diff --git a/continew-common/src/main/java/top/continew/admin/common/context/UserContext.java b/continew-common/src/main/java/top/continew/admin/common/context/UserContext.java index 35223f4d..bac23265 100644 --- a/continew-common/src/main/java/top/continew/admin/common/context/UserContext.java +++ b/continew-common/src/main/java/top/continew/admin/common/context/UserContext.java @@ -81,12 +81,12 @@ public class UserContext implements Serializable { private Set roles; /** - * 客户端类型 + * 终端类型 */ private String clientType; /** - * 客户端 ID + * 终端 ID */ private String clientId; diff --git a/continew-module-system/src/main/java/top/continew/admin/auth/AbstractLoginHandler.java b/continew-module-system/src/main/java/top/continew/admin/auth/AbstractLoginHandler.java index 7e1f7e9f..1701199f 100644 --- a/continew-module-system/src/main/java/top/continew/admin/auth/AbstractLoginHandler.java +++ b/continew-module-system/src/main/java/top/continew/admin/auth/AbstractLoginHandler.java @@ -84,7 +84,7 @@ public abstract class AbstractLoginHandler implements LoginH * 认证 * * @param user 用户信息 - * @param client 客户端信息 + * @param client 终端信息 * @return token 令牌信息 */ protected String authenticate(UserDO user, ClientResp client) { diff --git a/continew-module-system/src/main/java/top/continew/admin/auth/LoginHandler.java b/continew-module-system/src/main/java/top/continew/admin/auth/LoginHandler.java index f5a74936..b817a9c3 100644 --- a/continew-module-system/src/main/java/top/continew/admin/auth/LoginHandler.java +++ b/continew-module-system/src/main/java/top/continew/admin/auth/LoginHandler.java @@ -35,7 +35,7 @@ public interface LoginHandler { * 登录 * * @param req 登录请求参数 - * @param client 客户端信息 + * @param client 终端信息 * @param request 请求对象 * @return 登录响应参数 */ @@ -45,7 +45,7 @@ public interface LoginHandler { * 登录前置处理 * * @param req 登录请求参数 - * @param client 客户端信息 + * @param client 终端信息 * @param request 请求对象 */ void preLogin(T req, ClientResp client, HttpServletRequest request); @@ -54,7 +54,7 @@ public interface LoginHandler { * 登录后置处理 * * @param req 登录请求参数 - * @param client 客户端信息 + * @param client 终端信息 * @param request 请求对象 */ void postLogin(T req, ClientResp client, HttpServletRequest request); diff --git a/continew-module-system/src/main/java/top/continew/admin/auth/model/query/OnlineUserQuery.java b/continew-module-system/src/main/java/top/continew/admin/auth/model/query/OnlineUserQuery.java index e5e7b42b..ad5d1a6f 100644 --- a/continew-module-system/src/main/java/top/continew/admin/auth/model/query/OnlineUserQuery.java +++ b/continew-module-system/src/main/java/top/continew/admin/auth/model/query/OnlineUserQuery.java @@ -46,9 +46,9 @@ public class OnlineUserQuery implements Serializable { private String nickname; /** - * 客户端 ID + * 终端 ID */ - @Schema(description = "客户端 ID", example = "ef51c9a3e9046c4f2ea45142c8a8344a") + @Schema(description = "终端 ID", example = "ef51c9a3e9046c4f2ea45142c8a8344a") private String clientId; /** diff --git a/continew-module-system/src/main/java/top/continew/admin/auth/model/req/LoginReq.java b/continew-module-system/src/main/java/top/continew/admin/auth/model/req/LoginReq.java index 9cdd8c0d..531361e3 100644 --- a/continew-module-system/src/main/java/top/continew/admin/auth/model/req/LoginReq.java +++ b/continew-module-system/src/main/java/top/continew/admin/auth/model/req/LoginReq.java @@ -47,10 +47,10 @@ public class LoginReq implements Serializable { private static final long serialVersionUID = 1L; /** - * 客户端 ID + * 终端 ID */ - @Schema(description = "客户端 ID", example = "ef51c9a3e9046c4f2ea45142c8a8344a") - @NotBlank(message = "客户端ID不能为空") + @Schema(description = "终端 ID", example = "ef51c9a3e9046c4f2ea45142c8a8344a") + @NotBlank(message = "终端ID不能为空") private String clientId; /** diff --git a/continew-module-system/src/main/java/top/continew/admin/auth/model/resp/OnlineUserResp.java b/continew-module-system/src/main/java/top/continew/admin/auth/model/resp/OnlineUserResp.java index a5e0d7d3..03a044bf 100644 --- a/continew-module-system/src/main/java/top/continew/admin/auth/model/resp/OnlineUserResp.java +++ b/continew-module-system/src/main/java/top/continew/admin/auth/model/resp/OnlineUserResp.java @@ -69,15 +69,15 @@ public class OnlineUserResp implements Serializable { private String nickname; /** - * 客户端类型 + * 终端类型 */ - @Schema(description = "客户端类型", example = "PC") + @Schema(description = "终端类型", example = "PC") private String clientType; /** - * 客户端 ID + * 终端 ID */ - @Schema(description = "客户端 ID", example = "ef51c9a3e9046c4f2ea45142c8a8344a") + @Schema(description = "终端 ID", example = "ef51c9a3e9046c4f2ea45142c8a8344a") private String clientId; /** diff --git a/continew-module-system/src/main/java/top/continew/admin/auth/service/impl/AuthServiceImpl.java b/continew-module-system/src/main/java/top/continew/admin/auth/service/impl/AuthServiceImpl.java index d81af9fd..e0bf2b36 100644 --- a/continew-module-system/src/main/java/top/continew/admin/auth/service/impl/AuthServiceImpl.java +++ b/continew-module-system/src/main/java/top/continew/admin/auth/service/impl/AuthServiceImpl.java @@ -67,11 +67,11 @@ public class AuthServiceImpl implements AuthService { @Override public LoginResp login(LoginReq req, HttpServletRequest request) { AuthTypeEnum authType = req.getAuthType(); - // 校验客户端 + // 校验终端 ClientResp client = clientService.getByClientId(req.getClientId()); - ValidationUtils.throwIfNull(client, "客户端不存在"); - ValidationUtils.throwIf(DisEnableStatusEnum.DISABLE.equals(client.getStatus()), "客户端已禁用"); - ValidationUtils.throwIf(!client.getAuthType().contains(authType.getValue()), "该客户端暂未授权 [{}] 认证", authType + ValidationUtils.throwIfNull(client, "终端不存在"); + ValidationUtils.throwIf(DisEnableStatusEnum.DISABLE.equals(client.getStatus()), "终端已禁用"); + ValidationUtils.throwIf(!client.getAuthType().contains(authType.getValue()), "该终端暂未授权 [{}] 认证", authType .getDescription()); // 获取处理器 LoginHandler loginHandler = loginHandlerFactory.getHandler(authType); diff --git a/continew-module-system/src/main/java/top/continew/admin/auth/service/impl/OnlineUserServiceImpl.java b/continew-module-system/src/main/java/top/continew/admin/auth/service/impl/OnlineUserServiceImpl.java index c7e1be02..4968c94b 100644 --- a/continew-module-system/src/main/java/top/continew/admin/auth/service/impl/OnlineUserServiceImpl.java +++ b/continew-module-system/src/main/java/top/continew/admin/auth/service/impl/OnlineUserServiceImpl.java @@ -124,11 +124,11 @@ public class OnlineUserServiceImpl implements OnlineUserService { } /** - * 是否匹配客户端 ID + * 是否匹配终端 ID * - * @param clientId 客户端 ID + * @param clientId 终端 ID * @param userContext 用户上下文信息 - * @return 是否匹配客户端 ID + * @return 是否匹配终端 ID */ private boolean isMatchClientId(String clientId, UserContext userContext) { if (StrUtil.isBlank(clientId)) { diff --git a/continew-module-system/src/main/java/top/continew/admin/system/mapper/ClientMapper.java b/continew-module-system/src/main/java/top/continew/admin/system/mapper/ClientMapper.java index 8f328cee..393be00d 100644 --- a/continew-module-system/src/main/java/top/continew/admin/system/mapper/ClientMapper.java +++ b/continew-module-system/src/main/java/top/continew/admin/system/mapper/ClientMapper.java @@ -20,7 +20,7 @@ import top.continew.admin.system.model.entity.ClientDO; import top.continew.starter.data.mp.base.BaseMapper; /** - * 客户端 Mapper + * 终端 Mapper * * @author KAI * @since 2024/12/03 16:04 diff --git a/continew-module-system/src/main/java/top/continew/admin/system/model/entity/ClientDO.java b/continew-module-system/src/main/java/top/continew/admin/system/model/entity/ClientDO.java index f10ba610..51d2a1d9 100644 --- a/continew-module-system/src/main/java/top/continew/admin/system/model/entity/ClientDO.java +++ b/continew-module-system/src/main/java/top/continew/admin/system/model/entity/ClientDO.java @@ -27,7 +27,7 @@ import java.io.Serial; import java.util.List; /** - * 客户端实体 + * 终端实体 * * @author KAI * @author Charles7c @@ -41,17 +41,17 @@ public class ClientDO extends BaseDO { private static final long serialVersionUID = 1L; /** - * 客户端 ID + * 终端 ID */ private String clientId; /** - * 客户端 Key + * 终端 Key */ private String clientKey; /** - * 客户端秘钥 + * 终端秘钥 */ private String clientSecret; @@ -62,7 +62,7 @@ public class ClientDO extends BaseDO { private List authType; /** - * 客户端类型 + * 终端类型 */ private String clientType; diff --git a/continew-module-system/src/main/java/top/continew/admin/system/model/query/ClientQuery.java b/continew-module-system/src/main/java/top/continew/admin/system/model/query/ClientQuery.java index 0a531428..bee9905a 100644 --- a/continew-module-system/src/main/java/top/continew/admin/system/model/query/ClientQuery.java +++ b/continew-module-system/src/main/java/top/continew/admin/system/model/query/ClientQuery.java @@ -27,29 +27,29 @@ import java.io.Serializable; import java.util.List; /** - * 客户端查询条件 + * 终端查询条件 * * @author KAI * @author Charles7c * @since 2024/12/03 16:04 */ @Data -@Schema(description = "客户端查询条件") +@Schema(description = "终端查询条件") public class ClientQuery implements Serializable { @Serial private static final long serialVersionUID = 1L; /** - * 客户端 Key + * 终端 Key */ - @Schema(description = "客户端 Key", example = "PC") + @Schema(description = "终端 Key", example = "PC") private String clientKey; /** - * 客户端秘钥 + * 终端秘钥 */ - @Schema(description = "客户端秘钥", example = "dd77ab1e353a027e0d60ce3b151e8642") + @Schema(description = "终端秘钥", example = "dd77ab1e353a027e0d60ce3b151e8642") private String clientSecret; /** @@ -60,9 +60,9 @@ public class ClientQuery implements Serializable { private List authType; /** - * 客户端类型 + * 终端类型 */ - @Schema(description = "客户端类型", example = "PC") + @Schema(description = "终端类型", example = "PC") private String clientType; /** diff --git a/continew-module-system/src/main/java/top/continew/admin/system/model/req/ClientReq.java b/continew-module-system/src/main/java/top/continew/admin/system/model/req/ClientReq.java index 1bf170ad..806ea897 100644 --- a/continew-module-system/src/main/java/top/continew/admin/system/model/req/ClientReq.java +++ b/continew-module-system/src/main/java/top/continew/admin/system/model/req/ClientReq.java @@ -28,33 +28,33 @@ import java.io.Serializable; import java.util.List; /** - * 创建或修改客户端参数 + * 创建或修改终端参数 * * @author KAI * @author Charles7c * @since 2024/12/03 16:04 */ @Data -@Schema(description = "创建或修改客户端参数") +@Schema(description = "创建或修改终端参数") public class ClientReq implements Serializable { @Serial private static final long serialVersionUID = 1L; /** - * 客户端 Key + * 终端 Key */ - @Schema(description = "客户端 Key", example = "PC") - @NotBlank(message = "客户端Key不能为空") - @Length(max = 32, message = "客户端Key长度不能超过 {max} 个字符") + @Schema(description = "终端 Key", example = "PC") + @NotBlank(message = "终端Key不能为空") + @Length(max = 32, message = "终端Key长度不能超过 {max} 个字符") private String clientKey; /** - * 客户端秘钥 + * 终端秘钥 */ - @Schema(description = "客户端秘钥", example = "dd77ab1e353a027e0d60ce3b151e8642") - @NotBlank(message = "客户端秘钥不能为空") - @Length(max = 255, message = "客户端秘钥长度不能超过 {max} 个字符") + @Schema(description = "终端秘钥", example = "dd77ab1e353a027e0d60ce3b151e8642") + @NotBlank(message = "终端秘钥不能为空") + @Length(max = 255, message = "终端秘钥长度不能超过 {max} 个字符") private String clientSecret; /** @@ -65,11 +65,11 @@ public class ClientReq implements Serializable { private List authType; /** - * 客户端类型 + * 终端类型 */ - @Schema(description = "客户端类型", example = "PC") - @NotBlank(message = "客户端类型不能为空") - @Length(max = 32, message = "客户端类型长度不能超过 {max} 个字符") + @Schema(description = "终端类型", example = "PC") + @NotBlank(message = "终端类型不能为空") + @Length(max = 32, message = "终端类型长度不能超过 {max} 个字符") private String clientType; /** @@ -91,7 +91,7 @@ public class ClientReq implements Serializable { private DisEnableStatusEnum status; /** - * 客户端 ID + * 终端 ID */ @Schema(hidden = true) private String clientId; diff --git a/continew-module-system/src/main/java/top/continew/admin/system/model/resp/ClientResp.java b/continew-module-system/src/main/java/top/continew/admin/system/model/resp/ClientResp.java index b59be0b0..bad36f69 100644 --- a/continew-module-system/src/main/java/top/continew/admin/system/model/resp/ClientResp.java +++ b/continew-module-system/src/main/java/top/continew/admin/system/model/resp/ClientResp.java @@ -25,35 +25,35 @@ import java.io.Serial; import java.util.List; /** - * 客户端信息 + * 终端信息 * * @author KAI * @author Charles7c * @since 2024/12/03 16:04 */ @Data -@Schema(description = "客户端信息") +@Schema(description = "终端信息") public class ClientResp extends BaseDetailResp { @Serial private static final long serialVersionUID = 1L; /** - * 客户端 ID + * 终端 ID */ - @Schema(description = "客户端 ID", example = "ef51c9a3e9046c4f2ea45142c8a8344a") + @Schema(description = "终端 ID", example = "ef51c9a3e9046c4f2ea45142c8a8344a") private String clientId; /** - * 客户端 Key + * 终端 Key */ - @Schema(description = "客户端 Key", example = "PC") + @Schema(description = "终端 Key", example = "PC") private String clientKey; /** - * 客户端秘钥 + * 终端秘钥 */ - @Schema(description = "客户端秘钥", example = "dd77ab1e353a027e0d60ce3b151e8642") + @Schema(description = "终端秘钥", example = "dd77ab1e353a027e0d60ce3b151e8642") private String clientSecret; /** @@ -63,9 +63,9 @@ public class ClientResp extends BaseDetailResp { private List authType; /** - * 客户端类型 + * 终端类型 */ - @Schema(description = "客户端类型", example = "PC") + @Schema(description = "终端类型", example = "PC") private String clientType; /** diff --git a/continew-module-system/src/main/java/top/continew/admin/system/service/ClientService.java b/continew-module-system/src/main/java/top/continew/admin/system/service/ClientService.java index ac2cf2d6..c4b63e09 100644 --- a/continew-module-system/src/main/java/top/continew/admin/system/service/ClientService.java +++ b/continew-module-system/src/main/java/top/continew/admin/system/service/ClientService.java @@ -22,7 +22,7 @@ import top.continew.admin.system.model.resp.ClientResp; import top.continew.starter.extension.crud.service.BaseService; /** - * 客户端业务接口 + * 终端业务接口 * * @author KAI * @author Charles7c @@ -31,10 +31,10 @@ import top.continew.starter.extension.crud.service.BaseService; public interface ClientService extends BaseService { /** - * 根据客户端 ID 查詢 + * 根据终端 ID 查詢 * - * @param clientId 客戶端 ID - * @return 客户端信息 + * @param clientId 终端 ID + * @return 终端信息 */ ClientResp getByClientId(String clientId); } \ No newline at end of file diff --git a/continew-module-system/src/main/java/top/continew/admin/system/service/impl/ClientServiceImpl.java b/continew-module-system/src/main/java/top/continew/admin/system/service/impl/ClientServiceImpl.java index c563abec..75113eec 100644 --- a/continew-module-system/src/main/java/top/continew/admin/system/service/impl/ClientServiceImpl.java +++ b/continew-module-system/src/main/java/top/continew/admin/system/service/impl/ClientServiceImpl.java @@ -35,7 +35,7 @@ import top.continew.starter.extension.crud.service.BaseServiceImpl; import java.util.List; /** - * 客户端业务实现 + * 终端业务实现 * * @author KAI * @author Charles7c @@ -60,7 +60,7 @@ public class ClientServiceImpl extends BaseServiceImpl deptMapper.lambdaUpdate().gt(DeptDO::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) .remove()); SnailJobLog.REMOTE.info("演示环境数据已清理完成。"); diff --git a/continew-webapi/src/main/java/top/continew/admin/controller/system/ClientController.java b/continew-webapi/src/main/java/top/continew/admin/controller/system/ClientController.java index 245138b6..e5b12c64 100644 --- a/continew-webapi/src/main/java/top/continew/admin/controller/system/ClientController.java +++ b/continew-webapi/src/main/java/top/continew/admin/controller/system/ClientController.java @@ -27,12 +27,12 @@ import top.continew.starter.extension.crud.annotation.CrudRequestMapping; import top.continew.starter.extension.crud.enums.Api; /** - * 客户端管理 API + * 终端管理 API * * @author KAI * @since 2024/12/03 16:04 */ -@Tag(name = "客户端管理 API") +@Tag(name = "终端管理 API") @RestController @CrudRequestMapping(value = "/system/client", api = {Api.PAGE, Api.DETAIL, Api.ADD, Api.UPDATE, Api.DELETE}) public class ClientController extends BaseController { diff --git a/continew-webapi/src/main/resources/db/changelog/mysql/main_data.sql b/continew-webapi/src/main/resources/db/changelog/mysql/main_data.sql index af156bbd..d571089f 100644 --- a/continew-webapi/src/main/resources/db/changelog/mysql/main_data.sql +++ b/continew-webapi/src/main/resources/db/changelog/mysql/main_data.sql @@ -78,7 +78,7 @@ VALUES (1114, '修改', 1110, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:storage:update', 4, 1, 1, NOW()), (1115, '删除', 1110, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:storage:delete', 5, 1, 1, NOW()), -( 1180, '客户端管理', 1000, 2, '/system/client', 'SystemClient', 'system/client/index', NULL, 'mobile', b'0', b'0', b'0', NULL, 9, 1, 1, NOW()), +( 1180, '终端管理', 1000, 2, '/system/client', 'SystemClient', 'system/client/index', NULL, 'mobile', b'0', b'0', b'0', NULL, 9, 1, 1, NOW()), (1181, '列表', 1180, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:client:list', 1, 1, 1, NOW()), (1182, '详情', 1180, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:client:detail', 2, 1, 1, NOW()), (1183, '新增', 1180, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:client:add', 3, 1, 1, NOW()), @@ -190,7 +190,7 @@ INSERT INTO `sys_dict` VALUES (1, '公告类型', 'notice_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` (`id`, `label`, `value`, `color`, `sort`, `description`, `status`, `dict_id`, `create_user`, `create_time`) @@ -247,7 +247,7 @@ VALUES (1, '开发环境', 'local_dev', 2, NULL, NULL, NULL, 'C:/continew-admin/data/file/', 'http://localhost:8000/file', '本地存储', b'1', 1, 1, 1, NOW()), (2, '生产环境', 'local_prod', 2, NULL, NULL, NULL, '../data/file/', 'http://api.continew.top/file', '本地存储', b'0', 2, 2, 1, NOW()); --- 初始化客户端数据 +-- 初始化终端数据 INSERT INTO `sys_client` (`id`, `client_id`, `client_key`, `client_secret`, `auth_type`, `client_type`, `active_timeout`, `timeout`, `status`, `create_user`, `create_time`) VALUES diff --git a/continew-webapi/src/main/resources/db/changelog/mysql/main_table.sql b/continew-webapi/src/main/resources/db/changelog/mysql/main_table.sql index 7e89ce1b..aa6f948d 100644 --- a/continew-webapi/src/main/resources/db/changelog/mysql/main_table.sql +++ b/continew-webapi/src/main/resources/db/changelog/mysql/main_table.sql @@ -299,11 +299,11 @@ CREATE TABLE IF NOT EXISTS `sys_file` ( CREATE TABLE IF NOT EXISTS `sys_client` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `client_id` varchar(50) NOT NULL COMMENT '客户端ID', - `client_key` varchar(255) NOT NULL COMMENT '客户端Key', - `client_secret` varchar(255) NOT NULL COMMENT '客户端秘钥', + `client_id` varchar(50) NOT NULL COMMENT '终端ID', + `client_key` varchar(255) NOT NULL COMMENT '终端Key', + `client_secret` varchar(255) NOT NULL COMMENT '终端秘钥', `auth_type` json NOT NULL COMMENT '认证类型', - `client_type` varchar(50) NOT NULL COMMENT '客户端类型', + `client_type` varchar(50) NOT NULL COMMENT '终端类型', `active_timeout` bigint(20) DEFAULT -1 COMMENT 'Token最低活跃频率(单位:秒,-1:不限制,永不冻结)', `timeout` bigint(20) DEFAULT 2592000 COMMENT 'Token有效期(单位:秒,-1:永不过期)', `status` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态(1:启用;2:禁用)', @@ -313,4 +313,4 @@ CREATE TABLE IF NOT EXISTS `sys_client` ( `update_time` datetime DEFAULT NULL COMMENT '修改时间', PRIMARY KEY (`id`), UNIQUE INDEX `uk_client_id`(`client_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='客户端表'; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='终端表'; diff --git a/continew-webapi/src/main/resources/db/changelog/postgresql/main_data.sql b/continew-webapi/src/main/resources/db/changelog/postgresql/main_data.sql index 36d9d9a5..0966dfef 100644 --- a/continew-webapi/src/main/resources/db/changelog/postgresql/main_data.sql +++ b/continew-webapi/src/main/resources/db/changelog/postgresql/main_data.sql @@ -78,7 +78,7 @@ VALUES (1114, '修改', 1110, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:storage:update', 4, 1, 1, NOW()), (1115, '删除', 1110, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:storage:delete', 5, 1, 1, NOW()), -( 1180, '客户端管理', 1000, 2, '/system/client', 'SystemClient', 'system/client/index', NULL, 'mobile', false, false, false, NULL, 9, 1, 1, NOW()), +( 1180, '终端管理', 1000, 2, '/system/client', 'SystemClient', 'system/client/index', NULL, 'mobile', false, false, false, NULL, 9, 1, 1, NOW()), (1181, '列表', 1180, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:client:list', 1, 1, 1, NOW()), (1182, '详情', 1180, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:client:detail', 2, 1, 1, NOW()), (1183, '新增', 1180, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:client:add', 3, 1, 1, NOW()), @@ -190,7 +190,7 @@ INSERT INTO "sys_dict" VALUES (1, '公告类型', 'notice_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" ("id", "label", "value", "color", "sort", "description", "status", "dict_id", "create_user", "create_time") @@ -247,7 +247,7 @@ VALUES (1, '开发环境', 'local_dev', 2, NULL, NULL, NULL, 'C:/continew-admin/data/file/', 'http://localhost:8000/file', '本地存储', true, 1, 1, 1, NOW()), (2, '生产环境', 'local_prod', 2, NULL, NULL, NULL, '../data/file/', 'http://api.continew.top/file', '本地存储', false, 2, 2, 1, NOW()); --- 初始化客户端数据 +-- 初始化终端数据 INSERT INTO "sys_client" ("id", "client_id", "client_key", "client_secret", "auth_type", "client_type", "active_timeout", "timeout", "status", "create_user", "create_time") VALUES diff --git a/continew-webapi/src/main/resources/db/changelog/postgresql/main_table.sql b/continew-webapi/src/main/resources/db/changelog/postgresql/main_table.sql index 246cbb51..3482f46c 100644 --- a/continew-webapi/src/main/resources/db/changelog/postgresql/main_table.sql +++ b/continew-webapi/src/main/resources/db/changelog/postgresql/main_table.sql @@ -515,11 +515,11 @@ CREATE TABLE IF NOT EXISTS "sys_client" ( ); CREATE UNIQUE INDEX "uk_client_client_id" ON "sys_client" ("client_id"); COMMENT ON COLUMN "sys_client"."id" IS 'ID'; -COMMENT ON COLUMN "sys_client"."client_id" IS '客户端ID'; -COMMENT ON COLUMN "sys_client"."client_key" IS '客户端Key'; -COMMENT ON COLUMN "sys_client"."client_secret" IS '客户端秘钥'; +COMMENT ON COLUMN "sys_client"."client_id" IS '终端ID'; +COMMENT ON COLUMN "sys_client"."client_key" IS '终端Key'; +COMMENT ON COLUMN "sys_client"."client_secret" IS '终端秘钥'; COMMENT ON COLUMN "sys_client"."auth_type" IS '认证类型'; -COMMENT ON COLUMN "sys_client"."client_type" IS '客户端类型'; +COMMENT ON COLUMN "sys_client"."client_type" IS '终端类型'; COMMENT ON COLUMN "sys_client"."active_timeout" IS 'Token最低活跃频率(单位:秒,-1:不限制,永不冻结)'; COMMENT ON COLUMN "sys_client"."timeout" IS 'Token有效期(单位:秒,-1:永不过期)'; COMMENT ON COLUMN "sys_client"."status" IS '状态(1:启用;2:禁用)'; @@ -527,4 +527,4 @@ COMMENT ON COLUMN "sys_client"."create_user" IS '创建人'; COMMENT ON COLUMN "sys_client"."create_time" IS '创建时间'; COMMENT ON COLUMN "sys_client"."update_user" IS '修改人'; COMMENT ON COLUMN "sys_client"."update_time" IS '修改时间'; -COMMENT ON TABLE "sys_client" IS '客户端表'; \ No newline at end of file +COMMENT ON TABLE "sys_client" IS '终端表'; \ No newline at end of file