master
zyy 5 years ago
parent 1c1d35401f
commit 83006f6faf

@ -85,16 +85,16 @@ public class AwardListServiceImpl extends BaseServiceImpl<AwardListMapper, Award
Users users = usersMapper.selectOne(Wrappers.<Users>lambdaQuery().eq(Users::getOpenId, openId) Users users = usersMapper.selectOne(Wrappers.<Users>lambdaQuery().eq(Users::getOpenId, openId)
.and(queryWrapper1 -> queryWrapper1.eq(Users::getState, 1))); .and(queryWrapper1 -> queryWrapper1.eq(Users::getState, 1)));
// if (redisService.exists("user-award-" + users.getId())) { if (redisService.exists("user-award-" + users.getId())) {
//
// AwardList userAWardList = userAWardList = awardListMapper.selectOne(Wrappers.<AwardList>lambdaQuery().eq(AwardList::getUserId, users.getId())); AwardList userAWardList = userAWardList = awardListMapper.selectOne(Wrappers.<AwardList>lambdaQuery().eq(AwardList::getUserId, users.getId()));
// if (null != userAWardList) { if (null != userAWardList) {
//
//
// redisService.set("user-award-" + users.getId(), userAWardList.toString()); redisService.set("user-award-" + users.getId(), userAWardList.toString());
// throw new AreadyAwardException("您已经抽过奖了, 不要太贪心哦~~~"); throw new AreadyAwardException("您已经抽过奖了, 不要太贪心哦~~~");
// } }
// } }
// synchronized (this) { // synchronized (this) {
AwardList maxIdAward = awardListMapper.selectByMaxId(); AwardList maxIdAward = awardListMapper.selectByMaxId();

Loading…
Cancel
Save