| | |
| | | return ResultUtil.error("验证码无效"); |
| | | } |
| | | TAppUser tAppUser = this.baseMapper.selectOne(new QueryWrapper<TAppUser>().eq("phone", phone).ne("state", 3)); |
| | | if(tAppUser==null){ |
| | | return ResultUtil.error("该账号未注册", ""); |
| | | } |
| | | if(tAppUser.getState() == 2){ |
| | | return ResultUtil.error("您的账号已被冻结", ""); |
| | | } |
| | |
| | | if (ToolUtil.isEmpty(merchandise)){ |
| | | return ResultUtil.error("商品不存在"); |
| | | } |
| | | |
| | | |
| | | TAppUser tAppUser = this.baseMapper.selectById(userIdFormRedis); |
| | | |
| | | |
| | | if(merchandise.getUserPopulation()==2){ |
| | | if(tAppUser.getIsVip()==0){ |
| | | return ResultUtil.error("该商品只能年度会员购买"); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | if(merchandise.getUserPopulation()==3){ |
| | | List<TStudent> students = tsmapper.selectList(new LambdaQueryWrapper<TStudent>().eq(TStudent::getAppUserId, userIdFormRedis)); |
| | | if(students.size()==0){ |
| | | return ResultUtil.error("该商品只能已有学员用户购买"); |
| | | } |
| | | } |
| | | |
| | | |
| | | if (ToolUtil.isEmpty(tAppUser)){ |
| | | return ResultUtil.error("用户不存在"); |
| | | } |