Browse Source

完善代码

master
review512jwy@163.com 3 months ago
parent
commit
1d7a82c279
  1. 12
      model2d3d-viewer-back-controller/src/main/java/com/model2d3d/viewer/back/controller/BuildingController.java
  2. 2
      model2d3d-viewer-back-model/src/main/java/com/model2d3d/viewer/back/dto/user/OptUserParam.java
  3. 2
      model2d3d-viewer-back-model/src/main/java/com/model2d3d/viewer/back/vo/building/BuildingPageVO.java

12
model2d3d-viewer-back-controller/src/main/java/com/model2d3d/viewer/back/controller/BuildingController.java

@ -42,7 +42,7 @@ import org.springframework.web.multipart.MultipartFile;
@AccessRequired @AccessRequired
// Indicates whether login token verification is required. Placing it here means all methods in this class require authentication. // Indicates whether login token verification is required. Placing it here means all methods in this class require authentication.
@RequestMapping("/building") // HTTP request path mapping @RequestMapping("/building") // HTTP request path mapping
@Tag(name = "BuildingController", description = "Building Management Module - APIs for managing buildings") @Tag(name = "楼宇接口", description = "Building Management Module - APIs for managing buildings")
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public class BuildingController { public class BuildingController {
@ -62,7 +62,7 @@ public class BuildingController {
* @param LanguageType language type (0: Chinese, 1: English, 2: Japanese) * @param LanguageType language type (0: Chinese, 1: English, 2: Japanese)
* @return a SimpleDataResponse indicating the result of the add operation * @return a SimpleDataResponse indicating the result of the add operation
*/ */
@Operation(summary = "Add a building") @Operation(summary = "添加楼宇")
@RequestMapping(value = "/add", method = RequestMethod.POST) @RequestMapping(value = "/add", method = RequestMethod.POST)
public SimpleDataResponse add( public SimpleDataResponse add(
@RequestBody @Validated OptBuildingParams optBuildingParams, @RequestBody @Validated OptBuildingParams optBuildingParams,
@ -85,7 +85,7 @@ public class BuildingController {
* @param LanguageType language type (0: Chinese, 1: English, 2: Japanese) * @param LanguageType language type (0: Chinese, 1: English, 2: Japanese)
* @return a SimpleDataResponse indicating the result of the edit operation * @return a SimpleDataResponse indicating the result of the edit operation
*/ */
@Operation(summary = "Edit a building") @Operation(summary = "编辑楼宇")
@RequestMapping(value = "/edit", method = RequestMethod.POST) @RequestMapping(value = "/edit", method = RequestMethod.POST)
public SimpleDataResponse edit( public SimpleDataResponse edit(
@RequestBody @Validated OptBuildingParams optBuildingParams, @RequestBody @Validated OptBuildingParams optBuildingParams,
@ -108,7 +108,7 @@ public class BuildingController {
* @param LanguageType language type (0: Chinese, 1: English, 2: Japanese) * @param LanguageType language type (0: Chinese, 1: English, 2: Japanese)
* @return a SimpleDataResponse indicating the result of the batch delete operation * @return a SimpleDataResponse indicating the result of the batch delete operation
*/ */
@Operation(summary = "Batch delete buildings") @Operation(summary = "批量删除楼宇")
@RequestMapping(value = "/batchDelete", method = RequestMethod.POST) @RequestMapping(value = "/batchDelete", method = RequestMethod.POST)
public SimpleDataResponse batchDelete( public SimpleDataResponse batchDelete(
@RequestBody @Validated DeleteBuildingParams deleteBuildingParams, @RequestBody @Validated DeleteBuildingParams deleteBuildingParams,
@ -123,7 +123,7 @@ public class BuildingController {
/** /**
* Get a page of building list. * Get a page of building list.
**/ **/
@Operation(summary = "Get a page of building list") @Operation(summary = "查询楼宇列表")
@RequestMapping(value = "/getListPage", method = RequestMethod.GET) @RequestMapping(value = "/getListPage", method = RequestMethod.GET)
public PageResponse<IPage<BuildingPageVO>> getListPage( public PageResponse<IPage<BuildingPageVO>> getListPage(
@Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required = true) String LoginName, @Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required = true) String LoginName,
@ -150,7 +150,7 @@ public class BuildingController {
} }
@Operation(summary = "Get buildings bound to the user", description = "获取用户绑定的楼宇") @Operation(summary = "获取用户绑定的楼宇", description = "获取用户绑定的楼宇")
@RequestMapping(value = "/getBoundBuildings", method = RequestMethod.POST) @RequestMapping(value = "/getBoundBuildings", method = RequestMethod.POST)
public SimpleDataResponse<List<BuildingPageVO>> getBoundBuildings( public SimpleDataResponse<List<BuildingPageVO>> getBoundBuildings(
@Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required = true) String LoginName, @Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required = true) String LoginName,

2
model2d3d-viewer-back-model/src/main/java/com/model2d3d/viewer/back/dto/user/OptUserParam.java

@ -44,7 +44,7 @@ public class OptUserParam {
@Schema(description ="所属企业ID",example = "2") @Schema(description ="所属企业ID",example = "2")
private String companyId; private String companyId;
@Schema(description ="Building IDs, array", example = "[11111,2222222]") @Schema(description ="绑定的楼宇ID,数组格式", example = "[11111,2222222]")
private List<Long> buildingIds; private List<Long> buildingIds;

2
model2d3d-viewer-back-model/src/main/java/com/model2d3d/viewer/back/vo/building/BuildingPageVO.java

@ -13,7 +13,7 @@ import org.hibernate.validator.constraints.Length;
public class BuildingPageVO{ public class BuildingPageVO{
@Schema(description ="Building unique identifier ID, not required for new additions", example = "2738967") @Schema(description ="Building unique identifier ID, not required for new additions", example = "2738967")
private String buildingId; private Long buildingId;
@Schema(description ="Company ID", example = "2738967", required = true) @Schema(description ="Company ID", example = "2738967", required = true)
private String companyId; private String companyId;

Loading…
Cancel
Save