From dd0833ef33804b7cf085b8c3c005e5788a3617d6 Mon Sep 17 00:00:00 2001
From: jyy <935090232@qq.com>
Date: Mon, 22 Mar 2021 17:10:38 +0800
Subject: [PATCH] 积分商城16
---
zq-erp/src/main/java/com/matrix/system/shopXcx/api/tools/WxShopOrderUtil.java | 27 ++++++++++++---------------
1 files changed, 12 insertions(+), 15 deletions(-)
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/tools/WxShopOrderUtil.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/tools/WxShopOrderUtil.java
index 7c9a66b..283da6a 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/tools/WxShopOrderUtil.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/tools/WxShopOrderUtil.java
@@ -1,16 +1,15 @@
package com.matrix.system.shopXcx.api.tools;
import com.matrix.system.common.bean.CustomerDataDictionary;
-import com.matrix.system.common.dao.CustomerDataDictionaryDao;
import com.matrix.biz.service.BizUserService;
import com.matrix.component.tools.WxTempLateMsgUtil;
import com.matrix.core.exception.GlobleException;
import com.matrix.core.tools.LogUtil;
import com.matrix.core.tools.StringUtils;
import com.matrix.system.common.constance.AppConstance;
-import com.matrix.system.shopXcx.api.pojo.AddShopOrderPOJO;
+import com.matrix.system.shopXcx.api.pojo.ShopOrderDto;
import com.matrix.system.shopXcx.api.pojo.OrderPostageInfoPOJO;
-import com.matrix.system.shopXcx.api.pojo.OrderProductSkuPOJO;
+import com.matrix.system.shopXcx.api.pojo.OrderItemDto;
import com.matrix.system.shopXcx.api.service.WxShopMemberDayService;
import com.matrix.system.shopXcx.bean.*;
import com.matrix.system.shopXcx.dao.*;
@@ -47,8 +46,6 @@
private WxShopMemberDayService wxShopMemberDayService;
@Autowired
private BizUserService bizUserService;
- @Autowired
- private ShopScoreRecordDao shopScoreRecordDao;
private SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy年MM月dd日");
@@ -95,12 +92,12 @@
/**
* 处理产品规格信息
- * @param addShopOrderPOJO
+ * @param shopOrderDto
*/
- public List<ShopOrderDetails> processProductSkuInfo(ShopOrder shopOrder, AddShopOrderPOJO addShopOrderPOJO,
+ public List<ShopOrderDetails> processProductSkuInfo(ShopOrder shopOrder, ShopOrderDto shopOrderDto,
ShopCoupon shopCoupon) {
List<ShopOrderDetails> resList = new ArrayList<>();
- List<OrderProductSkuPOJO> skuList = addShopOrderPOJO.getSkuList();
+ List<OrderItemDto> skuList = shopOrderDto.getOrderItemList();
if (CollectionUtils.isEmpty(skuList)) {
return resList;
}
@@ -108,9 +105,9 @@
//设置购买数量
int total = 0;
BigDecimal commodityMoney = new BigDecimal("0");
- for (OrderProductSkuPOJO orderProductSkuPOJO : skuList) {
- ids.add(orderProductSkuPOJO.getSkuId());
- total += orderProductSkuPOJO.getCount();
+ for (OrderItemDto orderItemDto : skuList) {
+ ids.add(orderItemDto.getSkuId());
+ total += orderItemDto.getCount();
}
shopOrder.setPurchaseQuantity(total);
List<ShopSku> contrastList = shopSkuDao.selectByIds(ids);
@@ -131,10 +128,10 @@
BigDecimal couponTotalMoney = new BigDecimal("0");
Double discountRate = wxShopMemberDayService.getMemberDay();
- for (OrderProductSkuPOJO orderProductSkuPOJO : skuList) {
+ for (OrderItemDto orderItemDto : skuList) {
boolean isExist = false;
for (ShopSku shopSku : contrastList) {
- if (shopSku.getId().equals(orderProductSkuPOJO.getSkuId())) {
+ if (shopSku.getId().equals(orderItemDto.getSkuId())) {
isExist = true;
ShopOrderDetails shopOrderDetails = new ShopOrderDetails();
shopOrderDetails.setCreateBy(AppConstance.SYSTEM_USER);
@@ -142,9 +139,9 @@
shopOrderDetails.setpId(shopSku.getPId());
shopOrderDetails.setsId(shopSku.getId());
shopOrderDetails.setPrice(shopSku.getPrice());
- shopOrderDetails.setCount(orderProductSkuPOJO.getCount());
+ shopOrderDetails.setCount(orderItemDto.getCount());
BigDecimal price = new BigDecimal(shopSku.getPrice().toString());
- BigDecimal count = new BigDecimal(orderProductSkuPOJO.getCount().toString());
+ BigDecimal count = new BigDecimal(orderItemDto.getCount().toString());
shopOrderDetails.setsTitle(shopSku.getName());
resList.add(shopOrderDetails);
--
Gitblit v1.9.1