| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.uuid.IdUtils; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.goods.api.domain.GetLotteryEventList; |
| | | import com.ruoyi.goods.api.domain.TLotteryEvent; |
| | | import com.ruoyi.goods.api.domain.TLotteryEventUser; |
| | | import com.ruoyi.goods.api.domain.TUserLotteryEvent; |
| | | import com.ruoyi.goods.api.service.LotteryEventClient; |
| | | import com.ruoyi.goods.service.lottery.ILotteryEventService; |
| | | import com.ruoyi.goods.service.lottery.ILotteryEventUserService; |
| | | import com.ruoyi.goods.service.lottery.IUserLotteryEventService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | |
| | | @Resource |
| | | private IUserLotteryEventService userLotteryEventService; |
| | | |
| | | @Resource |
| | | private ILotteryEventUserService lotteryEventUserService; |
| | | |
| | | |
| | | /** |
| | |
| | | } |
| | | return R.ok(list); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 添加用户抽奖弹框记录 |
| | | * @param lotteryEventUser |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/addLotteryEventUser") |
| | | public R addLotteryEventUser(@RequestBody TLotteryEventUser lotteryEventUser){ |
| | | TLotteryEventUser one = lotteryEventUserService.getOne(new LambdaQueryWrapper<TLotteryEventUser>().eq(TLotteryEventUser::getLotteryEventId, lotteryEventUser.getLotteryEventId()) |
| | | .eq(TLotteryEventUser::getUser_id, lotteryEventUser.getUser_id())); |
| | | if(null == one){ |
| | | lotteryEventUserService.save(lotteryEventUser); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | |
| | | } |