diff --git a/db/pig_codegen.sql b/db/pig_codegen.sql index c7467f73..d1e323ab 100644 --- a/db/pig_codegen.sql +++ b/db/pig_codegen.sql @@ -6,52 +6,51 @@ SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; USE `pig_codegen`; - -/* - * Copyright (c) 2020 pig4cloud Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -- ---------------------------- -- Table structure for gen_datasource_conf -- ---------------------------- DROP TABLE IF EXISTS `gen_datasource_conf`; CREATE TABLE `gen_datasource_conf` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', - `name` varchar(64) DEFAULT NULL, - `url` varchar(255) DEFAULT NULL, - `username` varchar(64) DEFAULT NULL, - `password` varchar(64) DEFAULT NULL, - `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `update_date` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新', - `del_flag` char(1) DEFAULT '0', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COMMENT='数据源表'; + `id` int NOT NULL AUTO_INCREMENT COMMENT '主键', + `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '数据源名称', + `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT 'jdbc-url', + `username` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '用户名', + `password` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '密码', + `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT '0' COMMENT '删除标记', + `create_time` datetime DEFAULT NULL COMMENT '创建时间', + `create_by` varchar(64) DEFAULT NULL COMMENT '创建人', + `update_time` datetime DEFAULT NULL COMMENT '修改时间', + `update_by` varchar(64) DEFAULT NULL COMMENT '更新人', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='数据源表'; + +-- ---------------------------- +-- Records of gen_datasource_conf +-- ---------------------------- +BEGIN; +COMMIT; -- ---------------------------- -- Table structure for gen_form_conf -- ---------------------------- DROP TABLE IF EXISTS `gen_form_conf`; CREATE TABLE `gen_form_conf` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `table_name` varchar(64) DEFAULT NULL, - `form_info` json NOT NULL COMMENT '表单信息', - `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', - `del_flag` char(1) DEFAULT '0', - PRIMARY KEY (`id`) USING BTREE, - KEY `table_name` (`table_name`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='表单配置'; + `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID', + `table_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '表名', + `form_info` json NOT NULL COMMENT '表单信息', + `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT '0' COMMENT '删除标记', + `create_time` datetime DEFAULT NULL COMMENT '创建时间', + `create_by` varchar(64) DEFAULT NULL COMMENT '创建人', + `update_time` datetime DEFAULT NULL COMMENT '修改时间', + `update_by` varchar(64) DEFAULT NULL COMMENT '更新人', + PRIMARY KEY (`id`) USING BTREE, + KEY `table_name` (`table_name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='表单配置'; + +-- ---------------------------- +-- Records of gen_form_conf +-- ---------------------------- +BEGIN; +COMMIT; SET FOREIGN_KEY_CHECKS = 1; diff --git a/pig-common/pig-common-mybatis/src/main/java/com/pig4cloud/pig/common/mybatis/config/MybatisPlusMetaObjectHandler.java b/pig-common/pig-common-mybatis/src/main/java/com/pig4cloud/pig/common/mybatis/config/MybatisPlusMetaObjectHandler.java index 577df669..74d77229 100644 --- a/pig-common/pig-common-mybatis/src/main/java/com/pig4cloud/pig/common/mybatis/config/MybatisPlusMetaObjectHandler.java +++ b/pig-common/pig-common-mybatis/src/main/java/com/pig4cloud/pig/common/mybatis/config/MybatisPlusMetaObjectHandler.java @@ -38,11 +38,10 @@ public class MybatisPlusMetaObjectHandler implements MetaObjectHandler { /** * 填充值,先判断是否有手动设置,优先手动设置的值,例如:job必须手动设置 - * - * @param fieldName 属性名 - * @param fieldVal 属性值 + * @param fieldName 属性名 + * @param fieldVal 属性值 * @param metaObject MetaObject - * @param isCover 是否覆盖原有值,避免更新操作手动入参 + * @param isCover 是否覆盖原有值,避免更新操作手动入参 */ private static void fillValIfNullByName(String fieldName, Object fieldVal, MetaObject metaObject, boolean isCover) { // 1. 没有 get 方法 @@ -63,7 +62,6 @@ public class MybatisPlusMetaObjectHandler implements MetaObjectHandler { /** * 获取 spring security 当前的用户名 - * * @return 当前用户名 */ private String getUserName() { diff --git a/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/controller/OauthClientDetailsController.java b/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/controller/OauthClientDetailsController.java index fbe57f70..370c1609 100644 --- a/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/controller/OauthClientDetailsController.java +++ b/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/controller/OauthClientDetailsController.java @@ -55,6 +55,7 @@ public class OauthClientDetailsController { return R.ok(sysOauthClientDetailsService .list(Wrappers.lambdaQuery().eq(SysOauthClientDetails::getClientId, clientId))); } + /** * 简单分页查询 * @param page 分页对象 diff --git a/pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/entity/GenDatasourceConf.java b/pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/entity/GenDatasourceConf.java index 18974769..8185b28a 100755 --- a/pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/entity/GenDatasourceConf.java +++ b/pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/entity/GenDatasourceConf.java @@ -18,12 +18,10 @@ package com.pig4cloud.pig.codegen.entity; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableLogic; import com.baomidou.mybatisplus.annotation.TableName; -import com.baomidou.mybatisplus.extension.activerecord.Model; +import com.pig4cloud.pig.common.mybatis.base.BaseEntity; import lombok.Data; import lombok.EqualsAndHashCode; -import java.time.LocalDateTime; - /** * 数据源表 * @@ -33,9 +31,7 @@ import java.time.LocalDateTime; @Data @TableName("gen_datasource_conf") @EqualsAndHashCode(callSuper = true) -public class GenDatasourceConf extends Model { - - private static final long serialVersionUID = 1L; +public class GenDatasourceConf extends BaseEntity { /** * 主键 @@ -63,16 +59,6 @@ public class GenDatasourceConf extends Model { */ private String password; - /** - * 创建时间 - */ - private LocalDateTime createDate; - - /** - * 更新 - */ - private LocalDateTime updateDate; - /** * 删除标记 */ diff --git a/pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/entity/GenFormConf.java b/pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/entity/GenFormConf.java index 43edd777..769f5e76 100755 --- a/pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/entity/GenFormConf.java +++ b/pig-visual/pig-codegen/src/main/java/com/pig4cloud/pig/codegen/entity/GenFormConf.java @@ -18,14 +18,12 @@ package com.pig4cloud.pig.codegen.entity; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; -import com.baomidou.mybatisplus.extension.activerecord.Model; +import com.pig4cloud.pig.common.mybatis.base.BaseEntity; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; -import java.time.LocalDateTime; - /** * 生成记录 * @@ -36,9 +34,7 @@ import java.time.LocalDateTime; @TableName("gen_form_conf") @EqualsAndHashCode(callSuper = true) @ApiModel(value = "生成记录") -public class GenFormConf extends Model { - - private static final long serialVersionUID = 1L; +public class GenFormConf extends BaseEntity { /** * ID @@ -59,18 +55,6 @@ public class GenFormConf extends Model { @ApiModelProperty(value = "表单信息") private String formInfo; - /** - * 创建时间 - */ - @ApiModelProperty(value = "创建时间") - private LocalDateTime createTime; - - /** - * 修改时间 - */ - @ApiModelProperty(value = "修改时间") - private LocalDateTime updateTime; - /** * 删除标记 */