diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/department/DepartmentController.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/department/DepartmentController.java index 85cef380295cb6476e5ba6626fc528e02f5427f7..000ec948082e2271bc0e2c52ed0e336d33e5faf9 100644 --- a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/department/DepartmentController.java +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/department/DepartmentController.java @@ -3,6 +3,7 @@ package org.oswh.sherly.controller.department; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.oswh.sherly.common.model.Result; +import org.oswh.sherly.controller.department.dto.DepartmentDeleteReqDTO; import org.oswh.sherly.controller.department.dto.DepartmentInsertReqDTO; import org.oswh.sherly.controller.department.dto.DepartmentRespDTO; import org.oswh.sherly.controller.department.dto.DepartmentUpdateReqDTO; @@ -42,7 +43,7 @@ public class DepartmentController { return Result.success(); } - @PutMapping("/update_one") + @PostMapping("/update_one") @PreAuthorize("hasAnyAuthority('department:update_one')") @Operation(summary = "部门更新") public Result updateOne(@RequestBody @Valid DepartmentUpdateReqDTO dto) { @@ -50,11 +51,11 @@ public class DepartmentController { return Result.success(); } - @DeleteMapping("/remove_one") + @PostMapping("/remove_one") @PreAuthorize("hasAnyAuthority('department:remove_one')") @Operation(summary = "部门删除") - public Result removeOne(@RequestParam String departmentId) { - departmentService.removeOne(departmentId); + public Result removeOne(@RequestBody @Valid DepartmentDeleteReqDTO dto) { + departmentService.removeOne(dto); return Result.success(); } } diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/department/dto/DepartmentDeleteReqDTO.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/department/dto/DepartmentDeleteReqDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..8b53e32af1cfd5cfc430e53bcfed54880eff48b2 --- /dev/null +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/department/dto/DepartmentDeleteReqDTO.java @@ -0,0 +1,11 @@ +package org.oswh.sherly.controller.department.dto; + + +import lombok.Data; + +@Data +public class DepartmentDeleteReqDTO { + + private String departmentId; + +} diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/log/OperationLogController.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/log/OperationLogController.java index ec823f05a91678ec007c7f39259eabad368a7845..12cf6bdacb28459f79185db3eb1e1bd4e301cda3 100644 --- a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/log/OperationLogController.java +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/log/OperationLogController.java @@ -4,6 +4,7 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.oswh.sherly.common.model.PageResult; import org.oswh.sherly.common.model.Result; +import org.oswh.sherly.controller.log.dto.OperationLogDeleteReqDTO; import org.oswh.sherly.controller.log.dto.OperationLogPageReqDTO; import org.oswh.sherly.controller.log.dto.OperationLogPageRespDTO; import org.oswh.sherly.controller.log.dto.OperationLogRespDTO; @@ -41,11 +42,11 @@ public class OperationLogController { @PreAuthorize("hasAnyAuthority('operation_log:get_one')") @Operation(summary = "操作日志详情") @SherlyLog(noRecord = true) - public Result getOne(@RequestParam String logId) { - return Result.success(operationLogManager.getOne(logId)); + public Result getOne(@ParameterObject OperationLogDeleteReqDTO dto) { + return Result.success(operationLogManager.getOne(dto)); } - @DeleteMapping("/remove_all") + @PostMapping("/remove_all") @PreAuthorize("hasAnyAuthority('operation_log:remove_all')") @Operation(summary = "操作日志清空") public Result removeAll() { diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/log/dto/OperationLogDeleteReqDTO.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/log/dto/OperationLogDeleteReqDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..252b72b1a2df7a8557fc83864af0a8c5b7288a0c --- /dev/null +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/log/dto/OperationLogDeleteReqDTO.java @@ -0,0 +1,9 @@ +package org.oswh.sherly.controller.log.dto; + + +import lombok.Data; + +@Data +public class OperationLogDeleteReqDTO { + private String logId; +} diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/login/LoginController.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/login/LoginController.java index 2e60f3208e99ae20636c79a80f61087ad4acabb0..d16b26265f59c08d9ca1582c762733a4d625e386 100644 --- a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/login/LoginController.java +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/login/LoginController.java @@ -4,11 +4,13 @@ package org.oswh.sherly.controller.login; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.oswh.sherly.common.model.Result; +import org.oswh.sherly.controller.login.dto.AccountUserListReqDTO; import org.oswh.sherly.controller.login.dto.LoginReqDTO; import org.oswh.sherly.controller.login.dto.LoginRespDTO; import org.oswh.sherly.controller.login.dto.LoginTenantRespDTO; import org.oswh.sherly.other.log.annotation.SherlyLog; import org.oswh.sherly.service.login.LoginService; +import org.springdoc.api.annotations.ParameterObject; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -47,8 +49,8 @@ public class LoginController { @GetMapping("/available_list") @Operation(summary = "可用租户列表") @SherlyLog(noRecord = true) - public Result> availableList(@RequestParam String phone) { - return Result.success(loginService.availableList(phone)); + public Result> availableList(@ParameterObject AccountUserListReqDTO dto) { + return Result.success(loginService.availableList(dto)); } @PostMapping("/available_list_check") @@ -58,7 +60,7 @@ public class LoginController { return Result.success(loginService.availableListCheck(dto)); } - @PutMapping("/login_change") + @PostMapping("/login_change") @Operation(summary = "切换登录租户") public Result loginChange(@RequestParam String tenantCode, HttpServletRequest request) { loginService.loginChange(tenantCode, request); diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/login/LoginLogController.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/login/LoginLogController.java index 08e5963295167cb09b0aa79091e30b6afe529938..2d322c01c0ffcd99201735f1ff31613c078703ff 100644 --- a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/login/LoginLogController.java +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/login/LoginLogController.java @@ -9,10 +9,7 @@ import org.oswh.sherly.controller.log.dto.LoginLogPageRespDTO; import org.oswh.sherly.manager.log.LoginLogManager; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; @@ -36,7 +33,7 @@ public class LoginLogController { return Result.success(loginLogManager.listPage(dto)); } - @DeleteMapping("/remove_all") + @PostMapping("/remove_all") @PreAuthorize("hasAnyAuthority('login_log:remove_all')") @Operation(summary = "登录日志清空") public Result removeAll() { diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/login/dto/AccountUserListReqDTO.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/login/dto/AccountUserListReqDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..818085512757674ac04e1f75c113e801d393eef4 --- /dev/null +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/login/dto/AccountUserListReqDTO.java @@ -0,0 +1,9 @@ +package org.oswh.sherly.controller.login.dto; + + +import lombok.Data; + +@Data +public class AccountUserListReqDTO { + private String phone; +} diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/menu/MenuController.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/menu/MenuController.java index e42349dc6072cf6f3a90260d0687d4e68e5edb82..98ca29006f2a89cd29e305e64c14afb4d5da9dd3 100644 --- a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/menu/MenuController.java +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/menu/MenuController.java @@ -43,7 +43,7 @@ public class MenuController { return Result.success(); } - @DeleteMapping("/remove_one") + @PostMapping("/remove_one") @PreAuthorize("hasAnyAuthority('menu:remove_one')") @Operation(summary = "菜单删除") public Result removeOne(@RequestBody @Valid MenuDeleteReqDTO dto) { @@ -51,7 +51,7 @@ public class MenuController { return Result.success(); } - @PutMapping("/update_one") + @PostMapping("/update_one") @PreAuthorize("hasAnyAuthority('menu:update_one')") @Operation(summary = "菜单修改") public Result updateOne(@RequestBody @Valid MenuUpdateReqDTO dto) { diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/menu/dto/MenuDetailReqDTO.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/menu/dto/MenuDetailReqDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..6eec7f7f0560cccfb7cf88344cb79f541b6f6c7a --- /dev/null +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/menu/dto/MenuDetailReqDTO.java @@ -0,0 +1,15 @@ +package org.oswh.sherly.controller.menu.dto; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +@Data +public class MenuDetailReqDTO { + + /** 菜单id */ + @NotBlank + @Schema(description = "菜单id") + private String menuId; +} diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/menu/dto/MenuDetailRespDTO.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/menu/dto/MenuDetailRespDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..259b368dd92e77a054727f107216308a9b41cb6a --- /dev/null +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/menu/dto/MenuDetailRespDTO.java @@ -0,0 +1,77 @@ +package org.oswh.sherly.controller.menu.dto; + +import com.alibaba.excel.enums.BooleanEnum; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.oswh.sherly.common.enums.UsableEnum; +import org.oswh.sherly.controller.menu.enums.MenuTypeEnum; + +@Data +public class MenuDetailRespDTO { + /** 菜单id */ + @Schema(description = "菜单id") + private String menuId; + + /** 菜单名称 */ + @Schema(description = "菜单名称") + private String menuName; + + /** 菜单类型 */ + @Schema(description = "菜单类型") + private MenuTypeEnum menuType; + + /** 权限 */ + @Schema(description = "权限") + private String permission; + + /** 父菜单编号 */ + @Schema(description = "父菜单编号") + private String parentId; + + /** 菜单路由地址 */ + @Schema(description = "菜单路径") + private String path; + + /** 菜单组件地址 */ + @Schema(description = "组件地址") + private String componentPath; + + /** 菜单组件名称 */ + @Schema(description = "路由地址") + private String componentName; + + /** 菜单图标 */ + @Schema(description = "菜单图标") + private String icon; + + /** 排序 */ + @Schema(description = "排序") + private Integer sort; + + /** 类目状态 */ + @Schema(description = "类目状态") + private UsableEnum usable; + + /** + * 显示状态 + * 只有目录和菜单使用 + * 当设置为 true,该菜单不会展示在侧边栏,但是路由还是存在。例如说,一些独立的编辑页面 /edit/1024 等等 + */ + @Schema(description = "显示状态") + private UsableEnum visible; + + /** + * 总是显示 + * 如果为 false,当该菜单只有一个子菜单时,不展示自己,直接展示子菜单 + */ + @Schema(description = "总是显示") + private UsableEnum alwaysShow; + + /** + * 缓存状态 + * 只有目录和菜单使用,否使用 Vue 路由的 keep-alive 特性 + * 注意:如果开启缓存,则必须填写 componentName,否则无法缓存 + */ + @Schema(description = "缓存状态") + private UsableEnum keepAlive; +} diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/menu/dto/MenuRespDTO.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/menu/dto/MenuRespDTO.java index 7a3f83b0656211110d5e457461d8192ceaa90458..e8333d124bfd0aba52c18cc0d2b9733f213547fe 100644 --- a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/menu/dto/MenuRespDTO.java +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/menu/dto/MenuRespDTO.java @@ -53,12 +53,7 @@ public class MenuRespDTO { @Schema(description = "排序") private Integer sort; - /** - * 类目状态 - * 等价理解为可用性 - */ - @NotNull - private UsableEnum usable; + /** * 显示状态 @@ -87,5 +82,9 @@ public class MenuRespDTO { @Schema(description = "创建时间") private Date createTime; + /** 类目状态 */ + @Schema(description = "类目状态") + private UsableEnum usable; + private List children; } diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/notice/NoticeController.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/notice/NoticeController.java index d11108326a4af55ccf6eb7254ae2d5dd357960fc..53acb37a2fdc0c041a4753bfdcbed95a0c6293d6 100644 --- a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/notice/NoticeController.java +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/notice/NoticeController.java @@ -34,21 +34,21 @@ public class NoticeController { return Result.success(noticeManager.listPage(dto)); } - @PutMapping("/clear_list") + @PostMapping("/clear_list") @Operation(summary = "消息部分设置已读") public Result clearList(@RequestBody NoticeClearListReqDTO dto) { noticeManager.clearList(dto); return Result.success(); } - @PutMapping("/clear_all") + @PostMapping("/clear_all") @Operation(summary = "消息全部设置已读") public Result clearAll() { noticeManager.clearAll(); return Result.success(); } - @PutMapping("/reset_list") + @PostMapping("/reset_list") @Operation(summary = "消息部分设置未读") public Result resetList(@RequestBody NoticeResetListReqDTO dto) { noticeManager.resetList(dto); diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/oss/OssConfigController.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/oss/OssConfigController.java index c516c9bcd49925c37e201eff78ee82f41faf53c9..03ad8b14288a23f194abac19381f3a2435fba152 100644 --- a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/oss/OssConfigController.java +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/oss/OssConfigController.java @@ -38,15 +38,15 @@ public class OssConfigController { @GetMapping("/get_one") @PreAuthorize("hasAnyAuthority('oss_config:get_one')") @Operation(summary = "对象存储配置详情") - public Result getOne(@RequestParam String configId) { - return Result.success(ossConfigService.getOne(configId)); + public Result getOne(@ParameterObject OssConfigDetailReqDTO dto) { + return Result.success(ossConfigService.getOne(dto)); } - @PutMapping("/enable_one") + @PostMapping("/enable_one") @PreAuthorize("hasAnyAuthority('oss_config:enable_one')") @Operation(summary = "对象存储配置激活") - public Result enableOne(@RequestParam String configId) { - ossConfigService.enableOne(configId); + public Result enableOne(@RequestBody OssConfigEnableReqDTO dto) { + ossConfigService.enableOne(dto); return Result.success(); } @@ -58,7 +58,7 @@ public class OssConfigController { return Result.success(); } - @PutMapping("/update_one") + @PostMapping("/update_one") @PreAuthorize("hasAnyAuthority('oss_config:update_one')") @Operation(summary = "对象存储配置更新") public Result updateOne(@RequestBody @Valid OssConfigUpdateReqDTO dto) { @@ -66,11 +66,11 @@ public class OssConfigController { return Result.success(); } - @DeleteMapping("/remove_one") + @PostMapping("/remove_one") @PreAuthorize("hasAnyAuthority('oss_config:remove_one')") @Operation(summary = "对象存储配置删除") - public Result removeOne(@RequestParam String configId) { - ossConfigService.removeOne(configId); + public Result removeOne(@RequestParam OssConfigDeleteReqDTO dto) { + ossConfigService.removeOne(dto); return Result.success(); } } diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/oss/OssController.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/oss/OssController.java index 91c90ac82067aa6b68ee23251b48b4847c20551c..632dc5d2ee3bf156624427b888ea2d7c84d30102 100644 --- a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/oss/OssController.java +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/oss/OssController.java @@ -70,7 +70,7 @@ public class OssController { return Result.success(ossManager.accessUrl(path)); } - @DeleteMapping("/remove_one") + @PostMapping("/remove_one") @PreAuthorize("hasAnyAuthority('oss:remove_one')") @Operation(summary = "文件删除") public Result removeOne(@RequestParam String fileId) { diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/oss/dto/FileDirectUploadReqDTO.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/oss/dto/FileDirectUploadReqDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..f92b5a676ff06f2a82154965f291eba2df092103 --- /dev/null +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/oss/dto/FileDirectUploadReqDTO.java @@ -0,0 +1,8 @@ +package org.oswh.sherly.controller.oss.dto; + +import lombok.Data; + +@Data +public class FileDirectUploadReqDTO { + private String fileName; +} diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/oss/dto/FileDownloadReqDTO.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/oss/dto/FileDownloadReqDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..efac53685220ec158bb32c726df0fc386046ca3e --- /dev/null +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/oss/dto/FileDownloadReqDTO.java @@ -0,0 +1,8 @@ +package org.oswh.sherly.controller.oss.dto; + +import lombok.Data; + +@Data +public class FileDownloadReqDTO { + private String path; +} diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/oss/dto/OssConfigDeleteReqDTO.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/oss/dto/OssConfigDeleteReqDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..454221fdc0e92a1c2bfe27d83652648f811e1083 --- /dev/null +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/oss/dto/OssConfigDeleteReqDTO.java @@ -0,0 +1,8 @@ +package org.oswh.sherly.controller.oss.dto; + +import lombok.Data; + +@Data +public class OssConfigDeleteReqDTO { + private String configId; +} diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/oss/dto/OssConfigDetailReqDTO.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/oss/dto/OssConfigDetailReqDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..98a8062f846a4dfafd3997d52e8601cb9079660c --- /dev/null +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/oss/dto/OssConfigDetailReqDTO.java @@ -0,0 +1,8 @@ +package org.oswh.sherly.controller.oss.dto; + +import lombok.Data; + +@Data +public class OssConfigDetailReqDTO { + String configId; +} diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/oss/dto/OssConfigEnableReqDTO.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/oss/dto/OssConfigEnableReqDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..779b388449c5f8ca6a5a1f62a192a941b2629a1b --- /dev/null +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/oss/dto/OssConfigEnableReqDTO.java @@ -0,0 +1,11 @@ +package org.oswh.sherly.controller.oss.dto; + +import lombok.Data; + +/** + * 对象存储激活的dto + */ +@Data +public class OssConfigEnableReqDTO { + String configId; +} diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/quartz/ScheduleTaskController.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/quartz/ScheduleTaskController.java index 0cd68127be8b87f122005fc0be54c0042bb7a3af..218169d866729301fe10d003ccc6403d2fc51cc6 100644 --- a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/quartz/ScheduleTaskController.java +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/quartz/ScheduleTaskController.java @@ -50,21 +50,21 @@ public class ScheduleTaskController { return Result.success(); } - @DeleteMapping("/remove_one") + @PostMapping("/remove_one") @Operation(summary = "定时任务删除") public Result removeOne(@RequestParam String scheduleTaskId) { scheduleTaskManager.removeOne(scheduleTaskId); return Result.success(); } - @PutMapping("/update_one") + @PostMapping("/update_one") @Operation(summary = "定时任务更新") public Result updateOne(@RequestBody ScheduleTaskUpdateReqDTO dto) { scheduleTaskManager.updateOne(dto); return Result.success(); } - @PutMapping("/enable_one") + @PostMapping("/enable_one") @Operation(summary = "定时任务禁用/启用") public Result enableOne(@RequestParam String scheduleTaskId, @RequestParam UsableEnum enable) { scheduleTaskManager.enableOne(scheduleTaskId, enable); diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/role/RoleController.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/role/RoleController.java index d5064c910d455064b8817573682a315e8fcea565..4149398459d30f2ec1c5ca655b89bbf27dfad19c 100644 --- a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/role/RoleController.java +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/role/RoleController.java @@ -38,8 +38,8 @@ public class RoleController { @GetMapping("/get_one") @PreAuthorize("hasAnyAuthority('role:get_one')") @Operation(summary = "角色详情") - public Result getOne(@RequestParam String roleId) { - return Result.success(roleService.getOne(roleId)); + public Result getOne(@ParameterObject RoleDetailReqDTO dto) { + return Result.success(roleService.getOne(dto)); } @PostMapping("/save_one") @@ -50,7 +50,7 @@ public class RoleController { return Result.success(); } - @PutMapping("/update_one") + @PostMapping("/update_one") @PreAuthorize("hasAnyAuthority('role:update_one')") @Operation(summary = "角色更新") public Result updateOne(@RequestBody @Valid RoleUpdateReqDTO dto) { @@ -58,11 +58,11 @@ public class RoleController { return Result.success(); } - @DeleteMapping("/remove_one") + @PostMapping("/remove_one") @PreAuthorize("hasAnyAuthority('role:remove_one')") @Operation(summary = "角色删除") - public Result removeOne(@RequestParam String roleId) { - roleService.removeOne(roleId); + public Result removeOne(@RequestBody RoleDeleteReqDTO dto) { + roleService.removeOne(dto); return Result.success(); } diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/role/dto/RoleDeleteReqDTO.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/role/dto/RoleDeleteReqDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..a6a65e0ab096f6f99e7964ecdb8eb442f7d4cedf --- /dev/null +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/role/dto/RoleDeleteReqDTO.java @@ -0,0 +1,8 @@ +package org.oswh.sherly.controller.role.dto; + +import lombok.Data; + +@Data +public class RoleDeleteReqDTO { + private String roleId; +} diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/role/dto/RoleDetailReqDTO.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/role/dto/RoleDetailReqDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..2a34911ba830c1a2ee03d23db8673e44f3b8d265 --- /dev/null +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/role/dto/RoleDetailReqDTO.java @@ -0,0 +1,8 @@ +package org.oswh.sherly.controller.role.dto; + +import lombok.Data; + +@Data +public class RoleDetailReqDTO { + String roleId; +} diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/tenant/TenantController.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/tenant/TenantController.java index 1f76b243a356e5a925064d3adfe53b4cf595587e..d75fa84f33825e2322fcaea3ada9beda1ddcf7c0 100644 --- a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/tenant/TenantController.java +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/tenant/TenantController.java @@ -45,7 +45,7 @@ public class TenantController { return Result.success(); } - @PutMapping("/update_one") + @PostMapping("/update_one") @PreAuthorize("hasAnyAuthority('tenant:update_one')") @Operation(summary = "租户更新") public Result updateOne(@RequestBody @Valid TenantUpdateReqDTO dto) { @@ -53,15 +53,15 @@ public class TenantController { return Result.success(); } - @DeleteMapping("/remove_one") + @PostMapping("/remove_one") @PreAuthorize("hasAnyAuthority('tenant:remove_one')") @Operation(summary = "租户删除") - public Result removeOne(@RequestParam String tenantId) { - tenantService.removeOne(tenantId); + public Result removeOne(@RequestBody TenantDeleteReqDTO dto) { + tenantService.removeOne(dto); return Result.success(); } - @PutMapping("/update_menu") + @PostMapping("/update_menu") @PreAuthorize("hasAnyAuthority('tenant:update_menu')") @Operation(summary = "租户菜单更新") public Result updateMenu(@RequestBody @Valid TenantMenuUpdateReqDTO dto) { @@ -72,8 +72,8 @@ public class TenantController { @GetMapping("/list_menu") @PreAuthorize("hasAnyAuthority('tenant:list_menu')") @Operation(summary = "租户菜单列表") - public Result> listMenu(@RequestParam String tenantId) { - return Result.success(tenantService.listMenu(tenantId)); + public Result> listMenu(@ParameterObject TenantListReqDTO dto) { + return Result.success(tenantService.listMenu(dto)); } @GetMapping("/list_export") diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/tenant/TenantPackageController.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/tenant/TenantPackageController.java index 37fdd92598432d924ce806773f637734162edf30..ad656dd591fff2c63b3f93eba034ca610563cf23 100644 --- a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/tenant/TenantPackageController.java +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/tenant/TenantPackageController.java @@ -41,14 +41,14 @@ public class TenantPackageController { return Result.success(); } - @DeleteMapping("/remove_one") + @PostMapping("/remove_one") @Operation(summary = "租户套餐删除") public Result removeOne(@RequestParam String tenantPackageId) { tenantPackageService.removeOne(tenantPackageId); return Result.success(); } - @PutMapping("/update_one") + @PostMapping("/update_one") @Operation(summary = "租户套餐更新") public Result updateOne(@RequestBody @Valid TenantPackageUpdateReqDTO dto) { tenantPackageService.updateOne(dto); @@ -63,11 +63,11 @@ public class TenantPackageController { @GetMapping("/get_one") @Operation(summary = "租户套餐菜单详情") - public Result getOne(@RequestParam String tenantPackageId) { - return Result.success(tenantPackageService.getOne(tenantPackageId)); + public Result getOne(@ParameterObject TenantDetailReqDTO dto) { + return Result.success(tenantPackageService.getOne(dto)); } - @PutMapping("/usable") + @PostMapping("/usable") @Operation(summary = "租户套餐可用性") public Result usable(@RequestParam String tenantPackageId, @RequestParam UsableEnum usable) { tenantPackageService.usable(tenantPackageId, usable); diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/tenant/dto/TenantDeleteReqDTO.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/tenant/dto/TenantDeleteReqDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..5aa2c11a633e726cab7f4d4e3ae41d1774a02212 --- /dev/null +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/tenant/dto/TenantDeleteReqDTO.java @@ -0,0 +1,9 @@ +package org.oswh.sherly.controller.tenant.dto; + +import lombok.Data; + +@Data +public class TenantDeleteReqDTO { + + private String tenantId; +} diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/tenant/dto/TenantDetailReqDTO.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/tenant/dto/TenantDetailReqDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..c9f2246f86972e35b9cbe317eff65c12ab5b25e8 --- /dev/null +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/tenant/dto/TenantDetailReqDTO.java @@ -0,0 +1,8 @@ +package org.oswh.sherly.controller.tenant.dto; + +import lombok.Data; + +@Data +public class TenantDetailReqDTO { + private String tenantPackageId; +} diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/tenant/dto/TenantListReqDTO.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/tenant/dto/TenantListReqDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..55e5a219b7827f15132b119ec7068012d579051e --- /dev/null +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/tenant/dto/TenantListReqDTO.java @@ -0,0 +1,8 @@ +package org.oswh.sherly.controller.tenant.dto; + +import lombok.Data; + +@Data +public class TenantListReqDTO { + private String tenantId; +} diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/user/UserController.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/user/UserController.java index e5bed1941b2860ef1ca552f30f4449188227d2f5..46448e83012cc5ca90e6d90696d3024c3dc290d8 100644 --- a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/user/UserController.java +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/user/UserController.java @@ -47,11 +47,11 @@ public class UserController { @GetMapping("/get_one") @PreAuthorize("hasAnyAuthority('user:get_one')") @Operation(summary = "用户详情") - public Result getOne(@RequestParam String userId) { - return Result.success(userService.getOne(userId)); + public Result getOne(@ParameterObject UserDetailReqDTO dto) { + return Result.success(userService.getOne(dto)); } - @PutMapping("/usable") + @PostMapping("/usable") @PreAuthorize("hasAnyAuthority('user:usable')") @Operation(summary = "用户禁用/启用") public Result usable(@RequestParam String userId, @RequestParam UsableEnum usable) { @@ -67,7 +67,7 @@ public class UserController { return Result.success(); } - @PutMapping("/update_one") + @PostMapping("/update_one") @PreAuthorize("hasAnyAuthority('user:update_one')") @Operation(summary = "用户更新") public Result updateOne(@RequestBody @Valid UserUpdateReqDTO dto) { @@ -75,11 +75,11 @@ public class UserController { return Result.success(); } - @DeleteMapping("/remove_one") + @PostMapping("/remove_one") @PreAuthorize("hasAnyAuthority('user:remove_one')") @Operation(summary = "用户删除") - public Result removeOne(@RequestParam String userId) { - userService.removeOne(userId); + public Result removeOne(@RequestBody UserDeleteReqDTO dto) { + userService.removeOne(dto); return Result.success(); } diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/user/UserSelfController.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/user/UserSelfController.java index f7ccb2bfb52e45aaaa95080583f338e9d450f881..d1c9bf49606a3d3ccd9409ae6de03fd132b0e454 100644 --- a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/user/UserSelfController.java +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/user/UserSelfController.java @@ -40,21 +40,21 @@ public class UserSelfController { return Result.success(userSelfService.getSelf()); } - @PutMapping("/update_self") + @PostMapping("/update_self") @Operation(summary = "用户个人中心更新") public Result updateSelf(@RequestBody @Valid UserSelfUpdateReqDTO dto) { userSelfService.updateSelf(dto); return Result.success(); } - @PutMapping("/update_password") + @PostMapping("/update_password") @Operation(summary = "用户修改密码") public Result updatePassword(@RequestBody @Valid UserUpdatePasswordReqDTO dto) { userSelfService.updatePassword(dto); return Result.success(); } - @PutMapping("/update_avatar") + @PostMapping("/update_avatar") @Operation(summary = "用户修改头像") public Result updateAvatar(@RequestParam MultipartFile file) { String avatarPath = ossManager.uploadOne(file, "avatar/"); diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/user/dto/UserDeleteReqDTO.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/user/dto/UserDeleteReqDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..b3c80968f637eb17a994cadd45d97fe40a7b8409 --- /dev/null +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/user/dto/UserDeleteReqDTO.java @@ -0,0 +1,8 @@ +package org.oswh.sherly.controller.user.dto; + +import lombok.Data; + +@Data +public class UserDeleteReqDTO { + String userId; +} diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/user/dto/UserDetailReqDTO.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/user/dto/UserDetailReqDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..23a1c352159603a40b18bccd438b979d6d51b8a2 --- /dev/null +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/user/dto/UserDetailReqDTO.java @@ -0,0 +1,8 @@ +package org.oswh.sherly.controller.user.dto; + +import lombok.Data; + +@Data +public class UserDetailReqDTO { + private String userId; +} diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/useronline/UserOnlineController.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/useronline/UserOnlineController.java index 6a2b5fa3cfc55a7684cf53d6313f824379b8da15..2501dbeab260e7ebb6f5aef9a33469d86410c473 100644 --- a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/useronline/UserOnlineController.java +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/controller/useronline/UserOnlineController.java @@ -34,7 +34,7 @@ public class UserOnlineController { return Result.success(userOnlineService.listAll(dto)); } - @DeleteMapping("/force_quit") + @PostMapping("/force_quit") @PreAuthorize("hasAnyAuthority('user_online:force_quit')") @Operation(summary = "强制退出") public Result forceQuit(@RequestParam String sessionId) { diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/convertor/menu/MenuConvertor.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/convertor/menu/MenuConvertor.java index 88e9e4bc48a6a6d4ff9d85adebb3740b5dddce88..c10ad0fb6714223b80c4ccd2eb3f19c96d8079a8 100644 --- a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/convertor/menu/MenuConvertor.java +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/convertor/menu/MenuConvertor.java @@ -3,6 +3,7 @@ package org.oswh.sherly.convertor.menu; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; import org.oswh.sherly.controller.generic.dto.BasicMenuInfoRespDTO; +import org.oswh.sherly.controller.menu.dto.MenuDetailRespDTO; import org.oswh.sherly.controller.menu.dto.MenuInsertReqDTO; import org.oswh.sherly.controller.menu.dto.MenuRespDTO; import org.oswh.sherly.controller.menu.dto.MenuUpdateReqDTO; @@ -20,4 +21,6 @@ public interface MenuConvertor { MenuDO convertToDO (MenuUpdateReqDTO reqDTO); BasicMenuInfoRespDTO convertToInfoRespDTO(MenuDO menuDO); + + MenuDetailRespDTO convertToDetailRespDTO(MenuDO menuDO); } diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/manager/log/OperationLogManagerImpl.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/manager/log/OperationLogManagerImpl.java index 1da80c843bcdd78fbc8da7b958855b39293f7a7e..348381b6b381e6fafbf3d5e976e290c665ed0014 100644 --- a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/manager/log/OperationLogManagerImpl.java +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/manager/log/OperationLogManagerImpl.java @@ -4,6 +4,7 @@ package org.oswh.sherly.manager.log; import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.oswh.sherly.common.model.PageResult; +import org.oswh.sherly.controller.log.dto.OperationLogDeleteReqDTO; import org.oswh.sherly.controller.log.dto.OperationLogPageReqDTO; import org.oswh.sherly.controller.log.dto.OperationLogPageRespDTO; import org.oswh.sherly.controller.log.dto.OperationLogRespDTO; @@ -64,7 +65,8 @@ public class OperationLogManagerImpl implements OperationLogManager { } @Override - public OperationLogRespDTO getOne(String logId) { + public OperationLogRespDTO getOne(OperationLogDeleteReqDTO dto) { + String logId = dto.getLogId(); OperationLogDO log = operationLogMapper.selectById(logId); return OperationLogConvertor.convertToLogRespDTO(log); } diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/mapper/menu/MenuMapper.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/mapper/menu/MenuMapper.java index de9e3d22f9e9c761207717dc35d49e0edaded856..4e169453cd2131545b66158de86a90826f3d4ab5 100644 --- a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/mapper/menu/MenuMapper.java +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/mapper/menu/MenuMapper.java @@ -29,4 +29,5 @@ public interface MenuMapper extends SherlyMapper { void removeAll(); + } diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/other/log/service/OperationLogManager.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/other/log/service/OperationLogManager.java index c7450fed724c128966e6deed1f1803fea09ee28b..962cb9acae69b5d62e510c76b0095ce8970151a6 100644 --- a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/other/log/service/OperationLogManager.java +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/other/log/service/OperationLogManager.java @@ -1,6 +1,7 @@ package org.oswh.sherly.other.log.service; import org.oswh.sherly.common.model.PageResult; +import org.oswh.sherly.controller.log.dto.OperationLogDeleteReqDTO; import org.oswh.sherly.controller.log.dto.OperationLogPageReqDTO; import org.oswh.sherly.controller.log.dto.OperationLogPageRespDTO; import org.oswh.sherly.controller.log.dto.OperationLogRespDTO; @@ -32,7 +33,7 @@ public interface OperationLogManager { * @param logId * @return */ - OperationLogRespDTO getOne(String logId); + OperationLogRespDTO getOne(OperationLogDeleteReqDTO dto); /** * 日志清空 diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/service/department/DepartmentService.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/service/department/DepartmentService.java index ee84353c448adb306fe8f1f6b4b232e728389659..8fc25e236f5af45f423201939ee674133bb88076 100644 --- a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/service/department/DepartmentService.java +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/service/department/DepartmentService.java @@ -2,6 +2,7 @@ package org.oswh.sherly.service.department; import org.oswh.sherly.common.modules.exception.BizException; +import org.oswh.sherly.controller.department.dto.DepartmentDeleteReqDTO; import org.oswh.sherly.controller.department.dto.DepartmentInsertReqDTO; import org.oswh.sherly.controller.department.dto.DepartmentRespDTO; import org.oswh.sherly.controller.department.dto.DepartmentUpdateReqDTO; @@ -36,6 +37,7 @@ public class DepartmentService { /** * 查询部门树 + * * @return */ public List listTree() { @@ -55,6 +57,7 @@ public class DepartmentService { /** * 递归拼装子结点 + * * @param parent * @param all * @return @@ -68,6 +71,7 @@ public class DepartmentService { /** * 部门新增 + * * @param dto */ public void saveOne(DepartmentInsertReqDTO dto) { @@ -84,6 +88,7 @@ public class DepartmentService { /** * 部门更新 + * * @param dto */ public void updateOne(DepartmentUpdateReqDTO dto) { @@ -104,10 +109,12 @@ public class DepartmentService { /** * 部门删除 - * @param departmentId + * + * @param dto */ @Transactional(rollbackFor = Exception.class) - public void removeOne(String departmentId) { + public void removeOne(DepartmentDeleteReqDTO dto) { + String departmentId = dto.getDepartmentId(); if (Objects.equals(departmentId, 1L)) { throw new BizException(DELETE_DEPT_ERROR); } diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/service/login/LoginService.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/service/login/LoginService.java index 3016ba035490f46cef268ccfb00adb6c9ed909a5..f5a2f6efcd9d42e15ec4e1782dd5bba9d500a658 100644 --- a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/service/login/LoginService.java +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/service/login/LoginService.java @@ -13,6 +13,7 @@ import org.oswh.sherly.common.modules.security.model.SecurityModel; import org.oswh.sherly.common.modules.security.util.SecurityUtil; import org.oswh.sherly.common.util.IpUtil; import org.oswh.sherly.common.util.JwtUtil; +import org.oswh.sherly.controller.login.dto.AccountUserListReqDTO; import org.oswh.sherly.controller.login.dto.LoginReqDTO; import org.oswh.sherly.controller.login.dto.LoginRespDTO; import org.oswh.sherly.controller.login.dto.LoginTenantRespDTO; @@ -84,6 +85,7 @@ public class LoginService { /** * 登录 + * * @param dto * @param request * @return @@ -129,6 +131,7 @@ public class LoginService { /** * 处理登录时携带租户code情况 + * * @param dto */ private void dealWithTenantCode(LoginReqDTO dto) { @@ -158,6 +161,7 @@ public class LoginService { /** * 更新用户登录信息 + * * @param securityModel * @param request */ @@ -176,11 +180,12 @@ public class LoginService { /** * 可用租户列表 - * @param phone + * + * @param dto * @return */ - public List availableList(String phone) { - + public List availableList(AccountUserListReqDTO dto) { + String phone = dto.getPhone(); AccountUserDO accountUserDO = accountUserMapper.getByPhone(phone); List tenantCodes = StrUtil.split(accountUserDO.getTenantData(), ","); List tenantDOs = tenantMapper.listAvailableByTenantCodes(tenantCodes); @@ -240,6 +245,7 @@ public class LoginService { /** * 可用租户列表 + * * @param dto * @return */ diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/service/oss/OssConfigService.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/service/oss/OssConfigService.java index 99a08c429e26909a63eb667ac04592b558a36ddf..e48278345e79d2ae5867f2c0f3bde091acd977af 100644 --- a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/service/oss/OssConfigService.java +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/service/oss/OssConfigService.java @@ -47,10 +47,11 @@ public class OssConfigService { /** * 对象存储配置详情 * - * @param configId + * @param dto * @return */ - public OssConfigRespDTO getOne(String configId) { + public OssConfigRespDTO getOne(OssConfigDetailReqDTO dto) { + String configId = dto.getConfigId(); OssConfigDO ossConfigDO = ossConfigMapper.selectById(configId); OssClientConfig config = ossConfigDO.getConfig(); String configStr = JSONUtil.toJsonStr(config); @@ -105,7 +106,8 @@ public class OssConfigService { * * @param configId */ - public void removeOne(String configId) { + public void removeOne(OssConfigDeleteReqDTO dto) { + String configId = dto.getConfigId(); OssConfigDO config = ossConfigMapper.selectById(configId); ossConfigMapper.deleteById(configId); if (Objects.equals(config.getUsable(), ENABLE)) { @@ -117,9 +119,10 @@ public class OssConfigService { /** * 对象存储配置激活 * - * @param configId + * @param dto */ - public void enableOne(String configId) { + public void enableOne(OssConfigEnableReqDTO dto) { + String configId = dto.getConfigId(); List list = ossConfigMapper.selectList(); list = list.stream().peek(e -> { e.setUsable(DISABLE); diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/service/role/RoleService.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/service/role/RoleService.java index 81388bb8ee8e8650681c880db707142d2edcbb2b..50adaf77c22bc90abff8cf64b336e3b2cba0c506 100644 --- a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/service/role/RoleService.java +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/service/role/RoleService.java @@ -46,10 +46,11 @@ public class RoleService { /** * 角色详情 - * @param roleId + * @param dto * @return */ - public RoleRespDTO getOne(String roleId) { + public RoleRespDTO getOne(RoleDetailReqDTO dto) { + String roleId = dto.getRoleId(); RoleDO roleDO = roleMapper.selectById(roleId); // 查询菜单 @@ -105,10 +106,11 @@ public class RoleService { /** * 角色删除 - * @param roleId + * @param dto */ @Transactional(rollbackFor = Exception.class) - public void removeOne(String roleId) { + public void removeOne(RoleDeleteReqDTO dto) { + String roleId = dto.getRoleId(); if (Objects.equals(roleId, 1L)) { throw new BizException(DELETE_ROLE_ERROR); } diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/service/tenant/TenantPackageService.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/service/tenant/TenantPackageService.java index 4c5ad00fbb90853b3570e30b613f4b2bb917331c..98c6003abc4e3ac4e8d93f066bdd474d86f89391 100644 --- a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/service/tenant/TenantPackageService.java +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/service/tenant/TenantPackageService.java @@ -105,10 +105,11 @@ public class TenantPackageService { /** * 租户套餐详情 - * @param tenantPackageId + * @param dto * @return */ - public TenantPackageRespDTO getOne(String tenantPackageId) { + public TenantPackageRespDTO getOne(TenantDetailReqDTO dto) { + String tenantPackageId = dto.getTenantPackageId(); TenantPackageDO tenantPackageDO = tenantPackageMapper.selectById(tenantPackageId); TenantPackageRespDTO tenantPackageRespDTO =TenantPackageConvertor.convertToRespDTO(tenantPackageDO); List tenantPackageMenuDOs = tenantPackageMenuMapper.listByTenantPackageId(tenantPackageId); diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/service/tenant/TenantService.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/service/tenant/TenantService.java index d48974d497b6dfd526aa062204d1077f0b2817a4..aceb116a0fc728640216f655a9739a7553be56cc 100644 --- a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/service/tenant/TenantService.java +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/service/tenant/TenantService.java @@ -167,9 +167,10 @@ public class TenantService { /** * 租户删除 - * @param tenantId + * @param dto */ - public void removeOne(String tenantId) { + public void removeOne(TenantDeleteReqDTO dto) { + String tenantId = dto.getTenantId(); if (Objects.equals(tenantId, 1L)) { throw new BizException(DELETE_TENANT_ERROR); } @@ -218,10 +219,11 @@ public class TenantService { /** * 租户菜单列表 - * @param tenantId + * @param dto * @return */ - public List listMenu(String tenantId) { + public List listMenu(TenantListReqDTO dto) { + String tenantId = dto.getTenantId(); TenantDO tenantDO = tenantMapper.selectById(tenantId); SecurityUtil.setOperateTenantCode(tenantDO.getTenantCode()); diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/service/user/UserSelfService.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/service/user/UserSelfService.java index c0eb125dc33553ec1541288d5eccef5870750216..f383a0e176b806b8ab9c85b88a9362e728a6b3ca 100644 --- a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/service/user/UserSelfService.java +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/service/user/UserSelfService.java @@ -98,6 +98,7 @@ public class UserSelfService { /** * 用户修改密码 + * * @param dto */ public void updatePassword(UserUpdatePasswordReqDTO dto) { @@ -123,6 +124,7 @@ public class UserSelfService { /** * 用户个人中心更新 + * * @param dto */ public void updateSelf(UserSelfUpdateReqDTO dto) { @@ -133,6 +135,7 @@ public class UserSelfService { /** * 用户修改头像 + * * @param avatarPath */ public void updateAvatar(String avatarPath) { @@ -144,6 +147,7 @@ public class UserSelfService { /** * 个人中心操作日志列表 + * * @param dto * @return */ diff --git a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/service/user/UserService.java b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/service/user/UserService.java index ce71cf57d7242ca43bf30ddb3c5ddb31d73c7d6c..fca1e101bc83dce082d25470cbc29f47ad38dfc2 100644 --- a/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/service/user/UserService.java +++ b/sherly-boot-services/sherly-boot-system/sherly-boot-system-biz/src/main/java/org/oswh/sherly/service/user/UserService.java @@ -114,10 +114,11 @@ public class UserService { /** * 用户详情 - * @param userId + * @param dto * @return */ - public UserRespDTO getOne(String userId) { + public UserRespDTO getOne(UserDetailReqDTO dto) { + String userId = dto.getUserId(); UserDO userDO = userMapper.selectById(userId); @@ -199,10 +200,11 @@ public class UserService { /** * 用户删除 - * @param userId + * @param dto */ @Transactional(rollbackFor = Exception.class) - public void removeOne(String userId) { + public void removeOne(UserDeleteReqDTO dto) { + String userId = dto.getUserId(); if (Objects.equals(userId, "1")) { throw new BizException(DELETE_USER_ERROR); }