|
@@ -1,5 +1,6 @@
|
|
package com.huimv.admin.service.impl;
|
|
package com.huimv.admin.service.impl;
|
|
|
|
|
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
import cn.hutool.http.HttpRequest;
|
|
import cn.hutool.http.HttpRequest;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
@@ -313,7 +314,12 @@ public class FeedAreaServiceImpl extends ServiceImpl<FeedAreaMapper, FeedArea> i
|
|
format = "0.00";
|
|
format = "0.00";
|
|
}
|
|
}
|
|
JSONObject jsonObject = new JSONObject();
|
|
JSONObject jsonObject = new JSONObject();
|
|
- jsonObject.put("pigNum", pig.getNumber());
|
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(pig)) {
|
|
|
|
+ jsonObject.put("pigNum", pig.getNumber());
|
|
|
|
+ } else {
|
|
|
|
+ jsonObject.put("pigNum", 0);
|
|
|
|
+ }
|
|
|
|
+
|
|
jsonObject.put("feedEnv", envs.size());
|
|
jsonObject.put("feedEnv", envs.size());
|
|
jsonObject.put("online", online);
|
|
jsonObject.put("online", online);
|
|
jsonObject.put("rank", format);
|
|
jsonObject.put("rank", format);
|