|
|
|
@ -95,7 +95,7 @@ public class HighCouponController { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 查询商户
|
|
|
|
|
HighMerchant merchant = highMerchantService.getMerchantById(highCoupon.getCompanyId()); |
|
|
|
|
HighMerchant merchant = highMerchantService.getMerchantById(highCoupon.getMerchantId()); |
|
|
|
|
if (merchant == null) { |
|
|
|
|
log.error("HighCouponController -> insertCoupon() error!","未找到商户"); |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.MERCHANT_NOF_FOUND, ""); |
|
|
|
@ -259,16 +259,24 @@ public class HighCouponController { |
|
|
|
|
@RequestMapping(value="/getCouponList",method = RequestMethod.GET) |
|
|
|
|
@ResponseBody |
|
|
|
|
@ApiOperation(value = "卡卷列表") |
|
|
|
|
public ResponseData getCouponList(@RequestParam(name = "companyId", required = false) Long companyId, |
|
|
|
|
public ResponseData getCouponList( |
|
|
|
|
@RequestParam(name = "merchantId", required = false) Long merchantId, |
|
|
|
|
@RequestParam(name = "couponName", required = false) String couponName, |
|
|
|
|
@RequestParam(name = "couponType", required = false) Integer couponType, |
|
|
|
|
@RequestParam(name = "status", required = false) Integer status, |
|
|
|
|
@RequestParam(name = "pageNum", required = true) Integer pageNum, |
|
|
|
|
@RequestParam(name = "pageSize", required = true) Integer pageSize) { |
|
|
|
|
@RequestParam(name = "pageSize", required = true) Integer pageSize, HttpServletRequest request) { |
|
|
|
|
try { |
|
|
|
|
|
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
map.put("companyId", companyId); |
|
|
|
|
|
|
|
|
|
SessionObject sessionObject = userCenter.getSessionObject(request); |
|
|
|
|
UserInfoModel userInfoModel = (UserInfoModel) sessionObject.getObject(); |
|
|
|
|
if (userInfoModel.getBsCompany() == null) { |
|
|
|
|
log.error("HighCouponController -> getCouponList() error!","权限不足"); |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMPETENCE_INSUFFICIENT, ""); |
|
|
|
|
} |
|
|
|
|
map.put("companyId", userInfoModel.getBsCompany().getId()); |
|
|
|
|
map.put("merchantId", merchantId); |
|
|
|
|
map.put("couponName", couponName); |
|
|
|
|
map.put("couponType", couponType); |
|
|
|
|