|
@@ -11,6 +11,7 @@ import com.caimei365.order.model.dto.SubmitDto;
|
|
|
import com.caimei365.order.model.bo.OrderUserBo;
|
|
|
import com.caimei365.order.model.po.InvoicePo;
|
|
|
import com.caimei365.order.model.po.OrderPo;
|
|
|
+import com.caimei365.order.model.po.ShopOrderPo;
|
|
|
import com.caimei365.order.model.vo.*;
|
|
|
import com.caimei365.order.service.SubmitService;
|
|
|
import com.caimei365.order.utils.CodeUtil;
|
|
@@ -122,13 +123,13 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
log.error("订单参数解析异常try-catch:", e);
|
|
|
return ResponseJson.error("订单参数解析异常!", null);
|
|
|
}
|
|
|
- if (null == orderInfo){
|
|
|
+ if (null == orderInfo || orderInfo.isEmpty()){
|
|
|
return ResponseJson.error("订单商品数据异常!", null);
|
|
|
}
|
|
|
- if (null == payInfo){
|
|
|
+ if (null == payInfo || payInfo.isEmpty()){
|
|
|
return ResponseJson.error("订单金额数据异常!", null);
|
|
|
}
|
|
|
- if (null == orderInvoice){
|
|
|
+ if (null == orderInvoice || orderInvoice.isEmpty()){
|
|
|
return ResponseJson.error("发票信息数据异常!", null);
|
|
|
}
|
|
|
// 打印参数
|
|
@@ -219,15 +220,9 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
}
|
|
|
orderUserBo.setBuyUserId(buyUserId);
|
|
|
orderUserBo.setAddressId(submitDto.getAddressId());
|
|
|
-
|
|
|
-
|
|
|
-// * "unionId":"", //微信unionId
|
|
|
-// * "cartType":3, //购买类型:(1自主下单, 3协销下单)
|
|
|
-// * "serviceProviderId": 1378, //协销ID(小程序忽略)
|
|
|
-// * "clubUserId": 10708, //机构用户ID
|
|
|
-// * "addressId": 2732, //地址ID
|
|
|
-
|
|
|
-
|
|
|
+ /*
|
|
|
+ * 保存订单
|
|
|
+ */
|
|
|
return saveOrder(orderUserBo);
|
|
|
}
|
|
|
|
|
@@ -262,8 +257,6 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
mainOrder.setOrderSubmitType(3);
|
|
|
// 订单未确认
|
|
|
mainOrder.setConfirmFlag(0);
|
|
|
- // 协销Id
|
|
|
- mainOrder.setServiceProviderId(orderUserBo.getBuyUserId());
|
|
|
} else {
|
|
|
// 普通订单
|
|
|
mainOrder.setOrderType(1);
|
|
@@ -487,6 +480,7 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
promotions.getProductList().add(promotionPrice);
|
|
|
if (!promotionsIds.contains(promotions.getId())) {
|
|
|
promotionsIds.add(promotions.getId());
|
|
|
+ promotions.setPromotionsId(promotions.getId());
|
|
|
promotionList.add(promotions);
|
|
|
} else {
|
|
|
promotionList.forEach(promotionsTemp -> {
|
|
@@ -495,6 +489,7 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+ product.setOrderPromotionsId(promotions.getId());
|
|
|
}
|
|
|
}
|
|
|
// 统计商品总金额
|
|
@@ -545,6 +540,9 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
productIdList.add(product.getProductId().toString());
|
|
|
}
|
|
|
}
|
|
|
+ if (orderProductList.size()==0){
|
|
|
+ return ResponseJson.error("订单商品数据异常!", null);
|
|
|
+ }
|
|
|
// 设置是否是二手订单
|
|
|
if (secondHandOrderFlag) {
|
|
|
mainOrder.setSecondHandOrderFlag(1);
|
|
@@ -595,6 +593,8 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
/*
|
|
|
* 发票信息
|
|
|
*/
|
|
|
+ boolean hasInvoiceFlag = false;
|
|
|
+ InvoicePo invoice = new InvoicePo();
|
|
|
mainOrder.setInvoiceFlag(orderUserBo.getInvoiceType());
|
|
|
// 发票类型 0不开发票 1普通发票 2增值税发票
|
|
|
if (1== orderUserBo.getInvoiceType() || 2 == orderUserBo.getInvoiceType()){
|
|
@@ -608,7 +608,6 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
if (StringUtils.isNotEmpty(corporationTaxNum)){
|
|
|
return ResponseJson.error("纳税人识别号信息不正确!", null);
|
|
|
}
|
|
|
- InvoicePo invoice = new InvoicePo();
|
|
|
invoice.setType(invoiceType);
|
|
|
invoice.setInvoiceTitle(invoiceTitle);
|
|
|
invoice.setCorporationTaxNum(corporationTaxNum);
|
|
@@ -621,6 +620,7 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
}
|
|
|
invoice.setInvoiceContent(invoiceContent);
|
|
|
invoice.setInvoiceTitleType(invoiceTitleType);
|
|
|
+ hasInvoiceFlag = true;
|
|
|
}
|
|
|
if (2== orderUserBo.getInvoiceType()) {
|
|
|
// 增值税发票:发票类型、发票、抬头(公司名称)、纳税人识别号、注册地址、注册电话、开户银行、开户银行账户
|
|
@@ -635,6 +635,7 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
invoice.setRegisteredPhone(registeredPhone);
|
|
|
invoice.setOpenBank(openBank);
|
|
|
invoice.setBankAccountNo(bankAccountNo);
|
|
|
+ hasInvoiceFlag = true;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -683,6 +684,7 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
mainOrder.setStatus(11);
|
|
|
mainOrder.setConfirmTime(curDateStr);
|
|
|
}
|
|
|
+
|
|
|
// 是否完成支付(默认不是,只有余额抵扣才算)
|
|
|
boolean isPaySuccessFlag = false;
|
|
|
// 余额支付标识,0不使用,1使用
|
|
@@ -717,103 +719,138 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
mainOrder.setPayFlag(1);
|
|
|
isPaySuccessFlag = true;
|
|
|
}
|
|
|
+ // 抵扣后更新用户余额
|
|
|
+ submitMapper.updateUserMoney(lastUserMoney, lastAbleUserMoney, orderUserBo.getUserId());
|
|
|
+ log.info("【提交订单】>>>>>更新用户余额,抵扣后剩余:[userMoney:" + lastUserMoney + "] ,ableUserMoney:" + lastAbleUserMoney);
|
|
|
+ // 支付时间
|
|
|
+ mainOrder.setPayTime(curDateStr);
|
|
|
+ }
|
|
|
+ // 余额支付金额
|
|
|
+ mainOrder.setBalancePayFee(balancePayFee.get());
|
|
|
+ // 实际支付金额(商品金额+运费-余额抵扣)
|
|
|
+ mainOrder.setPayableAmount(payableAmount.get());
|
|
|
+
|
|
|
+ // 是否返佣订单
|
|
|
+ Integer rebateFlag = (null == orderUserBo.getRebateFlag() ? 0 : orderUserBo.getRebateFlag());
|
|
|
+ mainOrder.setRebateFlag(rebateFlag);
|
|
|
+
|
|
|
+ // 判断前端传入orderShouldPayFee订单应付金额,和后台计算应付金额对比
|
|
|
+ log.info("【提交订单】>>>>>后台计算payableAmount:" + payableAmount.get() + " ,前端传入orderShouldPayFee:" + orderUserBo.getOrderShouldPayFee());
|
|
|
+ // compare return[-1:v1<v2, 0:v1=v2, 1:v1>v2]
|
|
|
+ int compare = MathUtil.compare(orderUserBo.getOrderShouldPayFee(), payableAmount.get());
|
|
|
+ if (compare != 0) {
|
|
|
+ // 设置手动回滚事务
|
|
|
+ TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
+ return ResponseJson.error("订单付款金额不正确!", null);
|
|
|
+ }
|
|
|
|
|
|
+ // 售后条款
|
|
|
+ Integer clauseId = orderUserBo.getClauseId();
|
|
|
+ String clauseName = null;
|
|
|
+ if (null != clauseId) {
|
|
|
+ clauseName = submitMapper.getClauseNameById(clauseId);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(clauseName)) {
|
|
|
+ mainOrder.setClauseId(clauseId);
|
|
|
+ mainOrder.setClauseName(clauseName);
|
|
|
+ } else {
|
|
|
+ mainOrder.setClauseId(1);
|
|
|
+ mainOrder.setClauseName("无条款");
|
|
|
+ }
|
|
|
|
|
|
+ /*
|
|
|
+ * 保存主订单数据
|
|
|
+ */
|
|
|
+ submitMapper.insertMainOrder(mainOrder);
|
|
|
+ log.info("【提交订单】>>>>>>>>>>>>>>>>>>>>>>>>>>新增主订单(insert[cm_order])orderId:" + mainOrder.getOrderId());
|
|
|
|
|
|
+ /*
|
|
|
+ * 保存订单促销
|
|
|
+ */
|
|
|
+ promotionList.forEach(promotions -> {
|
|
|
+ promotions.setOrderId(mainOrder.getOrderId());
|
|
|
+ submitMapper.insertOrderPromotions(promotions);
|
|
|
+ log.info("【提交订单】>>>>>>>>>>>>>>>>>>>>>>>>>>新增订单促销活动(insert[cm_promotions_order])id:" + promotions.getId());
|
|
|
+ });
|
|
|
|
|
|
+ /*
|
|
|
+ * 保存订单发票信息
|
|
|
+ */
|
|
|
+ if (hasInvoiceFlag) {
|
|
|
+ // 开发票才保存
|
|
|
+ invoice.setOrderId(mainOrder.getOrderId());
|
|
|
+ // 一个订单只有一条发票信息,删除老的订单增值税信息
|
|
|
+ submitMapper.deleteOrderInvoiceByOrderId(mainOrder.getOrderId());
|
|
|
+ // 保存 订单发票信息
|
|
|
+ submitMapper.insertOrderInvoice(invoice);
|
|
|
+ log.info("【提交订单】>>>>>>>>>>>>>>>>>>>>>>>>>>保存订单发票信息(insert[bp_order_invoice])orderId:" + mainOrder.getOrderId());
|
|
|
|
|
|
-// userDao.updateMoney(user.getUserMoney(), user.getAbleUserMoney(), user.getUserID());
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-// log.info(">>>>>更新余额抵扣:[userMoney:" + user.getUserMoney() + "] ,ableUserMoney:" + user.getAbleUserMoney());
|
|
|
-// // 支付时间
|
|
|
-// mainOrder.setPayTime(curDateStr);
|
|
|
+ }
|
|
|
|
|
|
+ /*
|
|
|
+ * 整理 子订单信息
|
|
|
+ */
|
|
|
+ // 收集子订单供应商ID字符串
|
|
|
+ String shopOrderIds = "";
|
|
|
+ for (Object infoObject: orderInfo) {
|
|
|
+ JSONObject shopInfo = (JSONObject) infoObject;
|
|
|
+ Integer shopId = (Integer) shopInfo.get("shopId");
|
|
|
+ String shopNote = (String) shopInfo.get("note");
|
|
|
+ // 初始化子订单信息
|
|
|
+ ShopOrderPo shopOrder = new ShopOrderPo();
|
|
|
+ shopOrder.setShopId(shopId);
|
|
|
+ shopOrder.setNote(shopNote);
|
|
|
+ shopOrder.setOrderId(mainOrder.getOrderId());
|
|
|
+ shopOrder.setOrderNo(mainOrder.getOrderNo());
|
|
|
+ shopOrder.setClubId(mainOrder.getClubId());
|
|
|
+ // 子订单设值并 保存
|
|
|
+ //saveShopOrder(shopOrder, orderProductList, promotionList);
|
|
|
+ // 记录子订单编号
|
|
|
+ shopOrderIds = (StringUtils.isEmpty(shopOrderIds) ? ""+shopOrder.getShopOrderId() : ","+shopOrder.getShopOrderId());
|
|
|
+ // 设置订单商品订单号
|
|
|
+// for (ProductBo orderProduct : orderProductList) {
|
|
|
+// if (shopId.equals(orderProduct.getShopId())) {
|
|
|
+// orderProduct.setShopOrderId(shopOrder.getShopOrderId());
|
|
|
+// orderProduct.setShopOrderNo(shopOrder.getShopOrderNo());
|
|
|
+// orderProduct.setOrderId(mainOrder.getOrderId());
|
|
|
+// orderProduct.setOrderNo(mainOrder.getOrderNo());
|
|
|
+// if (null != orderProduct.getOrderPromotionsId()) {
|
|
|
+// promotionList.forEach(promotions -> {
|
|
|
+// if (orderProduct.getOrderPromotionsId().equals(promotions.getPromotionsId())){
|
|
|
+// orderProduct.setOrderPromotionsId(promotions.getId());
|
|
|
+// }
|
|
|
+// });
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
|
|
|
+ }
|
|
|
|
|
|
+ /*
|
|
|
+ * 设置邮费子订单
|
|
|
+ */
|
|
|
+ if (1 == mainOrder.getFreePostFlag()) {
|
|
|
+ //Integer postageOrderId = setPostageOrder(mainOrder, shopOrderIds, orderInfo.size());
|
|
|
+ // 记录子订单编号
|
|
|
+ //shopOrderIds = (StringUtils.isEmpty(shopOrderIds) ? ""+postageOrderId : ","+postageOrderId);
|
|
|
+ }
|
|
|
|
|
|
+ /*
|
|
|
+ * 更新主订单的子订单Id信息,如:1000,1002
|
|
|
+ */
|
|
|
+ if (StringUtils.isNotEmpty(shopOrderIds)) {
|
|
|
+ mainOrder.setShopOrderIds(shopOrderIds);
|
|
|
+ //submitMapper.updateShopOrderIds(shopOrderIds, mainOrder.getOrderId());
|
|
|
+ } else {
|
|
|
+ // 设置手动回滚事务
|
|
|
+ TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
+ return ResponseJson.error("生成子订单异常!", null);
|
|
|
}
|
|
|
-// // 余额支付金额
|
|
|
-// mainOrder.setBalancePayFee(balancePayFee);
|
|
|
-// // 实际支付金额(商品金额+运费-余额抵扣)
|
|
|
-// mainOrder.setPayableAmount(payableAmount);
|
|
|
-// // 售后条款
|
|
|
-// if (payInfo.get("clauseId") != null) {
|
|
|
-// ClauseVo clauseById = sellerDao.findClauseById(Integer.parseInt(payInfo.get("clauseId").toString()));
|
|
|
-// if (clauseById != null) {
|
|
|
-// mainOrder.setClauseID(Long.parseLong(payInfo.get("clauseId").toString()));
|
|
|
-// mainOrder.setClauseName(clauseById.getName());
|
|
|
-// } else {
|
|
|
-// mainOrder.setClauseID(1L);
|
|
|
-// mainOrder.setClauseName("无条款");
|
|
|
-// }
|
|
|
-// } else {
|
|
|
-// mainOrder.setClauseID(1L);
|
|
|
-// mainOrder.setClauseName("无条款");
|
|
|
-// }
|
|
|
-// // 是否返佣订单
|
|
|
-// mainOrder.setRebateFlag(payInfo.get("rebateFlag") == null ? "0" : payInfo.get("rebateFlag").toString());
|
|
|
-// // 判断前端传入orderShouldPayFee订单应付金额,和后台计算应付金额对比
|
|
|
-// BigDecimal orderShouldPayFee = new BigDecimal(payInfo.get("orderShouldPayFee").toString());
|
|
|
-// double v = MathUtil.sub(payableAmount, orderShouldPayFee).doubleValue();
|
|
|
-// log.info(">>>>>payableAmount:" + payableAmount + " ,orderShouldPayFee:" + orderShouldPayFee);
|
|
|
-// // 考虑前端计算不精确
|
|
|
-// if (v < -0.1d || v > 0.1d) {
|
|
|
-// // 设置手动回滚事务
|
|
|
-// TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
-// return JsonModel.newInstance().error(-1, "订单付款金额异常");
|
|
|
-// }
|
|
|
-//
|
|
|
-// /*
|
|
|
-// * 保存主订单数据
|
|
|
-// */
|
|
|
-// orderSubmitDao.insertSelective(mainOrder);
|
|
|
-// log.info(">>>>>>>>>>>>>>>>>>>>>>>>>>新增主订单(insert[cm_order])orderId:" + mainOrder.getOrderID());
|
|
|
-//
|
|
|
-// //设置订单促销订单号,并保存
|
|
|
-// promotionsList.forEach(promotions -> {
|
|
|
-// promotions.setOrderId(mainOrder.getOrderID().intValue());
|
|
|
-// orderSubmitDao.insertOrderPromotions(promotions);
|
|
|
-// log.info(">>>>>>>>>>>>>>>>>>>>>>>>>>新增订单促销活动(insert[cm_promotions_order])id:" + promotions.getId());
|
|
|
-// });
|
|
|
-//
|
|
|
-// /*
|
|
|
-// * 设置订单商品订单号
|
|
|
-// */
|
|
|
-// for (OrderProductVo orderProduct : orderProductList) {
|
|
|
-// orderProduct.setOrderID(mainOrder.getOrderID());
|
|
|
-// orderProduct.setOrderNo(mainOrder.getOrderNo());
|
|
|
-// PromotionsVo promotions = promotionsDao.getPromotionsByProductId(orderProduct.getProductID());
|
|
|
-// if (promotions != null) {
|
|
|
-// PromotionsVo promotionsVo = promotionsDao.findOrderPromotions(orderProduct.getOrderID(), promotions.getId());
|
|
|
-// if (promotionsVo != null) {
|
|
|
-// orderProduct.setOrderPromotionsId(promotionsVo.getId());
|
|
|
-// }
|
|
|
-//
|
|
|
-// }
|
|
|
-// }
|
|
|
-//
|
|
|
-// /*
|
|
|
-// * 整理 子订单信息
|
|
|
-// */
|
|
|
-// // 收集子订单供应商ID字符串
|
|
|
-// String shopOrderIds = "";
|
|
|
-// for (Map<String, Object> shopOrderInfo : orderInfo) {
|
|
|
-// Integer shopId = (Integer) shopOrderInfo.get("shopId");
|
|
|
-// String shopNote = (String) shopOrderInfo.get("note");
|
|
|
-// // 初始化子订单信息
|
|
|
-// ShopOrderVo shopOrder = saveShopOrder(mainOrder, orderProductList, shopId, shopNote);
|
|
|
-// // 保存子订单号
|
|
|
-// shopOrderIds += (("".equals(shopOrderIds) ? "" : ",") + shopOrder.getShopOrderID());
|
|
|
-// // 设置订单商品子订单号
|
|
|
-// for (OrderProductVo orderProduct : orderProductList) {
|
|
|
-// if (shopId.longValue() == orderProduct.getShopID()) {
|
|
|
-// orderProduct.setShopOrderID(shopOrder.getShopOrderID());
|
|
|
-// orderProduct.setShopOrderNo(shopOrder.getShopOrderNo());
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
// /*
|
|
|
// * 保存订单商品
|
|
|
// */
|
|
@@ -844,16 +881,7 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
// });
|
|
|
// }
|
|
|
//
|
|
|
-// /*
|
|
|
-// * 设置邮费子订单
|
|
|
-// */
|
|
|
-// if ("1".equals(mainOrder.getFreePostFlag())) {
|
|
|
-// shopOrderIds = setPostFeeShopOrder(mainOrder, shopOrderIds, orderInfo.size());
|
|
|
-// }
|
|
|
-//
|
|
|
-// // 更新主订单信息, 子订单ID:1000,1002
|
|
|
-// mainOrder.setShopOrderIDs(shopOrderIds);
|
|
|
-// orderSubmitDao.updateSelective(mainOrder);
|
|
|
+
|
|
|
//
|
|
|
// /*
|
|
|
// * 保存 订单用户地址
|
|
@@ -861,7 +889,7 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
// if (null != address) {
|
|
|
// //保存地址信息
|
|
|
// UserinfoVo userInfo = new UserinfoVo();
|
|
|
-// userInfo.setOrderId(mainOrder.getOrderID());
|
|
|
+// userInfo.setOrderId(mainOrder.getOrderId());
|
|
|
// userInfo.setClubId(user.getClubID().longValue());
|
|
|
// userInfo.setUserId(user.getUserID().longValue());
|
|
|
// userInfo.setName(user.getName() == null ? user.getUserName() : user.getName());
|
|
@@ -875,7 +903,7 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
// userInfo.setTown(address.getTown());
|
|
|
// userInfo.setAddress(address.getAddress());
|
|
|
// orderSubmitDao.insertUserInfo(userInfo);
|
|
|
-// log.info(">>>>>>>>>>>>>>>>>>>>>>>>>>保存订单用户地址(insert[bp_order_userinfo])orderId:" + mainOrder.getOrderID());
|
|
|
+// log.info(">>>>>>>>>>>>>>>>>>>>>>>>>>保存订单用户地址(insert[bp_order_userinfo])orderId:" + mainOrder.getOrderId());
|
|
|
// } else {
|
|
|
// //设置手动回滚事务
|
|
|
// TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
@@ -887,31 +915,14 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
// */
|
|
|
// if (1 == balancePayFlag && MathUtil.compare(balancePayFee, 0) > 0) {
|
|
|
// // 余额支付标识,0不使用,1使用
|
|
|
-// saveBalanceRecord(balancePayFee, mainOrder.getOrderID().intValue(), user.getUserID());
|
|
|
+// saveBalanceRecord(balancePayFee, mainOrder.getOrderId().intValue(), user.getUserID());
|
|
|
// //保存余额到收款记录
|
|
|
// if (cartType != 3) {
|
|
|
-// saveDiscernReceipt(balancePayFee, mainOrder.getOrderID().intValue());
|
|
|
+// saveDiscernReceipt(balancePayFee, mainOrder.getOrderId().intValue());
|
|
|
// }
|
|
|
// }
|
|
|
//
|
|
|
-// /*
|
|
|
-// * 保存 订单发票信息
|
|
|
-// */
|
|
|
-// if (invoiceFlag) {
|
|
|
-// // 开发票才保存
|
|
|
-// invoice.setOrderId(mainOrder.getOrderID());
|
|
|
-// // 查询是否存在老的增值税信息
|
|
|
-// OrderInvoiceVo userInvoice = orderDao.getOrderInvoice(mainOrder.getOrderID().intValue());
|
|
|
-// if (null != userInvoice) {
|
|
|
-// // 更新 发票信息
|
|
|
-// orderSubmitDao.updateOrderInvoice(invoice);
|
|
|
-// log.info(">>>>>>>>>>>>>>>>>>>>>>>>>>更新发票信息(update[bp_order_invoice])orderId:" + mainOrder.getOrderID());
|
|
|
-// } else {
|
|
|
-// // 保存 发票信息
|
|
|
-// orderSubmitDao.insertOrderInvoice(invoice);
|
|
|
-// log.info(">>>>>>>>>>>>>>>>>>>>>>>>>>新增发票信息(insert[bp_order_invoice])orderId:" + mainOrder.getOrderID());
|
|
|
-// }
|
|
|
-// }
|
|
|
+
|
|
|
//
|
|
|
// /*
|
|
|
// * pc商城提交订单,保存更新用户增值税发票
|
|
@@ -934,7 +945,7 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
// if (userBeans > 0) {
|
|
|
// UserBeansHistoryPo beansHistory = new UserBeansHistoryPo();
|
|
|
// beansHistory.setUserId(user.getUserID());
|
|
|
-// beansHistory.setOrderId(mainOrder.getOrderID().intValue());
|
|
|
+// beansHistory.setOrderId(mainOrder.getOrderId().intValue());
|
|
|
// beansHistory.setBeansType(10);
|
|
|
// beansHistory.setType(2);
|
|
|
// beansHistory.setNum(userBeans);
|
|
@@ -950,9 +961,9 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
// * 构造返回参数
|
|
|
// */
|
|
|
// Map<String, String> info = new HashMap<>();
|
|
|
-// info.put("orderID", String.valueOf(mainOrder.getOrderID()));
|
|
|
+// info.put("orderID", String.valueOf(mainOrder.getOrderId()));
|
|
|
// info.put("orderNo", String.valueOf(mainOrder.getOrderNo()));
|
|
|
-// info.put("orderMark", "#" + mainOrder.getOrderID() + "#");
|
|
|
+// info.put("orderMark", "#" + mainOrder.getOrderId() + "#");
|
|
|
// //应付订单金额
|
|
|
// info.put("payTotalFee", String.valueOf(mainOrder.getPayTotalFee()));
|
|
|
// //真实需要付款金额
|
|
@@ -960,7 +971,7 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
//
|
|
|
// //下单推送
|
|
|
// if (org.apache.commons.lang.StringUtils.isNotBlank(user.getBindMobile())) {
|
|
|
-// String shortLink = orderPushService.getShortLink(8, 3, domain + "/user/mainOrder/detail.html?orderId=" + mainOrder.getOrderID());
|
|
|
+// String shortLink = orderPushService.getShortLink(8, 3, domain + "/user/mainOrder/detail.html?orderId=" + mainOrder.getOrderId());
|
|
|
// String name = productName.toString();
|
|
|
// if (name.length() > 10) {
|
|
|
// name = name.substring(0, 10);
|
|
@@ -969,7 +980,7 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
// "您可关注采美公众号或者访问采美微信小程序和网站查看并支付订单。平台公众号:微信搜索“采美365网”; 微信小程序:微信搜索“采美采购商城”;网址:www.caimei365.com/t/" + shortLink;
|
|
|
// boolean sendSms = orderPushService.getSendSms(3, user.getBindMobile(), content);
|
|
|
// if (!sendSms) {
|
|
|
-// log.info("下单推送失败,orderId>>>>" + mainOrder.getOrderID());
|
|
|
+// log.info("下单推送失败,orderId>>>>" + mainOrder.getOrderId());
|
|
|
// }
|
|
|
// }
|
|
|
//
|