修改汇联通distributorId 原参数aNId4A3X修改为orjuOND7

dev
袁野 2 days ago
parent 5c3338b868
commit 0bcc922a26
  1. 79
      cweb/src/main/java/com/cweb/controller/cms/CmsContentController.java
  2. 4
      service/src/main/java/com/hfkj/service/order/OrderCancelService.java
  3. 10
      service/src/main/java/com/hfkj/service/order/impl/BsOrderServiceImpl.java

@ -74,58 +74,35 @@ public class CmsContentController {
List<JdGoodsModel> goodsMsgs = new ArrayList<>();
if ( cmsContent.getShowType() != null && cmsContent.getShowType() == 1) {
if (cmsContent.getAutomatic() == 1) {
goodsMap.put("goodsType", cmsContent.getShowDataId());
if (cmsContent.getShowDataId() != null) {
cmsContent.setJumpUrl(cmsContent.getJumpUrl() + "&goodsType=" + cmsContent.getShowDataId());
}
} else {
cmsContent.setJumpUrl(cmsContent.getJumpUrl() + "&automaticCode=" + cmsContent.getId());
goodsMap.put("automaticCode" , cmsContent.getId());
}
goodsMap.put("limit" , 2);
goodsMsgs = goodsMsgService.getListCrest(goodsMap);
}
if (cmsContent.getShowType() != null && cmsContent.getShowType() == 2) {
if (cmsContent.getAutomatic() == 1) {
goodsMap.put("goodsType", cmsContent.getShowDataId());
if (cmsContent.getShowDataId() != null) {
cmsContent.setJumpUrl(cmsContent.getJumpUrl() + "&goodsType=" + cmsContent.getShowDataId());
}
} else {
cmsContent.setJumpUrl(cmsContent.getJumpUrl() + "&automaticCode=" + cmsContent.getId());
goodsMap.put("automaticCode" , cmsContent.getId());
}
goodsMap.put("limit" , 4);
goodsMap.put("saleNum" , 2);
goodsMsgs = goodsMsgService.getListCrest(goodsMap);
}
if (cmsContent.getShowType() != null && cmsContent.getShowType() == 3) {
if (cmsContent.getAutomatic() == 1) {
goodsMap.put("goodsType", cmsContent.getShowDataId());
if (cmsContent.getShowDataId() != null) {
cmsContent.setJumpUrl(cmsContent.getJumpUrl() + "&goodsType=" + cmsContent.getShowDataId());
}
} else {
cmsContent.setJumpUrl(cmsContent.getJumpUrl() + "&automaticCode=" + cmsContent.getId());
goodsMap.put("automaticCode" , cmsContent.getId());
}
goodsMap.put("limit" , 10);
goodsMap.put("type" , 1);
goodsMsgs = goodsMsgService.getListCrest(goodsMap);
}
if (cmsContent.getAutomatic() == 1) {
goodsMap.put("goodsType", cmsContent.getShowDataId());
if (cmsContent.getShowDataId() != null) {
cmsContent.setJumpUrl(cmsContent.getJumpUrl() + "&goodsType=" + cmsContent.getShowDataId());
}
} else {
cmsContent.setJumpUrl(cmsContent.getJumpUrl() + "&automaticCode=" + cmsContent.getId());
goodsMap.put("automaticCode" , cmsContent.getId());
if (cmsContent.getAutomatic() == 1) {
goodsMap.put("goodsType", cmsContent.getShowDataId());
if (cmsContent.getShowDataId() != null) {
cmsContent.setJumpUrl(cmsContent.getJumpUrl() + "&goodsType=" + cmsContent.getShowDataId());
}
} else {
cmsContent.setJumpUrl(cmsContent.getJumpUrl() + "&automaticCode=" + cmsContent.getId());
goodsMap.put("automaticCode" , cmsContent.getId());
}
if ( cmsContent.getShowType() != null && cmsContent.getShowType() == 1) {
goodsMap.put("limit" , 2);
goodsMsgs = goodsMsgService.getListCrest(goodsMap);
}
if (cmsContent.getShowType() != null && cmsContent.getShowType() == 2) {
goodsMap.put("limit" , 4);
goodsMap.put("saleNum" , 2);
goodsMsgs = goodsMsgService.getListCrest(goodsMap);
}
if (cmsContent.getShowType() != null && cmsContent.getShowType() == 3) {
goodsMap.put("limit" , 10);
goodsMap.put("type" , 1);
goodsMsgs = goodsMsgService.getListCrest(goodsMap);
}
goodsModels.addAll(goodsMsgs);

@ -70,11 +70,11 @@ public class OrderCancelService {
public void product(OrderChildModel orderChild) {
// 查询产品
GoodsMsg goodsMsg = goodsMsgService.queryDetail(orderChild.getProductId());
// 归库
goodsSpecsService.editStockNum(orderChild.getProductSpecId(), orderChild.getProductCount(), 1);
if (goodsMsg.getType() == 1) {
// 实物
} else if (goodsMsg.getType() == 2) {
// 归库
goodsSpecsService.editStockNum(orderChild.getProductSpecId(), orderChild.getProductCount(), 1);
// 虚拟商品
GoodsVpd vpd = goodsVpdService.queryDetailBySpecsId(orderChild.getProductSpecId());

@ -149,6 +149,13 @@ public class BsOrderServiceImpl implements BsOrderService {
/************** 处理业务 ***************/
for (OrderChildModel child : order.getOrderChildList()) {
// 查询规格
GoodsSpecs specs = goodsSpecsService.queryDetail(child.getProductSpecId());
// 校验商品购买是否超过库存
if (specs.getStock() < child.getProductCount()) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "商品库存不足!");
}
child.setOrderNo(order.getOrderNo());
// 子订单号 交易id + 线程随机数 + 4位随机数
child.setChildOrderNo(order.getId()+ IDGenerator.nextId(1) +RandomUtils.number(4, false));
@ -156,8 +163,7 @@ public class BsOrderServiceImpl implements BsOrderService {
if (child.getProductType().equals(OrderChildProductTypeEnum.type1.getCode())) {
child = orderCreateService.goods(order, child);
addressId = child.getAddressId();
// 查询规格
GoodsSpecs specs = goodsSpecsService.queryDetail(child.getProductSpecId());
if (specs.getThirdId() != null) {
skuInfo.setSkuId(Long.parseLong(specs.getThirdId()));
skuInfo.setSkuNum(child.getProductCount());

Loading…
Cancel
Save