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")); }