|
@@ -2871,7 +2871,9 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
|
|
|
//计算总价
|
|
//计算总价
|
|
|
BigDecimal totalMoney = BigDecimal.ZERO;
|
|
BigDecimal totalMoney = BigDecimal.ZERO;
|
|
|
for (FsStoreCartQueryVO vo : carts) {
|
|
for (FsStoreCartQueryVO vo : carts) {
|
|
|
- totalMoney = totalMoney.add(vo.getPrice().multiply(new BigDecimal(vo.getCartNum().toString())));
|
|
|
|
|
|
|
+ if (vo.getType().equals("product")) {
|
|
|
|
|
+ totalMoney = totalMoney.add(vo.getPrice().multiply(new BigDecimal(vo.getCartNum().toString())));
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
redisCache.setCacheObject("createOrderMoney:" + uuid, totalMoney, 120, TimeUnit.DAYS);
|
|
redisCache.setCacheObject("createOrderMoney:" + uuid, totalMoney, 120, TimeUnit.DAYS);
|
|
|
return R.ok().put("orderKey", uuid).put("carts", carts);
|
|
return R.ok().put("orderKey", uuid).put("carts", carts);
|
|
@@ -2911,6 +2913,7 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
|
|
|
.isPay(0)
|
|
.isPay(0)
|
|
|
.isDel(0)
|
|
.isDel(0)
|
|
|
.isBuy(1)
|
|
.isBuy(1)
|
|
|
|
|
+ .type(vo.getType())
|
|
|
.changePrice(vo.getPrice())
|
|
.changePrice(vo.getPrice())
|
|
|
.build();
|
|
.build();
|
|
|
storeCart.setCreateTime(new Date());
|
|
storeCart.setCreateTime(new Date());
|
|
@@ -4368,7 +4371,7 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
|
|
|
if(order.getCompanyCustomerId() != null) {
|
|
if(order.getCompanyCustomerId() != null) {
|
|
|
user = userService.selectFsUserById(param.getUserId());
|
|
user = userService.selectFsUserById(param.getUserId());
|
|
|
} else {
|
|
} else {
|
|
|
- userService.selectFsUserById(order.getUserId());
|
|
|
|
|
|
|
+ user = userService.selectFsUserById(order.getUserId());
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
if(user!=null){
|
|
if(user!=null){
|
|
@@ -4393,12 +4396,14 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
|
|
|
order.setPayDelivery(order.getPayPrice().subtract(payMoney));
|
|
order.setPayDelivery(order.getPayPrice().subtract(payMoney));
|
|
|
order.setPayMoney(payMoney);
|
|
order.setPayMoney(payMoney);
|
|
|
}else {
|
|
}else {
|
|
|
|
|
+ //客户信息制单走这儿
|
|
|
order.setPayMoney(order.getPayPrice());
|
|
order.setPayMoney(order.getPayPrice());
|
|
|
order.setPayDelivery(order.getTotalPrice().subtract(order.getPayMoney()));
|
|
order.setPayDelivery(order.getTotalPrice().subtract(order.getPayMoney()));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
else if(param.getPayType().equals(3)){
|
|
else if(param.getPayType().equals(3)){
|
|
|
|
|
+ //小程序制单物流走这儿
|
|
|
//货到付款
|
|
//货到付款
|
|
|
order.setPayType("3");
|
|
order.setPayType("3");
|
|
|
BigDecimal amount=redisCache.getCacheObject("orderAmount:"+order.getId());
|
|
BigDecimal amount=redisCache.getCacheObject("orderAmount:"+order.getId());
|