| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | |
| | | |
| | | |
| | | @RequestMapping(value = "/pageMgtCoupon", method = RequestMethod.POST) |
| | | @ApiOperation(value = "平台分页获取优惠券列表【2.0】") |
| | | @ApiOperation(value = "平台分页获取优惠券列表") |
| | | public R<Page<MgtCouponPageVo>> pageMgtCoupon(@RequestBody MgtCouponPageDto mgtCouponPageDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | mgtCouponPageDto.setUserId(userId); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | //todo 立即结束 |
| | | @RequestMapping(value = "/endImmediately", method = RequestMethod.POST) |
| | | @Log(title = "优惠券管理", businessType = BusinessType.UPDATE,operContent = "立即结束") |
| | | @ApiOperation(value = "立即结束【2.0】") |
| | | public R endImmediately(@RequestBody MgtBaseGetDto mgtBaseGetDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | mgtBaseGetDto.setUserId(userId); |
| | | couponService.endImmediately(mgtBaseGetDto); |
| | | return R.ok(); |
| | | return couponService.endImmediately(mgtBaseGetDto); |
| | | } |
| | | |
| | | //获取抽奖类型优惠券列表 |
| | | @RequestMapping(value = "/getLotteryEventCouponList", method = RequestMethod.POST) |
| | | @ApiOperation(value = "平台获取抽奖类型优惠券列表【2.0】") |
| | | public R<List<LotteryEventCouponListVO>> getLotteryEventCouponList(@RequestParam(value = "shopId",required = false) Long shopId) { |
| | | return R.ok( couponService.getLotteryEventCouponList(shopId)); |
| | | } |
| | | |
| | | } |