From e148cbb10f2f51caea1988a73933bab3f776eff9 Mon Sep 17 00:00:00 2001 From: YUANYE <418471657@qq.com> Date: Tue, 11 May 2021 11:30:37 +0800 Subject: [PATCH] 2 --- .../java/com/bweb/controller/HighCouponCodeController.java | 2 ++ .../java/com/hai/service/impl/HighCouponCodeServiceImpl.java | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighCouponCodeController.java b/hai-bweb/src/main/java/com/bweb/controller/HighCouponCodeController.java index fe1ea1be..a8a8c88c 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighCouponCodeController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighCouponCodeController.java @@ -51,10 +51,12 @@ public class HighCouponCodeController { public ResponseData getCouponCodeList(@RequestParam(name = "couponId", required = true) Long couponId, @RequestParam(name = "status", required = false) Integer status, @RequestParam(name = "salesCode", required = false) String salesCode, + @RequestParam(name = "agentId", required = false) Long agentId, @RequestParam(name = "pageNum", required = true) Integer pageNum, @RequestParam(name = "pageSize", required = true) Integer pageSize) { try { Map map = new HashMap<>(); + map.put("agentId", agentId); map.put("couponId", couponId); map.put("status", status); map.put("salesCode", salesCode); diff --git a/hai-service/src/main/java/com/hai/service/impl/HighCouponCodeServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighCouponCodeServiceImpl.java index 6a113771..f8c7749a 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighCouponCodeServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighCouponCodeServiceImpl.java @@ -229,6 +229,10 @@ public class HighCouponCodeServiceImpl implements HighCouponCodeService { HighCouponCodeExample example = new HighCouponCodeExample(); HighCouponCodeExample.Criteria criteria = example.createCriteria(); + if (MapUtils.getLong(map, "agentId") != null) { + criteria.andAgentIdEqualTo(MapUtils.getLong(map, "agentId")); + } + if (MapUtils.getLong(map, "couponId") != null) { criteria.andCouponIdEqualTo(MapUtils.getLong(map, "couponId")); }