抽奖修改
This commit is contained in:
parent
19db286c01
commit
1715e5e799
|
|
@ -207,9 +207,9 @@ public class DiscSpinningController {
|
|||
} else {
|
||||
String redisKey = "";
|
||||
if (source.equals(2)) {
|
||||
redisKey = RedisKeys.getDateKey("spinning:amount:taskW") + userId;
|
||||
redisKey = RedisKeys.getDateKey("spinning:draw:taskW") + userId;
|
||||
} else if (source.equals(3)) {
|
||||
redisKey = RedisKeys.getDateKey("spinning:amount:taskM") + userId;
|
||||
redisKey = RedisKeys.getDateKey("spinning:draw:taskM") + userId;
|
||||
}
|
||||
Map<String, Object> week = redisUtils.get(redisKey, Map.class);
|
||||
for (Map.Entry<String, Object> entry : week.entrySet()) {
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ public class DiscSpinningServiceImpl extends ServiceImpl<DiscSpinningDao, DiscSp
|
|||
@Transactional
|
||||
public DiscSpinningRecord draws(int drawCount, double orderAmount, Long sourceId, Long userId, Integer source) {
|
||||
DiscSpinning result = new DiscSpinning("谢谢惠顾", 1, BigDecimal.ZERO);
|
||||
List<DiscSpinning> prizes = baseMapper.selectList(new QueryWrapper<DiscSpinning>().eq("disc_type", source).orderByAsc("odds"));
|
||||
List<DiscSpinning> prizes = baseMapper.selectList(new QueryWrapper<DiscSpinning>().eq("disc_type", source).orderByAsc("number"));
|
||||
if (CollectionUtil.isEmpty(prizes)) {
|
||||
DiscSpinningRecord record = new DiscSpinningRecord(result.getName(), sourceId, userId, result.getUrl(), result.getType(),
|
||||
result.getNumber(), DateUtils.formatYMD(new Date()), DateUtils.format(new Date()), source);
|
||||
|
|
|
|||
|
|
@ -363,7 +363,7 @@ public class TaskCenterServiceImpl extends ServiceImpl<TaskCenterDao, TaskCenter
|
|||
}
|
||||
}
|
||||
if (CollectionUtil.isNotEmpty(taskWRedisMap)) {
|
||||
redisUtils.set(RedisKeys.getDateKey("spinning:amount:taskW") + userId, taskWRedisMap, DateUtils.todayAfterSecond());
|
||||
redisUtils.set(RedisKeys.getDateKey("spinning:draw:taskW") + userId, taskWRedisMap, DateUtils.todayAfterSecond());
|
||||
}
|
||||
} else if ("3".equals(type)) {
|
||||
if (signCount == null) {
|
||||
|
|
@ -379,7 +379,7 @@ public class TaskCenterServiceImpl extends ServiceImpl<TaskCenterDao, TaskCenter
|
|||
}
|
||||
}
|
||||
if (CollectionUtil.isNotEmpty(taskWRedisMap)) {
|
||||
redisUtils.set(RedisKeys.getDateKey("spinning:amount:taskM") + userId, taskWRedisMap, DateUtils.todayAfterSecond());
|
||||
redisUtils.set(RedisKeys.getDateKey("spinning:draw:taskM") + userId, taskWRedisMap, DateUtils.todayAfterSecond());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue