|
|
|
@ -11,6 +11,7 @@ import com.hai.common.utils.ResponseMsgUtil; |
|
|
|
|
import com.hai.entity.BsCompany; |
|
|
|
|
import com.hai.entity.HighCoupon; |
|
|
|
|
import com.hai.entity.HighUserCoupon; |
|
|
|
|
import com.hai.entity.SecRegion; |
|
|
|
|
import com.hai.model.HighUserCouponModel; |
|
|
|
|
import com.hai.model.HighUserModel; |
|
|
|
|
import com.hai.model.ResponseData; |
|
|
|
@ -61,6 +62,9 @@ public class HighCouponController { |
|
|
|
|
@Resource |
|
|
|
|
private HighMerchantStoreService highMerchantStoreService; |
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
private CommonService commonService; |
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/getCouponList", method = RequestMethod.GET) |
|
|
|
|
@ResponseBody |
|
|
|
|
@ApiOperation(value = "卡卷列表") |
|
|
|
@ -73,20 +77,22 @@ public class HighCouponController { |
|
|
|
|
@RequestParam(name = "pageSize", required = true) Integer pageSize) { |
|
|
|
|
try { |
|
|
|
|
|
|
|
|
|
BsCompany bsCompany = bsCompanyService.selectCompanyByRegion(regionId); |
|
|
|
|
if (bsCompany != null) { |
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
map.put("companyId", bsCompany.getId()); |
|
|
|
|
map.put("merchantId", merchantId); |
|
|
|
|
map.put("couponName", couponName); |
|
|
|
|
map.put("couponType", couponType); |
|
|
|
|
map.put("displayArea", displayArea); |
|
|
|
|
map.put("notCouponSource", 2); |
|
|
|
|
map.put("status", 2); |
|
|
|
|
PageHelper.startPage(pageNum, pageSize); |
|
|
|
|
return ResponseMsgUtil.success(new PageInfo<>(highCouponService.getCouponList(map))); |
|
|
|
|
SecRegion region = commonService.getRegionsById(Long.parseLong(regionId)); |
|
|
|
|
if (region != null && region.getParentId() != null) { |
|
|
|
|
BsCompany bsCompany = bsCompanyService.selectCompanyByRegion(region.getParentId().toString()); |
|
|
|
|
if (bsCompany != null) { |
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
map.put("companyId", bsCompany.getId()); |
|
|
|
|
map.put("merchantId", merchantId); |
|
|
|
|
map.put("couponName", couponName); |
|
|
|
|
map.put("couponType", couponType); |
|
|
|
|
map.put("displayArea", displayArea); |
|
|
|
|
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) { |
|
|
|
|