| | |
| | | return R.fail("抽奖活动不存在"); |
| | | } |
| | | if (LocalDateTime.now().isAfter(lotteryEvent.getStartTime())) { |
| | | return R.fail("删除失败"); |
| | | return R.fail("活动已开始,不能删除!"); |
| | | } |
| | | if (!lotteryEvent.getShopId().equals(dto.getShopId())) { |
| | | return R.fail("删除失败"); |
| | | return R.fail("删除失败,该活动不属于该店铺"); |
| | | } |
| | | lotteryEvent.setDelFlag(1); |
| | | lotteryEventService.updateById(lotteryEvent); |
| | |
| | | @ApiOperation(value = "获取门店抽奖详情【2.0】") |
| | | public R<TLotteryEvent> getShopLotteryDrawInfo(@RequestBody DelShopLotteryDrawDto dto) { |
| | | TLotteryEvent lotteryEvent = lotteryEventService.getById(dto.getId()); |
| | | if (null == lotteryEvent) { |
| | | if (null == lotteryEvent || 1 == lotteryEvent.getDelFlag()) { |
| | | return R.fail("抽奖活动不存在"); |
| | | } |
| | | if (!lotteryEvent.getShopId().equals(dto.getShopId().intValue())) { |