记得上下班打卡 | git大法好,push需谨慎

Commit 4caa5244 authored by Administrator's avatar Administrator 🎨

Merge branch 'pre' into 'master'

Pre

See merge request !89
parents 5f17bfdc bc3803c1
...@@ -24,11 +24,11 @@ public class SweetConstant { ...@@ -24,11 +24,11 @@ public class SweetConstant {
public final static String REDIS_KEY_SWEET_WECHAT_USER_INFO_STR="sweet:wechatUser:unionIdStr:"; public final static String REDIS_KEY_SWEET_WECHAT_USER_INFO_STR="sweet:wechatUser:unionIdStr:";
public final static String REDIS_KEY_SWEET_WECHAT_USER_UNIONID="sweet:wechatUser:openId:"; public final static String REDIS_KEY_SWEET_WECHAT_USER_UNIONID="sweet:wechatUser:openId:";
public final static String REDIS_KEY_SWEET_ANSWER_PHONE="sweet:answer:phone:"; public final static String REDIS_KEY_SWEET_ANSWER_PHONE="sweet:answer:phone:";
public final static String REDIS_KEY_SWEET_CITY_VOTE_STAT_LIST="sweet:cityVote:StatList"; public final static String REDIS_KEY_SWEET_CITY_VOTE_STAT_LIST=":StatList";
public final static String REDIS_KEY_SWEET_CITY_VOTE_CITY_CODE="sweet:cityVote:cityCode:"; public final static String REDIS_KEY_SWEET_CITY_VOTE_CITY_CODE=":cityCode:";
public final static String REDIS_KEY_SWEET_CITY_VOTE="sweet:cityVote"; public final static String REDIS_KEY_SWEET_CITY_VOTE="sweet:cityVote";
public final static String REDIS_KEY_SWEET_CITY_VOTE_USER=":user:"; public final static String REDIS_KEY_SWEET_CITY_VOTE_USER=":user:";
public final static String REDIS_KEY_SWEET_CITY_VOTE_STAT_UPDATE_TIME="sweet:cityVote:updateTime"; public final static String REDIS_KEY_SWEET_CITY_VOTE_STAT_UPDATE_TIME=":updateTime";
public final static String REDIS_KEY_SWEET_WECHAT_USER_INFO_MODERNSKY="sweet:wechatUser:modernsky:unionId:"; public final static String REDIS_KEY_SWEET_WECHAT_USER_INFO_MODERNSKY="sweet:wechatUser:modernsky:unionId:";
public final static String REDIS_KEY_SWEET_WECHAT_USER_INFO_STR_MODERNSKY="sweet:wechatUser:modernsky:unionIdStr:"; public final static String REDIS_KEY_SWEET_WECHAT_USER_INFO_STR_MODERNSKY="sweet:wechatUser:modernsky:unionIdStr:";
......
...@@ -493,11 +493,13 @@ public class RedisDataUtils { ...@@ -493,11 +493,13 @@ public class RedisDataUtils {
// 投票 // 投票
public void setSweetCityVoteStatList(List<SweetCItyVoteStatVo> sweetCItyVoteStatVo, Integer type) { public void setSweetCityVoteStatList(List<SweetCItyVoteStatVo> sweetCItyVoteStatVo, Integer type) {
String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_STAT_LIST.concat(String.valueOf(type)); String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE.concat(String.valueOf(type))
.concat(SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_STAT_LIST);
redisUtil.set(redisKey, sweetCItyVoteStatVo); redisUtil.set(redisKey, sweetCItyVoteStatVo);
} }
public List<SweetCItyVoteStatVo> getSweetCityVoteStatList(Integer type) { public List<SweetCItyVoteStatVo> getSweetCityVoteStatList(Integer type) {
String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_STAT_LIST.concat(String.valueOf(type)); String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE.concat(String.valueOf(type))
.concat(SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_STAT_LIST);
Object obj = redisUtil.get(redisKey); Object obj = redisUtil.get(redisKey);
List<SweetCItyVoteStatVo> sweetCityVoteStatList = ObjectUtil.getSweetCItyVoteStatVoList(); List<SweetCItyVoteStatVo> sweetCityVoteStatList = ObjectUtil.getSweetCItyVoteStatVoList();
if (null != obj) { if (null != obj) {
...@@ -506,11 +508,13 @@ public class RedisDataUtils { ...@@ -506,11 +508,13 @@ public class RedisDataUtils {
return sweetCityVoteStatList; return sweetCityVoteStatList;
} }
public void incrSweetCityVote(String cityCode, Integer type) { public void incrSweetCityVote(String cityCode, Integer type) {
String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_CITY_CODE.concat(String.valueOf(type)).concat(cityCode); String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE.concat(String.valueOf(type))
.concat(SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_CITY_CODE).concat(cityCode);
redisUtil.incr(redisKey, 1); redisUtil.incr(redisKey, 1);
} }
public Integer getSweetCityVote(String cityCode, Integer type) { public Integer getSweetCityVote(String cityCode, Integer type) {
String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_CITY_CODE.concat(String.valueOf(type)).concat(cityCode); String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE.concat(String.valueOf(type))
.concat(SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_CITY_CODE).concat(cityCode);
Object obj = redisUtil.get(redisKey); Object obj = redisUtil.get(redisKey);
if (null == obj) { if (null == obj) {
return 0; return 0;
...@@ -534,11 +538,13 @@ public class RedisDataUtils { ...@@ -534,11 +538,13 @@ public class RedisDataUtils {
} }
} }
public void setSweetCityVoteStatUpdateTime(Integer type) { public void setSweetCityVoteStatUpdateTime(Integer type) {
String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_STAT_UPDATE_TIME.concat(String.valueOf(type)); String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE.concat(String.valueOf(type))
.concat(SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_STAT_UPDATE_TIME);
redisUtil.set(redisKey, DateUtil.getNowTime()); redisUtil.set(redisKey, DateUtil.getNowTime());
} }
public String getSweetCityVoteStatUpdateTime(Integer type) { public String getSweetCityVoteStatUpdateTime(Integer type) {
String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_STAT_UPDATE_TIME.concat(String.valueOf(type)); String redisKey = SweetConstant.REDIS_KEY_SWEET_CITY_VOTE.concat(String.valueOf(type))
.concat(SweetConstant.REDIS_KEY_SWEET_CITY_VOTE_STAT_UPDATE_TIME);
Object obj = redisUtil.get(redisKey); Object obj = redisUtil.get(redisKey);
if (null == obj) { if (null == obj) {
return ""; return "";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment