| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.log.annotation.Log; |
| | | import com.ruoyi.common.log.enums.BusinessType; |
| | | import com.ruoyi.goods.api.domain.LotteryEvent; |
| | | import com.ruoyi.goods.api.domain.TLotteryEvent; |
| | | import com.ruoyi.goods.domain.dto.*; |
| | | import com.ruoyi.goods.domain.vo.*; |
| | | import com.ruoyi.goods.service.lottery.ILotteryEventService; |
| | |
| | | @RequestMapping(value = "/editLotteryEvent", method = RequestMethod.POST) |
| | | @Log(title = "抽奖管理", businessType = BusinessType.UPDATE,operContent = "编辑抽奖活动") |
| | | @ApiOperation(value = "平台添加/修改抽奖活动【2.0】") |
| | | public R<ShopLotteryDrawVo> editLotteryEvent(@Valid @RequestBody MgtLotteryEventEditDTO dto) { |
| | | public R editLotteryEvent(@Valid @RequestBody MgtLotteryEventEditDTO dto) { |
| | | return lotteryEventService.editLotteryEvent(dto); |
| | | } |
| | | @RequestMapping(value = "/pageMgtLotteryEvent", method = RequestMethod.POST) |
| | | @ApiOperation(value = "分页获取抽奖列表【2.0】") |
| | | public R<Page<MgtLotteryEventPageVo>> pageMgtLotteryEvent(@RequestBody MgtLotteryEventPageDto dto) { |
| | | Page<MgtLotteryEventPageVo> page = new Page<>(); |
| | | page.setSize(dto.getPageSize()); |
| | | page.setCurrent(dto.getPageNum()); |
| | | page.setOptimizeCountSql(false); |
| | | List<MgtLotteryEventPageVo> mgtGoodsPageVoList = lotteryEventService.pageMgtLotteryEvent(page,dto); |
| | | return R.ok(page.setRecords(mgtGoodsPageVoList)); |
| | | |
| | | |
| | | return R.ok(lotteryEventService.pageMgtLotteryEvent(dto)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/getLotteryEventDetailById/{id}", method = RequestMethod.POST) |
| | |
| | | @ApiOperation(value = "查看抽奖活动-答题情况【2.0】") |
| | | public R<Page<MgtUserAnswersPageVO>> getUserAnswersPage(@RequestBody MgtUserAnswersPageDTO dto) { |
| | | //检查是否答题类型 |
| | | LotteryEvent lotteryEvent = lotteryEventService.getById(dto.getLotteryEventId()); |
| | | TLotteryEvent lotteryEvent = lotteryEventService.getById(dto.getLotteryEventId()); |
| | | if (null == lotteryEvent || lotteryEvent.getDelFlag()!=0 ){ |
| | | return R.fail("该抽奖活动不存在"); |
| | | } |