|
|
|
@ -1,5 +1,7 @@ |
|
|
|
|
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; |
|
|
|
@ -28,6 +30,8 @@ import org.springframework.web.bind.annotation.*; |
|
|
|
|
import javax.annotation.Resource; |
|
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
|
import java.util.Date; |
|
|
|
|
import java.util.HashMap; |
|
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @Auther: 胡锐 |
|
|
|
@ -183,7 +187,7 @@ public class HighCouponController { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@RequestMapping(value="/upShelfApprove",method = RequestMethod.POST) |
|
|
|
|
@RequestMapping(value="/upShelfApprove",method = RequestMethod.GET) |
|
|
|
|
@ResponseBody |
|
|
|
|
@ApiOperation(value = "卡卷上架审批") |
|
|
|
|
public ResponseData upShelfApprove(@RequestParam(name = "id", required = true) Long id, HttpServletRequest request) { |
|
|
|
@ -222,7 +226,7 @@ public class HighCouponController { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@RequestMapping(value="/ofShelfApprove",method = RequestMethod.POST) |
|
|
|
|
@RequestMapping(value="/ofShelfApprove",method = RequestMethod.GET) |
|
|
|
|
@ResponseBody |
|
|
|
|
@ApiOperation(value = "卡卷下架") |
|
|
|
|
public ResponseData ofShelfApprove(@RequestParam(name = "id", required = true) Long id) { |
|
|
|
@ -237,4 +241,40 @@ public class HighCouponController { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@RequestMapping(value="/getCouponById",method = RequestMethod.GET) |
|
|
|
|
@ResponseBody |
|
|
|
|
@ApiOperation(value = "根据id 查询卡卷") |
|
|
|
|
public ResponseData getCouponById(@RequestParam(name = "id", required = true) Long id) { |
|
|
|
|
try { |
|
|
|
|
|
|
|
|
|
return ResponseMsgUtil.success(highCouponService.getCouponById(id)); |
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.error("HighCouponController -> getCouponById() error!",e); |
|
|
|
|
return ResponseMsgUtil.exception(e); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@RequestMapping(value="/getCouponList",method = RequestMethod.GET) |
|
|
|
|
@ResponseBody |
|
|
|
|
@ApiOperation(value = "卡卷列表") |
|
|
|
|
public ResponseData getCouponList(@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) { |
|
|
|
|
try { |
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
map.put("couponName", couponName); |
|
|
|
|
map.put("couponType", couponType); |
|
|
|
|
map.put("status", status); |
|
|
|
|
|
|
|
|
|
PageHelper.startPage(pageNum, pageSize); |
|
|
|
|
return ResponseMsgUtil.success(new PageInfo<>(highCouponService.getCouponList(map))); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.error("HighCouponController -> getCouponList() error!",e); |
|
|
|
|
return ResponseMsgUtil.exception(e); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|