parent
dc2e703c7c
commit
851998a07a
@ -0,0 +1,58 @@ |
||||
package com.bweb.controller; |
||||
|
||||
import com.github.pagehelper.PageHelper; |
||||
import com.github.pagehelper.PageInfo; |
||||
import com.hai.common.exception.ErrorCode; |
||||
import com.hai.common.exception.ErrorHelp; |
||||
import com.hai.common.exception.SysCode; |
||||
import com.hai.common.security.SessionObject; |
||||
import com.hai.common.utils.ResponseMsgUtil; |
||||
import com.hai.entity.HighCouponCode; |
||||
import com.hai.model.ResponseData; |
||||
import com.hai.model.UserInfoModel; |
||||
import com.hai.service.HighCouponCodeService; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import org.slf4j.Logger; |
||||
import org.slf4j.LoggerFactory; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
||||
import org.springframework.web.bind.annotation.RequestMethod; |
||||
import org.springframework.web.bind.annotation.RequestParam; |
||||
import org.springframework.web.bind.annotation.ResponseBody; |
||||
|
||||
import javax.annotation.Resource; |
||||
import javax.servlet.http.HttpServletRequest; |
||||
import java.util.HashMap; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* @Auther: 胡锐 |
||||
* @Description: 卡卷销售码 |
||||
* @Date: 2021/3/22 19:39 |
||||
*/ |
||||
public class HighCouponCodeController { |
||||
|
||||
private static Logger log = LoggerFactory.getLogger(HighCouponCodeController.class); |
||||
|
||||
@Resource |
||||
private HighCouponCodeService highCouponCodeService; |
||||
|
||||
@RequestMapping(value="/getCouponCodeList",method = RequestMethod.GET) |
||||
@ResponseBody |
||||
@ApiOperation(value = "销售码列表") |
||||
public ResponseData getCouponCodeList(@RequestParam(name = "couponId", required = true) Long couponId, |
||||
@RequestParam(name = "status", required = false) Integer status, |
||||
@RequestParam(name = "pageNum", required = true) Integer pageNum, |
||||
@RequestParam(name = "pageSize", required = true) Integer pageSize) { |
||||
try { |
||||
Map<String, Object> map = new HashMap<>(); |
||||
map.put("couponId", couponId); |
||||
map.put("status", status); |
||||
|
||||
PageHelper.startPage(pageNum, pageSize); |
||||
return ResponseMsgUtil.success(new PageInfo<>(highCouponCodeService.getCouponCodeList(map))); |
||||
} catch (Exception e) { |
||||
log.error("HighCouponController -> getCouponCodeList() error!",e); |
||||
return ResponseMsgUtil.exception(e); |
||||
} |
||||
} |
||||
} |
Loading…
Reference in new issue