|
@@ -58,10 +58,23 @@ public class ProtThresholdServiceImpl extends ServiceImpl<ProtThresholdMapper, P
|
|
|
if (protThresholdList.size() == 0) {
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
|
|
|
- jsonObject.put("in", getProtThreshold());
|
|
|
- jsonObject.put("deal", getProtThreshold());
|
|
|
- jsonObject.put("out", getProtThreshold());
|
|
|
- jsonObject.put("userIds", new ArrayList<>());
|
|
|
+ jsonObject.put("in", getProtThreshold());
|
|
|
+ jsonObject.put("deal", getProtThreshold());
|
|
|
+ jsonObject.put("out", getProtThreshold());
|
|
|
+ jsonObject.put("userIds", new ArrayList<>());
|
|
|
+ ProtThreshold protThreshold = new ProtThreshold();
|
|
|
+ protThreshold.setFarmId(Integer.parseInt(farmId));
|
|
|
+ protThreshold.setProtType(1);
|
|
|
+ protThresholdMapper.insert(protThreshold);
|
|
|
+ ProtThreshold protThreshold2 = new ProtThreshold();
|
|
|
+ protThreshold.setFarmId(Integer.parseInt(farmId));
|
|
|
+ protThreshold.setProtType(2);
|
|
|
+ protThresholdMapper.insert(protThreshold2);
|
|
|
+ ProtThreshold protThreshold3 = new ProtThreshold();
|
|
|
+ protThreshold.setFarmId(Integer.parseInt(farmId));
|
|
|
+ protThreshold.setProtType(3);
|
|
|
+ protThresholdMapper.insert(protThreshold3);
|
|
|
+
|
|
|
|
|
|
return new Result(ResultCode.SUCCESS, jsonObject);
|
|
|
} else {
|