|
@@ -1,6 +1,11 @@
|
|
package com.huimv.cattle.controller;
|
|
package com.huimv.cattle.controller;
|
|
|
|
|
|
|
|
|
|
|
|
+import com.huimv.cattle.pojo.PreventDetection;
|
|
|
|
+import com.huimv.cattle.service.PreventDetectionService;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
@@ -14,8 +19,16 @@ import org.springframework.web.bind.annotation.RestController;
|
|
* @since 2022-12-14
|
|
* @since 2022-12-14
|
|
*/
|
|
*/
|
|
@RestController
|
|
@RestController
|
|
-@RequestMapping("/prevent-detection")
|
|
|
|
|
|
+@RequestMapping("/preventDetection")
|
|
public class PreventDetectionController {
|
|
public class PreventDetectionController {
|
|
|
|
+ @Autowired
|
|
|
|
+ private PreventDetectionService preventDetectionService;
|
|
|
|
+
|
|
|
|
+ @PostMapping("/add")
|
|
|
|
+ public void add(@RequestBody PreventDetection preventDetection){
|
|
|
|
+// Validator.notNull(clientId, ErrorCode.INPUT_PARAMETERS_NULL);
|
|
|
|
+ preventDetectionService.save(preventDetection);
|
|
|
|
+ }
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|