diff --git a/fund-sys/src/main/java/com/fundplatform/sys/controller/AuthController.java b/fund-sys/src/main/java/com/fundplatform/sys/controller/AuthController.java index 3fa3e54..c03130a 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/controller/AuthController.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/controller/AuthController.java @@ -45,7 +45,7 @@ public class AuthController { */ @Operation(summary = "用户登出", description = "销毁当前用户Token,使会话失效") @PostMapping("/logout") - public Result logout(@Parameter(description = "当前登录用户ID") @RequestHeader(value = "X-User-Id", required = false) Long userId) { + public Result logout(@Parameter(description = "当前登录用户ID") @RequestHeader(value = "X-User-Id", required = false) String userId) { authService.logout(userId); return Result.success(); } @@ -55,7 +55,7 @@ public class AuthController { */ @Operation(summary = "刷新Token", description = "延长当前Token的有效期") @PostMapping("/refresh") - public Result refreshToken(@Parameter(description = "当前登录用户ID") @RequestHeader("X-User-Id") Long userId) { + public Result refreshToken(@Parameter(description = "当前登录用户ID") @RequestHeader("X-User-Id") String userId) { LoginVO vo = authService.refreshToken(userId); return Result.success(vo); } @@ -65,7 +65,7 @@ public class AuthController { */ @Operation(summary = "获取当前用户信息", description = "根据Token中的用户ID获取用户详情") @GetMapping("/info") - public Result getUserInfo(@Parameter(description = "当前登录用户ID") @RequestHeader("X-User-Id") Long userId) { + public Result getUserInfo(@Parameter(description = "当前登录用户ID") @RequestHeader("X-User-Id") String userId) { UserVO vo = authService.getUserInfo(userId); return Result.success(vo); } diff --git a/fund-sys/src/main/java/com/fundplatform/sys/controller/ConfigController.java b/fund-sys/src/main/java/com/fundplatform/sys/controller/ConfigController.java index 47120e7..88539ce 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/controller/ConfigController.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/controller/ConfigController.java @@ -28,8 +28,8 @@ public class ConfigController { * 创建参数 */ @PostMapping - public Result create(@Valid @RequestBody ConfigDTO dto) { - Long id = configService.createConfig(dto); + public Result create(@Valid @RequestBody ConfigDTO dto) { + String id = configService.createConfig(dto); return Result.success(id); } @@ -46,7 +46,7 @@ public class ConfigController { * 根据ID查询参数 */ @GetMapping("/{id}") - public Result getById(@PathVariable Long id) { + public Result getById(@PathVariable String id) { ConfigVO vo = configService.getConfigById(id); return Result.success(vo); } @@ -94,7 +94,7 @@ public class ConfigController { * 删除参数 */ @DeleteMapping("/{id}") - public Result delete(@PathVariable Long id) { + public Result delete(@PathVariable String id) { boolean result = configService.deleteConfig(id); return Result.success(result); } diff --git a/fund-sys/src/main/java/com/fundplatform/sys/controller/DeptController.java b/fund-sys/src/main/java/com/fundplatform/sys/controller/DeptController.java index b042729..0d4cd79 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/controller/DeptController.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/controller/DeptController.java @@ -28,8 +28,8 @@ public class DeptController { @Operation(summary = "创建部门") @PostMapping - public Result create(@Valid @RequestBody DeptDTO dto) { - Long deptId = deptService.createDept(dto); + public Result create(@Valid @RequestBody DeptDTO dto) { + String deptId = deptService.createDept(dto); return Result.success(deptId); } @@ -42,7 +42,7 @@ public class DeptController { @Operation(summary = "根据ID查询部门") @GetMapping("/{id}") - public Result getById(@Parameter(description = "部门ID") @PathVariable Long id) { + public Result getById(@Parameter(description = "部门ID") @PathVariable String id) { DeptVO vo = deptService.getDeptById(id); return Result.success(vo); } @@ -63,14 +63,14 @@ public class DeptController { @Operation(summary = "删除部门") @DeleteMapping("/{id}") - public Result delete(@Parameter(description = "部门ID") @PathVariable Long id) { + public Result delete(@Parameter(description = "部门ID") @PathVariable String id) { boolean result = deptService.deleteDept(id); return Result.success(result); } @Operation(summary = "更新部门状态") @PutMapping("/{id}/status") - public Result updateStatus(@Parameter(description = "部门ID") @PathVariable Long id, @Parameter(description = "状态:0禁用 1启用") @RequestParam Integer status) { + public Result updateStatus(@Parameter(description = "部门ID") @PathVariable String id, @Parameter(description = "状态:0禁用 1启用") @RequestParam Integer status) { boolean result = deptService.updateStatus(id, status); return Result.success(result); } diff --git a/fund-sys/src/main/java/com/fundplatform/sys/controller/MenuController.java b/fund-sys/src/main/java/com/fundplatform/sys/controller/MenuController.java index 7c1d870..a001f08 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/controller/MenuController.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/controller/MenuController.java @@ -28,8 +28,8 @@ public class MenuController { @Operation(summary = "创建菜单/权限") @PostMapping - public Result create(@Valid @RequestBody MenuDTO dto) { - Long menuId = menuService.createMenu(dto); + public Result create(@Valid @RequestBody MenuDTO dto) { + String menuId = menuService.createMenu(dto); return Result.success(menuId); } @@ -42,7 +42,7 @@ public class MenuController { @Operation(summary = "根据ID查询菜单") @GetMapping("/{id}") - public Result getById(@Parameter(description = "菜单ID") @PathVariable Long id) { + public Result getById(@Parameter(description = "菜单ID") @PathVariable String id) { MenuVO vo = menuService.getMenuById(id); return Result.success(vo); } @@ -56,14 +56,14 @@ public class MenuController { @Operation(summary = "获取用户菜单树", description = "根据用户ID获取其有权访问的菜单树") @GetMapping("/user/{userId}") - public Result> getUserTree(@Parameter(description = "用户ID") @PathVariable Long userId) { + public Result> getUserTree(@Parameter(description = "用户ID") @PathVariable String userId) { List tree = menuService.getUserMenuTree(userId); return Result.success(tree); } @Operation(summary = "删除菜单/权限") @DeleteMapping("/{id}") - public Result delete(@Parameter(description = "菜单ID") @PathVariable Long id) { + public Result delete(@Parameter(description = "菜单ID") @PathVariable String id) { boolean result = menuService.deleteMenu(id); return Result.success(result); } @@ -73,7 +73,7 @@ public class MenuController { */ @Operation(summary = "获取用户权限标识列表", description = "返回用户拥有的所有权限标识字符串") @GetMapping("/permissions/{userId}") - public Result> getUserPermissions(@Parameter(description = "用户ID") @PathVariable Long userId) { + public Result> getUserPermissions(@Parameter(description = "用户ID") @PathVariable String userId) { List permissions = menuService.getUserPermissions(userId); return Result.success(permissions); } diff --git a/fund-sys/src/main/java/com/fundplatform/sys/controller/ProfileController.java b/fund-sys/src/main/java/com/fundplatform/sys/controller/ProfileController.java index 5ee106c..0f26d5e 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/controller/ProfileController.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/controller/ProfileController.java @@ -30,7 +30,7 @@ public class ProfileController { */ @Operation(summary = "获取个人信息") @GetMapping - public Result getProfile(@Parameter(description = "当前登录用户ID") @RequestHeader("X-User-Id") Long userId) { + public Result getProfile(@Parameter(description = "当前登录用户ID") @RequestHeader("X-User-Id") String userId) { UserVO vo = userService.getUserById(userId); return Result.success(vo); } @@ -41,7 +41,7 @@ public class ProfileController { @Operation(summary = "更新个人信息") @PutMapping public Result updateProfile( - @Parameter(description = "当前登录用户ID") @RequestHeader("X-User-Id") Long userId, + @Parameter(description = "当前登录用户ID") @RequestHeader("X-User-Id") String userId, @Valid @RequestBody ProfileDTO dto) { boolean result = userService.updateProfile(userId, dto); return Result.success(result); @@ -53,7 +53,7 @@ public class ProfileController { @Operation(summary = "修改密码", description = "需要提供旧密码和新密码(MD5加密后传输)") @PutMapping("/password") public Result updatePassword( - @Parameter(description = "当前登录用户ID") @RequestHeader("X-User-Id") Long userId, + @Parameter(description = "当前登录用户ID") @RequestHeader("X-User-Id") String userId, @Valid @RequestBody PasswordDTO dto) { boolean result = userService.updatePassword(userId, dto); return Result.success(result); diff --git a/fund-sys/src/main/java/com/fundplatform/sys/controller/RoleController.java b/fund-sys/src/main/java/com/fundplatform/sys/controller/RoleController.java index e3df57b..042cafb 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/controller/RoleController.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/controller/RoleController.java @@ -29,8 +29,8 @@ public class RoleController { @Operation(summary = "创建角色") @PostMapping - public Result create(@Valid @RequestBody RoleDTO dto) { - Long roleId = roleService.createRole(dto); + public Result create(@Valid @RequestBody RoleDTO dto) { + String roleId = roleService.createRole(dto); return Result.success(roleId); } @@ -43,7 +43,7 @@ public class RoleController { @Operation(summary = "根据ID查询角色") @GetMapping("/{id}") - public Result getById(@Parameter(description = "角色ID") @PathVariable Long id) { + public Result getById(@Parameter(description = "角色ID") @PathVariable String id) { RoleVO vo = roleService.getRoleById(id); return Result.success(vo); } @@ -68,14 +68,14 @@ public class RoleController { @Operation(summary = "删除角色") @DeleteMapping("/{id}") - public Result delete(@Parameter(description = "角色ID") @PathVariable Long id) { + public Result delete(@Parameter(description = "角色ID") @PathVariable String id) { boolean result = roleService.deleteRole(id); return Result.success(result); } @Operation(summary = "更新角色状态") @PutMapping("/{id}/status") - public Result updateStatus(@Parameter(description = "角色ID") @PathVariable Long id, @Parameter(description = "状态:0禁用 1启用") @RequestParam Integer status) { + public Result updateStatus(@Parameter(description = "角色ID") @PathVariable String id, @Parameter(description = "状态:0禁用 1启用") @RequestParam Integer status) { boolean result = roleService.updateStatus(id, status); return Result.success(result); } @@ -85,8 +85,8 @@ public class RoleController { */ @Operation(summary = "获取角色的菜单ID列表") @GetMapping("/{id}/menus") - public Result> getRoleMenus(@Parameter(description = "角色ID") @PathVariable Long id) { - List menuIds = roleService.getRoleMenus(id); + public Result> getRoleMenus(@Parameter(description = "角色ID") @PathVariable String id) { + List menuIds = roleService.getRoleMenus(id); return Result.success(menuIds); } @@ -95,7 +95,7 @@ public class RoleController { */ @Operation(summary = "为角色分配菜单权限") @PutMapping("/{id}/menus") - public Result assignMenus(@Parameter(description = "角色ID") @PathVariable Long id, @RequestBody List menuIds) { + public Result assignMenus(@Parameter(description = "角色ID") @PathVariable String id, @RequestBody List menuIds) { boolean result = roleService.assignMenus(id, menuIds); return Result.success(result); } diff --git a/fund-sys/src/main/java/com/fundplatform/sys/controller/TenantController.java b/fund-sys/src/main/java/com/fundplatform/sys/controller/TenantController.java index 6bd1eb4..5b39784 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/controller/TenantController.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/controller/TenantController.java @@ -27,7 +27,7 @@ public class TenantController { @Operation(summary = "创建租户") @PostMapping - public Result create(@Valid @RequestBody TenantDTO dto) { + public Result create(@Valid @RequestBody TenantDTO dto) { return Result.success(tenantService.createTenant(dto)); } @@ -39,7 +39,7 @@ public class TenantController { @Operation(summary = "根据ID查询租户") @GetMapping("/{id}") - public Result getById(@Parameter(description = "租户ID") @PathVariable Long id) { + public Result getById(@Parameter(description = "租户ID") @PathVariable String id) { return Result.success(tenantService.getTenantById(id)); } @@ -54,13 +54,13 @@ public class TenantController { @Operation(summary = "删除租户") @DeleteMapping("/{id}") - public Result delete(@Parameter(description = "租户ID") @PathVariable Long id) { + public Result delete(@Parameter(description = "租户ID") @PathVariable String id) { return Result.success(tenantService.deleteTenant(id)); } @Operation(summary = "更新租户状态") @PutMapping("/{id}/status") - public Result updateStatus(@Parameter(description = "租户ID") @PathVariable Long id, @Parameter(description = "状态:0禁用 1启用 2过期") @RequestParam Integer status) { + public Result updateStatus(@Parameter(description = "租户ID") @PathVariable String id, @Parameter(description = "状态:0禁用 1启用 2过期") @RequestParam Integer status) { return Result.success(tenantService.updateStatus(id, status)); } } diff --git a/fund-sys/src/main/java/com/fundplatform/sys/controller/UserController.java b/fund-sys/src/main/java/com/fundplatform/sys/controller/UserController.java index ceb58d5..a824ba1 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/controller/UserController.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/controller/UserController.java @@ -30,8 +30,8 @@ public class UserController { */ @Operation(summary = "创建用户") @PostMapping - public Result create(@Valid @RequestBody UserDTO dto) { - Long userId = userService.createUser(dto); + public Result create(@Valid @RequestBody UserDTO dto) { + String userId = userService.createUser(dto); return Result.success(userId); } @@ -50,7 +50,7 @@ public class UserController { */ @Operation(summary = "根据ID查询用户") @GetMapping("/{id}") - public Result getById(@Parameter(description = "用户ID") @PathVariable Long id) { + public Result getById(@Parameter(description = "用户ID") @PathVariable String id) { UserVO vo = userService.getUserById(id); return Result.success(vo); } @@ -65,7 +65,7 @@ public class UserController { @Parameter(description = "每页条数") @RequestParam(defaultValue = "10") int pageSize, @Parameter(description = "用户名(模糊查询)") @RequestParam(required = false) String username, @Parameter(description = "状态:0禁用 1启用") @RequestParam(required = false) Integer status, - @Parameter(description = "部门ID") @RequestParam(required = false) Long deptId) { + @Parameter(description = "部门ID") @RequestParam(required = false) String deptId) { Page page = userService.pageUsers(pageNum, pageSize, username, status, deptId); return Result.success(page); } @@ -75,7 +75,7 @@ public class UserController { */ @Operation(summary = "删除用户(逻辑删除)") @DeleteMapping("/{id}") - public Result delete(@Parameter(description = "用户ID") @PathVariable Long id) { + public Result delete(@Parameter(description = "用户ID") @PathVariable String id) { boolean result = userService.deleteUser(id); return Result.success(result); } @@ -85,7 +85,7 @@ public class UserController { */ @Operation(summary = "批量删除用户") @DeleteMapping("/batch") - public Result batchDelete(@RequestBody Long[] ids) { + public Result batchDelete(@RequestBody String[] ids) { boolean result = userService.batchDeleteUsers(ids); return Result.success(result); } @@ -95,7 +95,7 @@ public class UserController { */ @Operation(summary = "重置用户密码", description = "将用户密码重置为系统默认密码") @PutMapping("/{id}/reset-password") - public Result resetPassword(@Parameter(description = "用户ID") @PathVariable Long id) { + public Result resetPassword(@Parameter(description = "用户ID") @PathVariable String id) { boolean result = userService.resetPassword(id); return Result.success(result); } @@ -105,7 +105,7 @@ public class UserController { */ @Operation(summary = "更新用户状态") @PutMapping("/{id}/status") - public Result updateStatus(@Parameter(description = "用户ID") @PathVariable Long id, @Parameter(description = "状态:0禁用 1启用") @RequestParam Integer status) { + public Result updateStatus(@Parameter(description = "用户ID") @PathVariable String id, @Parameter(description = "状态:0禁用 1启用") @RequestParam Integer status) { boolean result = userService.updateStatus(id, status); return Result.success(result); } diff --git a/fund-sys/src/main/java/com/fundplatform/sys/data/entity/OperationLog.java b/fund-sys/src/main/java/com/fundplatform/sys/data/entity/OperationLog.java index 280a6f2..445c256 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/data/entity/OperationLog.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/data/entity/OperationLog.java @@ -1,6 +1,5 @@ package com.fundplatform.sys.data.entity; -import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; @@ -12,10 +11,10 @@ import java.time.LocalDateTime; @TableName("sys_operation_log") public class OperationLog { - @TableId(type = IdType.AUTO) - private Long logId; + @TableId + private String logId; - private Long userId; + private String userId; private String username; @@ -37,19 +36,19 @@ public class OperationLog { private String errorMsg; - public Long getLogId() { + public String getLogId() { return logId; } - public void setLogId(Long logId) { + public void setLogId(String logId) { this.logId = logId; } - public Long getUserId() { + public String getUserId() { return userId; } - public void setUserId(Long userId) { + public void setUserId(String userId) { this.userId = userId; } diff --git a/fund-sys/src/main/java/com/fundplatform/sys/data/entity/SysDept.java b/fund-sys/src/main/java/com/fundplatform/sys/data/entity/SysDept.java index e646fde..fe97c1d 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/data/entity/SysDept.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/data/entity/SysDept.java @@ -9,7 +9,7 @@ import com.fundplatform.common.core.BaseEntity; @TableName("sys_dept") public class SysDept extends BaseEntity { - private Long parentId; + private String parentId; private String deptCode; private String deptName; private String deptLeader; @@ -18,11 +18,11 @@ public class SysDept extends BaseEntity { private Integer sortOrder; private Integer status; - public Long getParentId() { + public String getParentId() { return parentId; } - public void setParentId(Long parentId) { + public void setParentId(String parentId) { this.parentId = parentId; } diff --git a/fund-sys/src/main/java/com/fundplatform/sys/data/entity/SysMenu.java b/fund-sys/src/main/java/com/fundplatform/sys/data/entity/SysMenu.java index 758b873..f2ca3d5 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/data/entity/SysMenu.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/data/entity/SysMenu.java @@ -9,7 +9,7 @@ import com.fundplatform.common.core.BaseEntity; @TableName("sys_menu") public class SysMenu extends BaseEntity { - private Long parentId; + private String parentId; private String menuName; private Integer menuType; private String menuPath; @@ -20,11 +20,11 @@ public class SysMenu extends BaseEntity { private Integer visible; private Integer status; - public Long getParentId() { + public String getParentId() { return parentId; } - public void setParentId(Long parentId) { + public void setParentId(String parentId) { this.parentId = parentId; } diff --git a/fund-sys/src/main/java/com/fundplatform/sys/data/entity/SysTenant.java b/fund-sys/src/main/java/com/fundplatform/sys/data/entity/SysTenant.java index e30562f..72bf41e 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/data/entity/SysTenant.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/data/entity/SysTenant.java @@ -14,13 +14,13 @@ public class SysTenant extends BaseEntity { /** 租户表不需要tenant_id字段 */ @TableField(exist = false) - private Long tenantId; + private String tenantId; - public Long getTenantId() { + public String getTenantId() { return tenantId; } - public void setTenantId(Long tenantId) { + public void setTenantId(String tenantId) { this.tenantId = tenantId; } diff --git a/fund-sys/src/main/java/com/fundplatform/sys/data/entity/SysUser.java b/fund-sys/src/main/java/com/fundplatform/sys/data/entity/SysUser.java index 4f03efe..9f85771 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/data/entity/SysUser.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/data/entity/SysUser.java @@ -14,7 +14,7 @@ public class SysUser extends BaseEntity { private String realName; private String phone; private String email; - private Long deptId; + private String deptId; private Integer status; private String avatar; @@ -59,11 +59,11 @@ public class SysUser extends BaseEntity { this.email = email; } - public Long getDeptId() { + public String getDeptId() { return deptId; } - public void setDeptId(Long deptId) { + public void setDeptId(String deptId) { this.deptId = deptId; } diff --git a/fund-sys/src/main/java/com/fundplatform/sys/dto/ConfigDTO.java b/fund-sys/src/main/java/com/fundplatform/sys/dto/ConfigDTO.java index 730c01f..c562706 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/dto/ConfigDTO.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/dto/ConfigDTO.java @@ -7,7 +7,7 @@ import jakarta.validation.constraints.NotBlank; */ public class ConfigDTO { - private Long id; + private String id; @NotBlank(message = "参数键不能为空") private String configKey; @@ -28,11 +28,11 @@ public class ConfigDTO { private Integer sortOrder; - public Long getId() { + public String getId() { return id; } - public void setId(Long id) { + public void setId(String id) { this.id = id; } diff --git a/fund-sys/src/main/java/com/fundplatform/sys/dto/DeptDTO.java b/fund-sys/src/main/java/com/fundplatform/sys/dto/DeptDTO.java index 1bc3d24..33e93da 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/dto/DeptDTO.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/dto/DeptDTO.java @@ -8,9 +8,9 @@ import jakarta.validation.constraints.Size; */ public class DeptDTO { - private Long id; + private String id; - private Long parentId; + private String parentId; @NotBlank(message = "部门编码不能为空") @Size(max = 50, message = "部门编码不能超过50个字符") @@ -33,19 +33,19 @@ public class DeptDTO { private String remark; - public Long getId() { + public String getId() { return id; } - public void setId(Long id) { + public void setId(String id) { this.id = id; } - public Long getParentId() { + public String getParentId() { return parentId; } - public void setParentId(Long parentId) { + public void setParentId(String parentId) { this.parentId = parentId; } diff --git a/fund-sys/src/main/java/com/fundplatform/sys/dto/MenuDTO.java b/fund-sys/src/main/java/com/fundplatform/sys/dto/MenuDTO.java index 8d79d74..07906ed 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/dto/MenuDTO.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/dto/MenuDTO.java @@ -8,9 +8,9 @@ import jakarta.validation.constraints.Size; */ public class MenuDTO { - private Long id; + private String id; - private Long parentId; + private String parentId; @NotBlank(message = "菜单名称不能为空") @Size(max = 50, message = "菜单名称不能超过50个字符") @@ -38,19 +38,19 @@ public class MenuDTO { private String remark; - public Long getId() { + public String getId() { return id; } - public void setId(Long id) { + public void setId(String id) { this.id = id; } - public Long getParentId() { + public String getParentId() { return parentId; } - public void setParentId(Long parentId) { + public void setParentId(String parentId) { this.parentId = parentId; } diff --git a/fund-sys/src/main/java/com/fundplatform/sys/dto/RoleDTO.java b/fund-sys/src/main/java/com/fundplatform/sys/dto/RoleDTO.java index 9b5ae4b..121a2c8 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/dto/RoleDTO.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/dto/RoleDTO.java @@ -8,7 +8,7 @@ import jakarta.validation.constraints.Size; */ public class RoleDTO { - private Long id; + private String id; @NotBlank(message = "角色编码不能为空") @Size(max = 50, message = "角色编码不能超过50个字符") @@ -26,11 +26,11 @@ public class RoleDTO { private String remark; - public Long getId() { + public String getId() { return id; } - public void setId(Long id) { + public void setId(String id) { this.id = id; } diff --git a/fund-sys/src/main/java/com/fundplatform/sys/dto/TenantDTO.java b/fund-sys/src/main/java/com/fundplatform/sys/dto/TenantDTO.java index 7c97076..05469ec 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/dto/TenantDTO.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/dto/TenantDTO.java @@ -10,7 +10,7 @@ import java.time.LocalDateTime; */ public class TenantDTO { - private Long id; + private String id; @NotBlank(message = "租户编码不能为空") @Size(max = 50, message = "租户编码长度不能超过50") @@ -41,11 +41,11 @@ public class TenantDTO { @Size(max = 500, message = "备注长度不能超过500") private String remark; - public Long getId() { + public String getId() { return id; } - public void setId(Long id) { + public void setId(String id) { this.id = id; } diff --git a/fund-sys/src/main/java/com/fundplatform/sys/dto/UserDTO.java b/fund-sys/src/main/java/com/fundplatform/sys/dto/UserDTO.java index 1b3494d..4085121 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/dto/UserDTO.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/dto/UserDTO.java @@ -9,7 +9,7 @@ import jakarta.validation.constraints.Size; */ public class UserDTO { - private Long id; + private String id; @NotBlank(message = "用户名不能为空") @Size(min = 3, max = 50, message = "用户名长度必须在3-50个字符之间") @@ -28,7 +28,7 @@ public class UserDTO { @Pattern(regexp = "^$|^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$", message = "邮箱格式不正确") private String email; - private Long deptId; + private String deptId; private Integer status; @@ -36,11 +36,11 @@ public class UserDTO { private String remark; - public Long getId() { + public String getId() { return id; } - public void setId(Long id) { + public void setId(String id) { this.id = id; } @@ -84,11 +84,11 @@ public class UserDTO { this.email = email; } - public Long getDeptId() { + public String getDeptId() { return deptId; } - public void setDeptId(Long deptId) { + public void setDeptId(String deptId) { this.deptId = deptId; } diff --git a/fund-sys/src/main/java/com/fundplatform/sys/service/AuthService.java b/fund-sys/src/main/java/com/fundplatform/sys/service/AuthService.java index 9ef970c..df857de 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/service/AuthService.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/service/AuthService.java @@ -17,15 +17,15 @@ public interface AuthService { /** * 用户登出 */ - void logout(Long userId); + void logout(String userId); /** * 刷新Token */ - LoginVO refreshToken(Long userId); + LoginVO refreshToken(String userId); /** * 获取当前用户信息 */ - UserVO getUserInfo(Long userId); + UserVO getUserInfo(String userId); } diff --git a/fund-sys/src/main/java/com/fundplatform/sys/service/ConfigService.java b/fund-sys/src/main/java/com/fundplatform/sys/service/ConfigService.java index 8b5df5d..c5058f3 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/service/ConfigService.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/service/ConfigService.java @@ -15,7 +15,7 @@ public interface ConfigService { /** * 创建参数 */ - Long createConfig(ConfigDTO dto); + String createConfig(ConfigDTO dto); /** * 更新参数 @@ -25,7 +25,7 @@ public interface ConfigService { /** * 根据ID查询参数 */ - ConfigVO getConfigById(Long id); + ConfigVO getConfigById(String id); /** * 根据参数键查询值 @@ -50,7 +50,7 @@ public interface ConfigService { /** * 删除参数 */ - boolean deleteConfig(Long id); + boolean deleteConfig(String id); /** * 批量更新参数值 diff --git a/fund-sys/src/main/java/com/fundplatform/sys/service/DeptService.java b/fund-sys/src/main/java/com/fundplatform/sys/service/DeptService.java index 40c87d7..a612f39 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/service/DeptService.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/service/DeptService.java @@ -10,17 +10,17 @@ import java.util.List; */ public interface DeptService { - Long createDept(DeptDTO dto); + String createDept(DeptDTO dto); boolean updateDept(DeptDTO dto); - DeptVO getDeptById(Long id); + DeptVO getDeptById(String id); List getDeptTree(); List listAllDepts(); - boolean deleteDept(Long id); + boolean deleteDept(String id); - boolean updateStatus(Long id, Integer status); + boolean updateStatus(String id, Integer status); } diff --git a/fund-sys/src/main/java/com/fundplatform/sys/service/MenuService.java b/fund-sys/src/main/java/com/fundplatform/sys/service/MenuService.java index 047267a..473a5ac 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/service/MenuService.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/service/MenuService.java @@ -13,7 +13,7 @@ public interface MenuService { /** * 创建菜单 */ - Long createMenu(MenuDTO dto); + String createMenu(MenuDTO dto); /** * 更新菜单 @@ -23,7 +23,7 @@ public interface MenuService { /** * 根据ID查询菜单 */ - MenuVO getMenuById(Long id); + MenuVO getMenuById(String id); /** * 查询菜单树 @@ -33,15 +33,15 @@ public interface MenuService { /** * 查询用户菜单树 */ - List getUserMenuTree(Long userId); + List getUserMenuTree(String userId); /** * 删除菜单 */ - boolean deleteMenu(Long id); + boolean deleteMenu(String id); /** * 获取用户权限标识列表 */ - List getUserPermissions(Long userId); + List getUserPermissions(String userId); } diff --git a/fund-sys/src/main/java/com/fundplatform/sys/service/RoleService.java b/fund-sys/src/main/java/com/fundplatform/sys/service/RoleService.java index 0a8af3d..86f8cb2 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/service/RoleService.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/service/RoleService.java @@ -14,7 +14,7 @@ public interface RoleService { /** * 创建角色 */ - Long createRole(RoleDTO dto); + String createRole(RoleDTO dto); /** * 更新角色 @@ -24,7 +24,7 @@ public interface RoleService { /** * 根据ID查询角色 */ - RoleVO getRoleById(Long id); + RoleVO getRoleById(String id); /** * 分页查询角色 @@ -39,20 +39,20 @@ public interface RoleService { /** * 删除角色 */ - boolean deleteRole(Long id); + boolean deleteRole(String id); /** * 更新角色状态 */ - boolean updateStatus(Long id, Integer status); + boolean updateStatus(String id, Integer status); /** * 获取角色菜单ID列表 */ - List getRoleMenus(Long roleId); + List getRoleMenus(String roleId); /** * 分配菜单权限 */ - boolean assignMenus(Long roleId, List menuIds); + boolean assignMenus(String roleId, List menuIds); } diff --git a/fund-sys/src/main/java/com/fundplatform/sys/service/TenantService.java b/fund-sys/src/main/java/com/fundplatform/sys/service/TenantService.java index 97f592c..3dacf7e 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/service/TenantService.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/service/TenantService.java @@ -9,15 +9,15 @@ import com.fundplatform.sys.vo.TenantVO; */ public interface TenantService { - Long createTenant(TenantDTO dto); + String createTenant(TenantDTO dto); boolean updateTenant(TenantDTO dto); - TenantVO getTenantById(Long id); + TenantVO getTenantById(String id); Page pageTenants(int pageNum, int pageSize, String keyword); - boolean deleteTenant(Long id); + boolean deleteTenant(String id); - boolean updateStatus(Long id, Integer status); + boolean updateStatus(String id, Integer status); } diff --git a/fund-sys/src/main/java/com/fundplatform/sys/service/UserService.java b/fund-sys/src/main/java/com/fundplatform/sys/service/UserService.java index da90ae7..2e24eb2 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/service/UserService.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/service/UserService.java @@ -17,7 +17,7 @@ public interface UserService { * @param dto 用户DTO * @return 用户ID */ - Long createUser(UserDTO dto); + String createUser(UserDTO dto); /** * 更新用户 @@ -33,7 +33,7 @@ public interface UserService { * @param id 用户ID * @return 用户VO */ - UserVO getUserById(Long id); + UserVO getUserById(String id); /** * 分页查询用户 @@ -45,7 +45,7 @@ public interface UserService { * @param deptId 部门ID * @return 分页数据 */ - Page pageUsers(int pageNum, int pageSize, String username, Integer status, Long deptId); + Page pageUsers(int pageNum, int pageSize, String username, Integer status, String deptId); /** * 删除用户 @@ -53,7 +53,7 @@ public interface UserService { * @param id 用户ID * @return 是否成功 */ - boolean deleteUser(Long id); + boolean deleteUser(String id); /** * 批量删除用户 @@ -61,7 +61,7 @@ public interface UserService { * @param ids 用户ID列表 * @return 是否成功 */ - boolean batchDeleteUsers(Long[] ids); + boolean batchDeleteUsers(String[] ids); /** * 重置密码 @@ -69,7 +69,7 @@ public interface UserService { * @param id 用户ID * @return 是否成功 */ - boolean resetPassword(Long id); + boolean resetPassword(String id); /** * 更新用户状态 @@ -78,7 +78,7 @@ public interface UserService { * @param status 状态 * @return 是否成功 */ - boolean updateStatus(Long id, Integer status); + boolean updateStatus(String id, Integer status); /** * 更新个人信息 @@ -87,7 +87,7 @@ public interface UserService { * @param dto 个人信息DTO * @return 是否成功 */ - boolean updateProfile(Long userId, ProfileDTO dto); + boolean updateProfile(String userId, ProfileDTO dto); /** * 修改密码 @@ -96,5 +96,5 @@ public interface UserService { * @param dto 密码DTO * @return 是否成功 */ - boolean updatePassword(Long userId, PasswordDTO dto); + boolean updatePassword(String userId, PasswordDTO dto); } diff --git a/fund-sys/src/main/java/com/fundplatform/sys/service/impl/AuthServiceImpl.java b/fund-sys/src/main/java/com/fundplatform/sys/service/impl/AuthServiceImpl.java index 27cabe9..29d9fe6 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/service/impl/AuthServiceImpl.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/service/impl/AuthServiceImpl.java @@ -70,14 +70,14 @@ public class AuthServiceImpl implements AuthService { } @Override - public void logout(Long userId) { + public void logout(String userId) { // 清除用户所有Token(强制登出所有设备) // 如果只需要登出当前设备,需要从前端传递token tokenService.deleteAllUserTokens(userId); } @Override - public LoginVO refreshToken(Long userId) { + public LoginVO refreshToken(String userId) { SysUser user = userDataService.getById(userId); if (user == null) { throw new RuntimeException("用户不存在"); @@ -95,7 +95,7 @@ public class AuthServiceImpl implements AuthService { } @Override - public UserVO getUserInfo(Long userId) { + public UserVO getUserInfo(String userId) { SysUser user = userDataService.getById(userId); if (user == null) { throw new RuntimeException("用户不存在"); diff --git a/fund-sys/src/main/java/com/fundplatform/sys/service/impl/ConfigServiceImpl.java b/fund-sys/src/main/java/com/fundplatform/sys/service/impl/ConfigServiceImpl.java index 4a9841c..426f232 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/service/impl/ConfigServiceImpl.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/service/impl/ConfigServiceImpl.java @@ -33,7 +33,7 @@ public class ConfigServiceImpl implements ConfigService { @Override @Transactional(rollbackFor = Exception.class) - public Long createConfig(ConfigDTO dto) { + public String createConfig(ConfigDTO dto) { // 检查key是否已存在 LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); wrapper.eq(SysConfig::getConfigKey, dto.getConfigKey()); @@ -87,7 +87,7 @@ public class ConfigServiceImpl implements ConfigService { } @Override - public ConfigVO getConfigById(Long id) { + public ConfigVO getConfigById(String id) { SysConfig config = configDataService.getById(id); if (config == null || config.getDeleted() == 1) { throw new RuntimeException("参数不存在"); @@ -157,7 +157,7 @@ public class ConfigServiceImpl implements ConfigService { @Override @Transactional(rollbackFor = Exception.class) - public boolean deleteConfig(Long id) { + public boolean deleteConfig(String id) { SysConfig existing = configDataService.getById(id); if (existing == null || existing.getDeleted() == 1) { throw new RuntimeException("参数不存在"); diff --git a/fund-sys/src/main/java/com/fundplatform/sys/service/impl/DeptServiceImpl.java b/fund-sys/src/main/java/com/fundplatform/sys/service/impl/DeptServiceImpl.java index df5a5fa..6571099 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/service/impl/DeptServiceImpl.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/service/impl/DeptServiceImpl.java @@ -34,7 +34,7 @@ public class DeptServiceImpl implements DeptService { @Override @Transactional(rollbackFor = Exception.class) - public Long createDept(DeptDTO dto) { + public String createDept(DeptDTO dto) { LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); wrapper.eq(SysDept::getDeptCode, dto.getDeptCode()); wrapper.eq(SysDept::getDeleted, 0); @@ -43,7 +43,7 @@ public class DeptServiceImpl implements DeptService { } SysDept dept = new SysDept(); - dept.setParentId(dto.getParentId() != null ? dto.getParentId() : 0L); + dept.setParentId(dto.getParentId() != null ? dto.getParentId() : "0"); dept.setDeptCode(dto.getDeptCode()); dept.setDeptName(dto.getDeptName()); dept.setDeptLeader(dto.getDeptLeader()); @@ -88,7 +88,7 @@ public class DeptServiceImpl implements DeptService { } @Override - public DeptVO getDeptById(Long id) { + public DeptVO getDeptById(String id) { SysDept dept = deptDataService.getById(id); if (dept == null || dept.getDeleted() == 1) { throw new RuntimeException("部门不存在"); @@ -104,7 +104,7 @@ public class DeptServiceImpl implements DeptService { wrapper.orderByAsc(SysDept::getSortOrder); List depts = deptDataService.list(wrapper); - return buildDeptTree(depts, 0L); + return buildDeptTree(depts, "0"); } @Override @@ -117,7 +117,7 @@ public class DeptServiceImpl implements DeptService { @Override @Transactional(rollbackFor = Exception.class) - public boolean deleteDept(Long id) { + public boolean deleteDept(String id) { LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); wrapper.eq(SysDept::getParentId, id); wrapper.eq(SysDept::getDeleted, 0); @@ -136,7 +136,7 @@ public class DeptServiceImpl implements DeptService { @Override @Transactional(rollbackFor = Exception.class) - public boolean updateStatus(Long id, Integer status) { + public boolean updateStatus(String id, Integer status) { LambdaUpdateWrapper wrapper = new LambdaUpdateWrapper<>(); wrapper.eq(SysDept::getId, id); wrapper.set(SysDept::getStatus, status); @@ -146,10 +146,10 @@ public class DeptServiceImpl implements DeptService { return result; } - private List buildDeptTree(List depts, Long parentId) { + private List buildDeptTree(List depts, String parentId) { List tree = new ArrayList<>(); - Map> deptMap = depts.stream() + Map> deptMap = depts.stream() .collect(Collectors.groupingBy(SysDept::getParentId)); List rootDepts = deptMap.getOrDefault(parentId, new ArrayList<>()); diff --git a/fund-sys/src/main/java/com/fundplatform/sys/service/impl/MenuServiceImpl.java b/fund-sys/src/main/java/com/fundplatform/sys/service/impl/MenuServiceImpl.java index 52f4534..3487bcd 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/service/impl/MenuServiceImpl.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/service/impl/MenuServiceImpl.java @@ -34,9 +34,9 @@ public class MenuServiceImpl implements MenuService { @Override @Transactional(rollbackFor = Exception.class) - public Long createMenu(MenuDTO dto) { + public String createMenu(MenuDTO dto) { SysMenu menu = new SysMenu(); - menu.setParentId(dto.getParentId() != null ? dto.getParentId() : 0L); + menu.setParentId(dto.getParentId() != null ? dto.getParentId() : "0"); menu.setMenuName(dto.getMenuName()); menu.setMenuType(dto.getMenuType() != null ? dto.getMenuType() : 1); menu.setMenuPath(dto.getMenuPath()); @@ -86,7 +86,7 @@ public class MenuServiceImpl implements MenuService { } @Override - public MenuVO getMenuById(Long id) { + public MenuVO getMenuById(String id) { SysMenu menu = menuDataService.getById(id); if (menu == null || menu.getDeleted() == 1) { throw new RuntimeException("菜单不存在"); @@ -102,18 +102,18 @@ public class MenuServiceImpl implements MenuService { wrapper.orderByAsc(SysMenu::getSortOrder); List menus = menuDataService.list(wrapper); - return buildMenuTree(menus, 0L); + return buildMenuTree(menus, "0"); } @Override - public List getUserMenuTree(Long userId) { + public List getUserMenuTree(String userId) { // TODO: 根据用户角色查询菜单 return getMenuTree(); } @Override @Transactional(rollbackFor = Exception.class) - public boolean deleteMenu(Long id) { + public boolean deleteMenu(String id) { // 检查是否有子菜单 LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); wrapper.eq(SysMenu::getParentId, id); @@ -132,7 +132,7 @@ public class MenuServiceImpl implements MenuService { } @Override - public List getUserPermissions(Long userId) { + public List getUserPermissions(String userId) { // 查询所有启用的菜单/按钮 LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); wrapper.eq(SysMenu::getDeleted, 0); @@ -150,10 +150,10 @@ public class MenuServiceImpl implements MenuService { .collect(Collectors.toList()); } - private List buildMenuTree(List menus, Long parentId) { + private List buildMenuTree(List menus, String parentId) { List tree = new ArrayList<>(); - Map> menuMap = menus.stream() + Map> menuMap = menus.stream() .collect(Collectors.groupingBy(SysMenu::getParentId)); List rootMenus = menuMap.getOrDefault(parentId, new ArrayList<>()); diff --git a/fund-sys/src/main/java/com/fundplatform/sys/service/impl/RoleServiceImpl.java b/fund-sys/src/main/java/com/fundplatform/sys/service/impl/RoleServiceImpl.java index 4bc6c3d..d1feea4 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/service/impl/RoleServiceImpl.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/service/impl/RoleServiceImpl.java @@ -33,7 +33,7 @@ public class RoleServiceImpl implements RoleService { @Override @Transactional(rollbackFor = Exception.class) - public Long createRole(RoleDTO dto) { + public String createRole(RoleDTO dto) { // 检查角色编码是否存在 LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); wrapper.eq(SysRole::getRoleCode, dto.getRoleCode()); @@ -82,7 +82,7 @@ public class RoleServiceImpl implements RoleService { } @Override - public RoleVO getRoleById(Long id) { + public RoleVO getRoleById(String id) { SysRole role = roleDataService.getById(id); if (role == null || role.getDeleted() == 1) { throw new RuntimeException("角色不存在"); @@ -122,7 +122,7 @@ public class RoleServiceImpl implements RoleService { @Override @Transactional(rollbackFor = Exception.class) - public boolean deleteRole(Long id) { + public boolean deleteRole(String id) { LambdaUpdateWrapper wrapper = new LambdaUpdateWrapper<>(); wrapper.eq(SysRole::getId, id); wrapper.set(SysRole::getDeleted, 1); @@ -134,7 +134,7 @@ public class RoleServiceImpl implements RoleService { @Override @Transactional(rollbackFor = Exception.class) - public boolean updateStatus(Long id, Integer status) { + public boolean updateStatus(String id, Integer status) { LambdaUpdateWrapper wrapper = new LambdaUpdateWrapper<>(); wrapper.eq(SysRole::getId, id); wrapper.set(SysRole::getStatus, status); @@ -145,7 +145,7 @@ public class RoleServiceImpl implements RoleService { } @Override - public List getRoleMenus(Long roleId) { + public List getRoleMenus(String roleId) { // TODO: 从sys_role_menu表查询角色关联的菜单ID // 目前返回空列表 log.info("获取角色菜单: roleId={}", roleId); @@ -154,7 +154,7 @@ public class RoleServiceImpl implements RoleService { @Override @Transactional(rollbackFor = Exception.class) - public boolean assignMenus(Long roleId, List menuIds) { + public boolean assignMenus(String roleId, List menuIds) { // TODO: 实现角色菜单关联 log.info("分配角色菜单: roleId={}, menuIds={}", roleId, menuIds); return true; diff --git a/fund-sys/src/main/java/com/fundplatform/sys/service/impl/TenantServiceImpl.java b/fund-sys/src/main/java/com/fundplatform/sys/service/impl/TenantServiceImpl.java index 2c0f9bb..6387387 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/service/impl/TenantServiceImpl.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/service/impl/TenantServiceImpl.java @@ -30,7 +30,7 @@ public class TenantServiceImpl implements TenantService { @Override @Transactional(rollbackFor = Exception.class) - public Long createTenant(TenantDTO dto) { + public String createTenant(TenantDTO dto) { // 检查编码是否重复 LambdaQueryWrapper checkWrapper = new LambdaQueryWrapper<>(); checkWrapper.eq(SysTenant::getTenantCode, dto.getTenantCode()); @@ -101,7 +101,7 @@ public class TenantServiceImpl implements TenantService { } @Override - public TenantVO getTenantById(Long id) { + public TenantVO getTenantById(String id) { SysTenant tenant = tenantDataService.getById(id); if (tenant == null || tenant.getDeleted() == 1) { throw new RuntimeException("租户不存在"); @@ -134,7 +134,7 @@ public class TenantServiceImpl implements TenantService { @Override @Transactional(rollbackFor = Exception.class) - public boolean deleteTenant(Long id) { + public boolean deleteTenant(String id) { SysTenant existing = tenantDataService.getById(id); if (existing == null || existing.getDeleted() == 1) { throw new RuntimeException("租户不存在"); @@ -156,7 +156,7 @@ public class TenantServiceImpl implements TenantService { @Override @Transactional(rollbackFor = Exception.class) - public boolean updateStatus(Long id, Integer status) { + public boolean updateStatus(String id, Integer status) { SysTenant existing = tenantDataService.getById(id); if (existing == null || existing.getDeleted() == 1) { throw new RuntimeException("租户不存在"); diff --git a/fund-sys/src/main/java/com/fundplatform/sys/service/impl/UserServiceImpl.java b/fund-sys/src/main/java/com/fundplatform/sys/service/impl/UserServiceImpl.java index d6e4e62..09163ad 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/service/impl/UserServiceImpl.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/service/impl/UserServiceImpl.java @@ -38,7 +38,7 @@ public class UserServiceImpl implements UserService { @Override @Transactional(rollbackFor = Exception.class) - public Long createUser(UserDTO dto) { + public String createUser(UserDTO dto) { // 检查用户名是否存在 LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); wrapper.eq(SysUser::getUsername, dto.getUsername()); @@ -115,7 +115,7 @@ public class UserServiceImpl implements UserService { } @Override - public UserVO getUserById(Long id) { + public UserVO getUserById(String id) { SysUser user = userDataService.getById(id); if (user == null || user.getDeleted() == 1) { throw new RuntimeException("用户不存在"); @@ -124,7 +124,7 @@ public class UserServiceImpl implements UserService { } @Override - public Page pageUsers(int pageNum, int pageSize, String username, Integer status, Long deptId) { + public Page pageUsers(int pageNum, int pageSize, String username, Integer status, String deptId) { Page page = new Page<>(pageNum, pageSize); LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); wrapper.eq(SysUser::getDeleted, 0); @@ -150,7 +150,7 @@ public class UserServiceImpl implements UserService { @Override @Transactional(rollbackFor = Exception.class) - public boolean deleteUser(Long id) { + public boolean deleteUser(String id) { LambdaUpdateWrapper wrapper = new LambdaUpdateWrapper<>(); wrapper.eq(SysUser::getId, id); wrapper.set(SysUser::getDeleted, 1); @@ -162,7 +162,7 @@ public class UserServiceImpl implements UserService { @Override @Transactional(rollbackFor = Exception.class) - public boolean batchDeleteUsers(Long[] ids) { + public boolean batchDeleteUsers(String[] ids) { if (ids == null || ids.length == 0) { return false; } @@ -177,7 +177,7 @@ public class UserServiceImpl implements UserService { @Override @Transactional(rollbackFor = Exception.class) - public boolean resetPassword(Long id) { + public boolean resetPassword(String id) { String defaultPassword = "123456"; String md5Password = Md5Util.encrypt(defaultPassword); log.info("重置用户密码 - userId={}, 原始密码:{}, MD5: {}", id, defaultPassword, md5Password); @@ -192,7 +192,7 @@ public class UserServiceImpl implements UserService { @Override @Transactional(rollbackFor = Exception.class) - public boolean updateStatus(Long id, Integer status) { + public boolean updateStatus(String id, Integer status) { LambdaUpdateWrapper wrapper = new LambdaUpdateWrapper<>(); wrapper.eq(SysUser::getId, id); wrapper.set(SysUser::getStatus, status); @@ -204,7 +204,7 @@ public class UserServiceImpl implements UserService { @Override @Transactional(rollbackFor = Exception.class) - public boolean updateProfile(Long userId, ProfileDTO dto) { + public boolean updateProfile(String userId, ProfileDTO dto) { SysUser user = userDataService.getById(userId); if (user == null || user.getDeleted() == 1) { throw new RuntimeException("用户不存在"); @@ -227,7 +227,7 @@ public class UserServiceImpl implements UserService { @Override @Transactional(rollbackFor = Exception.class) - public boolean updatePassword(Long userId, PasswordDTO dto) { + public boolean updatePassword(String userId, PasswordDTO dto) { // 验证新密码和确认密码一致 if (!dto.getNewPassword().equals(dto.getConfirmPassword())) { throw new RuntimeException("新密码和确认密码不一致"); diff --git a/fund-sys/src/main/java/com/fundplatform/sys/vo/ConfigVO.java b/fund-sys/src/main/java/com/fundplatform/sys/vo/ConfigVO.java index b01c84f..3e6ef2c 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/vo/ConfigVO.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/vo/ConfigVO.java @@ -7,7 +7,7 @@ import java.time.LocalDateTime; */ public class ConfigVO { - private Long id; + private String id; private String configKey; private String configValue; private String configType; @@ -20,11 +20,11 @@ public class ConfigVO { private LocalDateTime createdTime; private LocalDateTime updatedTime; - public Long getId() { + public String getId() { return id; } - public void setId(Long id) { + public void setId(String id) { this.id = id; } diff --git a/fund-sys/src/main/java/com/fundplatform/sys/vo/DeptVO.java b/fund-sys/src/main/java/com/fundplatform/sys/vo/DeptVO.java index d543fc4..1707e08 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/vo/DeptVO.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/vo/DeptVO.java @@ -8,8 +8,8 @@ import java.util.List; */ public class DeptVO { - private Long id; - private Long parentId; + private String id; + private String parentId; private String parentName; private String deptCode; private String deptName; @@ -18,26 +18,26 @@ public class DeptVO { private String email; private Integer sortOrder; private Integer status; - private Long tenantId; + private String tenantId; private LocalDateTime createdTime; private LocalDateTime updatedTime; // 子部门 private List children; - public Long getId() { + public String getId() { return id; } - public void setId(Long id) { + public void setId(String id) { this.id = id; } - public Long getParentId() { + public String getParentId() { return parentId; } - public void setParentId(Long parentId) { + public void setParentId(String parentId) { this.parentId = parentId; } @@ -105,11 +105,11 @@ public class DeptVO { this.status = status; } - public Long getTenantId() { + public String getTenantId() { return tenantId; } - public void setTenantId(Long tenantId) { + public void setTenantId(String tenantId) { this.tenantId = tenantId; } diff --git a/fund-sys/src/main/java/com/fundplatform/sys/vo/LoginVO.java b/fund-sys/src/main/java/com/fundplatform/sys/vo/LoginVO.java index 2023884..08e33ba 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/vo/LoginVO.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/vo/LoginVO.java @@ -5,26 +5,26 @@ package com.fundplatform.sys.vo; */ public class LoginVO { - private Long userId; + private String userId; private String username; private String token; - private Long tenantId; + private String tenantId; public LoginVO() { } - public LoginVO(Long userId, String username, String token, Long tenantId) { + public LoginVO(String userId, String username, String token, String tenantId) { this.userId = userId; this.username = username; this.token = token; this.tenantId = tenantId; } - public Long getUserId() { + public String getUserId() { return userId; } - public void setUserId(Long userId) { + public void setUserId(String userId) { this.userId = userId; } @@ -44,11 +44,11 @@ public class LoginVO { this.token = token; } - public Long getTenantId() { + public String getTenantId() { return tenantId; } - public void setTenantId(Long tenantId) { + public void setTenantId(String tenantId) { this.tenantId = tenantId; } } diff --git a/fund-sys/src/main/java/com/fundplatform/sys/vo/MenuVO.java b/fund-sys/src/main/java/com/fundplatform/sys/vo/MenuVO.java index 3bc5e44..929f149 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/vo/MenuVO.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/vo/MenuVO.java @@ -8,8 +8,8 @@ import java.util.List; */ public class MenuVO { - private Long id; - private Long parentId; + private String id; + private String parentId; private String menuName; private Integer menuType; private String menuTypeName; @@ -20,26 +20,26 @@ public class MenuVO { private Integer sortOrder; private Integer visible; private Integer status; - private Long tenantId; + private String tenantId; private LocalDateTime createdTime; private LocalDateTime updatedTime; // 子菜单 private List children; - public Long getId() { + public String getId() { return id; } - public void setId(Long id) { + public void setId(String id) { this.id = id; } - public Long getParentId() { + public String getParentId() { return parentId; } - public void setParentId(Long parentId) { + public void setParentId(String parentId) { this.parentId = parentId; } @@ -123,11 +123,11 @@ public class MenuVO { this.status = status; } - public Long getTenantId() { + public String getTenantId() { return tenantId; } - public void setTenantId(Long tenantId) { + public void setTenantId(String tenantId) { this.tenantId = tenantId; } diff --git a/fund-sys/src/main/java/com/fundplatform/sys/vo/RoleVO.java b/fund-sys/src/main/java/com/fundplatform/sys/vo/RoleVO.java index 89e3816..b29e226 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/vo/RoleVO.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/vo/RoleVO.java @@ -7,22 +7,22 @@ import java.time.LocalDateTime; */ public class RoleVO { - private Long id; + private String id; private String roleCode; private String roleName; private Integer dataScope; private String dataScopeName; private Integer status; private Integer sortOrder; - private Long tenantId; + private String tenantId; private LocalDateTime createdTime; private LocalDateTime updatedTime; - public Long getId() { + public String getId() { return id; } - public void setId(Long id) { + public void setId(String id) { this.id = id; } @@ -74,11 +74,11 @@ public class RoleVO { this.sortOrder = sortOrder; } - public Long getTenantId() { + public String getTenantId() { return tenantId; } - public void setTenantId(Long tenantId) { + public void setTenantId(String tenantId) { this.tenantId = tenantId; } diff --git a/fund-sys/src/main/java/com/fundplatform/sys/vo/TenantVO.java b/fund-sys/src/main/java/com/fundplatform/sys/vo/TenantVO.java index e0370ce..ec41a90 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/vo/TenantVO.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/vo/TenantVO.java @@ -7,7 +7,7 @@ import java.time.LocalDateTime; */ public class TenantVO { - private Long id; + private String id; private String tenantCode; private String tenantName; private String contact; @@ -22,11 +22,11 @@ public class TenantVO { private LocalDateTime createdTime; private LocalDateTime updatedTime; - public Long getId() { + public String getId() { return id; } - public void setId(Long id) { + public void setId(String id) { this.id = id; } diff --git a/fund-sys/src/main/java/com/fundplatform/sys/vo/UserVO.java b/fund-sys/src/main/java/com/fundplatform/sys/vo/UserVO.java index 4e70bec..778f6a3 100644 --- a/fund-sys/src/main/java/com/fundplatform/sys/vo/UserVO.java +++ b/fund-sys/src/main/java/com/fundplatform/sys/vo/UserVO.java @@ -7,24 +7,24 @@ import java.time.LocalDateTime; */ public class UserVO { - private Long id; + private String id; private String username; private String realName; private String phone; private String email; - private Long deptId; + private String deptId; private String deptName; private Integer status; private String avatar; - private Long tenantId; + private String tenantId; private LocalDateTime createdTime; private LocalDateTime updatedTime; - public Long getId() { + public String getId() { return id; } - public void setId(Long id) { + public void setId(String id) { this.id = id; } @@ -60,11 +60,11 @@ public class UserVO { this.email = email; } - public Long getDeptId() { + public String getDeptId() { return deptId; } - public void setDeptId(Long deptId) { + public void setDeptId(String deptId) { this.deptId = deptId; } @@ -92,11 +92,11 @@ public class UserVO { this.avatar = avatar; } - public Long getTenantId() { + public String getTenantId() { return tenantId; } - public void setTenantId(Long tenantId) { + public void setTenantId(String tenantId) { this.tenantId = tenantId; }