提交代码

dev-discount
胡锐 2 years ago
parent 8bd4c6366b
commit cb1ca9fc9d
  1. 3
      hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java
  2. 5
      hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java

@ -233,7 +233,6 @@ public class HighOrderController {
log.error("HighOrderController --> addOrder() error!", "未找到用户"); log.error("HighOrderController --> addOrder() error!", "未找到用户");
throw ErrorHelp.genException(SysCode.System, ErrorCode.UN_MEMBER_ERROR, ""); throw ErrorHelp.genException(SysCode.System, ErrorCode.UN_MEMBER_ERROR, "");
} }
highOrder.setPayType(2); // 第三方平台
childOrder.setGoodsActualPrice(childOrder.getGoodsPrice()); childOrder.setGoodsActualPrice(childOrder.getGoodsPrice());
childOrder.setGoodsName(user.getName()); childOrder.setGoodsName(user.getName());
childOrder.setGoodsImg(user.getHeaderImg()); childOrder.setGoodsImg(user.getHeaderImg());
@ -306,8 +305,6 @@ public class HighOrderController {
log.error("HighOrderController --> addOrder() error!", "未找到门店信息"); log.error("HighOrderController --> addOrder() error!", "未找到门店信息");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到门店信息"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到门店信息");
} }
highOrder.setPayType(2); // 第三方平台
if (highOrder.getIsTyAgent() != null && highOrder.getIsTyAgent().equals(true)) { if (highOrder.getIsTyAgent() != null && highOrder.getIsTyAgent().equals(true)) {
// 查询加油站 // 查询加油站
HighTyAgentOilStation oilStation = tyAgentOilStationService.getDetailByOilStationId(childOrder.getGoodsId()); HighTyAgentOilStation oilStation = tyAgentOilStationService.getDetailByOilStationId(childOrder.getGoodsId());

@ -312,10 +312,11 @@ public class HighOrderServiceImpl implements HighOrderService {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "支付的积分金额大于支付金额"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "支付的积分金额大于支付金额");
} }
// 应付金额 减去 积分抵扣金额 = 支付金额
highOrder.setPayPrice(highOrder.getPayablePrice().subtract(goldPrice));
// 积分金额小于应付金额 // 积分金额小于应付金额
if (goldPrice.compareTo(highOrder.getPayablePrice()) == -1) { if (goldPrice.compareTo(highOrder.getPayablePrice()) == -1) {
// 应付金额 减去 积分抵扣金额 = 支付金额
highOrder.setPayPrice(highOrder.getPayablePrice().subtract(goldPrice));
updateOrderDetail(highOrder); updateOrderDetail(highOrder);
// 扣除用户积分 // 扣除用户积分

Loading…
Cancel
Save