|
@@ -1239,7 +1239,11 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
|
|
|
}
|
|
}
|
|
|
storeOrder.setCartId(cartIds);
|
|
storeOrder.setCartId(cartIds);
|
|
|
storeOrder.setTotalNum(Long.parseLong(String.valueOf(carts.size())));
|
|
storeOrder.setTotalNum(Long.parseLong(String.valueOf(carts.size())));
|
|
|
- storeOrder.setTotalPrice(dto.getTotalPrice());
|
|
|
|
|
|
|
+ if(CloudHostUtils.hasCloudHostName("叮当国医")){
|
|
|
|
|
+ storeOrder.setTotalPrice(param.getTotalPrice());
|
|
|
|
|
+ } else {
|
|
|
|
|
+ storeOrder.setTotalPrice(dto.getTotalPrice());
|
|
|
|
|
+ }
|
|
|
storeOrder.setTotalPostage(dto.getPayPostage());
|
|
storeOrder.setTotalPostage(dto.getPayPostage());
|
|
|
|
|
|
|
|
//优惠券处理
|
|
//优惠券处理
|
|
@@ -1292,8 +1296,14 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
|
|
|
|
|
|
|
|
//后台制单处理
|
|
//后台制单处理
|
|
|
if (param.getPayPrice() != null && param.getPayPrice().compareTo(BigDecimal.ZERO) > 0) {
|
|
if (param.getPayPrice() != null && param.getPayPrice().compareTo(BigDecimal.ZERO) > 0) {
|
|
|
- if (param.getPayPrice().compareTo(dto.getTotalPrice()) > 0) {
|
|
|
|
|
- return R.error("改价价格不能大于商品总价");
|
|
|
|
|
|
|
+ if(CloudHostUtils.hasCloudHostName("叮当国医")){
|
|
|
|
|
+ if (param.getPayPrice().compareTo(param.getTotalPrice()) > 0) {
|
|
|
|
|
+ return R.error("改价价格不能大于商品总价");
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if (param.getPayPrice().compareTo(dto.getTotalPrice()) > 0) {
|
|
|
|
|
+ return R.error("改价价格不能大于商品总价");
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
storeOrder.setPayPrice(param.getPayPrice());
|
|
storeOrder.setPayPrice(param.getPayPrice());
|
|
|
} else {
|
|
} else {
|
|
@@ -1318,8 +1328,13 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
|
|
|
BigDecimal amount = param.getAmount(); //货到付款 自定义代收金额
|
|
BigDecimal amount = param.getAmount(); //货到付款 自定义代收金额
|
|
|
if (amount != null && amount.compareTo(BigDecimal.ZERO) > 0) {
|
|
if (amount != null && amount.compareTo(BigDecimal.ZERO) > 0) {
|
|
|
storeOrder.setStatus(0);
|
|
storeOrder.setStatus(0);
|
|
|
- storeOrder.setPayMoney(amount);
|
|
|
|
|
- storeOrder.setPayDelivery(storeOrder.getPayPrice().subtract(amount));
|
|
|
|
|
|
|
+ if(CloudHostUtils.hasCloudHostName("叮当国医")){
|
|
|
|
|
+ storeOrder.setPayMoney(param.getPayPrice());
|
|
|
|
|
+ storeOrder.setPayDelivery(amount);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ storeOrder.setPayMoney(amount);
|
|
|
|
|
+ storeOrder.setPayDelivery(storeOrder.getPayPrice().subtract(amount));
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
storeOrder.setStatus(1);
|
|
storeOrder.setStatus(1);
|
|
|
}
|
|
}
|
|
@@ -2524,6 +2539,7 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
|
|
|
createParam.setOrderCreateType(3); //后台制单
|
|
createParam.setOrderCreateType(3); //后台制单
|
|
|
createParam.setOrderType(param.getOrderType());
|
|
createParam.setOrderType(param.getOrderType());
|
|
|
createParam.setOrderMedium(param.getOrderMedium()); //后台制单
|
|
createParam.setOrderMedium(param.getOrderMedium()); //后台制单
|
|
|
|
|
+ createParam.setTotalPrice(param.getTotalPrice());
|
|
|
return this.createOrder(param.getUserId(), createParam);
|
|
return this.createOrder(param.getUserId(), createParam);
|
|
|
} else {
|
|
} else {
|
|
|
throw new CustomException("创建失败");
|
|
throw new CustomException("创建失败");
|