提交修改

dev-discount
袁野 3 years ago
parent c2951e2868
commit 42d1582a05
  1. 2
      hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java
  2. 8
      hai-cweb/src/main/java/com/cweb/controller/OutRechargePriceController.java
  3. 3
      hai-service/src/main/java/com/hai/service/impl/OutRechargePriceServiceImpl.java

@ -346,7 +346,7 @@ public class HighOrderController {
// 卡卷类型 1:满减 2:抵扣 3:折扣 // 卡卷类型 1:满减 2:抵扣 3:折扣
if (highDiscountUserRel.getHighDiscount().getDiscountType() == 3) { if (highDiscountUserRel.getHighDiscount().getDiscountType() == 3) {
// 折扣除100 // 折扣除100
BigDecimal discountPrice = highDiscountUserRel.getHighDiscount().getDiscountPrice().divide(new BigDecimal("10")); BigDecimal discountPrice = highDiscountUserRel.getHighDiscount().getDiscountPrice();
// 订单总额 * 折扣 // 订单总额 * 折扣
BigDecimal payPrice = highOrder.getTotalPrice().multiply(discountPrice); BigDecimal payPrice = highOrder.getTotalPrice().multiply(discountPrice);
highOrder.setDeductionPrice(highOrder.getTotalPrice().subtract(payPrice)); highOrder.setDeductionPrice(highOrder.getTotalPrice().subtract(payPrice));

@ -59,7 +59,8 @@ public class OutRechargePriceController {
@ApiOperation(value = "查询充值金额列表") @ApiOperation(value = "查询充值金额列表")
public ResponseData getListOutRechargePrice( public ResponseData getListOutRechargePrice(
@RequestParam(value = "type", required = false) Integer type, @RequestParam(value = "type", required = false) Integer type,
@RequestParam(name = "regionId", required = true) String regionId @RequestParam(name = "regionId", required = true) String regionId,
@RequestParam(name = "showType", required = true) Integer showType
) { ) {
try { try {
Map<String, String> map = new HashMap<>(); Map<String, String> map = new HashMap<>();
@ -71,8 +72,11 @@ public class OutRechargePriceController {
} }
if (type != null ) { if (type != null ) {
map.put("type", String.valueOf(type)); map.put("showType", String.valueOf(showType));
}
if (type != null ) {
map.put("type", String.valueOf(type));
} }
return ResponseMsgUtil.success( outRechargePriceService.getListRechargePriceC(map)); return ResponseMsgUtil.success( outRechargePriceService.getListRechargePriceC(map));

@ -46,6 +46,9 @@ public class OutRechargePriceServiceImpl implements OutRechargePriceService {
if (StringUtils.isNotBlank(map.get("type"))) { if (StringUtils.isNotBlank(map.get("type"))) {
criteria.andTypeEqualTo(Integer.valueOf(map.get("type"))); criteria.andTypeEqualTo(Integer.valueOf(map.get("type")));
} }
if (StringUtils.isNotBlank(map.get("showType"))) {
criteria.andShowTypeEqualTo(Integer.valueOf(map.get("showType")));
}
if (StringUtils.isNotBlank(map.get("companyId"))) { if (StringUtils.isNotBlank(map.get("companyId"))) {
criteria.andCompanyIdEqualTo(Long.valueOf(map.get("companyId"))); criteria.andCompanyIdEqualTo(Long.valueOf(map.get("companyId")));
} }

Loading…
Cancel
Save