Newspaper 1 سال پیش
والد
کامیت
55a134bcf1

+ 20 - 0
snowy-web-app/src/main/java/vip/xiaonuo/core/config/BaseConfigure.java

@@ -184,4 +184,24 @@ public class BaseConfigure {
                 .paths(PathSelectors.any())
                 .build().extensions(openApiExtensionResolver.buildExtensions("精准饲喂系统"));
     }
+
+    @Bean(value = "warningDocApi")
+    public Docket warningDocApi() {
+        return new Docket(DocumentationType.SWAGGER_2)
+                .apiInfo(new ApiInfoBuilder()
+                        .title("预警")
+                        .description("预警")
+                        .termsOfServiceUrl("https://www.xiaonuo.vip")
+                        .contact(new Contact("HUIMV","https://www.xiaonuo.vip", "xuyuxiang29@foxmail.com"))
+                        .version("2.0.0")
+                        .build())
+                .globalResponseMessage(RequestMethod.GET, CommonResult.responseList())
+                .globalResponseMessage(RequestMethod.POST, CommonResult.responseList())
+                .groupName("预警")
+                .select()
+                .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
+                .apis(RequestHandlerSelectors.basePackage("vip.xiaonuo.modular.warning"))
+                .paths(PathSelectors.any())
+                .build().extensions(openApiExtensionResolver.buildExtensions("预警"));
+    }
 }

+ 1 - 1
snowy-web-app/src/main/java/vip/xiaonuo/modular/InternalCar/controller/InternalCarController.java

@@ -45,7 +45,7 @@ import javax.validation.constraints.NotEmpty;
  * @date  2023/12/05 16:29
  */
 @Api(tags = "internal_car控制器")
