| | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.jline.utils.Log; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | @Value("${spring.profiles.active}") |
| | | private String active; |
| | | |
| | | @Scheduled(cron = "0 0/5 * * * ? ") |
| | | public void updateAwardInfo(){ |
| | | Log.info("更新挂架开奖记录"); |
| | |
| | | DappOnHookAward dappOnHookAward = dappOnHookAwardDao.selectByByAwardTime(yyyyMMddHHMM); |
| | | dappOnHookAward.setState(1); |
| | | dappOnHookAwardDao.updateById(dappOnHookAward); |
| | | String redisKey = "on_hook_award_id"; |
| | | String redisKey = ""; |
| | | if("prod".equals(active)){ |
| | | redisKey = "on_hook_award_id"; |
| | | }else{ |
| | | redisKey = "on_hook_award_id_test"; |
| | | } |
| | | String onHookAwardRedisId = redisUtils.getString(redisKey); |
| | | if(StrUtil.isBlank(onHookAwardRedisId)){ |
| | | redisUtils.set(redisKey,dappOnHookAward.getId().toString(),0L); |