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

Commit 74666ad3 authored by jiangxiulong's avatar jiangxiulong

null

parent 34541450
...@@ -49,16 +49,19 @@ public class SweetCityVoteServiceImpl extends ServiceImpl<SweetCityVoteMapper, S ...@@ -49,16 +49,19 @@ public class SweetCityVoteServiceImpl extends ServiceImpl<SweetCityVoteMapper, S
public ResponseDto getList(String phone, String unionId) { public ResponseDto getList(String phone, String unionId) {
List<SweetCItyVoteStatVo> sweetCityVoteStatList = redisDataUtils.getSweetCityVoteStatList(); List<SweetCItyVoteStatVo> sweetCityVoteStatList = redisDataUtils.getSweetCityVoteStatList();
SweetCityVoteParam userVote = redisDataUtils.getUserVote(phone, unionId); SweetCityVoteParam userVote = redisDataUtils.getUserVote(phone, unionId);
String cityCode = userVote.getCityCode(); if (!CollectionUtils.isEmpty(sweetCityVoteStatList)) {
for (SweetCItyVoteStatVo info : sweetCityVoteStatList) { String cityCode = userVote.getCityCode();
if (null == userVote) { for (SweetCItyVoteStatVo info : sweetCityVoteStatList) {
info.setIsVote(1); if (null == userVote) {
} else if (cityCode.equals(info.getCityCode())) { info.setIsVote(1);
info.setIsVote(2); } else if (cityCode.equals(info.getCityCode())) {
} else { info.setIsVote(2);
info.setIsVote(3); } else {
info.setIsVote(3);
}
} }
} }
HashMap<String, Object> stringObjectHashMap = CollectionUtil.mapStringObject(); HashMap<String, Object> stringObjectHashMap = CollectionUtil.mapStringObject();
stringObjectHashMap.put("list", sweetCityVoteStatList); stringObjectHashMap.put("list", sweetCityVoteStatList);
stringObjectHashMap.put("userVote", userVote); stringObjectHashMap.put("userVote", userVote);
......
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