Commit eac9c43a by 吕明尚

Merge branch 'refs/heads/dev' into test

parents b2380b31 3bd58ea5
......@@ -69,11 +69,11 @@ public class EquityMembersOrderController extends BaseController {
@PostMapping("/createEquityMembers")
public R<EquityMembersResultResponse> createOrder(@RequestBody @Validated CreateEquityMembersRequest request) {
if ("1".equals(redisUtil.frontInOutLogSwitch())) {
log.info("EquityMembersOrderController method preOrder 入参 {}", JsonConvertUtil.write2JsonStr(request));
log.debug("EquityMembersOrderController method preOrder 入参 {}", JsonConvertUtil.write2JsonStr(request));
}
EquityMembersResultResponse response = equityMembersOrderService.createEquityMembers(request);
if ("1".equals(redisUtil.frontInOutLogSwitch())) {
log.info("EquityMembersOrderController method preOrder 出参 {}", JsonConvertUtil.write2JsonStr(response));
log.debug("EquityMembersOrderController method preOrder 出参 {}", JsonConvertUtil.write2JsonStr(response));
}
return R.ok(response);
}
......
......@@ -59,11 +59,11 @@ public class RechargeController extends BaseController {
@PostMapping("/createRecharge")
public R<RechargePayResultResponse> createOrder(@RequestBody @Validated CreateRechargeRequest request) {
if ("1".equals(redisUtil.frontInOutLogSwitch())) {
log.info("RechargeController method preOrder 入参 {}", JsonConvertUtil.write2JsonStr(request));
log.debug("RechargeController method preOrder 入参 {}", JsonConvertUtil.write2JsonStr(request));
}
RechargePayResultResponse response = rechargeService.createRecharge(request);
if ("1".equals(redisUtil.frontInOutLogSwitch())) {
log.info("RechargeController method preOrder 出参 {}", JsonConvertUtil.write2JsonStr(response));
log.debug("RechargeController method preOrder 出参 {}", JsonConvertUtil.write2JsonStr(response));
}
return R.ok(response);
}
......
......@@ -91,11 +91,11 @@ public class SOrderController extends BaseController
@RequestMapping(value = "/creat", method = RequestMethod.POST)
public R<OrderPayResultResponse> createOrder(@RequestBody @Validated CreateOrderRequest request) {
if("1".equals(redisUtil.frontInOutLogSwitch())) {
log.info("SOrderController method preOrder 入参 {}", JsonConvertUtil.write2JsonStr(request));
log.debug("SOrderController method preOrder 入参 {}", JsonConvertUtil.write2JsonStr(request));
}
OrderPayResultResponse response = sOrderService.createOrder(request);
if("1".equals(redisUtil.frontInOutLogSwitch())) {
log.info("SOrderController method preOrder 出参 {}", JsonConvertUtil.write2JsonStr(response));
log.debug("SOrderController method preOrder 出参 {}", JsonConvertUtil.write2JsonStr(response));
}
return R.ok(response);
}
......@@ -125,9 +125,9 @@ public class SOrderController extends BaseController
@ApiOperation(value = "计算订单价格")
@RequestMapping(value = "/computed/price", method = RequestMethod.POST)
public R<ComputedOrderPriceResponse> computedPrice(@Validated @RequestBody OrderComputedPriceRequest request) {
log.info("StoreOrderController method computedPrice 入参 {}", JsonConvertUtil.write2JsonStr(request));
log.debug("StoreOrderController method computedPrice 入参 {}", JsonConvertUtil.write2JsonStr(request));
ComputedOrderPriceResponse response = sOrderService.computedOrderPrice(request);
log.info("StoreOrderController method computedPrice 出参 {}", JsonConvertUtil.write2JsonStr(response));
log.debug("StoreOrderController method computedPrice 出参 {}", JsonConvertUtil.write2JsonStr(response));
return R.ok(response);
}
......
......@@ -2392,6 +2392,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
if (priceResponse.getPayFee().compareTo(new BigDecimal(0)) > 0) {
if (ObjectUtil.isNotEmpty(consumerMember)) {
MemberConfig memberConfig = memberConfigService.getOne(new LambdaQueryWrapper<MemberConfig>().eq(MemberConfig::getId, consumerMember.getMemberConfigId()));
priceResponse.setTotalFeeNow(priceResponse.getTotalFee().multiply(memberConfig.getDiscountRatio()).divide(new BigDecimal(100)));
//总金额乘以折扣比例除以100
priceResponse.setPayFee(priceResponse.getPayFee().multiply(memberConfig.getDiscountRatio()).divide(new BigDecimal(100)));
priceResponse.setDiscountFee(priceResponse.getTotalFee().subtract(priceResponse.getPayFee()));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment