From 351b9a53cb9ecebdf8f79db0117f540d9c42c2a4 Mon Sep 17 00:00:00 2001
From: whycrzg <ruanzhigang@whycst.com>
Date: 星期二, 23 二月 2021 17:19:23 +0800
Subject: [PATCH] update

---
 src/main/java/com/fgkj/controller/Batt_param_lowController.java |   19 +++++++++++--------
 1 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/src/main/java/com/fgkj/controller/Batt_param_lowController.java b/src/main/java/com/fgkj/controller/Batt_param_lowController.java
index 879ced6..4775714 100644
--- a/src/main/java/com/fgkj/controller/Batt_param_lowController.java
+++ b/src/main/java/com/fgkj/controller/Batt_param_lowController.java
@@ -8,39 +8,42 @@
 import com.fgkj.services.Batt_param_lowService;
 import com.google.gson.Gson;
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
 
+import javax.annotation.Resource;
+
 @RequestMapping("battParamLow")
 @RestController
-@Api
+@Api(tags = "battParamLow鎺ュ彛")
 public class Batt_param_lowController{
 
-	@Autowired
+	@Resource
 	private Batt_param_lowService service;
 
-	private ServiceModel model;
+	ServiceModel model = new ServiceModel();
 
 	// private Batt_param_low blow;
 	// private String blowstr;
 
 	@GetMapping("all")
+	@ApiOperation(notes = "",value="鏌ヨ鎵�鏈�")
 	public ServiceModel searchAll(){
-		model=service.searchAll();
+		ServiceModel model=service.searchAll();
 		//System.out.println(result);
 		return model;
 	}
 
-	@PutMapping("all")
+	@PutMapping("updateAll")
+	@ApiOperation(notes = "[{ \"low_type\": 1, \"low_nametype\": 1, \"low_value\": 0.0, \"low_method\": 0 }]",value="鍏ㄩ儴鏇存柊")
 	public ServiceModel updateAll(@RequestBody List<Batt_param_low> list){
 		Gson gson=new Gson();
 		UserRole u=new UserRole();
 		// List<Batt_param_low> list = gson.fromJson(blowstr, new TypeToken<List<Batt_param_low>>(){}.getType());
-		for(int i=0;i<list.size();i++){
-			model=service.update(list.get(i));
-		}
+		ServiceModel model=service.update(list);
 		return model;
 	}
 }

--
Gitblit v1.9.1