|
@@ -94,6 +94,7 @@ public class ShipServiceImpl implements ShipService {
|
|
|
private WeChatService weChatService;
|
|
|
@Resource
|
|
|
private ToolsFeign toolsFeign;
|
|
|
+
|
|
|
/**
|
|
|
* 供应商订单列表
|
|
|
*
|
|
@@ -140,94 +141,12 @@ public class ShipServiceImpl implements ShipService {
|
|
|
// 分页请求数据
|
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
|
List<SettlementVo> settlementList = shipMapper.getSettlementList(shopId, payStatus, shopOrderNo, name, beginTime, endTime, refundStatus);
|
|
|
- settlementList.forEach(settlement -> {
|
|
|
- if (null != settlement) {
|
|
|
- List<OrderProductVo> orderProductList = orderCommonMapper.getShopOrderProduct(settlement.getShopOrderId());
|
|
|
- settlement.setOrderProductList(orderProductList);
|
|
|
- }
|
|
|
- // 退款金额
|
|
|
- AtomicDouble refund = new AtomicDouble(0);
|
|
|
- // 付款手续费
|
|
|
- double procedureFee = 0d;
|
|
|
- // 付款记录
|
|
|
- List<DiscernReceiptVo> shopOrderRelation = shipMapper.getShopOrderRelation(settlement.getShopOrderId());
|
|
|
- for (DiscernReceiptVo discernReceipt : shopOrderRelation) {
|
|
|
- // 本次支付金额,单位/元
|
|
|
- double splitAmount = discernReceipt.getAssociateAmount();
|
|
|
- double payAmount;
|
|
|
- if (1 == discernReceipt.getPayWay()) {
|
|
|
- if (12 == discernReceipt.getPayType()) {
|
|
|
- // 网银支付
|
|
|
- payAmount = 10.00;
|
|
|
- } else if (17 == discernReceipt.getPayType()) {
|
|
|
- //b2c网银
|
|
|
- //b2c 0.2%
|
|
|
- payAmount = MathUtil.mul(splitAmount, 0.002, 2).doubleValue();
|
|
|
- //b2c最低手续费0.1
|
|
|
- if (payAmount < 0.1) {
|
|
|
- payAmount = 0.1;
|
|
|
- }
|
|
|
- } else if (8 == discernReceipt.getPayType() || 13 == discernReceipt.getPayType() || 15 == discernReceipt.getPayType()) {
|
|
|
- //微信0.65%手续费
|
|
|
- //微信0.65%
|
|
|
- payAmount = MathUtil.mul(splitAmount, 0.0065, 2).doubleValue();
|
|
|
- } else if (29 == discernReceipt.getPayType()) {
|
|
|
- //快捷支付 借记卡支付29,
|
|
|
-
|
|
|
- payAmount = MathUtil.mul(splitAmount, 0.003, 2).doubleValue();
|
|
|
- if (payAmount < 0.1) {
|
|
|
- payAmount = 0.1;
|
|
|
- }
|
|
|
- } else if (30 == discernReceipt.getPayType()) {
|
|
|
- //快捷支付 贷记卡支付30
|
|
|
- payAmount = MathUtil.mul(splitAmount, 0.006, 2).doubleValue();
|
|
|
- if (payAmount < 0.1) {
|
|
|
- payAmount = 0.1;
|
|
|
- }
|
|
|
- } else {
|
|
|
- //手续费 其他0.25%
|
|
|
- payAmount = MathUtil.mul(splitAmount, 0.0025, 2).doubleValue();
|
|
|
- }
|
|
|
- if (MathUtil.compare(payAmount, 0.01) <= 0) {
|
|
|
- payAmount = 0.01;
|
|
|
- }
|
|
|
- procedureFee = MathUtil.add(procedureFee, payAmount).doubleValue();
|
|
|
- }
|
|
|
- }
|
|
|
- // 退款记录
|
|
|
- List<CmReturnedPurchase> refundPurchase = shipMapper.getRefundPurchase(settlement.getShopOrderId());
|
|
|
- for (CmReturnedPurchase refundPur : refundPurchase) {
|
|
|
- refund.set(MathUtil.add(refund.get(), refundPur.getReturnedPurchaseFee()).doubleValue());
|
|
|
- }
|
|
|
- // 支付手续费
|
|
|
- settlement.setPaymentCommission(procedureFee);
|
|
|
- // 分帐记录
|
|
|
- Double splitAccount = shipMapper.getSplitAccount(settlement.getShopOrderId());
|
|
|
- // 分帐手续费
|
|
|
- settlement.setProrateCommission(MathUtil.mul(splitAccount, 0.001).doubleValue());
|
|
|
- // 总退款金额
|
|
|
- settlement.setRefundAmount(refund.get());
|
|
|
- });
|
|
|
+ settleListFunction(settlementList);
|
|
|
PageInfo<SettlementVo> pageInfo = new PageInfo(settlementList);
|
|
|
return ResponseJson.success(pageInfo);
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 导出excel
|
|
|
- *
|
|
|
- * @param shopId
|
|
|
- * @param payStatus
|
|
|
- * @param shopOrderNo
|
|
|
- * @param name
|
|
|
- * @param beginTime
|
|
|
- * @param endTime
|
|
|
- * @param refundStatus
|
|
|
- * @return
|
|
|
- */
|
|
|
- @Override
|
|
|
- public List<SettlementDto> exportExcel(Integer shopId, Integer payStatus, String shopOrderNo, String name, String beginTime, String endTime, Integer refundStatus) {
|
|
|
- List<SettlementVo> settlementList = shipMapper.getSettlementList(shopId, payStatus, shopOrderNo, name, beginTime, endTime, refundStatus);
|
|
|
- List<SettlementDto> settlementDtoList = new ArrayList<>();
|
|
|
+ private void settleListFunction(List<SettlementVo> settlementList) {
|
|
|
settlementList.forEach(settlement -> {
|
|
|
if (null != settlement) {
|
|
|
List<OrderProductVo> orderProductList = orderCommonMapper.getShopOrderProduct(settlement.getShopOrderId());
|
|
@@ -239,7 +158,7 @@ public class ShipServiceImpl implements ShipService {
|
|
|
double procedureFee = 0d;
|
|
|
// 付款记录
|
|
|
List<DiscernReceiptVo> shopOrderRelation = shipMapper.getShopOrderRelation(settlement.getShopOrderId());
|
|
|
- for (DiscernReceiptVo discernReceipt:shopOrderRelation) {
|
|
|
+ for (DiscernReceiptVo discernReceipt : shopOrderRelation) {
|
|
|
// 本次支付金额,单位/元
|
|
|
double splitAmount = discernReceipt.getAssociateAmount();
|
|
|
double payAmount;
|
|
@@ -260,19 +179,18 @@ public class ShipServiceImpl implements ShipService {
|
|
|
payAmount = MathUtil.mul(splitAmount, 0.0065, 2).doubleValue();
|
|
|
} else if (29 == discernReceipt.getPayType()) {
|
|
|
//快捷支付 借记卡支付29,
|
|
|
-
|
|
|
payAmount = MathUtil.mul(splitAmount, 0.003, 2).doubleValue();
|
|
|
if (payAmount < 0.1) {
|
|
|
payAmount = 0.1;
|
|
|
}
|
|
|
- }else if (30 == discernReceipt.getPayType()) {
|
|
|
+ } else if (30 == discernReceipt.getPayType()) {
|
|
|
//快捷支付 贷记卡支付30
|
|
|
payAmount = MathUtil.mul(splitAmount, 0.006, 2).doubleValue();
|
|
|
if (payAmount < 0.1) {
|
|
|
payAmount = 0.1;
|
|
|
}
|
|
|
} else {
|
|
|
- //手续费 其他0.25%
|
|
|
+ //手续费 支付宝0.25%
|
|
|
payAmount = MathUtil.mul(splitAmount, 0.0025, 2).doubleValue();
|
|
|
}
|
|
|
if (MathUtil.compare(payAmount, 0.01) <= 0) {
|
|
@@ -290,43 +208,40 @@ public class ShipServiceImpl implements ShipService {
|
|
|
// 分帐记录
|
|
|
Double splitAccount = shipMapper.getSplitAccount(settlement.getShopOrderId());
|
|
|
// 分帐手续费
|
|
|
- settlement.setProrateCommission(MathUtil.mul(splitAccount, 0.001).doubleValue());
|
|
|
+ Double splitCommission = MathUtil.mul(splitAccount, 0.001).doubleValue();
|
|
|
+ splitCommission = splitCommission <= 0 ? 0.01 : splitCommission;
|
|
|
+ settlement.setProrateCommission(splitCommission);
|
|
|
// 总退款金额
|
|
|
settlement.setRefundAmount(refund.get());
|
|
|
- // 设置返回数据
|
|
|
- SettlementDto lementDto = new SettlementDto();
|
|
|
- lementDto.setShopOrderNo(settlement.getShopOrderNo());
|
|
|
- lementDto.setOrderTime(settlement.getOrderTime());
|
|
|
- lementDto.setName(settlement.getName());
|
|
|
- if(settlement.getOrderProductList().size() > 0) {
|
|
|
+ if (settlement.getOrderProductList().size() > 0) {
|
|
|
String names = "";
|
|
|
for (OrderProductVo sett : settlement.getOrderProductList()) {
|
|
|
names = names + sett.getName();
|
|
|
}
|
|
|
- lementDto.setProductInfo(names);
|
|
|
- }
|
|
|
- lementDto.setTotalAmount(settlement.getTotalAmount());
|
|
|
- if (1 == settlement.getRefundStatus()) {
|
|
|
- lementDto.setRefundStatus("无退款");
|
|
|
- } else {
|
|
|
- lementDto.setRefundStatus("有退款");
|
|
|
+ settlement.setProductInfo(names);
|
|
|
}
|
|
|
- lementDto.setRefundAmount(settlement.getRefundAmount());
|
|
|
- lementDto.setPaymentCommission(settlement.getPaymentCommission());
|
|
|
- lementDto.setProrateCommission(settlement.getProrateCommission());
|
|
|
- if (1 == settlement.getSettlestatus()) {
|
|
|
- lementDto.setPayStatus("未结算");
|
|
|
- } else if (2 == settlement.getSettlestatus()){
|
|
|
- lementDto.setPayStatus("部分结算");
|
|
|
- } else {
|
|
|
- lementDto.setPayStatus("已结算");
|
|
|
- }
|
|
|
- lementDto.setShouldPayShopAmount(settlement.getShouldPayShopAmount());
|
|
|
- lementDto.setSettleAmount(settlement.getSettleAmount());
|
|
|
- lementDto.setUnsettledAmount(MathUtil.sub(settlement.getShouldPayShopAmount(), settlement.getSettleAmount()).doubleValue());
|
|
|
- settlementDtoList.add(lementDto);
|
|
|
+ settlement.setPaymentCommission(settlement.getPaymentCommission());
|
|
|
+ settlement.setProrateCommission(settlement.getProrateCommission());
|
|
|
});
|
|
|
- return settlementDtoList;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 导出excel
|
|
|
+ *
|
|
|
+ * @param shopId
|
|
|
+ * @param payStatus
|
|
|
+ * @param shopOrderNo
|
|
|
+ * @param name
|
|
|
+ * @param beginTime
|
|
|
+ * @param endTime
|
|
|
+ * @param refundStatus
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public List<SettlementVo> exportExcel(Integer shopId, Integer payStatus, String shopOrderNo, String name, String beginTime, String endTime, Integer refundStatus) {
|
|
|
+ List<SettlementVo> settlementList = shipMapper.getSettlementList(shopId, payStatus, shopOrderNo, name, beginTime, endTime, refundStatus);
|
|
|
+ settleListFunction(settlementList);
|
|
|
+ return settlementList;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -590,14 +505,14 @@ public class ShipServiceImpl implements ShipService {
|
|
|
logisticsInformation.setUpdateDate(date);
|
|
|
// 保存 物流跟踪信息
|
|
|
shipMapper.insertLogisticsInformation(logisticsInformation);
|
|
|
- if(2==shopOrder.getOrderType()){
|
|
|
+ if (2 == shopOrder.getOrderType()) {
|
|
|
String openId = baseMapper.getWechatHeheOpenId(shopOrder.getUserId());
|
|
|
//微信模板消息
|
|
|
- Map<String,Object> keyWords = new HashMap<>();
|
|
|
- keyWords.put("character_string3",shopOrder.getOrderNo());
|
|
|
- keyWords.put("time10",DateUtils.formatDate(date, "yyyy-MM-dd HH:mm"));
|
|
|
- keyWords.put("thing9",logisticsCompanyName);
|
|
|
- keyWords.put("character_string8",number);
|
|
|
+ Map<String, Object> keyWords = new HashMap<>();
|
|
|
+ keyWords.put("character_string3", shopOrder.getOrderNo());
|
|
|
+ keyWords.put("time10", DateUtils.formatDate(date, "yyyy-MM-dd HH:mm"));
|
|
|
+ keyWords.put("thing9", logisticsCompanyName);
|
|
|
+ keyWords.put("character_string8", number);
|
|
|
MessageModel<WechatTemplateMessage> wechatTemplateMessageMessageModel = new MessageModel<WechatTemplateMessage>()
|
|
|
.code(MessageType.WECHAT_TEMPLATE_MESSAGE)
|
|
|
.mqInfo(new MqInfo().topic("MessageLine").delay(3).async(1))
|
|
@@ -610,7 +525,7 @@ public class ShipServiceImpl implements ShipService {
|
|
|
.templateId("0Ruf-Ypu0Eahk0vY9orVN0-QqE0auk2N89LqjtGq4p8")
|
|
|
.mapKeyWords(keyWords)
|
|
|
.remark("您购买的商品已发货,收到货后请记得确认收货哟~")
|
|
|
- .pagePath("pages/views/order/order-detail?orderId="+shopOrder.getOrderId()));
|
|
|
+ .pagePath("pages/views/order/order-detail?orderId=" + shopOrder.getOrderId()));
|
|
|
toolsFeign.sendCommonMessage(wechatTemplateMessageMessageModel);
|
|
|
//站内信
|
|
|
MessageModel<InsideMessage> insideMessageMessageModel = new MessageModel<>();
|
|
@@ -681,11 +596,13 @@ public class ShipServiceImpl implements ShipService {
|
|
|
// }
|
|
|
// }
|
|
|
// }
|
|
|
- return ResponseJson.success(logisticsBatch.getId());
|
|
|
+ return ResponseJson.success(logisticsBatch.getId());
|
|
|
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* 修改主订单发货状态
|
|
|
+ *
|
|
|
* @param shopOrder 子订单
|
|
|
*/
|
|
|
private void setMainOrderStatus(ShopOrderVo shopOrder) {
|
|
@@ -789,7 +706,8 @@ public class ShipServiceImpl implements ShipService {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 设置 已发,已退,已取消发货数量
|
|
|
+ * 设置 已发,已退,已取消发货数量
|
|
|
+ *
|
|
|
* @param recordVo 发货记录
|
|
|
*/
|
|
|
private void setLogisticsRecordNum(LogisticsRecordVo recordVo) {
|
|
@@ -890,8 +808,8 @@ public class ShipServiceImpl implements ShipService {
|
|
|
* remark: 备注,
|
|
|
* remarkImage: 图片备注,
|
|
|
* logistics:[ // 物流信息
|
|
|
- * {number:'45646464646',logisticsCompanyName:'顺丰物流',logisticsCompanyCode:'物流英文代码'},
|
|
|
- * {number:'45646464646',logisticsCompanyName:'顺丰物流',logisticsCompanyCode:'物流英文代码'}
|
|
|
+ * {number:'45646464646',logisticsCompanyName:'顺丰物流',logisticsCompanyCode:'物流英文代码'},
|
|
|
+ * {number:'45646464646',logisticsCompanyName:'顺丰物流',logisticsCompanyCode:'物流英文代码'}
|
|
|
* ]
|
|
|
* }
|
|
|
*/
|
|
@@ -919,7 +837,7 @@ public class ShipServiceImpl implements ShipService {
|
|
|
return ResponseJson.error("添加物流参数异常!", null);
|
|
|
}
|
|
|
Date date = new Date();
|
|
|
- for (Object logisticObj: logistics) {
|
|
|
+ for (Object logisticObj : logistics) {
|
|
|
JSONObject logistic = (JSONObject) logisticObj;
|
|
|
String number = (String) logistic.get("number");
|
|
|
String logisticsCompanyName = (String) logistic.get("logisticsCompanyName");
|
|
@@ -931,7 +849,7 @@ public class ShipServiceImpl implements ShipService {
|
|
|
|
|
|
//推送信息中心-交易物流
|
|
|
String curDateStr = (new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")).format(date);
|
|
|
- MessageCenter messageCenter=new MessageCenter();
|
|
|
+ MessageCenter messageCenter = new MessageCenter();
|
|
|
messageCenter.setShopID(logisticsBatch.getShopId());
|
|
|
messageCenter.setClubID(null);
|
|
|
messageCenter.setUserType(2);
|
|
@@ -965,14 +883,15 @@ public class ShipServiceImpl implements ShipService {
|
|
|
|
|
|
/**
|
|
|
* 扫码添加物流
|
|
|
- * @param number 快递单号
|
|
|
- * @param mobile 收/寄件人的电话号码(顺丰必填)
|
|
|
+ *
|
|
|
+ * @param number 快递单号
|
|
|
+ * @param mobile 收/寄件人的电话号码(顺丰必填)
|
|
|
*/
|
|
|
@Override
|
|
|
public ResponseJson<CompanyVo> scanGetLogisticsInfo(String number, String mobile) {
|
|
|
String result = remoteCallService.getLogisticsByNumber(number, null, mobile);
|
|
|
String errorMsg = "查询失败!";
|
|
|
- if (StringUtils.isNotEmpty(result)){
|
|
|
+ if (StringUtils.isNotEmpty(result)) {
|
|
|
JSONObject resultJson = JSONObject.parseObject(result);
|
|
|
String comCode = resultJson.getString("com");
|
|
|
if (StringUtils.isNotEmpty(comCode)) {
|
|
@@ -1067,7 +986,7 @@ public class ShipServiceImpl implements ShipService {
|
|
|
calendar.add(Calendar.DATE, 3);
|
|
|
// 获取数据库已有分享码
|
|
|
OrderShareCodeVo orderCodeVo = shipMapper.getShipShareCode(null, shopOrderId);
|
|
|
- if (orderCodeVo != null && orderCodeVo.getExpiredTime().compareTo(date) >= 0 ) {
|
|
|
+ if (orderCodeVo != null && orderCodeVo.getExpiredTime().compareTo(date) >= 0) {
|
|
|
// 旧分享码还未过期,直接返回
|
|
|
return ResponseJson.success(orderCodeVo.getShareCode());
|
|
|
} else if (orderCodeVo != null) {
|
|
@@ -1107,7 +1026,7 @@ public class ShipServiceImpl implements ShipService {
|
|
|
public ResponseJson<Map<String, Object>> checkShipShareCode(Integer source, Integer shopOrderId, String shareCode, String code, String encryptedData, String iv, HttpHeaders headers) {
|
|
|
// 微信小程序授权登录(调用user服务,发送服务间调用POST请求)
|
|
|
String loginData = remoteCallService.appletsAuthorization(code, encryptedData, iv, headers);
|
|
|
- if (StringUtils.isEmpty(loginData)){
|
|
|
+ if (StringUtils.isEmpty(loginData)) {
|
|
|
return ResponseJson.error("微信授权登录异常!", null);
|
|
|
}
|
|
|
// 解析登录后得到 userIdentity, openId等
|
|
@@ -1212,18 +1131,18 @@ public class ShipServiceImpl implements ShipService {
|
|
|
* 保存商品资质
|
|
|
*
|
|
|
* @param jsonParamsDto params:[{
|
|
|
- * recordId: 商品发货记录id,
|
|
|
- * sn: sn码,
|
|
|
- * files: [{fileName:"文件名称",ossName:"oss文件名称"},{fileName:"文件名称",ossName:"oss文件名称"}...]
|
|
|
- * images: ["图片","图片",...]
|
|
|
- * }, {}]
|
|
|
+ * recordId: 商品发货记录id,
|
|
|
+ * sn: sn码,
|
|
|
+ * files: [{fileName:"文件名称",ossName:"oss文件名称"},{fileName:"文件名称",ossName:"oss文件名称"}...]
|
|
|
+ * images: ["图片","图片",...]
|
|
|
+ * }, {}]
|
|
|
*/
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
@Override
|
|
|
public ResponseJson<Void> saveProductQualification(JsonParamsDto jsonParamsDto) {
|
|
|
try {
|
|
|
JSONArray paramsArray = parseArray(jsonParamsDto.getParams());
|
|
|
- for (Object paramObj: paramsArray) {
|
|
|
+ for (Object paramObj : paramsArray) {
|
|
|
JSONObject jsonObject = (JSONObject) paramObj;
|
|
|
Integer recordId = jsonObject.getInteger("recordId");
|
|
|
String sn = jsonObject.getString("sn");
|
|
@@ -1233,7 +1152,7 @@ public class ShipServiceImpl implements ShipService {
|
|
|
if (!filesArray.isEmpty()) {
|
|
|
QualificationPo qualificationFile = new QualificationPo();
|
|
|
qualificationFile.setRecordId(recordId);
|
|
|
- for (Object fileObj: filesArray) {
|
|
|
+ for (Object fileObj : filesArray) {
|
|
|
JSONObject file = (JSONObject) fileObj;
|
|
|
qualificationFile.setFileName(file.getString("fileName"));
|
|
|
qualificationFile.setOssName(file.getString("ossName"));
|
|
@@ -1245,7 +1164,7 @@ public class ShipServiceImpl implements ShipService {
|
|
|
// 删除旧的资质图片
|
|
|
shipMapper.deleteQualificationImage(recordId);
|
|
|
if (!imagesArray.isEmpty()) {
|
|
|
- for (Object imageObj: imagesArray) {
|
|
|
+ for (Object imageObj : imagesArray) {
|
|
|
String image = String.valueOf(imageObj);
|
|
|
// 保存资质图片
|
|
|
shipMapper.insertQualificationImage(image, recordId);
|
|
@@ -1300,7 +1219,7 @@ public class ShipServiceImpl implements ShipService {
|
|
|
if (0 == wait - amount) {
|
|
|
status = 3;
|
|
|
//分销人员下单修改报备记录
|
|
|
- Integer identity = baseMapper.getUserIdentity(null,orderId, null);
|
|
|
+ Integer identity = baseMapper.getUserIdentity(null, orderId, null);
|
|
|
if (identity == 8) {
|
|
|
CmReportingClub byCmReportingClub = cmReportingClubMapper.getByCmReportingClub(new CmReportingClub()
|
|
|
.orderId(orderId)
|
|
@@ -1335,9 +1254,9 @@ public class ShipServiceImpl implements ShipService {
|
|
|
// 获取订单下子订单收款状态
|
|
|
List<Integer> receiptStatus = shipMapper.getReceiptStatus(orderId);
|
|
|
Integer sta = 1;
|
|
|
- if (receiptStatus.stream().allMatch(r -> r==3)) {
|
|
|
+ if (receiptStatus.stream().allMatch(r -> r == 3)) {
|
|
|
sta = 3;
|
|
|
- } else if (receiptStatus.stream().allMatch(r -> r==1)) {
|
|
|
+ } else if (receiptStatus.stream().allMatch(r -> r == 1)) {
|
|
|
sta = 1;
|
|
|
} else {
|
|
|
sta = 2;
|
|
@@ -1539,14 +1458,14 @@ public class ShipServiceImpl implements ShipService {
|
|
|
// 过滤保存已上架商品
|
|
|
List<CartItemVo> productList = shipMapper.getProductsOrganize(shop.getShopId(), organizeId, finalIdList, shop.getSplitCode());
|
|
|
// 设置该商品购买数量
|
|
|
- productList.forEach( p -> {
|
|
|
+ productList.forEach(p -> {
|
|
|
CmOrganizeSkuPo organizeSkuInfo = shipMapper.getOrganizeSkuInfo(p.getSkuId(), organizeId);
|
|
|
//前端传入修改后商品的价格
|
|
|
double price = productPriceInfos.get(p.getSkuId().toString());
|
|
|
// 该商品成本计算
|
|
|
if (null != organizeSkuInfo) {
|
|
|
// 商品为固定成本
|
|
|
- if ( StringUtils.isNotBlank(organizeSkuInfo.getCostCheckFlag()) && "1".equals(organizeSkuInfo.getCostCheckFlag())) {
|
|
|
+ if (StringUtils.isNotBlank(organizeSkuInfo.getCostCheckFlag()) && "1".equals(organizeSkuInfo.getCostCheckFlag())) {
|
|
|
// 系统商城商品的成本之和
|
|
|
double sysProductPrice = MathUtil.add(organizeSkuInfo.getCostPrice(), MathUtil.add(organizeSkuInfo.getCmCostPrice(), organizeSkuInfo.getOrganizeCostPrice())).doubleValue();
|
|
|
// 系统商品成本之和小于修改的价格,修改价格异常,不允许下单
|
|
@@ -1607,7 +1526,7 @@ public class ShipServiceImpl implements ShipService {
|
|
|
} else {
|
|
|
Double postage = (Double) postageMap.get("postage");
|
|
|
shopPostage.set(MathUtil.add(shopPostage.get(), postage).doubleValue());
|
|
|
- log.info("shopPostage.get()======"+shopPostage.get());
|
|
|
+ log.info("shopPostage.get()======" + shopPostage.get());
|
|
|
}
|
|
|
}
|
|
|
// 该供应商下商品种类 +1
|
|
@@ -1634,9 +1553,9 @@ public class ShipServiceImpl implements ShipService {
|
|
|
} else {
|
|
|
shop.setIsColdChina(false);
|
|
|
}
|
|
|
- log.info("shop.getPostage()******"+shop.getPostage());
|
|
|
+ log.info("shop.getPostage()******" + shop.getPostage());
|
|
|
// 供应商总金额
|
|
|
- shopPrice.set(MathUtil.add(MathUtil.add(shopPrice.get(), shop.getPostage()),coldChain).doubleValue());
|
|
|
+ shopPrice.set(MathUtil.add(MathUtil.add(shopPrice.get(), shop.getPostage()), coldChain).doubleValue());
|
|
|
if (shopKindCount.get() > 0) {
|
|
|
// 供应商商品
|
|
|
shop.setCartList(productList);
|
|
@@ -1684,7 +1603,7 @@ public class ShipServiceImpl implements ShipService {
|
|
|
// 联合丽格冷链费
|
|
|
double coldChain = 0.00d;
|
|
|
if (null != totalProductList) {
|
|
|
- for (CartItemVo cart :totalProductList) {
|
|
|
+ for (CartItemVo cart : totalProductList) {
|
|
|
if (7881 == cart.getProductId()) {
|
|
|
if (cart.getNumber() >= 100) {
|
|
|
coldChain = 0.00d;
|
|
@@ -1736,5 +1655,5 @@ public class ShipServiceImpl implements ShipService {
|
|
|
log.info("【删除订单】>>>>>>>>>逻辑删除主订单(update[cm_order])orderId:" + shopOrder.getOrderId());
|
|
|
}
|
|
|
return ResponseJson.success("订单取消成功", null);
|
|
|
- }
|
|
|
+ }
|
|
|
}
|