|
|
@@ -126,16 +126,17 @@ public class InsectPestDetectionController {
|
|
126
|
126
|
})
|
|
127
|
127
|
public ResponseEntity addInsectPestData(String insectPests) {
|
|
128
|
128
|
|
|
129
|
|
- Map<String, Object> modelMap = new HashMap<String, Object>();
|
|
|
129
|
+// Map<String, Object> modelMap = new HashMap<String, Object>();
|
|
130
|
130
|
|
|
131
|
131
|
try {
|
|
132
|
132
|
insectPestDetectionService.saveOrUpdate(insectPests);
|
|
133
|
|
- modelMap.put("msg", "保存成功");
|
|
|
133
|
+// modelMap.put("msg", "保存成功");
|
|
134
|
134
|
} catch (Exception e) {
|
|
135
|
|
- modelMap.put("msg", "保存失败");
|
|
|
135
|
+// modelMap.put("msg", "保存失败");
|
|
136
|
136
|
e.printStackTrace();
|
|
|
137
|
+ ResponseEntity.failed("保存失败");
|
|
137
|
138
|
}
|
|
138
|
|
- return ResponseEntity.ok(modelMap);
|
|
|
139
|
+ return ResponseEntity.ok();
|
|
139
|
140
|
}
|
|
140
|
141
|
|
|
141
|
142
|
@RequestMapping(value = "/getInsectPestDeatil", method = RequestMethod.POST)
|