|
|
@@ -1,8 +1,8 @@
|
|
|
package com.zhongshu.iot.server.core.controller.user;
|
|
|
|
|
|
+import com.github.microservice.busInfoModel.device.ProjectInfoModel;
|
|
|
import com.github.microservice.net.ResultContent;
|
|
|
import com.zhongshu.iot.client.model.mqtt.ProjectInfoAddParam;
|
|
|
-import com.github.microservice.busInfoModel.device.ProjectInfoModel;
|
|
|
import com.zhongshu.iot.client.model.mqtt.ProjectInfoSearchParam;
|
|
|
import com.zhongshu.iot.server.core.service.device.ProjectInfoService;
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
@@ -18,7 +18,7 @@ import org.springframework.web.bind.annotation.*;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
|
- * 项目 服务
|
|
|
+ * 分组 服务
|
|
|
*
|
|
|
* @author TRX
|
|
|
* @date 2024/3/21
|
|
|
@@ -26,40 +26,41 @@ import java.util.List;
|
|
|
@RequestMapping("/project")
|
|
|
@RestController
|
|
|
@Validated
|
|
|
-@Tag(name = "项目管理")
|
|
|
+@Tag(name = "分组管理")
|
|
|
public class ProjectInfoController {
|
|
|
|
|
|
@Autowired
|
|
|
- ProjectInfoService projectInfoService;
|
|
|
+ private ProjectInfoService projectInfoService;
|
|
|
|
|
|
- @Operation(summary = "添加-编辑项目")
|
|
|
+ @Operation(summary = "添加-编辑分组")
|
|
|
@RequestMapping(value = "addProjectInfo", method = {RequestMethod.POST})
|
|
|
public ResultContent addProjectInfo(@RequestBody ProjectInfoAddParam param) {
|
|
|
return projectInfoService.addProjectInfo(param);
|
|
|
}
|
|
|
|
|
|
- @Operation(summary = "项目列表-分页查询")
|
|
|
+ @Operation(summary = "分组列表-分页查询")
|
|
|
@RequestMapping(value = {"pageProject"}, method = {RequestMethod.POST})
|
|
|
public ResultContent<Page<ProjectInfoModel>> pageProject(@Parameter(hidden = true) @PageableDefault(page = 0, size = 10) Pageable pageable, ProjectInfoSearchParam param) {
|
|
|
return projectInfoService.page(pageable, param);
|
|
|
}
|
|
|
|
|
|
- @Operation(summary = "删除项目")
|
|
|
+ @Operation(summary = "删除分组")
|
|
|
@RequestMapping(value = "deleteProjectInfo", method = {RequestMethod.GET})
|
|
|
public ResultContent deleteProjectInfo(@Parameter(name = "id") @RequestParam("id") String id) {
|
|
|
return projectInfoService.deleteProjectInfo(id);
|
|
|
}
|
|
|
|
|
|
- @Operation(summary = "查询项目详情")
|
|
|
+ @Operation(summary = "查询分组详情")
|
|
|
@RequestMapping(value = "getProjectInfo", method = {RequestMethod.GET})
|
|
|
@Parameter(name = "id", description = "数据ID")
|
|
|
public ResultContent<ProjectInfoModel> getProjectInfo(String id) {
|
|
|
return projectInfoService.getProjectInfo(id);
|
|
|
}
|
|
|
|
|
|
- @Operation(summary = "查询所有可用的项目列表")
|
|
|
+ @Operation(summary = "查询所有可用的分组列表")
|
|
|
@RequestMapping(value = "getAllProject", method = {RequestMethod.GET})
|
|
|
- public ResultContent<List<ProjectInfoModel>> getAllProject() {
|
|
|
+ public ResultContent getAllProject() {
|
|
|
return projectInfoService.getAllProject();
|
|
|
}
|
|
|
+
|
|
|
}
|