|
@@ -1359,7 +1359,7 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
return ResponseJson.error("用户Id为空!", null);
|
|
|
}
|
|
|
CmReportingClub cmReportingClubById = cmReportingClubMapper.getCmReportingClubById(orderParamBo.getClubReportingId());
|
|
|
- if (orderParamBo.getUserIdentity() == 8&&null!=cmReportingClubById.orderStatus()) {
|
|
|
+ if (orderParamBo.getUserIdentity() == 8 && null != cmReportingClubById.orderStatus()) {
|
|
|
// 设置手动回滚事务
|
|
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
return ResponseJson.error("抱歉,该报备中已有人下单,暂无法下单!", null);
|
|
@@ -1376,9 +1376,9 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
//分销人员下单修改报备记录
|
|
|
if (orderParamBo.getUserIdentity() == 8) {
|
|
|
cmReportingClubMapper.updateCmReportingClub(new CmReportingClub()
|
|
|
- .id(orderParamBo.getClubReportingId())
|
|
|
- .orderId(mainOrder.getOrderId())
|
|
|
- .orderStatus(0)
|
|
|
+ .id(orderParamBo.getClubReportingId())
|
|
|
+ .orderId(mainOrder.getOrderId())
|
|
|
+ .orderStatus(0)
|
|
|
// .splitCode(cmReportingClubMapper.getDistributionSplitCode(cmReportingClubById.distributionId()))
|
|
|
);
|
|
|
}
|
|
@@ -1646,6 +1646,14 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
productService.savePurchasePrice(mainOrder, orderProduct, secondHandOrderFlag, "【提交订单】");
|
|
|
}
|
|
|
}
|
|
|
+ shopOrderList.forEach(f -> {
|
|
|
+ Integer accountType = submitMapper.findAccountType(f.getShopId());
|
|
|
+ if (1 == accountType) {
|
|
|
+ // 所有私账订单子订单利润算为付第三方采美中介费
|
|
|
+ Double profit = submitMapper.findCmProfit(f.getShopOrderId());
|
|
|
+ submitMapper.updateShopOrderOtherFee(profit, f.getShopOrderId());
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
/**
|
|
|
* 更新主订单的子订单Id信息,如:1000,1002
|
|
@@ -2275,7 +2283,7 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
// 该商品成本计算
|
|
|
if (null != SkuInfo) {
|
|
|
// 商品为固定成本
|
|
|
- if ( StringUtils.isNotBlank(SkuInfo.getCostCheckFlag()) && "1".equals(SkuInfo.getCostCheckFlag())) {
|
|
|
+ if (StringUtils.isNotBlank(SkuInfo.getCostCheckFlag()) && "1".equals(SkuInfo.getCostCheckFlag())) {
|
|
|
// 系统商城商品的成本之和
|
|
|
double sysProductPrice = MathUtil.add(SkuInfo.getCostPrice(), MathUtil.add(SkuInfo.getCmCostPrice(), SkuInfo.getOrganizeCostPrice())).doubleValue();
|
|
|
// 系统商品成本之和小于修改的价格,修改价格异常,不允许下单
|
|
@@ -2481,7 +2489,7 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
}
|
|
|
// 存在不修改商品价格异常商品,不可修改为该价格
|
|
|
if (isOrder.get()) {
|
|
|
- return ResponseJson.error(-1 , "订单商品价格修改异常", abnormalProductList);
|
|
|
+ return ResponseJson.error(-1, "订单商品价格修改异常", abnormalProductList);
|
|
|
}
|
|
|
|
|
|
// 佣金 采美应收
|
|
@@ -2601,7 +2609,7 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
return ResponseJson.error("发票类型不能为空!", null);
|
|
|
}
|
|
|
orderParamBo.setInvoiceType(invoiceType);
|
|
|
- // 联合丽格*/
|
|
|
+ // 联合丽格*/
|
|
|
if (1 == invoiceType || 2 == invoiceType) {
|
|
|
InvoicePo invoice = new InvoicePo();
|
|
|
String invoiceTitle = (String) orderInvoice.get("invoiceTitle");
|
|
@@ -2661,7 +2669,7 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
|
|
|
/**
|
|
|
* todo 协销下单, 联合丽格供应商帮机构下的那没有协销信息 协销取固定官方协销
|
|
|
- */
|
|
|
+ */
|
|
|
Integer spUserId = submitMapper.getServiceProviderUserId(1342);
|
|
|
if (null != spUserId && spUserId > 0) {
|
|
|
buyUserId = spUserId;
|
|
@@ -3412,6 +3420,14 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ shopOrderList.forEach(f -> {
|
|
|
+ Integer accountType = submitMapper.findAccountType(f.getShopId());
|
|
|
+ if (1 == accountType) {
|
|
|
+ // 所有私账订单子订单利润算为付第三方采美中介费
|
|
|
+ Double profit = submitMapper.findCmProfit(f.getShopOrderId());
|
|
|
+ submitMapper.updateShopOrderOtherFee(profit, f.getShopOrderId());
|
|
|
+ }
|
|
|
+ });
|
|
|
/**
|
|
|
* 更新主订单的子订单Id信息,如:1000,1002
|
|
|
*/
|
|
@@ -3470,7 +3486,7 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
// 保存 订单收货用户信息
|
|
|
submitMapper.insertOrderUserInfo(userInfo);
|
|
|
log.info("【提交订单】>>>>>>>>>>>>>>>>>>>>>>>>>>保存订单用户地址(insert[bp_order_userinfo])orderId:" + mainOrder.getOrderId());
|
|
|
- } catch ( Exception e) {
|
|
|
+ } catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
//设置手动回滚事务
|
|
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|