Commit bbbe8282 by 袁伟铭

修改

parent 4244fe51
package com.zq.portal.service; package com.zq.portal.service;
import cn.hutool.core.util.NumberUtil;
import com.zq.common.config.redis.RedisUtils; import com.zq.common.config.redis.RedisUtils;
import com.zq.common.entity.SystemArea; import com.zq.common.entity.SystemArea;
import com.zq.portal.dao.AreaDao; import com.zq.portal.dao.AreaDao;
...@@ -77,14 +78,17 @@ public class StatsService { ...@@ -77,14 +78,17 @@ public class StatsService {
private Map<String, Object> getMapStatsObj(List<StatsVo> statsList, String type) { private Map<String, Object> getMapStatsObj(List<StatsVo> statsList, String type) {
Map<String, Object> mapObj = new HashMap<>(); Map<String, Object> mapObj = new HashMap<>();
mapObj.put("type", type); mapObj.put("type", type);
mapObj.put("one", "0");
mapObj.put("two", "0");
mapObj.put("three", "0");
for (int i = 0; i < statsList.size(); i++) { for (int i = 0; i < statsList.size(); i++) {
StatsVo statsVo = statsList.get(i); StatsVo statsVo = statsList.get(i);
if (i == 0) { if (i == 0) {
mapObj.put("one", statsVo.getNum()); mapObj.put("one", NumberUtil.toStr(statsVo.getNum(), "0"));
} else if (i == 1) { } else if (i == 1) {
mapObj.put("two", statsVo.getNum()); mapObj.put("two", NumberUtil.toStr(statsVo.getNum(), "0"));
} else if (i == 2) { } else if (i == 2) {
mapObj.put("three", statsVo.getNum()); mapObj.put("three", NumberUtil.toStr(statsVo.getNum(), "0"));
} }
} }
return mapObj; return mapObj;
......
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