dev-discount
袁野 4 years ago
parent 194803824a
commit e148cbb10f
  1. 2
      hai-bweb/src/main/java/com/bweb/controller/HighCouponCodeController.java
  2. 4
      hai-service/src/main/java/com/hai/service/impl/HighCouponCodeServiceImpl.java

@ -51,10 +51,12 @@ public class HighCouponCodeController {
public ResponseData getCouponCodeList(@RequestParam(name = "couponId", required = true) Long couponId, public ResponseData getCouponCodeList(@RequestParam(name = "couponId", required = true) Long couponId,
@RequestParam(name = "status", required = false) Integer status, @RequestParam(name = "status", required = false) Integer status,
@RequestParam(name = "salesCode", required = false) String salesCode, @RequestParam(name = "salesCode", required = false) String salesCode,
@RequestParam(name = "agentId", required = false) Long agentId,
@RequestParam(name = "pageNum", required = true) Integer pageNum, @RequestParam(name = "pageNum", required = true) Integer pageNum,
@RequestParam(name = "pageSize", required = true) Integer pageSize) { @RequestParam(name = "pageSize", required = true) Integer pageSize) {
try { try {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("agentId", agentId);
map.put("couponId", couponId); map.put("couponId", couponId);
map.put("status", status); map.put("status", status);
map.put("salesCode", salesCode); map.put("salesCode", salesCode);

@ -229,6 +229,10 @@ public class HighCouponCodeServiceImpl implements HighCouponCodeService {
HighCouponCodeExample example = new HighCouponCodeExample(); HighCouponCodeExample example = new HighCouponCodeExample();
HighCouponCodeExample.Criteria criteria = example.createCriteria(); HighCouponCodeExample.Criteria criteria = example.createCriteria();
if (MapUtils.getLong(map, "agentId") != null) {
criteria.andAgentIdEqualTo(MapUtils.getLong(map, "agentId"));
}
if (MapUtils.getLong(map, "couponId") != null) { if (MapUtils.getLong(map, "couponId") != null) {
criteria.andCouponIdEqualTo(MapUtils.getLong(map, "couponId")); criteria.andCouponIdEqualTo(MapUtils.getLong(map, "couponId"));
} }

Loading…
Cancel
Save