| | |
| | | @RequestMapping(value = "/add", method = RequestMethod.POST) |
| | | public ResultVO<String> addDepartment(Authentication authentication, @RequestBody DepAddRPCReqDTO depAddRPCReqDTO) { |
| | | ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal(); |
| | | return accountDepartmentService.addDep(currentUser.getUid(), depAddRPCReqDTO); |
| | | return accountDepartmentService.addDep(currentUser, depAddRPCReqDTO); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/mod", method = RequestMethod.POST) |
| | | public ResultVO<String> addDepartment(Authentication authentication, @RequestBody DepModRPCReqDTO depModRPCReqDTO) { |
| | | ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal(); |
| | | return accountDepartmentService.modDep(currentUser.getUid(), depModRPCReqDTO); |
| | | return accountDepartmentService.modDep(currentUser, depModRPCReqDTO); |
| | | } |
| | | |
| | | |
| | |
| | | public ResultVO<String> addDepartment(Authentication authentication, @RequestBody JSONObject json) { |
| | | ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal(); |
| | | Long depId = json.getLong("depId"); |
| | | return accountDepartmentService.delDep(currentUser.getUid(), depId); |
| | | return accountDepartmentService.delDep(currentUser, depId); |
| | | } |
| | | |
| | | |
| | |
| | | @RequestMapping("/menu") |
| | | public ResultVO<List<MenuRPCRespDTO>> getMenu(Authentication authentication, Long projectId){ |
| | | ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal(); |
| | | return accountAuthService.getMenu(currentUser.getUid(), projectId); |
| | | return accountAuthService.getMenu(currentUser, projectId); |
| | | } |
| | | } |
| | |
| | | @RequestMapping(value = "/add",method = RequestMethod.POST) |
| | | public ResultVO<String> addMenu(Authentication authentication, @RequestBody MenuAddRPCReqDTO menuAddDto) { |
| | | ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal(); |
| | | return accountMenuService.addMenu(currentUser.getUid(), menuAddDto); |
| | | return accountMenuService.addMenu(currentUser, menuAddDto); |
| | | } |
| | | |
| | | |
| | |
| | | @RequestMapping(value = "/mod",method = RequestMethod.POST) |
| | | public ResultVO<String> addMenu(Authentication authentication, @RequestBody MenuModRPCReqDTO menuModDto) { |
| | | ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal(); |
| | | return accountMenuService.modMenu(currentUser.getUid(), menuModDto); |
| | | return accountMenuService.modMenu(currentUser, menuModDto); |
| | | } |
| | | |
| | | |
| | |
| | | public ResultVO<String> delMenu(Authentication authentication,@RequestBody JSONObject json ) { |
| | | ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal(); |
| | | Long id = json.getLong("id"); |
| | | return accountMenuService.delMenu(currentUser.getUid(), id); |
| | | return accountMenuService.delMenu(currentUser, id); |
| | | } |
| | | |
| | | } |
| | |
| | | @RequestMapping(value = "/add",method = RequestMethod.POST) |
| | | public ResultVO<String> addRole(Authentication authentication, RoleAddRPCReqDTO roleAddRPCReqDTO){ |
| | | ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal(); |
| | | return accountRoleService.addRole(currentUser.getUid(),roleAddRPCReqDTO); |
| | | return accountRoleService.addRole(currentUser,roleAddRPCReqDTO); |
| | | } |
| | | |
| | | |
| | |
| | | @RequestMapping(value = "/mod",method = RequestMethod.POST) |
| | | public ResultVO<String> modRole(Authentication authentication, RoleModRPCReqDTO roleModRPCReqDTO){ |
| | | ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal(); |
| | | return accountRoleService.modRole(currentUser.getUid(),roleModRPCReqDTO); |
| | | return accountRoleService.modRole(currentUser,roleModRPCReqDTO); |
| | | } |
| | | |
| | | |
| | |
| | | public ResultVO<String> modRole(Authentication authentication, JSONObject json){ |
| | | ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal(); |
| | | Long depId = json.getLong("depId"); |
| | | return accountRoleService.delRole(currentUser.getUid(),depId); |
| | | return accountRoleService.delRole(currentUser,depId); |
| | | } |
| | | } |
| | |
| | | @PreAuthorize("hasRole('ROLE_admin')") |
| | | public ResultVO<String> addUser(Authentication authentication, @RequestBody AccountAddRPCReqDTO accountAddRPCReqDTO) { |
| | | ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal(); |
| | | return accountUserService.addAccount(currentUser.getUid(), accountAddRPCReqDTO); |
| | | return accountUserService.addAccount(currentUser, accountAddRPCReqDTO); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | @RequestMapping(value = "/mod", method = RequestMethod.POST) |
| | | @PreAuthorize("hasRole('ROLE_admin')") |
| | | public ResultVO<String> modUser(Principal principal, @RequestBody AccountModRPCReqDTO accountModRPCReqDTO) { |
| | | String userId = principal.getName(); |
| | | return accountUserService.modAccount(Long.valueOf(userId), accountModRPCReqDTO); |
| | | public ResultVO<String> modUser(Authentication authentication, @RequestBody AccountModRPCReqDTO accountModRPCReqDTO) { |
| | | ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal(); |
| | | return accountUserService.modAccount(currentUser, accountModRPCReqDTO); |
| | | } |
| | | |
| | | |
| | |
| | | */ |
| | | @RequestMapping(value = "/del", method = RequestMethod.POST) |
| | | @PreAuthorize("hasRole('ROLE_admin')") |
| | | public ResultVO<String> delUser(Principal principal, @RequestBody JSONObject json) { |
| | | public ResultVO<String> delUser(Authentication authentication, @RequestBody JSONObject json) { |
| | | Long uid = json.getLong("uid"); |
| | | String userId = principal.getName(); |
| | | return accountUserService.delAccount(Long.valueOf(userId), uid); |
| | | ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal(); |
| | | return accountUserService.delAccount(currentUser, uid); |
| | | } |
| | | } |
| | |
| | | # 取消服务启动检查 |
| | | check: false |
| | | |
| | | #线程池配置 |
| | | threadPool: |
| | | corePoolSize: 20 |
| | | maxPoolSize: 20 |
| | | queueCapacity: 10000 |
| | | scheduling: |
| | | #控制线程是否执行 true:执行;false:不执行 |
| | | enabled: true |
| | | # enabled: false |
| | | |
| | | |
| | | rocketmq: |
| | | name-server: 192.168.0.52:9876 |
| | | producer: |
| | |
| | | # 取消服务启动检查 |
| | | check: false |
| | | |
| | | threadPool: |
| | | corePoolSize: 20 |
| | | maxPoolSize: 20 |
| | | queueCapacity: 10000 |
| | | scheduling: |
| | | #控制线程是否执行 true:执行;false:不执行 |
| | | enabled: true |
| | | # enabled: false |
| | | |
| | | rocketmq: |
| | | name-server: 192.168.30.107:9876 |
| | | producer: |
| | |
| | | # 取消服务启动检查 |
| | | check: false |
| | | |
| | | threadPool: |
| | | corePoolSize: 20 |
| | | maxPoolSize: 20 |
| | | queueCapacity: 10000 |
| | | scheduling: |
| | | #控制线程是否执行 true:执行;false:不执行 |
| | | enabled: true |
| | | # enabled: false |
| | | |
| | | rocketmq: |
| | | name-server: 192.168.30.107:9876 |
| | | producer: |
| | |
| | | # 取消服务启动检查 |
| | | check: false |
| | | |
| | | threadPool: |
| | | corePoolSize: 20 |
| | | maxPoolSize: 20 |
| | | queueCapacity: 10000 |
| | | scheduling: |
| | | #控制线程是否执行 true:执行;false:不执行 |
| | | enabled: true |
| | | # enabled: false |
| | | |
| | | rocketmq: |
| | | name-server: 192.168.0.52:9876 |
| | | producer: |
| | |
| | | # 取消服务启动检查 |
| | | check: false |
| | | |
| | | threadPool: |
| | | corePoolSize: 20 |
| | | maxPoolSize: 20 |
| | | queueCapacity: 10000 |
| | | scheduling: |
| | | #控制线程是否执行 true:执行;false:不执行 |
| | | enabled: true |
| | | # enabled: false |
| | | |
| | | rocketmq: |
| | | name-server: 192.168.0.52:9876 |
| | | producer: |
| | |
| | | # 取消服务启动检查 |
| | | check: false |
| | | |
| | | threadPool: |
| | | corePoolSize: 20 |
| | | maxPoolSize: 20 |
| | | queueCapacity: 10000 |
| | | scheduling: |
| | | #控制线程是否执行 true:执行;false:不执行 |
| | | enabled: true |
| | | # enabled: false |
| | | |
| | | rocketmq: |
| | | name-server: 192.168.0.52:9876 |
| | | producer: |