增加 ERP 模块

This commit is contained in:
YunaiV
2024-02-17 22:56:28 +08:00
parent f71a3b7dc0
commit 5f53986d5e
233 changed files with 19094 additions and 28 deletions

View File

@@ -11,10 +11,7 @@ import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.*;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@Tag(name = "RPC 服务 - 管理员用户")
@@ -53,6 +50,17 @@ public interface AdminUserApi {
return CollectionUtils.convertMap(users, AdminUserRespDTO::getId);
}
/**
* 校验用户是否有效。如下情况,视为无效:
* 1. 用户编号不存在
* 2. 用户被禁用
*
* @param id 用户编号
*/
default void validateUser(Long id) {
validateUserList(Collections.singleton(id));
}
@GetMapping(PREFIX + "/valid")
@Operation(summary = "校验用户们是否有效")
@Parameter(name = "ids", description = "用户编号数组", example = "3,5", required = true)

View File

@@ -57,10 +57,11 @@ spring:
password: 123456
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
redis:
host: 127.0.0.1 # 地址
port: 6379 # 端口
database: 0 # 数据库索引
data:
redis:
host: 127.0.0.1 # 地址
port: 6379 # 端口
database: 0 # 数据库索引
mybatis:
lazy-initialization: true # 单元测试,设置 MyBatis Mapper 延迟加载,加速每个单元测试