|
|
@ -77,7 +77,7 @@ public class HighCouponController { |
|
|
|
@RequestMapping(value = "/getCouponList", method = RequestMethod.GET) |
|
|
|
@RequestMapping(value = "/getCouponList", method = RequestMethod.GET) |
|
|
|
@ResponseBody |
|
|
|
@ResponseBody |
|
|
|
@ApiOperation(value = "卡卷列表") |
|
|
|
@ApiOperation(value = "卡卷列表") |
|
|
|
public ResponseData getCouponList(@RequestParam(name = "regionId", required = true) String regionId, |
|
|
|
public ResponseData getCouponList(@RequestParam(name = "companyId", required = true) String companyId, |
|
|
|
@RequestParam(name = "merchantId", required = false) Long merchantId, |
|
|
|
@RequestParam(name = "merchantId", required = false) Long merchantId, |
|
|
|
@RequestParam(name = "couponName", required = false) String couponName, |
|
|
|
@RequestParam(name = "couponName", required = false) String couponName, |
|
|
|
@RequestParam(name = "couponType", required = false) Integer couponType, |
|
|
|
@RequestParam(name = "couponType", required = false) Integer couponType, |
|
|
@ -88,25 +88,18 @@ public class HighCouponController { |
|
|
|
@RequestParam(name = "pageSize", required = true) Integer pageSize) { |
|
|
|
@RequestParam(name = "pageSize", required = true) Integer pageSize) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
|
|
|
|
SecRegion region = commonService.getParentByRegion(Long.parseLong(regionId)); |
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
if (region != null) { |
|
|
|
map.put("companyId", companyId); |
|
|
|
BsCompany bsCompany = bsCompanyService.selectCompanyByRegion(region.getRegionId().toString()); |
|
|
|
map.put("merchantId", merchantId); |
|
|
|
if (bsCompany != null) { |
|
|
|
map.put("couponName", couponName); |
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
map.put("couponType", couponType); |
|
|
|
map.put("companyId", bsCompany.getId()); |
|
|
|
map.put("brandId", brandId); |
|
|
|
map.put("merchantId", merchantId); |
|
|
|
map.put("goodsTypeId", goodsTypeId); |
|
|
|
map.put("couponName", couponName); |
|
|
|
map.put("displayArea", displayArea); |
|
|
|
map.put("couponType", couponType); |
|
|
|
map.put("notCouponSource", 2); |
|
|
|
map.put("brandId", brandId); |
|
|
|
map.put("status", 2); |
|
|
|
map.put("goodsTypeId", goodsTypeId); |
|
|
|
PageHelper.startPage(pageNum, pageSize); |
|
|
|
map.put("displayArea", displayArea); |
|
|
|
return ResponseMsgUtil.success(new PageInfo<>(highCouponService.getCouponList(map))); |
|
|
|
map.put("notCouponSource", 2); |
|
|
|
|
|
|
|
map.put("status", 2); |
|
|
|
|
|
|
|
PageHelper.startPage(pageNum, pageSize); |
|
|
|
|
|
|
|
return ResponseMsgUtil.success(new PageInfo<>(highCouponService.getCouponList(map))); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return ResponseMsgUtil.success(new PageInfo<>()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("HighCouponController -> getCouponList() error!", e); |
|
|
|
log.error("HighCouponController -> getCouponList() error!", e); |
|
|
|