...
|
...
|
@@ -6,6 +6,8 @@ import java.util.Map; |
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
import com.yoho.activity.common.redis.CacheKeyEnum;
|
|
|
import com.yoho.activity.common.redis.RedisValueCache;
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
...
|
...
|
@@ -35,6 +37,8 @@ public class UserdayPrizeLogServiceImpl implements IUserdayPrizeLogService { |
|
|
private IUserdayPrizeLogDAO userdayPrizeLogDAO;
|
|
|
@Resource(name = "userdayDrawPrizeService")
|
|
|
Map<Integer, IUserdayDrawPrizeService> userdayDrawPrizeServiceMap;
|
|
|
@Resource
|
|
|
RedisValueCache redisValueCache;
|
|
|
|
|
|
@Value("${userday.open.day}")
|
|
|
String userdayOpenDay;
|
...
|
...
|
@@ -127,7 +131,7 @@ public class UserdayPrizeLogServiceImpl implements IUserdayPrizeLogService { |
|
|
for (UserdayPrizeLog dal : userdayPrizeLogList) {
|
|
|
bo = new UserdayPrizeLogResponseBO();
|
|
|
BeanUtils.copyProperties(dal, bo);
|
|
|
bo.setWinningTime(DateUtils.long2DateStr(((long)bo.getCreateTime()) * 1000, "HH:mm"));
|
|
|
bo.setWinningTime(DateUtils.long2DateStr(((long) bo.getCreateTime()) * 1000, "HH:mm"));
|
|
|
list.add(bo);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -135,4 +139,12 @@ public class UserdayPrizeLogServiceImpl implements IUserdayPrizeLogService { |
|
|
return list;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public int queryPrizeLogNum(int prize_type) {
|
|
|
log.info("enter queryPrizeLogNum. param prize_type={}", prize_type);
|
|
|
int realNum = userdayPrizeLogDAO.selectNumByPrizeType(prize_type);
|
|
|
Integer virtualNum = redisValueCache.get(CacheKeyEnum.USERDAY_DRAWPRIZENUM, "", Integer.class);
|
|
|
return realNum + (null == virtualNum ? 0 : virtualNum);
|
|
|
}
|
|
|
|
|
|
} |
...
|
...
|
|