|
@@ -6,12 +6,9 @@ import com.caimei365.order.components.ProductService;
|
|
|
import com.caimei365.order.mapper.BaseMapper;
|
|
|
import com.caimei365.order.mapper.SubmitMapper;
|
|
|
import com.caimei365.order.model.ResponseJson;
|
|
|
-import com.caimei365.order.model.bo.ProductBo;
|
|
|
+import com.caimei365.order.model.po.*;
|
|
|
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;
|
|
@@ -59,9 +56,9 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
* "unionId":"", //微信unionId
|
|
|
* "cartType":3, //购买类型:(1自主下单, 3协销下单)
|
|
|
* "orderSource": 2, //订单来源:1WWW、2CRM、4客服[适用后台下单]、5外单[适用后台下单]、6小程序[采美,星范]、7呵呵商城小程序、8维沙小程序
|
|
|
- * "serviceProviderId": 1378, //协销ID(小程序忽略)
|
|
|
- * "clubUserId": 10708, //机构用户ID
|
|
|
- * "addressId": 2732, //地址ID
|
|
|
+ * "serviceProviderId": 1378, //协销Id(小程序忽略)
|
|
|
+ * "clubUserId": 10708, //机构用户Id
|
|
|
+ * "addressId": 2732, //地址Id
|
|
|
* "orderInfo": [ //【订单商品】
|
|
|
* { "shopId":1001, // 供应商Id
|
|
|
* "note":备注,
|
|
@@ -77,7 +74,7 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
* "balancePayFlag": 0,
|
|
|
* "clauseId": "2",
|
|
|
* "postage": "15",
|
|
|
- * "postageFlag": 1,
|
|
|
+ * "postageFlag": 1, //运费标志:0包邮 -1到付 1遵循运费规则
|
|
|
* "userBeans": 100,//抵扣采美豆数量
|
|
|
* "rebateFlag":0
|
|
|
* },
|
|
@@ -101,7 +98,7 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
* }
|
|
|
* }
|
|
|
* @return {code: -1=(用户账户异常,数据异常,操作异常等),1提交成功(支付完成),2提交成功(未支付),
|
|
|
- * code为1和2时:data{orderNo:订单号,orderID:订单ID,payTotalFee:订单金额,orderMark:订单标识}
|
|
|
+ * code为1和2时:data{orderNo:订单号,orderId:订单Id,payTotalFee:订单金额,orderMark:订单标识}
|
|
|
*/
|
|
|
@Override
|
|
|
public ResponseJson<Map<String, Object>> generateOrder(SubmitDto submitDto) {
|
|
@@ -150,7 +147,7 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
orderUserBo.setBalancePayFlag(balancePayFlag);
|
|
|
Double orderShouldPayFee = (Double) payInfo.get("orderShouldPayFee");
|
|
|
orderUserBo.setOrderShouldPayFee(orderShouldPayFee);
|
|
|
- // 邮费标志: 0包邮 1到付 2默认(遵循运费规则)
|
|
|
+ // 运费标志:0包邮 -1到付 1遵循运费规则
|
|
|
Integer postageFlag = (Integer) payInfo.get("postageFlag");
|
|
|
// 运费
|
|
|
Double postage = (Double) payInfo.get("postage");
|
|
@@ -164,7 +161,7 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
if (null != userBeans && userBeans > 0) {
|
|
|
// 计算需抵扣采美豆数量
|
|
|
int offsetBeans = MathUtil.mul(postage, 100).intValue();
|
|
|
- if (1 == postageFlag) {
|
|
|
+ if (-1 == postageFlag) {
|
|
|
// 到付默认30元,抵扣3000豆
|
|
|
offsetBeans = 3000;
|
|
|
}
|
|
@@ -315,11 +312,11 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
// 促销活动信息
|
|
|
List<PromotionsVo> promotionList= new ArrayList<>();
|
|
|
// 订单商品列表
|
|
|
- List<ProductBo> orderProductList = new ArrayList<>();
|
|
|
+ List<OrderProductPo> orderProductList = new ArrayList<>();
|
|
|
List<String> productIdList = new ArrayList<>();
|
|
|
|
|
|
// 子订单订单列表
|
|
|
- List<ShopOrderPo> shopOrderList = new ArrayList<>();
|
|
|
+ List<OrderShopPo> shopOrderList = new ArrayList<>();
|
|
|
JSONArray orderInfo = orderUserBo.getOrderInfo();
|
|
|
for (Object infoObject: orderInfo) {
|
|
|
JSONObject shopInfo = (JSONObject) infoObject;
|
|
@@ -337,7 +334,7 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
/*
|
|
|
* 初始化子订单
|
|
|
*/
|
|
|
- ShopOrderPo shopOrder = new ShopOrderPo();
|
|
|
+ OrderShopPo shopOrder = new OrderShopPo();
|
|
|
shopOrder.setShopId(shopId);
|
|
|
shopOrder.setShopName(shopName);
|
|
|
shopOrder.setNote(shopNote);
|
|
@@ -387,7 +384,7 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
// 赠品数
|
|
|
presentCount.updateAndGet(v -> v + presentNum);
|
|
|
// 获取数据库商品信息
|
|
|
- ProductBo product = submitMapper.getProductDetails(productId);
|
|
|
+ OrderProductPo product = submitMapper.getProductDetails(productId);
|
|
|
if (null == product) {
|
|
|
return ResponseJson.error("订单商品不存在!", null);
|
|
|
}
|
|
@@ -469,6 +466,7 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
discountPrice = ladderPrice.getBuyPrice();
|
|
|
}
|
|
|
}
|
|
|
+ product.setLadderPrices(ladderPrices);
|
|
|
product.setActProduct(2);
|
|
|
} else {
|
|
|
// 复购价
|
|
@@ -507,8 +505,8 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
if (hasActProductFlag && null != promotions) {
|
|
|
// 单品优惠
|
|
|
if (promotions.getType() == 1) {
|
|
|
- // 是否满足满减满赠
|
|
|
- if (MathUtil.compare(productFee, promotions.getTouchPrice()) >= 0) {
|
|
|
+ // 是否满足单品优惠条件
|
|
|
+ if (promotions.getMode()==1 || MathUtil.compare(productFee, promotions.getTouchPrice()) >= 0) {
|
|
|
// 满减
|
|
|
if (promotions.getMode() == 2) {
|
|
|
// 统计订单总满减金额
|
|
@@ -733,7 +731,7 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
// 机构用户 计算商品运费
|
|
|
Integer townId = baseMapper.getTownIdByAddressId(orderUserBo.getAddressId());
|
|
|
Map<String, Object> postageMap = productService.computePostage(orderUserBo.getUserId(), townId, productIdList);
|
|
|
- // 当前订单邮费标志: 0包邮 1到付 2默认(遵循运费规则)
|
|
|
+ // 运费标志:0包邮 -1到付 1遵循运费规则
|
|
|
Integer postageFlag = (Integer) postageMap.get("postageFlag");
|
|
|
Double postage = (Double) postageMap.get("postage");
|
|
|
if (!orderUserBo.getPostageFlag().equals(postageFlag) || MathUtil.compare(orderUserBo.getPostage(), postage) != 0) {
|
|
@@ -741,22 +739,16 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
}
|
|
|
}
|
|
|
// 设置运费
|
|
|
- mainOrder.setFreight(orderUserBo.getPostage());
|
|
|
+ mainOrder.setPostage(orderUserBo.getPostage());
|
|
|
// 订单总额 = 商品费 + 运费
|
|
|
payTotalFee.set(MathUtil.add(productTotalFee.get(), orderUserBo.getPostage()).doubleValue());
|
|
|
- // order免邮标志 运费:-1到付,0包邮,1需要运费,-2仪器到付其它包邮
|
|
|
- if (0 == orderUserBo.getPostageFlag()) {
|
|
|
- mainOrder.setFreePostFlag(0);
|
|
|
- } else if (1 == orderUserBo.getPostageFlag()){
|
|
|
- mainOrder.setFreePostFlag(-1);
|
|
|
- } else {
|
|
|
- // 遵循运费规则
|
|
|
- mainOrder.setFreePostFlag(1);
|
|
|
- if (orderUserBo.getOffsetBeans() > 0) {
|
|
|
- // 采美豆抵扣运费,订单总额 = 商品费
|
|
|
- payTotalFee.set(productTotalFee.get());
|
|
|
- }
|
|
|
+ // 运费标志:0包邮 -1到付 1遵循运费规则
|
|
|
+ mainOrder.setPostageFlag(orderUserBo.getPostageFlag());
|
|
|
+ if (1 == orderUserBo.getPostageFlag() && orderUserBo.getOffsetBeans() > 0) {
|
|
|
+ // 采美豆抵扣运费,订单总额 = 商品费
|
|
|
+ payTotalFee.set(productTotalFee.get());
|
|
|
}
|
|
|
+
|
|
|
// 商品总额
|
|
|
mainOrder.setProductTotalFee(productTotalFee.get());
|
|
|
mainOrder.setOrderTotalFee(productTotalFee.get());
|
|
@@ -896,7 +888,7 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
*/
|
|
|
submitMapper.insertShopOrder(shopOrder);
|
|
|
log.info("【提交订单】>>>>>>>>>>>>>>>>>>>>>>>>>>新增子订单(insert[cm_shop_order])shopOrderId::" + shopOrder.getShopOrderId());
|
|
|
- // 收集子订单供应商ID字符串
|
|
|
+ // 收集子订单Id字符串
|
|
|
if (StringUtils.isEmpty(shopOrderIds.get())) {
|
|
|
shopOrderIds.set(shopOrder.getShopOrderId().toString());
|
|
|
} else {
|
|
@@ -904,83 +896,141 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
}
|
|
|
});
|
|
|
|
|
|
-// /*
|
|
|
-// * 设置邮费子订单
|
|
|
-// */
|
|
|
-// 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);
|
|
|
-// }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-// /*
|
|
|
-// * 保存订单商品
|
|
|
-// */
|
|
|
-// StringBuilder productName = new StringBuilder();
|
|
|
-// List<OrderProductLadderPriceVo> orderProductLadderPriceList = new ArrayList<>();
|
|
|
-// for (OrderProductVo orderProduct : orderProductList) {
|
|
|
-// productName.append(orderProduct.getName());
|
|
|
-// // 保存订单商品数据
|
|
|
-// orderSubmitDao.insertOrderProduct(orderProduct);
|
|
|
-// log.info(">>>>>>>>>>>>>>>>>>>>>>>>>>保存订单商品(insert[cm_order_product])OrderProductID:" + orderProduct.getOrderProductID());
|
|
|
-// if (orderProduct.getLadderPriceFlag() == 1) {
|
|
|
-// //使用阶梯价格的订单商品保存下单时的阶梯价格列表
|
|
|
-// List<LadderPriceVo> ladderPriceList = shoppingCartDao.findLadderPrice(orderProduct.getProductID());
|
|
|
-// ladderPriceList.forEach(ladderPriceVo -> {
|
|
|
-// OrderProductLadderPriceVo orderProductLadderPrice = new OrderProductLadderPriceVo();
|
|
|
-// orderProductLadderPrice.setOrderProductId(orderProduct.getOrderProductID());
|
|
|
-// orderProductLadderPrice.setBuyNum(ladderPriceVo.getBuyNum().intValue());
|
|
|
-// orderProductLadderPrice.setBuyPrice(ladderPriceVo.getBuyPrice());
|
|
|
-// orderProductLadderPrice.setCreateDate(date);
|
|
|
-// orderProductLadderPrice.setLadderNum(ladderPriceVo.getLadderNum().intValue());
|
|
|
-// orderProductLadderPriceList.add(orderProductLadderPrice);
|
|
|
-// });
|
|
|
-// }
|
|
|
-// }
|
|
|
-// if (!CollectionUtils.isEmpty(orderProductLadderPriceList)) {
|
|
|
-// orderProductLadderPriceList.forEach(ladderPrice -> {
|
|
|
-// orderSubmitDao.insertOrderProductLadderPrice(ladderPrice);
|
|
|
-// });
|
|
|
-// }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ /*
|
|
|
+ * 整理 订单商品
|
|
|
+ */
|
|
|
+ for (OrderProductPo orderProduct : orderProductList) {
|
|
|
+ // 设置商品订单Id
|
|
|
+ orderProduct.setOrderId(mainOrder.getOrderId());
|
|
|
+ orderProduct.setOrderNo(mainOrder.getOrderNo());
|
|
|
+ // 设置商品子订单Id
|
|
|
+ shopOrderList.forEach(shopOrder -> {
|
|
|
+ if (orderProduct.getShopId().equals(shopOrder.getShopId())) {
|
|
|
+ orderProduct.setShopOrderId(shopOrder.getShopOrderId());
|
|
|
+ orderProduct.setShopOrderNo(shopOrder.getShopOrderNo());
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // 设置订单商品促销Id
|
|
|
+ promotionList.forEach(promotions -> {
|
|
|
+ if (promotions.getPromotionsId().equals(orderProduct.getOrderPromotionsId())) {
|
|
|
+ orderProduct.setOrderPromotionsId(promotions.getId());
|
|
|
+ orderProduct.setActProduct(1);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ /*
|
|
|
+ * 保存 订单商品
|
|
|
+ */
|
|
|
+ submitMapper.insertOrderProduct(orderProduct);
|
|
|
+ log.info("【提交订单】>>>>>>>>>>>>>>>>>>>>>>>>>>保存订单商品(insert[cm_order_product])OrderProductId:" + orderProduct.getOrderProductId());
|
|
|
+
|
|
|
+ if (orderProduct.getLadderPriceFlag() == 1) {
|
|
|
+ // 使用阶梯价格的订单商品保存下单时的阶梯价格列表
|
|
|
+ orderProduct.getLadderPrices().forEach(ladderPriceVo -> {
|
|
|
+ ladderPriceVo.setOrderProductId(orderProduct.getOrderProductId());
|
|
|
+ ladderPriceVo.setCreateDate(date);
|
|
|
+ /*
|
|
|
+ * 保存 订单阶梯价格
|
|
|
+ */
|
|
|
+ submitMapper.insertLadderPrices(ladderPriceVo);
|
|
|
+ log.info("【提交订单】>>>>>>>>>>>>>>>>>>>>>>>>>>保存订单阶梯价格(insert[order_product_ladder_price])id:" + ladderPriceVo.getId());
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
+ /*
|
|
|
+ * 设置邮费子订单( 0包邮 -1到付 1遵循运费规则)
|
|
|
+ */
|
|
|
+ if (1 == mainOrder.getPostageFlag()) {
|
|
|
+ // 获取 邮费商品
|
|
|
+ OrderProductPo postageProduct = submitMapper.getProductDetails(999);
|
|
|
+ // 生成子订单编号
|
|
|
+ StringBuilder postageOrderNo = new StringBuilder();
|
|
|
+ postageOrderNo.append(mainOrder.getOrderNo());
|
|
|
+ if (shopOrderIndex.get() < 10) {
|
|
|
+ postageOrderNo.append("0");
|
|
|
+ }
|
|
|
+ postageOrderNo.append(shopOrderIndex.get());
|
|
|
+ shopOrderIndex.incrementAndGet();
|
|
|
+ /*
|
|
|
+ * 初始化邮费订单
|
|
|
+ */
|
|
|
+ OrderShopPo postageOrder = new OrderShopPo();
|
|
|
+ postageOrder.setShopOrderNo(postageOrderNo.toString());
|
|
|
+ postageOrder.setOrderNo(mainOrder.getOrderNo());
|
|
|
+ postageOrder.setOrderId(mainOrder.getOrderId());
|
|
|
+ postageOrder.setUserId(mainOrder.getUserId());
|
|
|
+ postageOrder.setOrderSubmitType(mainOrder.getOrderSubmitType());
|
|
|
+ postageOrder.setItemCount(1);
|
|
|
+ //运费商品供应商Id默认998
|
|
|
+ postageOrder.setShopId(postageProduct.getShopId());
|
|
|
+ postageOrder.setProductAmount(mainOrder.getPostage());
|
|
|
+ postageOrder.setTotalAmount(mainOrder.getPostage());
|
|
|
+ postageOrder.setNeedPayAmount(mainOrder.getPostage());
|
|
|
+ postageOrder.setOrderTime(mainOrder.getOrderTime());
|
|
|
+ postageOrder.setCanRefundAmount(0d);
|
|
|
+ postageOrder.setClubId(mainOrder.getClubId());
|
|
|
+ if (3 == orderUserBo.getCartType()) {
|
|
|
+ // 协销订单
|
|
|
+ postageOrder.setSpId(orderUserBo.getBuyUserId());
|
|
|
+ }
|
|
|
+ // 订单默认可拆分
|
|
|
+ postageOrder.setSplitFlag(1);
|
|
|
+ /*
|
|
|
+ * 保存运费子订单
|
|
|
+ */
|
|
|
+ submitMapper.insertShopOrder(postageOrder);
|
|
|
+ log.info("【提交订单】>>>>>>>>>>>>>>>>>>>>>>>>>>新增子订单(运费商品)(insert[cm_shop_order])shopOrderId::" + postageOrder.getShopOrderId());
|
|
|
+ // 收集子订单Id字符串
|
|
|
+ if (StringUtils.isEmpty(shopOrderIds.get())) {
|
|
|
+ shopOrderIds.set(postageOrder.getShopOrderId().toString());
|
|
|
+ } else {
|
|
|
+ shopOrderIds.set(shopOrderIds.get() + "," + postageOrder.getShopOrderId());
|
|
|
+ }
|
|
|
+ /*
|
|
|
+ * 设置运费商品
|
|
|
+ */
|
|
|
+ postageProduct.setOrderNo(mainOrder.getOrderNo());
|
|
|
+ postageProduct.setOrderId(mainOrder.getOrderId());
|
|
|
+ postageProduct.setShopOrderId(postageOrder.getShopOrderId());
|
|
|
+ postageProduct.setShopOrderNo(postageOrder.getShopOrderNo());
|
|
|
+ postageProduct.setNum(1);
|
|
|
+ postageProduct.setPresentNum(0);
|
|
|
+ postageProduct.setPrice(mainOrder.getPostage());
|
|
|
+ postageProduct.setNormalPrice(mainOrder.getPostage());
|
|
|
+ postageProduct.setTotalAmount(mainOrder.getPostage());
|
|
|
+ postageProduct.setTotalFee(mainOrder.getPostage());
|
|
|
+ postageProduct.setShouldPayFee(mainOrder.getPostage());
|
|
|
+ postageProduct.setDiscount(100d);
|
|
|
+ postageProduct.setDiscountPrice(mainOrder.getPostage());
|
|
|
+ postageProduct.setTaxRate(100d);
|
|
|
+ postageProduct.setAddedValueTax(0d);
|
|
|
+ postageProduct.setTotalAddedValueTax(0d);
|
|
|
+ postageProduct.setShopFee(0d);
|
|
|
+ postageProduct.setOtherFee(0d);
|
|
|
+ postageProduct.setCmFee(mainOrder.getPostage());
|
|
|
+ postageProduct.setSingleShopFee(0d);
|
|
|
+ postageProduct.setSingleOtherFee(0d);
|
|
|
+ postageProduct.setSingleCmFee(mainOrder.getPostage());
|
|
|
+ postageProduct.setNotOutStore(0);
|
|
|
+ postageProduct.setBuyAgainFlag(0);
|
|
|
+ /*
|
|
|
+ * 保存 订单运费商品
|
|
|
+ */
|
|
|
+ submitMapper.insertOrderProduct(postageProduct);
|
|
|
+ log.info("【提交订单】>>>>>>>>>>>>>>>>>>>>>>>>>>保存订单运费商品(insert[cm_order_product])OrderProductId:" + postageProduct.getOrderProductId());
|
|
|
+ }
|
|
|
|
|
|
+ /*
|
|
|
+ * 更新主订单的子订单Id信息,如:1000,1002
|
|
|
+ */
|
|
|
+ if (StringUtils.isNotEmpty(shopOrderIds.get())) {
|
|
|
+ mainOrder.setShopOrderIds(shopOrderIds.get());
|
|
|
+ submitMapper.updateShopOrderIds(shopOrderIds.get(), mainOrder.getOrderId());
|
|
|
+ } else {
|
|
|
+ // 设置手动回滚事务
|
|
|
+ TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
+ return ResponseJson.error("生成子订单异常!", null);
|
|
|
+ }
|
|
|
|
|
|
/*
|
|
|
* 发票信息
|
|
@@ -1059,14 +1109,14 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
// //保存地址信息
|
|
|
// UserinfoVo userInfo = new UserinfoVo();
|
|
|
// userInfo.setOrderId(mainOrder.getOrderId());
|
|
|
-// userInfo.setClubId(user.getClubID().longValue());
|
|
|
-// userInfo.setUserId(user.getUserID().longValue());
|
|
|
+// userInfo.setClubId(user.getClubId().longValue());
|
|
|
+// userInfo.setUserId(user.getUserId().longValue());
|
|
|
// userInfo.setName(user.getName() == null ? user.getUserName() : user.getName());
|
|
|
// userInfo.setShouHuoRen(address.getShouHuoRen());
|
|
|
// userInfo.setMobile(address.getMobile());
|
|
|
// userInfo.setPostalCode(address.getPhone());
|
|
|
// userInfo.setPostalCode(address.getPostalCode());
|
|
|
-// userInfo.setTownId(address.getTownID());
|
|
|
+// userInfo.setTownId(address.getTownId());
|
|
|
// userInfo.setProvince(address.getProvince());
|
|
|
// userInfo.setCity(address.getCity());
|
|
|
// userInfo.setTown(address.getTown());
|
|
@@ -1084,7 +1134,7 @@ 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());
|
|
@@ -1113,7 +1163,7 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
// //保存采美豆使用记录
|
|
|
// if (userBeans > 0) {
|
|
|
// UserBeansHistoryPo beansHistory = new UserBeansHistoryPo();
|
|
|
-// beansHistory.setUserId(user.getUserID());
|
|
|
+// beansHistory.setUserId(user.getUserId());
|
|
|
// beansHistory.setOrderId(mainOrder.getOrderId().intValue());
|
|
|
// beansHistory.setBeansType(10);
|
|
|
// beansHistory.setType(2);
|
|
@@ -1122,7 +1172,7 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
// beansHistory.setAddTime(date);
|
|
|
// payDao.insertBeansHistory(beansHistory);
|
|
|
// int beans = user.getUserBeans() - userBeans;
|
|
|
-// payDao.updateUserBeans(user.getUserID().longValue(), beans);
|
|
|
+// payDao.updateUserBeans(user.getUserId().longValue(), beans);
|
|
|
// }
|
|
|
//
|
|
|
// log.info("******************** 提交订单逻辑处理 end *******************");
|
|
@@ -1130,7 +1180,7 @@ 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() + "#");
|
|
|
// //应付订单金额
|