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

Commit 37f39323 authored by jiangxiulong's avatar jiangxiulong

city排名默认

parent 5720e58b
......@@ -129,11 +129,11 @@ public class SweetCityVoteServiceImpl extends ServiceImpl<SweetCityVoteMapper, S
ArrayList<SweetCItyVoteStatVo> newList = ObjectUtil.getSweetCItyVoteStatVoList();
if (!CollectionUtils.isEmpty(list)) {
Integer ranking = 0;
Integer rankingUpOrDown = 2;
Integer rankingUpOrDown = 1;
for (SweetCityVoteStatDto cityVote : list) {
SweetCItyVoteStatVo voteStatVo = SweetCItyVoteStatVo.getNew().copy(cityVote);
voteStatVo.setRanking(ranking);
// 1.找到了老数据就进行对比 2.未找到说明是新增的 默认为排名上升 3.第一次没有统计过默认也是上升
// 1.找到了老数据就进行对比 2.未找到说明是新增的 默认为排名不变 3.第一次没有统计过默认不变
for (SweetCItyVoteStatVo statVoOld : sweetCityVoteStatList) {
if (statVoOld.getCityCode().equals(cityVote.getCityCode())) {
Integer oldRanking = statVoOld.getRanking();
......
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