From 73bb5617e6aeb4ee8f7dfd4ad54b61d477969d86 Mon Sep 17 00:00:00 2001
From: whycxzp <glperry@163.com>
Date: 星期二, 10 六月 2025 20:22:06 +0800
Subject: [PATCH] 自动充放电自动化流程

---
 src/main/java/com/whyc/controller/BattInfController.java |   46 ++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 42 insertions(+), 4 deletions(-)

diff --git a/src/main/java/com/whyc/controller/BattInfController.java b/src/main/java/com/whyc/controller/BattInfController.java
index dd4430a..826bd8f 100644
--- a/src/main/java/com/whyc/controller/BattInfController.java
+++ b/src/main/java/com/whyc/controller/BattInfController.java
@@ -1,17 +1,55 @@
 package com.whyc.controller;
 
+import com.whyc.dto.Response;
+import com.whyc.pojo.db_batt.BattInf;
 import com.whyc.service.BattInfService;
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
+/**
+ * 寮冪敤,鏁村悎鍒扮數婧愪俊鎭〃浜�
+ */
+@Deprecated
 @RestController
-@Api(tags = "鍦ㄧ敤钃勭數姹犳ā鍧�")
-@RequestMapping("binf")
+@Api(tags = "鐢垫睜淇℃伅")
+@RequestMapping("battInf")
 public class BattInfController {
+
     @Autowired
     private BattInfService service;
 
+    @ApiOperation("鏂板")
+    @PostMapping("add")
+    public Response add(@RequestBody BattInf battInf){
+        return service.add(battInf);
+    }
+
+    @ApiOperation("鍒犻櫎")
+    @PostMapping("delete")
+    public Response delete(@RequestParam int battGroupId){
+        return service.delete(battGroupId);
+    }
+
+    @ApiOperation("淇敼")
+    @PostMapping("update")
+    public Response update(@RequestBody BattInf battInf){
+        return service.update(battInf);
+    }
+
+    @ApiOperation("鏌ヨ-鍒嗛〉")
+    @GetMapping("getPage")
+    public Response getPage(@RequestParam int pageNum,@RequestParam int pageSize){
+        return service.getPage(pageNum,pageSize);
+    }
+
+    @ApiOperation("鏌ヨ-鏍规嵁id")
+    @GetMapping("getById")
+    public Response getById(@RequestParam int battGroupId){
+        BattInf battInf = service.getById(battGroupId);
+        return new Response().set(1,battInf);
+    }
+
 
 }

--
Gitblit v1.9.1