1. 代码质量修正

This commit is contained in:
黄昕 2024-03-08 16:22:02 +08:00
parent 01badeea5c
commit 12227541cc
3 changed files with 42 additions and 1 deletions

View File

@ -1,7 +1,6 @@
package com.cf.cs.protocol.pojo.dto; package com.cf.cs.protocol.pojo.dto;
import com.cf.cs.base.common.ConstValue; import com.cf.cs.base.common.ConstValue;
import com.cf.cs.base.misc.HelperUtils;
import com.cf.cs.protocol.validation.group.ValidGroups; import com.cf.cs.protocol.validation.group.ValidGroups;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;

View File

@ -32,6 +32,11 @@ import org.springframework.web.bind.annotation.RestController;
import java.util.List; import java.util.List;
/**
* The type User manager api.
*
* @author xajhuang @163.com
*/
@RestController @RestController
@Slf4j @Slf4j
@Tag(name = "用户管理接口") @Tag(name = "用户管理接口")
@ -43,6 +48,12 @@ public class UserManagerApi {
@Resource @Resource
private UserService userService; private UserService userService;
/**
* Gets user info by id.
*
* @param mr the mr
* @return the user info by id
*/
@PostMapping("/userInfo") @PostMapping("/userInfo")
@EncryptionProtocol @EncryptionProtocol
@DecryptionProtocol @DecryptionProtocol
@ -61,6 +72,12 @@ public class UserManagerApi {
} }
} }
/**
* Gets all user info paged.
*
* @param mr the mr
* @return the all user info paged
*/
@PostMapping("/userList") @PostMapping("/userList")
@EncryptionProtocol @EncryptionProtocol
@DecryptionProtocol @DecryptionProtocol
@ -81,6 +98,11 @@ public class UserManagerApi {
} }
} }
/**
* Gets current user info.
*
* @return the current user info
*/
@GetMapping("/userInfo") @GetMapping("/userInfo")
@EncryptionProtocol @EncryptionProtocol
@OperationLogAnnotation(OperationModule = "用户管理模块", OperationType = "读取", OperationDesc = "获取当前用户信息") @OperationLogAnnotation(OperationModule = "用户管理模块", OperationType = "读取", OperationDesc = "获取当前用户信息")
@ -90,6 +112,12 @@ public class UserManagerApi {
.build()); .build());
} }
/**
* Create new user protocol resp.
*
* @param mr the mr
* @return the protocol resp
*/
@PutMapping("/register") @PutMapping("/register")
@EncryptionProtocol @EncryptionProtocol
@DecryptionProtocol @DecryptionProtocol
@ -110,6 +138,12 @@ public class UserManagerApi {
} }
} }
/**
* Remove user protocol resp.
*
* @param mr the mr
* @return the protocol resp
*/
@DeleteMapping("/remove") @DeleteMapping("/remove")
@EncryptionProtocol @EncryptionProtocol
@DecryptionProtocol @DecryptionProtocol

View File

@ -26,6 +26,11 @@ import java.util.Map;
import static com.cf.cs.database.pojo.entity.table.ResourceDataTableDef.RESOURCE_DATA; import static com.cf.cs.database.pojo.entity.table.ResourceDataTableDef.RESOURCE_DATA;
import static com.cf.cs.database.pojo.entity.table.RoleResourceTableDef.ROLE_RESOURCE; import static com.cf.cs.database.pojo.entity.table.RoleResourceTableDef.ROLE_RESOURCE;
/**
* The type User permission service.
*
* @author xajhuang @163.com
*/
@Service @Service
public class UserPermissionServiceImpl implements UserPermissionService { public class UserPermissionServiceImpl implements UserPermissionService {
private final Map<Integer, String> resourceType = new HashMap<>(); private final Map<Integer, String> resourceType = new HashMap<>();
@ -124,6 +129,9 @@ public class UserPermissionServiceImpl implements UserPermissionService {
} }
/**
* Init.
*/
@PostConstruct @PostConstruct
public void init() { public void init() {
// 在组件初始化后执行的逻辑 // 在组件初始化后执行的逻辑