修改daima

dev-discount
yuanye 4 years ago
parent 5620edca7d
commit 6197207d3e
  1. 1
      hai-bweb/src/main/java/com/bweb/controller/BsCompanyController.java
  2. 16
      hai-bweb/src/main/java/com/bweb/controller/HighCouponController.java

@ -98,6 +98,7 @@ public class BsCompanyController {
} }
//发布人员 //发布人员
SessionObject sessionObject = userCenter.getSessionObject(request); SessionObject sessionObject = userCenter.getSessionObject(request);
if(sessionObject == null){ if(sessionObject == null){
log.error("SecCompanyController --> updateCompany() error!", ""); log.error("SecCompanyController --> updateCompany() error!", "");
throw ErrorHelp.genException(SysCode.System, ErrorCode.SEC_USER_EXPIRED, ""); throw ErrorHelp.genException(SysCode.System, ErrorCode.SEC_USER_EXPIRED, "");

@ -95,7 +95,7 @@ public class HighCouponController {
} }
// 查询商户 // 查询商户
HighMerchant merchant = highMerchantService.getMerchantById(highCoupon.getCompanyId()); HighMerchant merchant = highMerchantService.getMerchantById(highCoupon.getMerchantId());
if (merchant == null) { if (merchant == null) {
log.error("HighCouponController -> insertCoupon() error!","未找到商户"); log.error("HighCouponController -> insertCoupon() error!","未找到商户");
throw ErrorHelp.genException(SysCode.System, ErrorCode.MERCHANT_NOF_FOUND, ""); throw ErrorHelp.genException(SysCode.System, ErrorCode.MERCHANT_NOF_FOUND, "");
@ -259,16 +259,24 @@ 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 = "companyId", required = false) Long companyId, public ResponseData getCouponList(
@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,
@RequestParam(name = "status", required = false) Integer status, @RequestParam(name = "status", required = false) Integer status,
@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, HttpServletRequest request) {
try { try {
Map<String, Object> map = new HashMap<>(); 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("merchantId", merchantId);
map.put("couponName", couponName); map.put("couponName", couponName);
map.put("couponType", couponType); map.put("couponType", couponType);

Loading…
Cancel
Save