-@ApiSupport(author = "SNOWY_TEAM", order = 1)
+@ApiSupport(author = "HUIMV", order = 1)
 @RestController
 @Validated
 public class InternalCarController {

+ 9 - 9
snowy-web-app/src/main/java/vip/xiaonuo/modular/base/department/controller/DepartmentController.java

@@ -102,15 +102,15 @@ public class DepartmentController {
     @ApiOperation("添加部门")
     @CommonLog("添加部门")
     @PostMapping("/base/department/add")
-    public CommonResult<String> add(@RequestPart @ApiParam(value = "部门名称") String departmentName,
-                                    @RequestPart @ApiParam(value = "上级部门ID") String parentId,
-                                    @RequestPart @ApiParam(value = "所在区域") String departmentRegion,
-                                    @RequestPart @ApiParam(value = "详细地址") String detailLocation,
-                                    @RequestPart(required = false) @ApiParam(value = "部门电话") String departmentPhone,
-                                    @RequestPart(required = false) @ApiParam(value = "部门负责人") String departmentManager,
-                                    @RequestPart(required = false) @ApiParam(value = "描述") String remarks,
-                                    @RequestPart(required = false) @ApiParam(value = "排序码") Integer sortCode,
-                                    @RequestPart(value = "departmentImgUrl", required = false) @ApiParam(value = "部门图片") MultipartFile departmentImgUrl) {
+    public CommonResult<String> add(@RequestParam @ApiParam(value = "部门名称") String departmentName,
+                                    @RequestParam @ApiParam(value = "上级部门ID") String parentId,
+                                    @RequestParam @ApiParam(value = "所在区域") String departmentRegion,
+                                    @RequestParam @ApiParam(value = "详细地址") String detailLocation,
+                                    @RequestParam(required = false) @ApiParam(value = "部门电话") String departmentPhone,
+                                    @RequestParam(required = false) @ApiParam(value = "部门负责人") String departmentManager,
+                                    @RequestParam(required = false) @ApiParam(value = "描述") String remarks,
+                                    @RequestParam(required = false) @ApiParam(value = "排序码") Integer sortCode,
+                                    @RequestParam(value = "departmentImgUrl", required = false) @ApiParam(value = "部门图片") MultipartFile departmentImgUrl) {
         departmentService.add(departmentName,parentId,departmentRegion,detailLocation,departmentPhone,departmentManager,remarks,sortCode,departmentImgUrl);
         return CommonResult.ok();
     }

+ 1 - 1
snowy-web-app/src/main/java/vip/xiaonuo/modular/energy/energyDevice/controller/EnergyDeviceController.java

@@ -49,7 +49,7 @@ import java.util.Map;
  * @date  2023/12/28 08:46
  */
 @Api(tags = "能耗设备控制器")
-@ApiSupport(author = "SNOWY_TEAM", order = 1)
+@ApiSupport(author = "HUIMV", order = 1)
 @RestController
 @Validated
 public class EnergyDeviceController {

+ 5 - 4
snowy-web-app/src/main/java/vip/xiaonuo/modular/energy/energythreshold/controller/EnergyThresholdController.java

@@ -18,6 +18,7 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RestController;
 import vip.xiaonuo.common.pojo.CommonResult;
 import vip.xiaonuo.modular.energy.energyThreshold.entity.EnergyThreshold;
@@ -41,7 +42,7 @@ import javax.annotation.Resource;
  * @date  2023/12/26 09:32
  */
 @Api(tags = "能耗阈值控制器")
-@ApiSupport(author = "SNOWY_TEAM", order = 1)
+@ApiSupport(author = "HUIMV", order = 1)
 @RestController
 @Validated
 public class EnergyThresholdController {
@@ -70,7 +71,7 @@ public class EnergyThresholdController {
      */
     @ApiOperationSupport(order = 1)
     @ApiOperation("编辑能耗阈值")
-    @GetMapping("/energy/energyThreshold/saveThreshold")
+    @PostMapping("/energy/energyThreshold/saveThreshold")
     public CommonResult<String> saveThreshold(EnergyThresholdSaveParam energyThresholdSaveParam) {
         energyThresholdService.saveThreshold(energyThresholdSaveParam);
         return CommonResult.ok();
@@ -85,7 +86,7 @@ public class EnergyThresholdController {
      */
     @ApiOperationSupport(order = 2)
     @ApiOperation("修改能耗阈值状态")
-    @GetMapping("/energy/energyThreshold/modifyThresholdStatus")
+    @PostMapping("/energy/energyThreshold/modifyThresholdStatus")
     public CommonResult<String> modifyThresholdStatus(EnergyThresholdModifyParam energyThresholdModifyParam) {
         energyThresholdService.modifyThresholdStatus(energyThresholdModifyParam);
         return CommonResult.ok();
@@ -99,7 +100,7 @@ public class EnergyThresholdController {
      */
     @ApiOperationSupport(order = 2)
     @ApiOperation("同步能耗阈值")
-    @GetMapping("/energy/energyThreshold/syncThreshold")
+    @PostMapping("/energy/energyThreshold/syncThreshold")
     public CommonResult<String> syncThreshold(EnergyThresholdSyncParam energyThresholdSyncParam) {
         energyThresholdService.syncThreshold(energyThresholdSyncParam);
         return CommonResult.ok();

+ 8 - 7
snowy-web-app/src/main/java/vip/xiaonuo/modular/env/envThreshold/controller/EnvThresholdController.java

@@ -20,6 +20,7 @@ import io.swagger.annotations.ApiOperation;
 import org.springframework.validation.annotation.Validated;
 
 import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 import vip.xiaonuo.common.pojo.CommonResult;
@@ -41,7 +42,7 @@ import javax.annotation.Resource;
  * @date  2023/12/25 15:38
  */
 @Api(tags = "环控阈值控制器")
-@ApiSupport(author = "SNOWY_TEAM", order = 1)
+@ApiSupport(author = "HUIMV", order = 1)
 @RestController
 @Validated
 public class EnvThresholdController {
@@ -68,9 +69,9 @@ public class EnvThresholdController {
      * @author newspaper
      * @date  2023/12/25 15:45
      */
-    @ApiOperationSupport(order = 1)
+    @ApiOperationSupport(order = 2)
     @ApiOperation("编辑环控阈值")
-    @GetMapping("/env/envThreshold/saveThreshold")
+    @PostMapping("/env/envThreshold/saveThreshold")
     public CommonResult<String> saveThreshold(EnvThresholdSaveParam envThresholdSaveParam) {
         envThresholdService.saveThreshold(envThresholdSaveParam);
         return CommonResult.ok();
@@ -83,9 +84,9 @@ public class EnvThresholdController {
      * @author newspaper
      * @date  2023/12/25 15:45
      */
-    @ApiOperationSupport(order = 2)
+    @ApiOperationSupport(order = 3)
     @ApiOperation("修改环控阈值状态")
-    @GetMapping("/env/envThreshold/modifyThresholdStatus")
+    @PostMapping("/env/envThreshold/modifyThresholdStatus")
     public CommonResult<String> modifyThresholdStatus(EnvThresholdModifyParam envThresholdModifyParam) {
         envThresholdService.modifyThresholdStatus(envThresholdModifyParam);
         return CommonResult.ok();
@@ -97,9 +98,9 @@ public class EnvThresholdController {
      * @author newspaper
      * @date  2023/12/25 15:45
      */
-    @ApiOperationSupport(order = 2)
+    @ApiOperationSupport(order = 4)
     @ApiOperation("同步环控阈值")
-    @GetMapping("/env/envThreshold/syncThreshold")
+    @PostMapping("/env/envThreshold/syncThreshold")
     public CommonResult<String> syncThreshold(EnvThresholdSyncParam envThresholdSyncParam) {
         envThresholdService.syncThreshold(envThresholdSyncParam);
         return CommonResult.ok();

+ 2 - 2
snowy-web-app/src/main/java/vip/xiaonuo/modular/env/envdata/controller/EnvDataController.java

@@ -55,8 +55,8 @@ public class EnvDataController {
      */
     @ApiOperationSupport(order = 1)
     @ApiOperation("根据楼层ID获取最新环控数据")
-    @PostMapping("/env/envData/getLastDataByPigpenId")
-    public CommonResult<List<EnvDataRecentVo>> getLastDataByPigpenId(@RequestBody @Valid EnvDataPigpenIdParm envDataPigpenIdParm){
+    @GetMapping("/env/envData/getLastDataByPigpenId")
+    public CommonResult<List<EnvDataRecentVo>> getLastDataByPigpenId(EnvDataPigpenIdParm envDataPigpenIdParm){
         return CommonResult.data(envDataService.getLastDataByPigpenId(envDataPigpenIdParm));
     }
 

+ 1 - 1
snowy-web-app/src/main/java/vip/xiaonuo/modular/env/envdevice/controller/EnvDeviceController.java

@@ -152,7 +152,7 @@ public class EnvDeviceController {
      */
     @ApiOperationSupport(order = 7)
     @ApiOperation("获取栋舍选择器")
-    @GetMapping("/energy/energyDevice/pipgpenSelector")
+    @GetMapping("/env/envdevice/pipgpenSelector")
     public CommonResult<List<Tree<String>>> pipgpenSelector() {
         return CommonResult.data(basePigpenService.tree());
     }

+ 1 - 1
snowy-web-app/src/main/java/vip/xiaonuo/modular/people/controller/PeopleListController.java

@@ -43,7 +43,7 @@ import java.io.IOException;
  * @date  2023/12/04 16:16
  */
 @Api(tags = "people_list控制器")
-@ApiSupport(author = "SNOWY_TEAM", order = 1)
+@ApiSupport(author = "HUIMV", order = 1)
 @RestController
 @Validated
 public class PeopleListController {

+ 1 - 1
snowy-web-app/src/main/java/vip/xiaonuo/modular/warning/warningInfo/controller/WarningInfoController.java

@@ -47,7 +47,7 @@ import java.util.List;
  * @date  2023/12/26 13:40
  */
 @Api(tags = "预警控制器")
-@ApiSupport(author = "SNOWY_TEAM", order = 1)
+@ApiSupport(author = "HUIMV", order = 1)
 @RestController
 @Validated
 public class WarningInfoController {

+ 1 - 1
snowy-web-app/src/main/java/vip/xiaonuo/modular/warning/warningManager/controller/WarningManagerController.java

@@ -38,7 +38,7 @@ import javax.validation.Valid;
  * @date  2023/12/25 09:36
  */
 @Api(tags = "预警负责人控制器")
-@ApiSupport(author = "SNOWY_TEAM", order = 1)
+@ApiSupport(author = "HUIMV", order = 1)
 @RestController
 @Validated
 public class WarningManagerController {