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;
import com.cf.cs.base.common.ConstValue;
import com.cf.cs.base.misc.HelperUtils;
import com.cf.cs.protocol.validation.group.ValidGroups;
import com.fasterxml.jackson.annotation.JsonInclude;
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;
/**
* The type User manager api.
*
* @author xajhuang @163.com
*/
@RestController
@Slf4j
@Tag(name = "用户管理接口")
@ -43,6 +48,12 @@ public class UserManagerApi {
@Resource
private UserService userService;
/**
* Gets user info by id.
*
* @param mr the mr
* @return the user info by id
*/
@PostMapping("/userInfo")
@EncryptionProtocol
@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")
@EncryptionProtocol
@DecryptionProtocol
@ -81,6 +98,11 @@ public class UserManagerApi {
}
}
/**
* Gets current user info.
*
* @return the current user info
*/
@GetMapping("/userInfo")
@EncryptionProtocol
@OperationLogAnnotation(OperationModule = "用户管理模块", OperationType = "读取", OperationDesc = "获取当前用户信息")
@ -90,6 +112,12 @@ public class UserManagerApi {
.build());
}
/**
* Create new user protocol resp.
*
* @param mr the mr
* @return the protocol resp
*/
@PutMapping("/register")
@EncryptionProtocol
@DecryptionProtocol
@ -110,6 +138,12 @@ public class UserManagerApi {
}
}
/**
* Remove user protocol resp.
*
* @param mr the mr
* @return the protocol resp
*/
@DeleteMapping("/remove")
@EncryptionProtocol
@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.RoleResourceTableDef.ROLE_RESOURCE;
/**
* The type User permission service.
*
* @author xajhuang @163.com
*/
@Service
public class UserPermissionServiceImpl implements UserPermissionService {
private final Map<Integer, String> resourceType = new HashMap<>();
@ -124,6 +129,9 @@ public class UserPermissionServiceImpl implements UserPermissionService {
}
/**
* Init.
*/
@PostConstruct
public void init() {
// 在组件初始化后执行的逻辑