| | |
| | | INSERT INTO `t_da_sequence_num` (`id`, `code`, `name`, `sequence_num`, `prefix`) VALUES ('2', 'POINT_C', '计算点编码', 100000, 'C'); |
| | | |
| | | CREATE TABLE `t_http_api` ( |
| | | `id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'ID', |
| | | `code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '编码', |
| | | `name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '名称', |
| | | `url` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'URL', |
| | | `method` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '请求方法', |
| | | `param` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '参数', |
| | | `descp` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '描述', |
| | | `status` int NULL DEFAULT NULL COMMENT '状态', |
| | | `id` varchar(36) NOT NULL COMMENT 'ID', |
| | | `code` varchar(32) NOT NULL COMMENT '编码', |
| | | `name` varchar(32) NOT NULL COMMENT '名称', |
| | | `url` varchar(100) NOT NULL COMMENT 'URL', |
| | | `method` varchar(10) NULL DEFAULT NULL COMMENT '请求方法', |
| | | `param` varchar(200) NULL DEFAULT NULL COMMENT '参数', |
| | | `descp` varchar(100) NULL DEFAULT NULL COMMENT '描述', |
| | | `is_auth` tinyint(1) NOT NULL COMMENT '是否认证', |
| | | `auth_url` varchar(36) NULL DEFAULT NULL COMMENT '认证地址', |
| | | `creator` VARCHAR(64) COMMENT '创建人' , |
| | | `create_time` DATETIME COMMENT '创建时间' , |
| | | `updater` VARCHAR(64) COMMENT '修改人' , |
| | |
| | | UNIQUE KEY `uk_code` (`code`) USING BTREE |
| | | ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Api接口' ROW_FORMAT = DYNAMIC; |
| | | |
| | | |
| | | CREATE TABLE `t_http_token` ( |
| | | `id` varchar(36) NOT NULL COMMENT 'ID', |
| | | `api_id` varchar(36) NOT NULL COMMENT '接口ID', |
| | | `login_url` varchar(200) DEFAULT NULL COMMENT '登录地址', |
| | | `client_id` varchar(100) DEFAULT NULL COMMENT 'ClientId', |
| | | `client_secret` varchar(100) DEFAULT NULL COMMENT 'ClientSecret', |
| | | `username` varchar(50) DEFAULT NULL COMMENT '用户名', |
| | | `password` varchar(50) DEFAULT NULL COMMENT '密码', |
| | | `refresh_freq` varchar(10) DEFAULT NULL COMMENT '刷新频率', |
| | | `token` varchar(2000) DEFAULT NULL COMMENT 'token', |
| | | `expire_time` datetime DEFAULT NULL COMMENT '过期时间', |
| | | `update_time` datetime DEFAULT NULL COMMENT '更新时间', |
| | | PRIMARY KEY (`id`) USING BTREE, |
| | | UNIQUE KEY `uk_api_id` (`api_id`) USING BTREE |
| | | UNIQUE KEY `uk_login_url` (`login_url`) USING BTREE |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='接口Token'; |
| | | |
| | | CREATE TABLE `t_http_tag` ( |
| | |
| | | |
| | | @PreAuthorize("@ss.hasPermission('data:channel-http:create')") |
| | | @PostMapping("/create") |
| | | public CommonResult<Boolean> add(@RequestBody HttpTagEntity httpTagEntity){ |
| | | public CommonResult<Boolean> create(@RequestBody HttpTagEntity httpTagEntity){ |
| | | httpTagEntity.setId(UUID.randomUUID().toString()); |
| | | httpTagEntity.setCreateTime(new Date()); |
| | | tagService.add(httpTagEntity); |
| | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("T_HTTP_API") |
| | | @TableName("t_http_api") |
| | | public class HttpApiEntity implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | private String descp; |
| | | |
| | | /** |
| | | * 状态 |
| | | * 是否认证 |
| | | */ |
| | | private Integer status; |
| | | private Boolean isAuth; |
| | | |
| | | /** |
| | | * 认证地址 |
| | | */ |
| | | private String authUrl; |
| | | |
| | | /** |
| | | * 创建人 |
| | |
| | | private String id; |
| | | |
| | | /** |
| | | * 接口ID |
| | | */ |
| | | private String apiId; |
| | | |
| | | /** |
| | | * 登录地址 |
| | | * 认证地址 |
| | | */ |
| | | private String loginUrl; |
| | | |
| | |
| | | private String password; |
| | | |
| | | /** |
| | | * 刷新频率 |
| | | */ |
| | | private String refreshFreq; |
| | | |
| | | /** |
| | | * token |
| | | */ |
| | | private String token; |
| | |
| | | @ExcelProperty("ID") |
| | | private String id; |
| | | |
| | | @Schema(description = "", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| | | @ExcelProperty("") |
| | | @Schema(description = "接口ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| | | @ExcelProperty("接口ID") |
| | | private String apiId; |
| | | |
| | | @Schema(description = "", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| | | @ExcelProperty("") |
| | | @Schema(description = "登录地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| | | @ExcelProperty("登录地址") |
| | | private String loginUrl; |
| | | |
| | | @Schema(description = "", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| | | @ExcelProperty("") |
| | | @Schema(description = "ClientId", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| | | @ExcelProperty("ClientId") |
| | | private String clientId; |
| | | |
| | | @Schema(description = "", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| | | @ExcelProperty("") |
| | | @Schema(description = "ClientSecret", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| | | @ExcelProperty("ClientSecret") |
| | | private String clientSecret; |
| | | |
| | | @Schema(description = "", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| | | @ExcelProperty("") |
| | | @Schema(description = "用户名", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| | | @ExcelProperty("用户名") |
| | | private String username; |
| | | |
| | | @Schema(description = "", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| | | @ExcelProperty("") |
| | | @Schema(description = "密码", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| | | @ExcelProperty("密码") |
| | | private String password; |
| | | |
| | | @Schema(description = "", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| | | @ExcelProperty("") |
| | | @Schema(description = "token", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| | | @ExcelProperty("token") |
| | | private String token; |
| | | |
| | | @Schema(description = "", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| | | @ExcelProperty("") |
| | | private String prvsetName; |
| | | |
| | | @Schema(description = "", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| | | @ExcelProperty("") |
| | | private String projectName; |
| | | |
| | | @Schema(description = "", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| | | @ExcelProperty("") |
| | | private String platform; |
| | | |
| | | @Schema(description = "", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| | | @ExcelProperty("") |
| | | @Schema(description = "过期时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| | | @ExcelProperty("过期时间") |
| | | private Date expireTime; |
| | | |
| | | @Schema(description = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |