mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-10-29 02:57:11 +08:00
revert: 还原 终端 => 客户端(终端容易被误解)
This commit is contained in:
@@ -135,7 +135,7 @@ public class DeptController extends BaseController<DeptService, DeptResp, DeptDe
|
|||||||
- 邮件配置:提供系统发件箱配置,也支持通过配置文件指定
|
- 邮件配置:提供系统发件箱配置,也支持通过配置文件指定
|
||||||
- 短信配置:提供系统短信服务配置,也支持通过配置文件指定
|
- 短信配置:提供系统短信服务配置,也支持通过配置文件指定
|
||||||
- 存储配置:管理文件存储配置,支持本地存储、兼容 S3 协议对象存储
|
- 存储配置:管理文件存储配置,支持本地存储、兼容 S3 协议对象存储
|
||||||
- 终端配置:多端认证管理,可设置不同的 token 有效期
|
- 客户端配置:多端(PC端、小程序端等)认证管理,可设置不同的 token 有效期
|
||||||
- 在线用户:管理当前登录用户,可一键踢除下线
|
- 在线用户:管理当前登录用户,可一键踢除下线
|
||||||
- 日志管理:管理系统登录日志、操作日志,支持查看日志详情,包含请求头、响应头等报文信息
|
- 日志管理:管理系统登录日志、操作日志,支持查看日志详情,包含请求头、响应头等报文信息
|
||||||
- 短信日志:管理系统短信发送日志,支持删除、导出
|
- 短信日志:管理系统短信发送日志,支持删除、导出
|
||||||
|
|||||||
@@ -81,12 +81,12 @@ public class UserContext implements Serializable {
|
|||||||
private Set<RoleContext> roles;
|
private Set<RoleContext> roles;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端类型
|
* 客户端类型
|
||||||
*/
|
*/
|
||||||
private String clientType;
|
private String clientType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端 ID
|
* 客户端 ID
|
||||||
*/
|
*/
|
||||||
private String clientId;
|
private String clientId;
|
||||||
|
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ public abstract class AbstractLoginHandler<T extends LoginReq> implements LoginH
|
|||||||
* 认证
|
* 认证
|
||||||
*
|
*
|
||||||
* @param user 用户信息
|
* @param user 用户信息
|
||||||
* @param client 终端信息
|
* @param client 客户端信息
|
||||||
* @return token 令牌信息
|
* @return token 令牌信息
|
||||||
*/
|
*/
|
||||||
protected String authenticate(UserDO user, ClientResp client) {
|
protected String authenticate(UserDO user, ClientResp client) {
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public interface LoginHandler<T extends LoginReq> {
|
|||||||
* 登录
|
* 登录
|
||||||
*
|
*
|
||||||
* @param req 登录请求参数
|
* @param req 登录请求参数
|
||||||
* @param client 终端信息
|
* @param client 客户端信息
|
||||||
* @param request 请求对象
|
* @param request 请求对象
|
||||||
* @return 登录响应参数
|
* @return 登录响应参数
|
||||||
*/
|
*/
|
||||||
@@ -45,7 +45,7 @@ public interface LoginHandler<T extends LoginReq> {
|
|||||||
* 登录前置处理
|
* 登录前置处理
|
||||||
*
|
*
|
||||||
* @param req 登录请求参数
|
* @param req 登录请求参数
|
||||||
* @param client 终端信息
|
* @param client 客户端信息
|
||||||
* @param request 请求对象
|
* @param request 请求对象
|
||||||
*/
|
*/
|
||||||
void preLogin(T req, ClientResp client, HttpServletRequest request);
|
void preLogin(T req, ClientResp client, HttpServletRequest request);
|
||||||
@@ -54,7 +54,7 @@ public interface LoginHandler<T extends LoginReq> {
|
|||||||
* 登录后置处理
|
* 登录后置处理
|
||||||
*
|
*
|
||||||
* @param req 登录请求参数
|
* @param req 登录请求参数
|
||||||
* @param client 终端信息
|
* @param client 客户端信息
|
||||||
* @param request 请求对象
|
* @param request 请求对象
|
||||||
*/
|
*/
|
||||||
void postLogin(T req, ClientResp client, HttpServletRequest request);
|
void postLogin(T req, ClientResp client, HttpServletRequest request);
|
||||||
|
|||||||
@@ -44,9 +44,9 @@ public class OnlineUserQuery implements Serializable {
|
|||||||
private String nickname;
|
private String nickname;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端 ID
|
* 客户端 ID
|
||||||
*/
|
*/
|
||||||
@Schema(description = "终端 ID", example = "ef51c9a3e9046c4f2ea45142c8a8344a")
|
@Schema(description = "客户端 ID", example = "ef51c9a3e9046c4f2ea45142c8a8344a")
|
||||||
private String clientId;
|
private String clientId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -47,10 +47,10 @@ public class LoginReq implements Serializable {
|
|||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端 ID
|
* 客户端 ID
|
||||||
*/
|
*/
|
||||||
@Schema(description = "终端 ID", example = "ef51c9a3e9046c4f2ea45142c8a8344a")
|
@Schema(description = "客户端 ID", example = "ef51c9a3e9046c4f2ea45142c8a8344a")
|
||||||
@NotBlank(message = "终端ID不能为空")
|
@NotBlank(message = "客户端ID不能为空")
|
||||||
private String clientId;
|
private String clientId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -69,15 +69,15 @@ public class OnlineUserResp implements Serializable {
|
|||||||
private String nickname;
|
private String nickname;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端类型
|
* 客户端类型
|
||||||
*/
|
*/
|
||||||
@Schema(description = "终端类型", example = "PC")
|
@Schema(description = "客户端类型", example = "PC")
|
||||||
private String clientType;
|
private String clientType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端 ID
|
* 客户端 ID
|
||||||
*/
|
*/
|
||||||
@Schema(description = "终端 ID", example = "ef51c9a3e9046c4f2ea45142c8a8344a")
|
@Schema(description = "客户端 ID", example = "ef51c9a3e9046c4f2ea45142c8a8344a")
|
||||||
private String clientId;
|
private String clientId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -68,11 +68,11 @@ public class AuthServiceImpl implements AuthService {
|
|||||||
@Override
|
@Override
|
||||||
public LoginResp login(LoginReq req, HttpServletRequest request) {
|
public LoginResp login(LoginReq req, HttpServletRequest request) {
|
||||||
AuthTypeEnum authType = req.getAuthType();
|
AuthTypeEnum authType = req.getAuthType();
|
||||||
// 校验终端
|
// 校验客户端
|
||||||
ClientResp client = clientService.getByClientId(req.getClientId());
|
ClientResp client = clientService.getByClientId(req.getClientId());
|
||||||
ValidationUtils.throwIfNull(client, "终端不存在");
|
ValidationUtils.throwIfNull(client, "客户端不存在");
|
||||||
ValidationUtils.throwIf(DisEnableStatusEnum.DISABLE.equals(client.getStatus()), "终端已禁用");
|
ValidationUtils.throwIf(DisEnableStatusEnum.DISABLE.equals(client.getStatus()), "客户端已禁用");
|
||||||
ValidationUtils.throwIf(!client.getAuthType().contains(authType.getValue()), "该终端暂未授权 [{}] 认证", authType
|
ValidationUtils.throwIf(!client.getAuthType().contains(authType.getValue()), "该客户端暂未授权 [{}] 认证", authType
|
||||||
.getDescription());
|
.getDescription());
|
||||||
// 获取处理器
|
// 获取处理器
|
||||||
LoginHandler<LoginReq> loginHandler = loginHandlerFactory.getHandler(authType);
|
LoginHandler<LoginReq> loginHandler = loginHandlerFactory.getHandler(authType);
|
||||||
|
|||||||
@@ -124,11 +124,11 @@ public class OnlineUserServiceImpl implements OnlineUserService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否匹配终端 ID
|
* 是否匹配客户端 ID
|
||||||
*
|
*
|
||||||
* @param clientId 终端 ID
|
* @param clientId 客户端 ID
|
||||||
* @param userContext 用户上下文信息
|
* @param userContext 用户上下文信息
|
||||||
* @return 是否匹配终端 ID
|
* @return 是否匹配客户端 ID
|
||||||
*/
|
*/
|
||||||
private boolean isMatchClientId(String clientId, UserContext userContext) {
|
private boolean isMatchClientId(String clientId, UserContext userContext) {
|
||||||
if (StrUtil.isBlank(clientId)) {
|
if (StrUtil.isBlank(clientId)) {
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import top.continew.admin.system.model.entity.ClientDO;
|
|||||||
import top.continew.starter.data.mp.base.BaseMapper;
|
import top.continew.starter.data.mp.base.BaseMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端 Mapper
|
* 客户端 Mapper
|
||||||
*
|
*
|
||||||
* @author KAI
|
* @author KAI
|
||||||
* @since 2024/12/03 16:04
|
* @since 2024/12/03 16:04
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ import java.io.Serial;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端实体
|
* 客户端实体
|
||||||
*
|
*
|
||||||
* @author KAI
|
* @author KAI
|
||||||
* @author Charles7c
|
* @author Charles7c
|
||||||
@@ -41,12 +41,12 @@ public class ClientDO extends BaseDO {
|
|||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端 ID
|
* 客户端 ID
|
||||||
*/
|
*/
|
||||||
private String clientId;
|
private String clientId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端类型
|
* 客户端类型
|
||||||
*/
|
*/
|
||||||
private String clientType;
|
private String clientType;
|
||||||
|
|
||||||
|
|||||||
@@ -27,23 +27,23 @@ import java.io.Serializable;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端查询条件
|
* 客户端查询条件
|
||||||
*
|
*
|
||||||
* @author KAI
|
* @author KAI
|
||||||
* @author Charles7c
|
* @author Charles7c
|
||||||
* @since 2024/12/03 16:04
|
* @since 2024/12/03 16:04
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Schema(description = "终端查询条件")
|
@Schema(description = "客户端查询条件")
|
||||||
public class ClientQuery implements Serializable {
|
public class ClientQuery implements Serializable {
|
||||||
|
|
||||||
@Serial
|
@Serial
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端类型
|
* 客户端类型
|
||||||
*/
|
*/
|
||||||
@Schema(description = "终端类型", example = "PC")
|
@Schema(description = "客户端类型", example = "PC")
|
||||||
private String clientType;
|
private String clientType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -28,25 +28,25 @@ import java.io.Serializable;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建或修改终端参数
|
* 创建或修改客户端参数
|
||||||
*
|
*
|
||||||
* @author KAI
|
* @author KAI
|
||||||
* @author Charles7c
|
* @author Charles7c
|
||||||
* @since 2024/12/03 16:04
|
* @since 2024/12/03 16:04
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Schema(description = "创建或修改终端参数")
|
@Schema(description = "创建或修改客户端参数")
|
||||||
public class ClientReq implements Serializable {
|
public class ClientReq implements Serializable {
|
||||||
|
|
||||||
@Serial
|
@Serial
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端类型
|
* 客户端类型
|
||||||
*/
|
*/
|
||||||
@Schema(description = "终端类型", example = "PC")
|
@Schema(description = "客户端类型", example = "PC")
|
||||||
@NotBlank(message = "终端类型不能为空")
|
@NotBlank(message = "客户端类型不能为空")
|
||||||
@Length(max = 32, message = "终端类型长度不能超过 {max} 个字符")
|
@Length(max = 32, message = "客户端类型长度不能超过 {max} 个字符")
|
||||||
private String clientType;
|
private String clientType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -75,7 +75,7 @@ public class ClientReq implements Serializable {
|
|||||||
private DisEnableStatusEnum status;
|
private DisEnableStatusEnum status;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端 ID
|
* 客户端 ID
|
||||||
*/
|
*/
|
||||||
@Schema(hidden = true)
|
@Schema(hidden = true)
|
||||||
private String clientId;
|
private String clientId;
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import java.io.Serial;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端信息
|
* 客户端信息
|
||||||
*
|
*
|
||||||
* @author KAI
|
* @author KAI
|
||||||
* @author Charles7c
|
* @author Charles7c
|
||||||
@@ -39,24 +39,24 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@ExcelIgnoreUnannotated
|
@ExcelIgnoreUnannotated
|
||||||
@Schema(description = "终端信息")
|
@Schema(description = "客户端信息")
|
||||||
public class ClientResp extends BaseDetailResp {
|
public class ClientResp extends BaseDetailResp {
|
||||||
|
|
||||||
@Serial
|
@Serial
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端 ID
|
* 客户端 ID
|
||||||
*/
|
*/
|
||||||
@Schema(description = "终端 ID", example = "ef51c9a3e9046c4f2ea45142c8a8344a")
|
@Schema(description = "客户端 ID", example = "ef51c9a3e9046c4f2ea45142c8a8344a")
|
||||||
@ExcelProperty(value = "终端 ID", order = 2)
|
@ExcelProperty(value = "客户端 ID", order = 2)
|
||||||
private String clientId;
|
private String clientId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端类型(取值于字典 client_type
|
* 客户端类型(取值于字典 client_type
|
||||||
*/
|
*/
|
||||||
@Schema(description = "终端类型(取值于字典 client_type)", example = "PC")
|
@Schema(description = "客户端类型(取值于字典 client_type)", example = "PC")
|
||||||
@ExcelProperty(value = "终端类型", converter = ExcelDictConverter.class, order = 5)
|
@ExcelProperty(value = "客户端类型", converter = ExcelDictConverter.class, order = 5)
|
||||||
@DictExcelProperty("client_type")
|
@DictExcelProperty("client_type")
|
||||||
private String clientType;
|
private String clientType;
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import top.continew.admin.system.model.resp.ClientResp;
|
|||||||
import top.continew.starter.extension.crud.service.BaseService;
|
import top.continew.starter.extension.crud.service.BaseService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端业务接口
|
* 客户端业务接口
|
||||||
*
|
*
|
||||||
* @author KAI
|
* @author KAI
|
||||||
* @author Charles7c
|
* @author Charles7c
|
||||||
@@ -31,10 +31,10 @@ import top.continew.starter.extension.crud.service.BaseService;
|
|||||||
public interface ClientService extends BaseService<ClientResp, ClientResp, ClientQuery, ClientReq> {
|
public interface ClientService extends BaseService<ClientResp, ClientResp, ClientQuery, ClientReq> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据终端 ID 查詢
|
* 根据客户端 ID 查詢
|
||||||
*
|
*
|
||||||
* @param clientId 终端 ID
|
* @param clientId 客户端 ID
|
||||||
* @return 终端信息
|
* @return 客户端信息
|
||||||
*/
|
*/
|
||||||
ClientResp getByClientId(String clientId);
|
ClientResp getByClientId(String clientId);
|
||||||
}
|
}
|
||||||
@@ -37,7 +37,7 @@ import top.continew.starter.extension.crud.service.BaseServiceImpl;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端业务实现
|
* 客户端业务实现
|
||||||
*
|
*
|
||||||
* @author KAI
|
* @author KAI
|
||||||
* @author Charles7c
|
* @author Charles7c
|
||||||
@@ -63,7 +63,7 @@ public class ClientServiceImpl extends BaseServiceImpl<ClientMapper, ClientDO, C
|
|||||||
for (Long id : ids) {
|
for (Long id : ids) {
|
||||||
ClientDO client = this.getById(id);
|
ClientDO client = this.getById(id);
|
||||||
query.setClientId(client.getClientId());
|
query.setClientId(client.getClientId());
|
||||||
CheckUtils.throwIfNotEmpty(onlineUserService.list(query), "终端 [{}] 还存在在线用户,不能删除", client.getClientId());
|
CheckUtils.throwIfNotEmpty(onlineUserService.list(query), "客户端 [{}] 还存在在线用户,不能删除", client.getClientId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ public class DemoEnvironmentJob {
|
|||||||
Long appCount = appMapper.lambdaQuery().gt(AppDO::getId, DELETE_FLAG).count();
|
Long appCount = appMapper.lambdaQuery().gt(AppDO::getId, DELETE_FLAG).count();
|
||||||
this.log(appCount, "应用");
|
this.log(appCount, "应用");
|
||||||
Long clientCount = clientsMapper.lambdaQuery().gt(ClientDO::getId, DELETE_FLAG).count();
|
Long clientCount = clientsMapper.lambdaQuery().gt(ClientDO::getId, DELETE_FLAG).count();
|
||||||
this.log(clientCount, "终端");
|
this.log(clientCount, "客户端");
|
||||||
InterceptorIgnoreHelper.handle(IgnoreStrategy.builder().blockAttack(true).build());
|
InterceptorIgnoreHelper.handle(IgnoreStrategy.builder().blockAttack(true).build());
|
||||||
SnailJobLog.REMOTE.info("演示环境待清理数据项检测完成,开始执行清理。");
|
SnailJobLog.REMOTE.info("演示环境待清理数据项检测完成,开始执行清理。");
|
||||||
// 清理关联数据
|
// 清理关联数据
|
||||||
@@ -138,7 +138,7 @@ public class DemoEnvironmentJob {
|
|||||||
.remove());
|
.remove());
|
||||||
this.clean(deptCount, "部门", null, () -> deptMapper.lambdaUpdate().gt(DeptDO::getId, DEPT_FLAG).remove());
|
this.clean(deptCount, "部门", null, () -> deptMapper.lambdaUpdate().gt(DeptDO::getId, DEPT_FLAG).remove());
|
||||||
this.clean(appCount, "应用", null, () -> appMapper.lambdaUpdate().gt(AppDO::getId, DEPT_FLAG).remove());
|
this.clean(appCount, "应用", null, () -> appMapper.lambdaUpdate().gt(AppDO::getId, DEPT_FLAG).remove());
|
||||||
this.clean(clientCount, "终端", null, () -> clientsMapper.lambdaUpdate()
|
this.clean(clientCount, "客户端", null, () -> clientsMapper.lambdaUpdate()
|
||||||
.gt(ClientDO::getId, DEPT_FLAG)
|
.gt(ClientDO::getId, DEPT_FLAG)
|
||||||
.remove());
|
.remove());
|
||||||
SnailJobLog.REMOTE.info("演示环境数据已清理完成。");
|
SnailJobLog.REMOTE.info("演示环境数据已清理完成。");
|
||||||
|
|||||||
@@ -27,12 +27,12 @@ import top.continew.starter.extension.crud.annotation.CrudRequestMapping;
|
|||||||
import top.continew.starter.extension.crud.enums.Api;
|
import top.continew.starter.extension.crud.enums.Api;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端管理 API
|
* 客户端管理 API
|
||||||
*
|
*
|
||||||
* @author KAI
|
* @author KAI
|
||||||
* @since 2024/12/03 16:04
|
* @since 2024/12/03 16:04
|
||||||
*/
|
*/
|
||||||
@Tag(name = "终端管理 API")
|
@Tag(name = "客户端管理 API")
|
||||||
@RestController
|
@RestController
|
||||||
@CrudRequestMapping(value = "/system/client", api = {Api.PAGE, Api.GET, Api.CREATE, Api.UPDATE, Api.DELETE})
|
@CrudRequestMapping(value = "/system/client", api = {Api.PAGE, Api.GET, Api.CREATE, Api.UPDATE, Api.DELETE})
|
||||||
public class ClientController extends BaseController<ClientService, ClientResp, ClientResp, ClientQuery, ClientReq> {
|
public class ClientController extends BaseController<ClientService, ClientResp, ClientResp, ClientQuery, ClientReq> {
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ VALUES
|
|||||||
(1235, '删除', 1230, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:storage:delete', 5, 1, 1, NOW()),
|
(1235, '删除', 1230, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:storage:delete', 5, 1, 1, NOW()),
|
||||||
(1236, '修改状态', 1230, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:storage:updateStatus', 6, 1, 1, NOW()),
|
(1236, '修改状态', 1230, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:storage:updateStatus', 6, 1, 1, NOW()),
|
||||||
(1237, '设为默认存储', 1230, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:storage:setDefault', 7, 1, 1, NOW()),
|
(1237, '设为默认存储', 1230, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:storage:setDefault', 7, 1, 1, NOW()),
|
||||||
(1250, '终端配置', 1150, 2, '/system/config?tab=client', 'SystemClient', 'system/config/client/index', NULL, 'mobile', b'0', b'0', b'1', NULL, 7, 1, 1, NOW()),
|
(1250, '客户端配置', 1150, 2, '/system/config?tab=client', 'SystemClient', 'system/config/client/index', NULL, 'mobile', b'0', b'0', b'1', NULL, 7, 1, 1, NOW()),
|
||||||
(1251, '列表', 1250, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:client:list', 1, 1, 1, NOW()),
|
(1251, '列表', 1250, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:client:list', 1, 1, 1, NOW()),
|
||||||
(1252, '详情', 1250, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:client:get', 2, 1, 1, NOW()),
|
(1252, '详情', 1250, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:client:get', 2, 1, 1, NOW()),
|
||||||
(1253, '新增', 1250, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:client:create', 3, 1, 1, NOW()),
|
(1253, '新增', 1250, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:client:create', 3, 1, 1, NOW()),
|
||||||
@@ -214,7 +214,7 @@ INSERT INTO `sys_dict`
|
|||||||
VALUES
|
VALUES
|
||||||
(1, '公告类型', 'notice_type', NULL, b'1', 1, NOW()),
|
(1, '公告类型', 'notice_type', NULL, b'1', 1, NOW()),
|
||||||
(2, '消息类型', 'message_type', NULL, b'1', 1, NOW()),
|
(2, '消息类型', 'message_type', NULL, b'1', 1, NOW()),
|
||||||
(3, '终端类型', 'client_type', NULL, b'1', 1, NOW());
|
(3, '客户端类型', 'client_type', NULL, b'1', 1, NOW());
|
||||||
|
|
||||||
INSERT INTO `sys_dict_item`
|
INSERT INTO `sys_dict_item`
|
||||||
(`id`, `label`, `value`, `color`, `sort`, `description`, `status`, `dict_id`, `create_user`, `create_time`)
|
(`id`, `label`, `value`, `color`, `sort`, `description`, `status`, `dict_id`, `create_user`, `create_time`)
|
||||||
@@ -271,7 +271,7 @@ VALUES
|
|||||||
(1, '开发环境', 'local_dev', 1, NULL, NULL, NULL, 'C:/continew-admin/data/file/', 'http://localhost:8000/file', '本地存储', b'1', 1, 1, 1, NOW()),
|
(1, '开发环境', 'local_dev', 1, NULL, NULL, NULL, 'C:/continew-admin/data/file/', 'http://localhost:8000/file', '本地存储', b'1', 1, 1, 1, NOW()),
|
||||||
(2, '生产环境', 'local_prod', 1, NULL, NULL, NULL, '../data/file/', 'http://api.continew.top/file', '本地存储', b'0', 2, 2, 1, NOW());
|
(2, '生产环境', 'local_prod', 1, NULL, NULL, NULL, '../data/file/', 'http://api.continew.top/file', '本地存储', b'0', 2, 2, 1, NOW());
|
||||||
|
|
||||||
-- 初始化终端数据
|
-- 初始化客户端数据
|
||||||
INSERT INTO `sys_client`
|
INSERT INTO `sys_client`
|
||||||
(`id`, `client_id`, `client_type`, `auth_type`, `active_timeout`, `timeout`, `status`, `create_user`, `create_time`)
|
(`id`, `client_id`, `client_type`, `auth_type`, `active_timeout`, `timeout`, `status`, `create_user`, `create_time`)
|
||||||
VALUES
|
VALUES
|
||||||
|
|||||||
@@ -307,8 +307,8 @@ CREATE TABLE IF NOT EXISTS `sys_file` (
|
|||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `sys_client` (
|
CREATE TABLE IF NOT EXISTS `sys_client` (
|
||||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||||
`client_id` varchar(50) NOT NULL COMMENT '终端ID',
|
`client_id` varchar(50) NOT NULL COMMENT '客户端ID',
|
||||||
`client_type` varchar(50) NOT NULL COMMENT '终端类型',
|
`client_type` varchar(50) NOT NULL COMMENT '客户端类型',
|
||||||
`auth_type` json NOT NULL COMMENT '认证类型',
|
`auth_type` json NOT NULL COMMENT '认证类型',
|
||||||
`active_timeout` bigint(20) DEFAULT -1 COMMENT 'Token最低活跃频率(单位:秒,-1:不限制,永不冻结)',
|
`active_timeout` bigint(20) DEFAULT -1 COMMENT 'Token最低活跃频率(单位:秒,-1:不限制,永不冻结)',
|
||||||
`timeout` bigint(20) DEFAULT 2592000 COMMENT 'Token有效期(单位:秒,-1:永不过期)',
|
`timeout` bigint(20) DEFAULT 2592000 COMMENT 'Token有效期(单位:秒,-1:永不过期)',
|
||||||
@@ -321,7 +321,7 @@ CREATE TABLE IF NOT EXISTS `sys_client` (
|
|||||||
UNIQUE INDEX `uk_client_id`(`client_id`),
|
UNIQUE INDEX `uk_client_id`(`client_id`),
|
||||||
INDEX `idx_create_user`(`create_user`),
|
INDEX `idx_create_user`(`create_user`),
|
||||||
INDEX `idx_update_user`(`update_user`)
|
INDEX `idx_update_user`(`update_user`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='终端表';
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='客户端表';
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `sys_sms_config` (
|
CREATE TABLE IF NOT EXISTS `sys_sms_config` (
|
||||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ VALUES
|
|||||||
(1235, '删除', 1230, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:storage:delete', 5, 1, 1, NOW()),
|
(1235, '删除', 1230, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:storage:delete', 5, 1, 1, NOW()),
|
||||||
(1236, '修改状态', 1230, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:storage:updateStatus', 6, 1, 1, NOW()),
|
(1236, '修改状态', 1230, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:storage:updateStatus', 6, 1, 1, NOW()),
|
||||||
(1237, '设为默认存储', 1230, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:storage:setDefault', 7, 1, 1, NOW()),
|
(1237, '设为默认存储', 1230, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:storage:setDefault', 7, 1, 1, NOW()),
|
||||||
(1250, '终端配置', 1150, 2, '/system/config?tab=client', 'SystemClient', 'system/config/client/index', NULL, 'mobile', false, false, true, NULL, 7, 1, 1, NOW()),
|
(1250, '客户端配置', 1150, 2, '/system/config?tab=client', 'SystemClient', 'system/config/client/index', NULL, 'mobile', false, false, true, NULL, 7, 1, 1, NOW()),
|
||||||
(1251, '列表', 1250, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:client:list', 1, 1, 1, NOW()),
|
(1251, '列表', 1250, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:client:list', 1, 1, 1, NOW()),
|
||||||
(1252, '详情', 1250, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:client:get', 2, 1, 1, NOW()),
|
(1252, '详情', 1250, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:client:get', 2, 1, 1, NOW()),
|
||||||
(1253, '新增', 1250, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:client:create', 3, 1, 1, NOW()),
|
(1253, '新增', 1250, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:client:create', 3, 1, 1, NOW()),
|
||||||
@@ -214,7 +214,7 @@ INSERT INTO "sys_dict"
|
|||||||
VALUES
|
VALUES
|
||||||
(1, '公告类型', 'notice_type', NULL, true, 1, NOW()),
|
(1, '公告类型', 'notice_type', NULL, true, 1, NOW()),
|
||||||
(2, '消息类型', 'message_type', NULL, true, 1, NOW()),
|
(2, '消息类型', 'message_type', NULL, true, 1, NOW()),
|
||||||
(3, '终端类型', 'client_type', NULL, true, 1, NOW());
|
(3, '客户端类型', 'client_type', NULL, true, 1, NOW());
|
||||||
|
|
||||||
INSERT INTO "sys_dict_item"
|
INSERT INTO "sys_dict_item"
|
||||||
("id", "label", "value", "color", "sort", "description", "status", "dict_id", "create_user", "create_time")
|
("id", "label", "value", "color", "sort", "description", "status", "dict_id", "create_user", "create_time")
|
||||||
@@ -271,7 +271,7 @@ VALUES
|
|||||||
(1, '开发环境', 'local_dev', 1, NULL, NULL, NULL, 'C:/continew-admin/data/file/', 'http://localhost:8000/file', '本地存储', true, 1, 1, 1, NOW()),
|
(1, '开发环境', 'local_dev', 1, NULL, NULL, NULL, 'C:/continew-admin/data/file/', 'http://localhost:8000/file', '本地存储', true, 1, 1, 1, NOW()),
|
||||||
(2, '生产环境', 'local_prod', 1, NULL, NULL, NULL, '../data/file/', 'http://api.continew.top/file', '本地存储', false, 2, 2, 1, NOW());
|
(2, '生产环境', 'local_prod', 1, NULL, NULL, NULL, '../data/file/', 'http://api.continew.top/file', '本地存储', false, 2, 2, 1, NOW());
|
||||||
|
|
||||||
-- 初始化终端数据
|
-- 初始化客户端数据
|
||||||
INSERT INTO "sys_client"
|
INSERT INTO "sys_client"
|
||||||
("id", "client_id", "client_type", "auth_type", "active_timeout", "timeout", "status", "create_user", "create_time")
|
("id", "client_id", "client_type", "auth_type", "active_timeout", "timeout", "status", "create_user", "create_time")
|
||||||
VALUES
|
VALUES
|
||||||
|
|||||||
@@ -529,8 +529,8 @@ CREATE UNIQUE INDEX "uk_client_client_id" ON "sys_client" ("client_id");
|
|||||||
CREATE INDEX "idx_client_create_user" ON "sys_client" ("create_user");
|
CREATE INDEX "idx_client_create_user" ON "sys_client" ("create_user");
|
||||||
CREATE INDEX "idx_client_update_user" ON "sys_client" ("update_user");
|
CREATE INDEX "idx_client_update_user" ON "sys_client" ("update_user");
|
||||||
COMMENT ON COLUMN "sys_client"."id" IS 'ID';
|
COMMENT ON COLUMN "sys_client"."id" IS 'ID';
|
||||||
COMMENT ON COLUMN "sys_client"."client_id" IS '终端ID';
|
COMMENT ON COLUMN "sys_client"."client_id" IS '客户端ID';
|
||||||
COMMENT ON COLUMN "sys_client"."client_type" IS '终端类型';
|
COMMENT ON COLUMN "sys_client"."client_type" IS '客户端类型';
|
||||||
COMMENT ON COLUMN "sys_client"."auth_type" IS '认证类型';
|
COMMENT ON COLUMN "sys_client"."auth_type" IS '认证类型';
|
||||||
COMMENT ON COLUMN "sys_client"."active_timeout" IS 'Token最低活跃频率(单位:秒,-1:不限制,永不冻结)';
|
COMMENT ON COLUMN "sys_client"."active_timeout" IS 'Token最低活跃频率(单位:秒,-1:不限制,永不冻结)';
|
||||||
COMMENT ON COLUMN "sys_client"."timeout" IS 'Token有效期(单位:秒,-1:永不过期)';
|
COMMENT ON COLUMN "sys_client"."timeout" IS 'Token有效期(单位:秒,-1:永不过期)';
|
||||||
@@ -539,7 +539,7 @@ COMMENT ON COLUMN "sys_client"."create_user" IS '创建人';
|
|||||||
COMMENT ON COLUMN "sys_client"."create_time" IS '创建时间';
|
COMMENT ON COLUMN "sys_client"."create_time" IS '创建时间';
|
||||||
COMMENT ON COLUMN "sys_client"."update_user" IS '修改人';
|
COMMENT ON COLUMN "sys_client"."update_user" IS '修改人';
|
||||||
COMMENT ON COLUMN "sys_client"."update_time" IS '修改时间';
|
COMMENT ON COLUMN "sys_client"."update_time" IS '修改时间';
|
||||||
COMMENT ON TABLE "sys_client" IS '终端表';
|
COMMENT ON TABLE "sys_client" IS '客户端表';
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS "sys_sms_config" (
|
CREATE TABLE IF NOT EXISTS "sys_sms_config" (
|
||||||
"id" int8 NOT NULL,
|
"id" int8 NOT NULL,
|
||||||
|
|||||||
Reference in New Issue
Block a user