diff --git a/README.md b/README.md index a085c6c1..0a590ae9 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ - 前端:JavaScript/TypeScript + Vue3 + Vite5 + Pinia + Ant Design Vue 4.X - 移动端:uniapp (vue3版本) + uni-ui + (同时支持APP、小程序、H5) -- 后端:Java8/17 + SpringBoot2/3 + Sa Token + Mybatis-plus + 多种数据库 +- 后端:Java8/17 + SpringBoot2/3 + Sa Token + Mybatis-plus + 主流数据库/国产数据库 - 官方文档:[https://smartadmin.vip](https://smartadmin.vip) - 电脑在线预览:[https://preview.smartadmin.vip](https://preview.smartadmin.vip) - 移动端在线预览:[https://app.smartadmin.vip](https://app.smartadmin.vip/#/pages/login/login) diff --git a/smart-admin-api-java17-springboot3/pom.xml b/smart-admin-api-java17-springboot3/pom.xml index 335a45ff..086d0ee2 100644 --- a/smart-admin-api-java17-springboot3/pom.xml +++ b/smart-admin-api-java17-springboot3/pom.xml @@ -29,7 +29,6 @@ 1.2.23 1.4.2 20.0 - 1.21 0.9.11 2.15.0 3.12.0 @@ -127,12 +126,6 @@ ${google-guava.version} - - eu.bitwalker - UserAgentUtils - ${user-agent-utils.version} - - org.reflections reflections @@ -198,7 +191,6 @@ hutool-all ${hutool.version} - org.apache.velocity diff --git a/smart-admin-api-java17-springboot3/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/oa/enterprise/EnterpriseController.java b/smart-admin-api-java17-springboot3/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/oa/enterprise/controller/EnterpriseController.java similarity index 97% rename from smart-admin-api-java17-springboot3/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/oa/enterprise/EnterpriseController.java rename to smart-admin-api-java17-springboot3/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/oa/enterprise/controller/EnterpriseController.java index d919537b..ab06bd02 100644 --- a/smart-admin-api-java17-springboot3/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/oa/enterprise/EnterpriseController.java +++ b/smart-admin-api-java17-springboot3/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/oa/enterprise/controller/EnterpriseController.java @@ -1,4 +1,4 @@ -package net.lab1024.sa.admin.module.business.oa.enterprise; +package net.lab1024.sa.admin.module.business.oa.enterprise.controller; import cn.dev33.satoken.annotation.SaCheckPermission; import io.swagger.v3.oas.annotations.Operation; @@ -8,6 +8,7 @@ import jakarta.servlet.http.HttpServletResponse; import jakarta.validation.Valid; import lombok.extern.slf4j.Slf4j; import net.lab1024.sa.admin.constant.AdminSwaggerTagConst; +import net.lab1024.sa.admin.module.business.oa.enterprise.service.EnterpriseService; import net.lab1024.sa.admin.module.business.oa.enterprise.domain.form.*; import net.lab1024.sa.admin.module.business.oa.enterprise.domain.vo.EnterpriseEmployeeVO; import net.lab1024.sa.admin.module.business.oa.enterprise.domain.vo.EnterpriseExcelVO; diff --git a/smart-admin-api-java17-springboot3/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/oa/enterprise/EnterpriseEmployeeManager.java b/smart-admin-api-java17-springboot3/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/oa/enterprise/manager/EnterpriseEmployeeManager.java similarity index 90% rename from smart-admin-api-java17-springboot3/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/oa/enterprise/EnterpriseEmployeeManager.java rename to smart-admin-api-java17-springboot3/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/oa/enterprise/manager/EnterpriseEmployeeManager.java index f90b21ac..a3c21d84 100644 --- a/smart-admin-api-java17-springboot3/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/oa/enterprise/EnterpriseEmployeeManager.java +++ b/smart-admin-api-java17-springboot3/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/oa/enterprise/manager/EnterpriseEmployeeManager.java @@ -1,4 +1,4 @@ -package net.lab1024.sa.admin.module.business.oa.enterprise; +package net.lab1024.sa.admin.module.business.oa.enterprise.manager; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import net.lab1024.sa.admin.module.business.oa.enterprise.dao.EnterpriseEmployeeDao; diff --git a/smart-admin-api-java17-springboot3/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/oa/enterprise/EnterpriseService.java b/smart-admin-api-java17-springboot3/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/oa/enterprise/service/EnterpriseService.java similarity index 98% rename from smart-admin-api-java17-springboot3/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/oa/enterprise/EnterpriseService.java rename to smart-admin-api-java17-springboot3/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/oa/enterprise/service/EnterpriseService.java index 5ea17e6c..37848774 100644 --- a/smart-admin-api-java17-springboot3/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/oa/enterprise/EnterpriseService.java +++ b/smart-admin-api-java17-springboot3/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/oa/enterprise/service/EnterpriseService.java @@ -1,4 +1,4 @@ -package net.lab1024.sa.admin.module.business.oa.enterprise; +package net.lab1024.sa.admin.module.business.oa.enterprise.service; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.google.common.collect.Lists; @@ -13,6 +13,7 @@ import net.lab1024.sa.admin.module.business.oa.enterprise.domain.vo.EnterpriseEm import net.lab1024.sa.admin.module.business.oa.enterprise.domain.vo.EnterpriseExcelVO; import net.lab1024.sa.admin.module.business.oa.enterprise.domain.vo.EnterpriseListVO; import net.lab1024.sa.admin.module.business.oa.enterprise.domain.vo.EnterpriseVO; +import net.lab1024.sa.admin.module.business.oa.enterprise.manager.EnterpriseEmployeeManager; import net.lab1024.sa.admin.module.system.department.service.DepartmentService; import net.lab1024.sa.base.common.code.UserErrorCode; import net.lab1024.sa.base.common.domain.PageResult; diff --git a/smart-admin-api-java17-springboot3/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/oa/invoice/service/InvoiceService.java b/smart-admin-api-java17-springboot3/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/oa/invoice/service/InvoiceService.java index bfa87e09..dc7eb521 100644 --- a/smart-admin-api-java17-springboot3/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/oa/invoice/service/InvoiceService.java +++ b/smart-admin-api-java17-springboot3/sa-admin/src/main/java/net/lab1024/sa/admin/module/business/oa/invoice/service/InvoiceService.java @@ -3,7 +3,7 @@ package net.lab1024.sa.admin.module.business.oa.invoice.service; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; -import net.lab1024.sa.admin.module.business.oa.enterprise.EnterpriseService; +import net.lab1024.sa.admin.module.business.oa.enterprise.service.EnterpriseService; import net.lab1024.sa.admin.module.business.oa.enterprise.domain.vo.EnterpriseVO; import net.lab1024.sa.admin.module.business.oa.invoice.dao.InvoiceDao; import net.lab1024.sa.admin.module.business.oa.invoice.domain.*; diff --git a/smart-admin-api-java17-springboot3/sa-admin/src/main/java/net/lab1024/sa/admin/module/system/position/domain/entity/PositionEntity.java b/smart-admin-api-java17-springboot3/sa-admin/src/main/java/net/lab1024/sa/admin/module/system/position/domain/entity/PositionEntity.java index 0beac2a3..dd511bc6 100644 --- a/smart-admin-api-java17-springboot3/sa-admin/src/main/java/net/lab1024/sa/admin/module/system/position/domain/entity/PositionEntity.java +++ b/smart-admin-api-java17-springboot3/sa-admin/src/main/java/net/lab1024/sa/admin/module/system/position/domain/entity/PositionEntity.java @@ -34,7 +34,7 @@ public class PositionEntity { /** * 职级 */ - private String level; + private String positionLevel; /** * 排序 diff --git a/smart-admin-api-java17-springboot3/sa-admin/src/main/java/net/lab1024/sa/admin/module/system/position/domain/form/PositionAddForm.java b/smart-admin-api-java17-springboot3/sa-admin/src/main/java/net/lab1024/sa/admin/module/system/position/domain/form/PositionAddForm.java index 87696b6a..7aa08086 100644 --- a/smart-admin-api-java17-springboot3/sa-admin/src/main/java/net/lab1024/sa/admin/module/system/position/domain/form/PositionAddForm.java +++ b/smart-admin-api-java17-springboot3/sa-admin/src/main/java/net/lab1024/sa/admin/module/system/position/domain/form/PositionAddForm.java @@ -21,7 +21,7 @@ public class PositionAddForm { private String positionName; @Schema(description = "职级") - private String level; + private String positionLevel; @Schema(description = "排序") @NotNull(message = "排序不能为空") diff --git a/smart-admin-api-java17-springboot3/sa-admin/src/main/java/net/lab1024/sa/admin/module/system/position/domain/vo/PositionVO.java b/smart-admin-api-java17-springboot3/sa-admin/src/main/java/net/lab1024/sa/admin/module/system/position/domain/vo/PositionVO.java index ee178840..05783acf 100644 --- a/smart-admin-api-java17-springboot3/sa-admin/src/main/java/net/lab1024/sa/admin/module/system/position/domain/vo/PositionVO.java +++ b/smart-admin-api-java17-springboot3/sa-admin/src/main/java/net/lab1024/sa/admin/module/system/position/domain/vo/PositionVO.java @@ -23,7 +23,7 @@ public class PositionVO { private String positionName; @Schema(description = "职级") - private String level; + private String positionLevel; @Schema(description = "排序") private Integer sort; diff --git a/smart-admin-api-java17-springboot3/sa-admin/src/main/resources/dev/log4j2-spring.xml b/smart-admin-api-java17-springboot3/sa-admin/src/main/resources/dev/log4j2-spring.xml index 738304c7..cab3506a 100644 --- a/smart-admin-api-java17-springboot3/sa-admin/src/main/resources/dev/log4j2-spring.xml +++ b/smart-admin-api-java17-springboot3/sa-admin/src/main/resources/dev/log4j2-spring.xml @@ -5,15 +5,13 @@ --> - + - - + @@ -21,7 +19,7 @@ - + @@ -39,7 +37,7 @@ - + @@ -57,7 +55,7 @@ - + @@ -75,7 +73,7 @@ - + @@ -89,7 +87,7 @@ - + @@ -104,11 +102,9 @@ - - diff --git a/smart-admin-api-java17-springboot3/sa-admin/src/main/resources/pre/log4j2-spring.xml b/smart-admin-api-java17-springboot3/sa-admin/src/main/resources/pre/log4j2-spring.xml index d03ceca1..10fcc1c1 100644 --- a/smart-admin-api-java17-springboot3/sa-admin/src/main/resources/pre/log4j2-spring.xml +++ b/smart-admin-api-java17-springboot3/sa-admin/src/main/resources/pre/log4j2-spring.xml @@ -5,12 +5,12 @@ --> - + - + @@ -18,7 +18,7 @@ - + @@ -36,7 +36,7 @@ - + @@ -54,7 +54,7 @@ - + @@ -72,7 +72,7 @@ - + @@ -86,7 +86,7 @@ - + diff --git a/smart-admin-api-java17-springboot3/sa-admin/src/main/resources/prod/log4j2-spring.xml b/smart-admin-api-java17-springboot3/sa-admin/src/main/resources/prod/log4j2-spring.xml index e0b752ba..822d2763 100644 --- a/smart-admin-api-java17-springboot3/sa-admin/src/main/resources/prod/log4j2-spring.xml +++ b/smart-admin-api-java17-springboot3/sa-admin/src/main/resources/prod/log4j2-spring.xml @@ -5,12 +5,12 @@ --> - + - + @@ -18,7 +18,7 @@ - + @@ -36,7 +36,7 @@ - + @@ -54,7 +54,7 @@ - + @@ -72,7 +72,7 @@ - + @@ -86,7 +86,7 @@ - + diff --git a/smart-admin-api-java17-springboot3/sa-admin/src/main/resources/test/log4j2-spring.xml b/smart-admin-api-java17-springboot3/sa-admin/src/main/resources/test/log4j2-spring.xml index d03ceca1..10fcc1c1 100644 --- a/smart-admin-api-java17-springboot3/sa-admin/src/main/resources/test/log4j2-spring.xml +++ b/smart-admin-api-java17-springboot3/sa-admin/src/main/resources/test/log4j2-spring.xml @@ -5,12 +5,12 @@ --> - + - + @@ -18,7 +18,7 @@ - + @@ -36,7 +36,7 @@ - + @@ -54,7 +54,7 @@ - + @@ -72,7 +72,7 @@ - + @@ -86,7 +86,7 @@ - + diff --git a/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/config/CacheConfig.java b/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/config/CacheConfig.java index c1440361..902d5cf0 100644 --- a/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/config/CacheConfig.java +++ b/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/config/CacheConfig.java @@ -1,6 +1,7 @@ package net.lab1024.sa.base.config; import com.alibaba.fastjson.support.spring.GenericFastJsonRedisSerializer; +import jakarta.annotation.Resource; import net.lab1024.sa.base.module.support.cache.CacheService; import net.lab1024.sa.base.module.support.cache.CaffeineCacheServiceImpl; import net.lab1024.sa.base.module.support.cache.RedisCacheServiceImpl; @@ -8,6 +9,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.data.redis.cache.RedisCacheConfiguration; +import org.springframework.data.redis.connection.RedisConnectionFactory; import org.springframework.data.redis.serializer.RedisSerializationContext; /** @@ -22,14 +24,17 @@ public class CacheConfig { private static final String REDIS_CACHE = "redis"; private static final String CAFFEINE_CACHE = "caffeine"; + + @Resource + private RedisConnectionFactory factory; + @Bean @ConditionalOnProperty(prefix = "spring.cache", name = {"type"}, havingValue = REDIS_CACHE) public RedisCacheConfiguration redisCacheConfiguration() { return RedisCacheConfiguration.defaultCacheConfig() .disableCachingNullValues() .computePrefixWith(name -> "cache:" + name + ":") -// .serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(new GenericFastJsonRedisSerializer())); - ; + .serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(new GenericFastJsonRedisSerializer())); } @Bean diff --git a/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/domain/vo/TableVO.java b/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/domain/vo/TableVO.java index 8b6d4771..3c027308 100644 --- a/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/domain/vo/TableVO.java +++ b/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/domain/vo/TableVO.java @@ -25,12 +25,6 @@ public class TableVO { @Schema(description = "表备注") private String tableComment; - @Schema(description = "创建时间") - private LocalDateTime createTime; - - @Schema(description = "更新时间") - private LocalDateTime updateTime; - @Schema(description = "配置时间") private LocalDateTime configTime; diff --git a/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/CodeGeneratorService.java b/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/CodeGeneratorService.java index 2976097a..f8918480 100644 --- a/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/CodeGeneratorService.java +++ b/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/CodeGeneratorService.java @@ -156,7 +156,7 @@ public class CodeGeneratorService { List tableColumns = getTableColumns(form.getTableName()); if (null != form.getDeleteInfo() && form.getDeleteInfo().getIsSupportDelete() && !form.getDeleteInfo().getIsPhysicallyDeleted()) { Optional any = tableColumns.stream().filter(e -> e.getColumnName().equals(CodeGeneratorConstant.DELETED_FLAG)).findAny(); - if (any.isEmpty()) { + if (!any.isPresent()) { return ResponseDTO.userErrorParam("表结构中没有假删字段:" + CodeGeneratorConstant.DELETED_FLAG + ",请仔细排查"); } } diff --git a/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/CodeGeneratorTemplateService.java b/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/CodeGeneratorTemplateService.java index 930d73bf..d7675eee 100644 --- a/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/CodeGeneratorTemplateService.java +++ b/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/CodeGeneratorTemplateService.java @@ -33,7 +33,6 @@ import org.springframework.stereotype.Service; import java.io.File; import java.io.OutputStream; import java.io.StringWriter; -import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.util.*; import java.util.stream.Collectors; @@ -75,6 +74,11 @@ public class CodeGeneratorTemplateService { map.put("js/const.js", new ConstVariableService()); map.put("js/list.vue", new ListVariableService()); map.put("js/form.vue", new FormVariableService()); + // ts前端 + map.put("ts/api.ts", new ApiVariableService()); + map.put("ts/const.ts", new ConstVariableService()); + map.put("ts/list.vue", new ListVariableService()); + map.put("ts/form.vue", new FormVariableService()); } public void zipGeneratedFiles(OutputStream outputStream, String tableName, CodeGeneratorConfigEntity codeGeneratorConfigEntity) { diff --git a/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/variable/backend/domain/AddFormVariableService.java b/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/variable/backend/domain/AddFormVariableService.java index 0df8d332..57847bf1 100644 --- a/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/variable/backend/domain/AddFormVariableService.java +++ b/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/variable/backend/domain/AddFormVariableService.java @@ -103,9 +103,9 @@ public class AddFormVariableService extends CodeGenerateBaseVariableService { //字典 if (SmartStringUtil.isNotEmpty(codeField.getDict())) { - finalFieldMap.put("dict", "\n @JsonDeserialize(using = DictValueVoDeserializer.class)"); + finalFieldMap.put("dict", "\n @JsonDeserialize(using = DictDataDeserializer.class)"); packageList.add("import com.fasterxml.jackson.databind.annotation.JsonDeserialize;"); - packageList.add("import net.lab1024.sa.base.common.json.deserializer.DictValueVoDeserializer;"); + packageList.add("import net.lab1024.sa.base.common.json.deserializer.DictDataDeserializer;"); } //文件上传 diff --git a/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/variable/backend/domain/QueryFormVariableService.java b/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/variable/backend/domain/QueryFormVariableService.java index 4101d5e0..028275b2 100644 --- a/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/variable/backend/domain/QueryFormVariableService.java +++ b/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/variable/backend/domain/QueryFormVariableService.java @@ -106,9 +106,9 @@ public class QueryFormVariableService extends CodeGenerateBaseVariableService { case DICT: codeField = getCodeFieldByColumnName(field.getColumnNameList().get(0), form); if (SmartStringUtil.isNotEmpty(codeField.getDict())) { - finalFieldMap.put("dict", "\n @JsonDeserialize(using = DictValueVoDeserializer.class)"); + finalFieldMap.put("dict", "\n @JsonDeserialize(using = DictDataDeserializer.class)"); packageList.add("import com.fasterxml.jackson.databind.annotation.JsonDeserialize;"); - packageList.add("import net.lab1024.sa.base.common.json.deserializer.DictValueVoDeserializer;"); + packageList.add("import net.lab1024.sa.base.common.json.deserializer.DictDataDeserializer;"); } finalFieldMap.put("javaType", "String"); default: diff --git a/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/variable/backend/domain/UpdateFormVariableService.java b/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/variable/backend/domain/UpdateFormVariableService.java index a3cfb439..3d1e1689 100644 --- a/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/variable/backend/domain/UpdateFormVariableService.java +++ b/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/variable/backend/domain/UpdateFormVariableService.java @@ -118,9 +118,9 @@ public class UpdateFormVariableService extends CodeGenerateBaseVariableService { //字典 if (SmartStringUtil.isNotEmpty(codeField.getDict())) { - finalFieldMap.put("dict", "\n @JsonDeserialize(using = DictValueVoDeserializer.class)"); + finalFieldMap.put("dict", "\n @JsonDeserialize(using = DictDataDeserializer.class)"); packageList.add("import com.fasterxml.jackson.databind.annotation.JsonDeserialize;"); - packageList.add("import net.lab1024.sa.base.common.json.deserializer.DictValueVoDeserializer;"); + packageList.add("import net.lab1024.sa.base.common.json.deserializer.DictDataDeserializer;"); } //文件上传 diff --git a/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/variable/front/ListVariableService.java b/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/variable/front/ListVariableService.java index dc5e6358..4f626a93 100644 --- a/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/variable/front/ListVariableService.java +++ b/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/variable/front/ListVariableService.java @@ -46,7 +46,7 @@ public class ListVariableService extends CodeGenerateBaseVariableService { CodeField codeField = getCodeFieldByColumnName(queryField.getColumnNameList().get(0), form); - if (CodeQueryFieldQueryTypeEnum.ENUM.equalsValue(queryField.getQueryTypeEnum())) { + if (CodeQueryFieldQueryTypeEnum.ENUM.equalsValue(queryField.getQueryTypeEnum()) && SmartStringUtil.isNotBlank(codeField.getEnumName())) { String upperUnderscoreEnum = CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, codeField.getEnumName()); objectMap.put("frontEnumName", upperUnderscoreEnum); frontImportSet.add("import SmartEnumSelect from '/@/components/framework/smart-enum-select/index.vue';"); diff --git a/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/dict/domain/vo/DictDataVO.java b/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/dict/domain/vo/DictDataVO.java index fe940b1b..1fdd6fb5 100644 --- a/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/dict/domain/vo/DictDataVO.java +++ b/smart-admin-api-java17-springboot3/sa-base/src/main/java/net/lab1024/sa/base/module/support/dict/domain/vo/DictDataVO.java @@ -3,6 +3,7 @@ package net.lab1024.sa.base.module.support.dict.domain.vo; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import java.io.Serializable; import java.time.LocalDateTime; /** @@ -25,6 +26,12 @@ public class DictDataVO implements Serializable { @Schema(description = "字典编码") private String dictCode; + @Schema(description = "字典名字") + private String dictName; + + @Schema(description = "字典禁用状态") + private Integer dictDisabledFlag; + @Schema(description = "字典项值") private String dataValue; diff --git a/smart-admin-api-java17-springboot3/sa-base/src/main/resources/code-generator-template/ts/api.ts.vm b/smart-admin-api-java17-springboot3/sa-base/src/main/resources/code-generator-template/ts/api.ts.vm new file mode 100644 index 00000000..b249d0c2 --- /dev/null +++ b/smart-admin-api-java17-springboot3/sa-base/src/main/resources/code-generator-template/ts/api.ts.vm @@ -0,0 +1,78 @@ +/** + * ${basic.description} api 封装 + * + * @Author: ${basic.frontAuthor} + * @Date: ${basic.frontDate} + * @Copyright ${basic.copyright} + */ +import { postRequest, getRequest } from '/@/lib/axios'; + +export const ${name.lowerCamel}Api = { + + /** + * 分页查询 @author ${basic.frontAuthor} + */ + queryPage : (param) => { + return postRequest('/${name.lowerCamel}/queryPage', param); + }, + + /** + * 增加 @author ${basic.frontAuthor} + */ + add: (param) => { + return postRequest('/${name.lowerCamel}/add', param); + }, + + /** + * 修改 @author ${basic.frontAuthor} + */ + update: (param) => { + return postRequest('/${name.lowerCamel}/update', param); + }, +## ------------------ 详情 ------------------ + +#if($deleteInfo.isSupportDetail) + /** + * 获取详情 @author ${basic.frontAuthor} + */ + getDetail: (id) => { + return getRequest(`/${name.lowerCamel}/getDetail/\${id}`); + }, +#end + +## ------------------ 删除 ------------------ +#if($deleteInfo.isSupportDelete) + #if($deleteInfo.deleteEnum == 'Single') + /** + * 删除 @author ${basic.frontAuthor} + */ + delete: (id) => { + return getRequest(`/${name.lowerCamel}/delete/${id}`); + }, + #end + #if($deleteInfo.deleteEnum == 'Batch') + /** + * 批量删除 @author ${basic.frontAuthor} + */ + batchDelete: (idList) => { + return postRequest('/${name.lowerCamel}/batchDelete', idList); + }, + #end + #if($deleteInfo.deleteEnum == 'SingleAndBatch') + /** + * 删除 @author ${basic.frontAuthor} + */ + delete: (id) => { + return getRequest(`/${name.lowerCamel}/delete/${id}`); + }, + + /** + * 批量删除 @author ${basic.frontAuthor} + */ + batchDelete: (idList) => { + return postRequest('/${name.lowerCamel}/batchDelete', idList); + }, + #end +#end + +}; diff --git a/smart-admin-api-java17-springboot3/sa-base/src/main/resources/code-generator-template/ts/const.ts.vm b/smart-admin-api-java17-springboot3/sa-base/src/main/resources/code-generator-template/ts/const.ts.vm new file mode 100644 index 00000000..30ca06a3 --- /dev/null +++ b/smart-admin-api-java17-springboot3/sa-base/src/main/resources/code-generator-template/ts/const.ts.vm @@ -0,0 +1,23 @@ +/** + * ${basic.description} 枚举 + * + * @Author: ${basic.frontAuthor} + * @Date: ${basic.frontDate} + * @Copyright ${basic.copyright} + */ + +#foreach ($enum in $enumList) + +/** + * $enum.columnComment + */ +export const $enum.upperUnderscoreEnum = { + +} +#end + +export default { +#foreach ($enum in $enumList) + $enum.upperUnderscoreEnum, +#end +}; \ No newline at end of file diff --git a/smart-admin-api-java17-springboot3/sa-base/src/main/resources/code-generator-template/ts/form.vue.vm b/smart-admin-api-java17-springboot3/sa-base/src/main/resources/code-generator-template/ts/form.vue.vm new file mode 100644 index 00000000..6e21ce79 --- /dev/null +++ b/smart-admin-api-java17-springboot3/sa-base/src/main/resources/code-generator-template/ts/form.vue.vm @@ -0,0 +1,239 @@ + + + + +#if($insertAndUpdate.countPerLine == 1) + #foreach ($field in $formFields) + #if($field.frontComponent == "Input") + + + + #end + #if($field.frontComponent == "InputNumber") + + + + #end + #if($field.frontComponent == "Textarea") + + + + #end + #if($field.frontComponent == "BooleanSelect") + + + + #end + #if($field.frontComponent == "SmartEnumSelect") + + + + #end + #if($field.frontComponent == "DictSelect") + + + + #end + #if($field.frontComponent == "Date") + + + + #end + #if($field.frontComponent == "DateTime") + + + + #end + #if($field.frontComponent == "FileUpload") + + form.$!{field.fieldName} = e" + /> + + #end + #end +#end + #if($insertAndUpdate.countPerLine > 1) + + #set($span=24 / $!insertAndUpdate.countPerLine ) + #foreach ($field in $formFields) + + #if($field.frontComponent == "Input") + + + + #end + #if($field.frontComponent == "InputNumber") + + + + #end + #if($field.frontComponent == "Textarea") + + + + #end + #if($field.frontComponent == "BooleanSelect") + + + + #end + #if($field.frontComponent == "SmartEnumSelect") + + + + #end + #if($field.frontComponent == "DictSelect") + + + + #end + #if($field.frontComponent == "Date") + + + + #end + #if($field.frontComponent == "DateTime") + + + + #end + #if($field.frontComponent == "FileUpload") + + form.$!{field.fieldName} = e" + /> + + #end + + #end + + #end + + + + + 取消 + 保存 + + + + + diff --git a/smart-admin-api-java17-springboot3/sa-base/src/main/resources/code-generator-template/ts/list.vue.vm b/smart-admin-api-java17-springboot3/sa-base/src/main/resources/code-generator-template/ts/list.vue.vm new file mode 100644 index 00000000..11747b09 --- /dev/null +++ b/smart-admin-api-java17-springboot3/sa-base/src/main/resources/code-generator-template/ts/list.vue.vm @@ -0,0 +1,348 @@ + + + + + +#foreach ($field in $queryFields) +#if($field.queryTypeEnum == "Like") + + + +#end +#if($field.queryTypeEnum == "Equal") + + + +#end +#if($field.queryTypeEnum == "Dict") + + + +#end +#if($field.queryTypeEnum == "Enum") + + + +#end +#if($field.queryTypeEnum == "Date") + + + +#end +#if($field.queryTypeEnum == "DateRange") + + + +#end +#end + + + + + + 查询 + + + + + + 重置 + + + + + + + + + + +#if($insertAndUpdate.isSupportInsertAndUpdate) + + + + + 新建 + +#end +#if($deleteInfo.isSupportDelete && ($deleteInfo.deleteEnum == "Batch"||$deleteInfo.deleteEnum == "SingleAndBatch")) + + + + + 批量删除 + +#end + + + + + + + + + + + + #foreach ($field in $listFields) + #if($field.frontComponent == "FileUpload") + + + + #end + #end + #foreach ($field in $listFields) + #if($field.frontEnumPlugin) + + {{ $!{field.frontEnumPlugin} }} + + #end + #end + #foreach ($field in $listFields) + #if($field.dict) + + + + #end + #end + + + +#if($insertAndUpdate.isSupportInsertAndUpdate) + 编辑 +#end +#if($deleteInfo.isSupportDelete && ($deleteInfo.deleteEnum == "Single"||$deleteInfo.deleteEnum == "SingleAndBatch")) + 删除 +#end + + + + + + + + + + + <$!{name.upperCamel}Form ref="formRef" @reloadList="queryData"/> + + + + diff --git a/smart-admin-api-java17-springboot3/sa-base/src/main/resources/mapper/support/CodeGeneratorMapper.xml b/smart-admin-api-java17-springboot3/sa-base/src/main/resources/mapper/support/CodeGeneratorMapper.xml index f9cab77f..de229357 100644 --- a/smart-admin-api-java17-springboot3/sa-base/src/main/resources/mapper/support/CodeGeneratorMapper.xml +++ b/smart-admin-api-java17-springboot3/sa-base/src/main/resources/mapper/support/CodeGeneratorMapper.xml @@ -21,8 +21,6 @@ select `tables`.table_name, `tables`.table_comment, - `tables`.create_time, - `tables`.update_time, t_code_generator_config.update_time configTime from information_schema.tables `tables` left join t_code_generator_config on `tables`.table_name = t_code_generator_config.table_name diff --git a/smart-admin-api-java17-springboot3/sa-base/src/main/resources/mapper/support/DictDataMapper.xml b/smart-admin-api-java17-springboot3/sa-base/src/main/resources/mapper/support/DictDataMapper.xml index b29468de..83978833 100644 --- a/smart-admin-api-java17-springboot3/sa-base/src/main/resources/mapper/support/DictDataMapper.xml +++ b/smart-admin-api-java17-springboot3/sa-base/src/main/resources/mapper/support/DictDataMapper.xml @@ -12,7 +12,9 @@ select t_dict_data.*, - t_dict.dict_code + t_dict.dict_code, + t_dict.dict_name, + t_dict.disabled_flag dictDisabledFlag from t_dict_data left join t_dict on t_dict_data.dict_id = t_dict.dict_id order by t_dict_data.sort_order desc diff --git a/smart-admin-api-java17-springboot3/sa-base/src/main/resources/pre/sa-base.yaml b/smart-admin-api-java17-springboot3/sa-base/src/main/resources/pre/sa-base.yaml index d6802f47..2836bad0 100644 --- a/smart-admin-api-java17-springboot3/sa-base/src/main/resources/pre/sa-base.yaml +++ b/smart-admin-api-java17-springboot3/sa-base/src/main/resources/pre/sa-base.yaml @@ -134,7 +134,7 @@ reload: sa-token: # token 名称(同时也是 cookie 名称) token-name: Authorization - # token 前缀 例如:Bearer + # token 前缀 例如:Bear token-prefix: Bearer # token 有效期(单位:秒) 默认30天(2592000秒),-1 代表永久有效 timeout: 2592000 diff --git a/smart-admin-api-java17-springboot3/sa-base/src/main/resources/prod/sa-base.yaml b/smart-admin-api-java17-springboot3/sa-base/src/main/resources/prod/sa-base.yaml index 2156faab..3cf50f34 100644 --- a/smart-admin-api-java17-springboot3/sa-base/src/main/resources/prod/sa-base.yaml +++ b/smart-admin-api-java17-springboot3/sa-base/src/main/resources/prod/sa-base.yaml @@ -102,6 +102,7 @@ springdoc: enabled: true # 开关 doc-expansion: none #关闭展开 tags-sorter: alpha + server-base-url: https://preview.smartadmin.vip/smart-admin-api api-docs: enabled: true # 开关 knife4j: @@ -132,7 +133,7 @@ reload: sa-token: # token 名称(同时也是 cookie 名称) token-name: Authorization - # token 前缀 例如:Bearer + # token 前缀 例如:Bear token-prefix: Bearer # token 有效期(单位:秒) 默认30天(2592000秒),-1 代表永久有效 timeout: 2592000 diff --git a/smart-admin-api-java17-springboot3/sa-base/src/main/resources/test/sa-base.yaml b/smart-admin-api-java17-springboot3/sa-base/src/main/resources/test/sa-base.yaml index d6802f47..2836bad0 100644 --- a/smart-admin-api-java17-springboot3/sa-base/src/main/resources/test/sa-base.yaml +++ b/smart-admin-api-java17-springboot3/sa-base/src/main/resources/test/sa-base.yaml @@ -134,7 +134,7 @@ reload: sa-token: # token 名称(同时也是 cookie 名称) token-name: Authorization - # token 前缀 例如:Bearer + # token 前缀 例如:Bear token-prefix: Bearer # token 有效期(单位:秒) 默认30天(2592000秒),-1 代表永久有效 timeout: 2592000 diff --git a/smart-admin-api-java8-springboot2/pom.xml b/smart-admin-api-java8-springboot2/pom.xml index 91a8c38a..d50cdb78 100644 --- a/smart-admin-api-java8-springboot2/pom.xml +++ b/smart-admin-api-java8-springboot2/pom.xml @@ -27,11 +27,10 @@ 3.9.1 1.7.0 4.3.0 - 2.0.16 + 2.0.48 1.2.14 1.4.2 20.0 - 1.21 0.9.11 2.15.0 3.12.0 @@ -152,12 +151,6 @@ ${google-guava.version} - - eu.bitwalker - UserAgentUtils - ${user-agent-utils.version} - - org.reflections reflections diff --git a/smart-admin-api-java8-springboot2/sa-admin/src/main/java/net/lab1024/sa/admin/module/system/position/domain/entity/PositionEntity.java b/smart-admin-api-java8-springboot2/sa-admin/src/main/java/net/lab1024/sa/admin/module/system/position/domain/entity/PositionEntity.java index 0beac2a3..dd511bc6 100644 --- a/smart-admin-api-java8-springboot2/sa-admin/src/main/java/net/lab1024/sa/admin/module/system/position/domain/entity/PositionEntity.java +++ b/smart-admin-api-java8-springboot2/sa-admin/src/main/java/net/lab1024/sa/admin/module/system/position/domain/entity/PositionEntity.java @@ -34,7 +34,7 @@ public class PositionEntity { /** * 职级 */ - private String level; + private String positionLevel; /** * 排序 diff --git a/smart-admin-api-java8-springboot2/sa-admin/src/main/java/net/lab1024/sa/admin/module/system/position/domain/form/PositionAddForm.java b/smart-admin-api-java8-springboot2/sa-admin/src/main/java/net/lab1024/sa/admin/module/system/position/domain/form/PositionAddForm.java index 58d89ed8..f7d4d303 100644 --- a/smart-admin-api-java8-springboot2/sa-admin/src/main/java/net/lab1024/sa/admin/module/system/position/domain/form/PositionAddForm.java +++ b/smart-admin-api-java8-springboot2/sa-admin/src/main/java/net/lab1024/sa/admin/module/system/position/domain/form/PositionAddForm.java @@ -22,7 +22,7 @@ public class PositionAddForm { private String positionName; @Schema(description = "职级") - private String level; + private String positionLevel; @Schema(description = "排序") @NotNull(message = "排序不能为空") diff --git a/smart-admin-api-java8-springboot2/sa-admin/src/main/java/net/lab1024/sa/admin/module/system/position/domain/vo/PositionVO.java b/smart-admin-api-java8-springboot2/sa-admin/src/main/java/net/lab1024/sa/admin/module/system/position/domain/vo/PositionVO.java index ee178840..05783acf 100644 --- a/smart-admin-api-java8-springboot2/sa-admin/src/main/java/net/lab1024/sa/admin/module/system/position/domain/vo/PositionVO.java +++ b/smart-admin-api-java8-springboot2/sa-admin/src/main/java/net/lab1024/sa/admin/module/system/position/domain/vo/PositionVO.java @@ -23,7 +23,7 @@ public class PositionVO { private String positionName; @Schema(description = "职级") - private String level; + private String positionLevel; @Schema(description = "排序") private Integer sort; diff --git a/smart-admin-api-java8-springboot2/sa-admin/src/main/resources/dev/log4j2-spring.xml b/smart-admin-api-java8-springboot2/sa-admin/src/main/resources/dev/log4j2-spring.xml index 14e3eea5..cab3506a 100644 --- a/smart-admin-api-java8-springboot2/sa-admin/src/main/resources/dev/log4j2-spring.xml +++ b/smart-admin-api-java8-springboot2/sa-admin/src/main/resources/dev/log4j2-spring.xml @@ -5,12 +5,13 @@ --> - + - + @@ -18,7 +19,7 @@ - + @@ -36,7 +37,7 @@ - + @@ -54,7 +55,7 @@ - + @@ -72,7 +73,7 @@ - + @@ -86,7 +87,7 @@ - + @@ -101,11 +102,9 @@ - - diff --git a/smart-admin-api-java8-springboot2/sa-admin/src/main/resources/pre/log4j2-spring.xml b/smart-admin-api-java8-springboot2/sa-admin/src/main/resources/pre/log4j2-spring.xml index d03ceca1..10fcc1c1 100644 --- a/smart-admin-api-java8-springboot2/sa-admin/src/main/resources/pre/log4j2-spring.xml +++ b/smart-admin-api-java8-springboot2/sa-admin/src/main/resources/pre/log4j2-spring.xml @@ -5,12 +5,12 @@ --> - + - + @@ -18,7 +18,7 @@ - + @@ -36,7 +36,7 @@ - + @@ -54,7 +54,7 @@ - + @@ -72,7 +72,7 @@ - + @@ -86,7 +86,7 @@ - + diff --git a/smart-admin-api-java8-springboot2/sa-admin/src/main/resources/prod/log4j2-spring.xml b/smart-admin-api-java8-springboot2/sa-admin/src/main/resources/prod/log4j2-spring.xml index e0b752ba..822d2763 100644 --- a/smart-admin-api-java8-springboot2/sa-admin/src/main/resources/prod/log4j2-spring.xml +++ b/smart-admin-api-java8-springboot2/sa-admin/src/main/resources/prod/log4j2-spring.xml @@ -5,12 +5,12 @@ --> - + - + @@ -18,7 +18,7 @@ - + @@ -36,7 +36,7 @@ - + @@ -54,7 +54,7 @@ - + @@ -72,7 +72,7 @@ - + @@ -86,7 +86,7 @@ - + diff --git a/smart-admin-api-java8-springboot2/sa-admin/src/main/resources/test/log4j2-spring.xml b/smart-admin-api-java8-springboot2/sa-admin/src/main/resources/test/log4j2-spring.xml index d03ceca1..10fcc1c1 100644 --- a/smart-admin-api-java8-springboot2/sa-admin/src/main/resources/test/log4j2-spring.xml +++ b/smart-admin-api-java8-springboot2/sa-admin/src/main/resources/test/log4j2-spring.xml @@ -5,12 +5,12 @@ --> - + - + @@ -18,7 +18,7 @@ - + @@ -36,7 +36,7 @@ - + @@ -54,7 +54,7 @@ - + @@ -72,7 +72,7 @@ - + @@ -86,7 +86,7 @@ - + diff --git a/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/config/CacheConfig.java b/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/config/CacheConfig.java index 2881a4b8..5beb7413 100644 --- a/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/config/CacheConfig.java +++ b/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/config/CacheConfig.java @@ -35,8 +35,7 @@ public class CacheConfig { return RedisCacheConfiguration.defaultCacheConfig() .disableCachingNullValues() .computePrefixWith(name -> "cache:" + name + ":") -// .serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(new GenericFastJsonRedisSerializer())); - ; + .serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(new GenericFastJsonRedisSerializer())); } @Bean diff --git a/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/domain/vo/TableVO.java b/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/domain/vo/TableVO.java index 8b6d4771..3c027308 100644 --- a/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/domain/vo/TableVO.java +++ b/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/domain/vo/TableVO.java @@ -25,12 +25,6 @@ public class TableVO { @Schema(description = "表备注") private String tableComment; - @Schema(description = "创建时间") - private LocalDateTime createTime; - - @Schema(description = "更新时间") - private LocalDateTime updateTime; - @Schema(description = "配置时间") private LocalDateTime configTime; diff --git a/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/CodeGeneratorTemplateService.java b/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/CodeGeneratorTemplateService.java index eb2673f0..507e323b 100644 --- a/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/CodeGeneratorTemplateService.java +++ b/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/CodeGeneratorTemplateService.java @@ -74,6 +74,11 @@ public class CodeGeneratorTemplateService { map.put("js/const.js", new ConstVariableService()); map.put("js/list.vue", new ListVariableService()); map.put("js/form.vue", new FormVariableService()); + // ts前端 + map.put("ts/api.ts", new ApiVariableService()); + map.put("ts/const.ts", new ConstVariableService()); + map.put("ts/list.vue", new ListVariableService()); + map.put("ts/form.vue", new FormVariableService()); } public void zipGeneratedFiles(OutputStream outputStream, String tableName, CodeGeneratorConfigEntity codeGeneratorConfigEntity) { diff --git a/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/variable/backend/domain/AddFormVariableService.java b/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/variable/backend/domain/AddFormVariableService.java index 1d29259a..23612e47 100644 --- a/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/variable/backend/domain/AddFormVariableService.java +++ b/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/variable/backend/domain/AddFormVariableService.java @@ -103,9 +103,9 @@ public class AddFormVariableService extends CodeGenerateBaseVariableService { //字典 if (SmartStringUtil.isNotEmpty(codeField.getDict())) { - finalFieldMap.put("dict", "\n @JsonDeserialize(using = DictValueVoDeserializer.class)"); + finalFieldMap.put("dict", "\n @JsonDeserialize(using = DictDataDeserializer.class)"); packageList.add("import com.fasterxml.jackson.databind.annotation.JsonDeserialize;"); - packageList.add("import net.lab1024.sa.base.common.json.deserializer.DictValueVoDeserializer;"); + packageList.add("import net.lab1024.sa.base.common.json.deserializer.DictDataDeserializer;"); } //文件上传 diff --git a/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/variable/backend/domain/QueryFormVariableService.java b/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/variable/backend/domain/QueryFormVariableService.java index 86780e0a..ef1f4398 100644 --- a/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/variable/backend/domain/QueryFormVariableService.java +++ b/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/variable/backend/domain/QueryFormVariableService.java @@ -107,9 +107,9 @@ public class QueryFormVariableService extends CodeGenerateBaseVariableService { case DICT: codeField = getCodeFieldByColumnName(field.getColumnNameList().get(0), form); if (SmartStringUtil.isNotEmpty(codeField.getDict())) { - finalFieldMap.put("dict", "\n @JsonDeserialize(using = DictValueVoDeserializer.class)"); + finalFieldMap.put("dict", "\n @JsonDeserialize(using = DictDataDeserializer.class)"); packageList.add("import com.fasterxml.jackson.databind.annotation.JsonDeserialize;"); - packageList.add("import net.lab1024.sa.base.common.json.deserializer.DictValueVoDeserializer;"); + packageList.add("import net.lab1024.sa.base.common.json.deserializer.DictDataDeserializer;"); } finalFieldMap.put("javaType", "String"); default: diff --git a/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/variable/backend/domain/UpdateFormVariableService.java b/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/variable/backend/domain/UpdateFormVariableService.java index 004e7670..f8d26377 100644 --- a/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/variable/backend/domain/UpdateFormVariableService.java +++ b/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/variable/backend/domain/UpdateFormVariableService.java @@ -118,9 +118,9 @@ public class UpdateFormVariableService extends CodeGenerateBaseVariableService { //字典 if (SmartStringUtil.isNotEmpty(codeField.getDict())) { - finalFieldMap.put("dict", "\n @JsonDeserialize(using = DictValueVoDeserializer.class)"); + finalFieldMap.put("dict", "\n @JsonDeserialize(using = DictDataDeserializer.class)"); packageList.add("import com.fasterxml.jackson.databind.annotation.JsonDeserialize;"); - packageList.add("import net.lab1024.sa.base.common.json.deserializer.DictValueVoDeserializer;"); + packageList.add("import net.lab1024.sa.base.common.json.deserializer.DictDataDeserializer;"); } //文件上传 diff --git a/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/variable/front/ListVariableService.java b/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/variable/front/ListVariableService.java index 4bce8e19..0fee7352 100644 --- a/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/variable/front/ListVariableService.java +++ b/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/codegenerator/service/variable/front/ListVariableService.java @@ -47,7 +47,7 @@ public class ListVariableService extends CodeGenerateBaseVariableService { CodeField codeField = getCodeFieldByColumnName(queryField.getColumnNameList().get(0), form); - if (CodeQueryFieldQueryTypeEnum.ENUM.equalsValue(queryField.getQueryTypeEnum())) { + if (CodeQueryFieldQueryTypeEnum.ENUM.equalsValue(queryField.getQueryTypeEnum()) && SmartStringUtil.isNotBlank(codeField.getEnumName())) { String upperUnderscoreEnum = CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, codeField.getEnumName()); objectMap.put("frontEnumName", upperUnderscoreEnum); frontImportSet.add("import SmartEnumSelect from '/@/components/framework/smart-enum-select/index.vue';"); diff --git a/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/dict/domain/vo/DictDataVO.java b/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/dict/domain/vo/DictDataVO.java index 8dc19f34..1fdd6fb5 100644 --- a/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/dict/domain/vo/DictDataVO.java +++ b/smart-admin-api-java8-springboot2/sa-base/src/main/java/net/lab1024/sa/base/module/support/dict/domain/vo/DictDataVO.java @@ -3,6 +3,7 @@ package net.lab1024.sa.base.module.support.dict.domain.vo; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import java.io.Serializable; import java.time.LocalDateTime; /** @@ -14,7 +15,7 @@ import java.time.LocalDateTime; */ @Data -public class DictDataVO { +public class DictDataVO implements Serializable { @Schema(description = "字典数据id") private Long dictDataId; @@ -25,6 +26,12 @@ public class DictDataVO { @Schema(description = "字典编码") private String dictCode; + @Schema(description = "字典名字") + private String dictName; + + @Schema(description = "字典禁用状态") + private Integer dictDisabledFlag; + @Schema(description = "字典项值") private String dataValue; diff --git a/smart-admin-api-java8-springboot2/sa-base/src/main/resources/code-generator-template/ts/api.ts.vm b/smart-admin-api-java8-springboot2/sa-base/src/main/resources/code-generator-template/ts/api.ts.vm new file mode 100644 index 00000000..b249d0c2 --- /dev/null +++ b/smart-admin-api-java8-springboot2/sa-base/src/main/resources/code-generator-template/ts/api.ts.vm @@ -0,0 +1,78 @@ +/** + * ${basic.description} api 封装 + * + * @Author: ${basic.frontAuthor} + * @Date: ${basic.frontDate} + * @Copyright ${basic.copyright} + */ +import { postRequest, getRequest } from '/@/lib/axios'; + +export const ${name.lowerCamel}Api = { + + /** + * 分页查询 @author ${basic.frontAuthor} + */ + queryPage : (param) => { + return postRequest('/${name.lowerCamel}/queryPage', param); + }, + + /** + * 增加 @author ${basic.frontAuthor} + */ + add: (param) => { + return postRequest('/${name.lowerCamel}/add', param); + }, + + /** + * 修改 @author ${basic.frontAuthor} + */ + update: (param) => { + return postRequest('/${name.lowerCamel}/update', param); + }, +## ------------------ 详情 ------------------ + +#if($deleteInfo.isSupportDetail) + /** + * 获取详情 @author ${basic.frontAuthor} + */ + getDetail: (id) => { + return getRequest(`/${name.lowerCamel}/getDetail/\${id}`); + }, +#end + +## ------------------ 删除 ------------------ +#if($deleteInfo.isSupportDelete) + #if($deleteInfo.deleteEnum == 'Single') + /** + * 删除 @author ${basic.frontAuthor} + */ + delete: (id) => { + return getRequest(`/${name.lowerCamel}/delete/${id}`); + }, + #end + #if($deleteInfo.deleteEnum == 'Batch') + /** + * 批量删除 @author ${basic.frontAuthor} + */ + batchDelete: (idList) => { + return postRequest('/${name.lowerCamel}/batchDelete', idList); + }, + #end + #if($deleteInfo.deleteEnum == 'SingleAndBatch') + /** + * 删除 @author ${basic.frontAuthor} + */ + delete: (id) => { + return getRequest(`/${name.lowerCamel}/delete/${id}`); + }, + + /** + * 批量删除 @author ${basic.frontAuthor} + */ + batchDelete: (idList) => { + return postRequest('/${name.lowerCamel}/batchDelete', idList); + }, + #end +#end + +}; diff --git a/smart-admin-api-java8-springboot2/sa-base/src/main/resources/code-generator-template/ts/const.ts.vm b/smart-admin-api-java8-springboot2/sa-base/src/main/resources/code-generator-template/ts/const.ts.vm new file mode 100644 index 00000000..30ca06a3 --- /dev/null +++ b/smart-admin-api-java8-springboot2/sa-base/src/main/resources/code-generator-template/ts/const.ts.vm @@ -0,0 +1,23 @@ +/** + * ${basic.description} 枚举 + * + * @Author: ${basic.frontAuthor} + * @Date: ${basic.frontDate} + * @Copyright ${basic.copyright} + */ + +#foreach ($enum in $enumList) + +/** + * $enum.columnComment + */ +export const $enum.upperUnderscoreEnum = { + +} +#end + +export default { +#foreach ($enum in $enumList) + $enum.upperUnderscoreEnum, +#end +}; \ No newline at end of file diff --git a/smart-admin-api-java8-springboot2/sa-base/src/main/resources/code-generator-template/ts/form.vue.vm b/smart-admin-api-java8-springboot2/sa-base/src/main/resources/code-generator-template/ts/form.vue.vm new file mode 100644 index 00000000..6e21ce79 --- /dev/null +++ b/smart-admin-api-java8-springboot2/sa-base/src/main/resources/code-generator-template/ts/form.vue.vm @@ -0,0 +1,239 @@ + + + + +#if($insertAndUpdate.countPerLine == 1) + #foreach ($field in $formFields) + #if($field.frontComponent == "Input") + + + + #end + #if($field.frontComponent == "InputNumber") + + + + #end + #if($field.frontComponent == "Textarea") + + + + #end + #if($field.frontComponent == "BooleanSelect") + + + + #end + #if($field.frontComponent == "SmartEnumSelect") + + + + #end + #if($field.frontComponent == "DictSelect") + + + + #end + #if($field.frontComponent == "Date") + + + + #end + #if($field.frontComponent == "DateTime") + + + + #end + #if($field.frontComponent == "FileUpload") + + form.$!{field.fieldName} = e" + /> + + #end + #end +#end + #if($insertAndUpdate.countPerLine > 1) + + #set($span=24 / $!insertAndUpdate.countPerLine ) + #foreach ($field in $formFields) + + #if($field.frontComponent == "Input") + + + + #end + #if($field.frontComponent == "InputNumber") + + + + #end + #if($field.frontComponent == "Textarea") + + + + #end + #if($field.frontComponent == "BooleanSelect") + + + + #end + #if($field.frontComponent == "SmartEnumSelect") + + + + #end + #if($field.frontComponent == "DictSelect") + + + + #end + #if($field.frontComponent == "Date") + + + + #end + #if($field.frontComponent == "DateTime") + + + + #end + #if($field.frontComponent == "FileUpload") + + form.$!{field.fieldName} = e" + /> + + #end + + #end + + #end + + + + + 取消 + 保存 + + + + + diff --git a/smart-admin-api-java8-springboot2/sa-base/src/main/resources/code-generator-template/ts/list.vue.vm b/smart-admin-api-java8-springboot2/sa-base/src/main/resources/code-generator-template/ts/list.vue.vm new file mode 100644 index 00000000..11747b09 --- /dev/null +++ b/smart-admin-api-java8-springboot2/sa-base/src/main/resources/code-generator-template/ts/list.vue.vm @@ -0,0 +1,348 @@ + + + + + +#foreach ($field in $queryFields) +#if($field.queryTypeEnum == "Like") + + + +#end +#if($field.queryTypeEnum == "Equal") + + + +#end +#if($field.queryTypeEnum == "Dict") + + + +#end +#if($field.queryTypeEnum == "Enum") + + + +#end +#if($field.queryTypeEnum == "Date") + + + +#end +#if($field.queryTypeEnum == "DateRange") + + + +#end +#end + + + + + + 查询 + + + + + + 重置 + + + + + + + + + + +#if($insertAndUpdate.isSupportInsertAndUpdate) + + + + + 新建 + +#end +#if($deleteInfo.isSupportDelete && ($deleteInfo.deleteEnum == "Batch"||$deleteInfo.deleteEnum == "SingleAndBatch")) + + + + + 批量删除 + +#end + + + + + + + + + + + + #foreach ($field in $listFields) + #if($field.frontComponent == "FileUpload") + + + + #end + #end + #foreach ($field in $listFields) + #if($field.frontEnumPlugin) + + {{ $!{field.frontEnumPlugin} }} + + #end + #end + #foreach ($field in $listFields) + #if($field.dict) + + + + #end + #end + + + +#if($insertAndUpdate.isSupportInsertAndUpdate) + 编辑 +#end +#if($deleteInfo.isSupportDelete && ($deleteInfo.deleteEnum == "Single"||$deleteInfo.deleteEnum == "SingleAndBatch")) + 删除 +#end + + + + + + + + + + + <$!{name.upperCamel}Form ref="formRef" @reloadList="queryData"/> + + + + diff --git a/smart-admin-api-java8-springboot2/sa-base/src/main/resources/mapper/support/CodeGeneratorMapper.xml b/smart-admin-api-java8-springboot2/sa-base/src/main/resources/mapper/support/CodeGeneratorMapper.xml index f9cab77f..de229357 100644 --- a/smart-admin-api-java8-springboot2/sa-base/src/main/resources/mapper/support/CodeGeneratorMapper.xml +++ b/smart-admin-api-java8-springboot2/sa-base/src/main/resources/mapper/support/CodeGeneratorMapper.xml @@ -21,8 +21,6 @@ select `tables`.table_name, `tables`.table_comment, - `tables`.create_time, - `tables`.update_time, t_code_generator_config.update_time configTime from information_schema.tables `tables` left join t_code_generator_config on `tables`.table_name = t_code_generator_config.table_name diff --git a/smart-admin-api-java8-springboot2/sa-base/src/main/resources/mapper/support/DictDataMapper.xml b/smart-admin-api-java8-springboot2/sa-base/src/main/resources/mapper/support/DictDataMapper.xml index b29468de..83978833 100644 --- a/smart-admin-api-java8-springboot2/sa-base/src/main/resources/mapper/support/DictDataMapper.xml +++ b/smart-admin-api-java8-springboot2/sa-base/src/main/resources/mapper/support/DictDataMapper.xml @@ -12,7 +12,9 @@ select t_dict_data.*, - t_dict.dict_code + t_dict.dict_code, + t_dict.dict_name, + t_dict.disabled_flag dictDisabledFlag from t_dict_data left join t_dict on t_dict_data.dict_id = t_dict.dict_id order by t_dict_data.sort_order desc diff --git a/smart-admin-web-javascript/src/components/support/dict-code-select/index.vue b/smart-admin-web-javascript/src/components/support/dict-code-select/index.vue index 73945036..dbd18d3d 100644 --- a/smart-admin-web-javascript/src/components/support/dict-code-select/index.vue +++ b/smart-admin-web-javascript/src/components/support/dict-code-select/index.vue @@ -28,12 +28,8 @@ - \ No newline at end of file + diff --git a/smart-admin-web-javascript/src/views/support/code-generator/components/form/code-generator-table-config-form-insert-and-update.vue b/smart-admin-web-javascript/src/views/support/code-generator/components/form/code-generator-table-config-form-insert-and-update.vue index d5477431..cbd6ec99 100644 --- a/smart-admin-web-javascript/src/views/support/code-generator/components/form/code-generator-table-config-form-insert-and-update.vue +++ b/smart-admin-web-javascript/src/views/support/code-generator/components/form/code-generator-table-config-form-insert-and-update.vue @@ -87,7 +87,7 @@ - 非空 + 非空 @@ -222,8 +222,8 @@ }; //表单 - field.requiredFlag = configField ? configField.requiredFlag : field.nullableFlag; - field.insertFlag = configField ? configField.insertFlag : field.nullableFlag; + field.requiredFlag = configField ? configField.requiredFlag : !field.nullableFlag; + field.insertFlag = configField ? configField.insertFlag : !field.nullableFlag; field.updateFlag = configField ? configField.updateFlag : false; if (configField && configField.frontComponent) { diff --git a/smart-admin-web-javascript/src/views/support/dict/components/dict-form-modal.vue b/smart-admin-web-javascript/src/views/support/dict/components/dict-form-modal.vue index 08bdde52..5641a333 100644 --- a/smart-admin-web-javascript/src/views/support/dict/components/dict-form-modal.vue +++ b/smart-admin-web-javascript/src/views/support/dict/components/dict-form-modal.vue @@ -19,7 +19,7 @@ - + diff --git a/smart-admin-web-javascript/src/views/system/position/position-form.vue b/smart-admin-web-javascript/src/views/system/position/position-form.vue index 4d779216..24f33e25 100644 --- a/smart-admin-web-javascript/src/views/system/position/position-form.vue +++ b/smart-admin-web-javascript/src/views/system/position/position-form.vue @@ -19,8 +19,8 @@ - - + + @@ -92,7 +92,7 @@ const formDefault = { positionId: undefined, positionName: undefined, //职务名称 - level: undefined, //职纪 + positionLevel: undefined, //职纪 sort: 0, remark: undefined, //备注 }; diff --git a/smart-admin-web-javascript/src/views/system/position/position-list.vue b/smart-admin-web-javascript/src/views/system/position/position-list.vue index f7b0c44b..31d16322 100644 --- a/smart-admin-web-javascript/src/views/system/position/position-list.vue +++ b/smart-admin-web-javascript/src/views/system/position/position-list.vue @@ -115,7 +115,7 @@ }, { title: '职级', - dataIndex: 'level', + dataIndex: 'positionLevel', ellipsis: true, }, { diff --git a/smart-admin-web-javascript/vite.config.js b/smart-admin-web-javascript/vite.config.js index 301c54e9..cb985b40 100644 --- a/smart-admin-web-javascript/vite.config.js +++ b/smart-admin-web-javascript/vite.config.js @@ -35,10 +35,19 @@ export default { }, ], }, - // 服务端渲染 server: { host: '0.0.0.0', port: 8081, + server: { + proxy: { + // 代理路径 + '/': { + target: 'http://127.0.0.1:1024/', // 目标服务器地址 + changeOrigin: true, // 是否修改请求头中的 Origin 字段 + rewrite: (path) => path, // 重写路径 + }, + }, + } }, plugins: [vue()], optimizeDeps: { diff --git a/smart-admin-web-typescript/src/App.vue b/smart-admin-web-typescript/src/App.vue index 660670a0..86f19c43 100644 --- a/smart-admin-web-typescript/src/App.vue +++ b/smart-admin-web-typescript/src/App.vue @@ -89,6 +89,7 @@ return text; } } + \ No newline at end of file + diff --git a/smart-admin-web-typescript/src/views/support/code-generator/components/form/code-generator-table-config-form-insert-and-update.vue b/smart-admin-web-typescript/src/views/support/code-generator/components/form/code-generator-table-config-form-insert-and-update.vue index ca71781a..b6b499e9 100644 --- a/smart-admin-web-typescript/src/views/support/code-generator/components/form/code-generator-table-config-form-insert-and-update.vue +++ b/smart-admin-web-typescript/src/views/support/code-generator/components/form/code-generator-table-config-form-insert-and-update.vue @@ -87,7 +87,7 @@ - 非空 + 非空 @@ -222,8 +222,8 @@ }; //表单 - field.requiredFlag = configField ? configField.requiredFlag : field.nullableFlag; - field.insertFlag = configField ? configField.insertFlag : field.nullableFlag; + field.requiredFlag = configField ? configField.requiredFlag : !field.nullableFlag; + field.insertFlag = configField ? configField.insertFlag : !field.nullableFlag; field.updateFlag = configField ? configField.updateFlag : false; if (configField && configField.frontComponent) { diff --git a/smart-admin-web-typescript/src/views/support/dict/components/dict-form-modal.vue b/smart-admin-web-typescript/src/views/support/dict/components/dict-form-modal.vue index 72c2e099..3b4a494a 100644 --- a/smart-admin-web-typescript/src/views/support/dict/components/dict-form-modal.vue +++ b/smart-admin-web-typescript/src/views/support/dict/components/dict-form-modal.vue @@ -19,7 +19,7 @@ - + diff --git a/smart-admin-web-typescript/src/views/system/position/position-form.vue b/smart-admin-web-typescript/src/views/system/position/position-form.vue index 1b893db4..b9631602 100644 --- a/smart-admin-web-typescript/src/views/system/position/position-form.vue +++ b/smart-admin-web-typescript/src/views/system/position/position-form.vue @@ -19,8 +19,8 @@ - - + + @@ -92,7 +92,7 @@ const formDefault = { positionId: undefined, positionName: undefined, //职务名称 - level: undefined, //职纪 + positionLevel: undefined, //职纪 sort: 0, remark: undefined, //备注 }; diff --git a/smart-admin-web-typescript/src/views/system/position/position-list.vue b/smart-admin-web-typescript/src/views/system/position/position-list.vue index 22694647..935a95af 100644 --- a/smart-admin-web-typescript/src/views/system/position/position-list.vue +++ b/smart-admin-web-typescript/src/views/system/position/position-list.vue @@ -115,7 +115,7 @@ }, { title: '职级', - dataIndex: 'level', + dataIndex: 'positionLevel', ellipsis: true, }, { diff --git a/smart-admin-web-typescript/vite.config.ts b/smart-admin-web-typescript/vite.config.ts index 2150c7f8..00adf773 100644 --- a/smart-admin-web-typescript/vite.config.ts +++ b/smart-admin-web-typescript/vite.config.ts @@ -39,6 +39,16 @@ export default { server: { host: '0.0.0.0', port: 8081, + server: { + proxy: { + // 代理路径 + '/': { + target: 'http://127.0.0.1:1024/', // 目标服务器地址 + changeOrigin: true, // 是否修改请求头中的 Origin 字段 + rewrite: (path) => path, // 重写路径 + }, + }, + } }, plugins: [vue()], optimizeDeps: { diff --git a/sql/smart_admin_v3.sql b/sql/smart_admin_v3.sql index 75d7c0f6..fc0ddd82 100644 --- a/sql/smart_admin_v3.sql +++ b/sql/smart_admin_v3.sql @@ -105,14 +105,14 @@ CREATE TABLE `t_code_generator_config` ( DROP TABLE IF EXISTS `t_config`; CREATE TABLE `t_config` ( `config_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '主键', - `config_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '参数名字', - `config_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '参数key', - `config_value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, + `config_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '参数名字', + `config_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '参数key', + `config_value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `update_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '上次修改时间', `create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', PRIMARY KEY (`config_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统配置' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统配置' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of t_config @@ -128,21 +128,21 @@ CREATE TABLE `t_data_tracer` ( `data_tracer_id` bigint(0) NOT NULL AUTO_INCREMENT, `data_id` bigint(0) NOT NULL COMMENT '各种单据的id', `type` int(0) NOT NULL COMMENT '单据类型', - `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '操作内容', - `diff_old` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '差异:旧的数据', - `diff_new` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '差异:新的数据', - `extra_data` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '额外信息', + `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '操作内容', + `diff_old` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '差异:旧的数据', + `diff_new` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '差异:新的数据', + `extra_data` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '额外信息', `user_id` bigint(0) NOT NULL COMMENT '用户id', `user_type` int(0) NOT NULL COMMENT '用户类型:1 后管用户 ', - `user_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '用户名称', - `ip` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT 'ip', - `ip_region` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT 'ip地区', - `user_agent` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '用户ua', + `user_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户名称', + `ip` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'ip', + `ip_region` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'ip地区', + `user_agent` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户ua', `update_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间', `create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', PRIMARY KEY (`data_tracer_id`) USING BTREE, INDEX `order_id_order_type`(`data_id`, `type`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '各种单据操作记录' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '各种单据操作记录' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of t_data_tracer @@ -164,7 +164,7 @@ INSERT INTO `t_data_tracer` VALUES (99, 12, 1, '', NULL, NULL, NULL, 1, 1, '管 DROP TABLE IF EXISTS `t_department`; CREATE TABLE `t_department` ( `department_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '部门主键id', - `department_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '部门名称', + `department_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '部门名称', `manager_id` bigint(0) NULL DEFAULT NULL COMMENT '部门负责人id', `parent_id` bigint(0) NOT NULL DEFAULT 0 COMMENT '部门的父级id', `sort` int(0) NOT NULL COMMENT '部门排序', @@ -172,7 +172,7 @@ CREATE TABLE `t_department` ( `create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', PRIMARY KEY (`department_id`) USING BTREE, INDEX `parent_id`(`parent_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '部门' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '部门' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of t_department @@ -241,20 +241,20 @@ CREATE TABLE `t_employee` ( `login_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '登录帐号', `login_pwd` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '登录密码', `actual_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '员工名称', - `avatar` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, + `avatar` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `gender` tinyint(1) NOT NULL DEFAULT 0 COMMENT '性别', `phone` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '手机号码', `department_id` bigint(0) NOT NULL COMMENT '部门id', `position_id` bigint(0) NULL DEFAULT NULL COMMENT '职务ID', - `email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '邮箱', + `email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '邮箱', `disabled_flag` tinyint unsigned NOT NULL COMMENT '是否被禁用 0否1是', `deleted_flag` tinyint unsigned NOT NULL COMMENT '是否删除0否 1是', `administrator_flag` tinyint(0) NOT NULL DEFAULT 0 COMMENT '是否为超级管理员: 0 不是,1是', - `remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '备注', + `remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', `update_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间', `create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', PRIMARY KEY (`employee_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 75 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '员工表' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 75 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '员工表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of t_employee @@ -280,15 +280,15 @@ INSERT INTO `t_employee` VALUES (74, 'xzh', '$argon2id$v=19$m=16384,t=2,p=1$e/hq DROP TABLE IF EXISTS `t_feedback`; CREATE TABLE `t_feedback` ( `feedback_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '主键', - `feedback_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '反馈内容', - `feedback_attachment` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '反馈图片', + `feedback_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '反馈内容', + `feedback_attachment` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '反馈图片', `user_id` bigint(0) NOT NULL COMMENT '创建人id', `user_type` int(0) NOT NULL COMMENT '创建人用户类型', - `user_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '创建人姓名', + `user_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人姓名', `create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `update_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间', PRIMARY KEY (`feedback_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 14 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '意见反馈' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 14 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '意见反馈' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_file @@ -913,25 +913,25 @@ INSERT INTO `t_oa_invoice` VALUES (15, '1024创新实验室', '1024lab', '1024la -- Table structure for t_operate_log -- ---------------------------- DROP TABLE IF EXISTS `t_operate_log`; -CREATE TABLE `t_operate_log` ( - `operate_log_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '主键', - `operate_user_id` bigint(0) NOT NULL COMMENT '用户id', - `operate_user_type` int(0) NOT NULL COMMENT '用户类型', - `operate_user_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '用户名称', - `module` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '操作模块', - `content` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '操作内容', - `url` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '请求路径', - `method` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '请求方法', - `param` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '请求参数', - `ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '请求ip', - `ip_region` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '请求ip地区', - `user_agent` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '请求user-agent', - `success_flag` tinyint(0) NULL DEFAULT NULL COMMENT '请求结果 0失败 1成功', - `fail_reason` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '失败原因', - `update_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间', - `create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', +CREATE TABLE `t_operate_log` ( + `operate_log_id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', + `operate_user_id` bigint NOT NULL COMMENT '用户id', + `operate_user_type` int NOT NULL COMMENT '用户类型', + `operate_user_name` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户名称', + `module` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '操作模块', + `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '操作内容', + `url` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '请求路径', + `method` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '请求方法', + `param` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '请求参数', + `ip` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '请求ip', + `ip_region` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '请求ip地区', + `user_agent` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '请求user-agent', + `success_flag` tinyint DEFAULT NULL COMMENT '请求结果 0失败 1成功', + `fail_reason` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '失败原因', + `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', + `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', PRIMARY KEY (`operate_log_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 4470 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '操作记录' ROW_FORMAT = Dynamic; +) ENGINE=InnoDB AUTO_INCREMENT=4499 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='操作记录'; -- ---------------------------- -- Table structure for t_password_log @@ -953,25 +953,28 @@ CREATE TABLE `t_password_log` ( -- Table structure for t_position -- ---------------------------- DROP TABLE IF EXISTS `t_position`; -CREATE TABLE `t_position` ( - `position_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '职务ID', +CREATE TABLE `t_position` ( + `position_id` bigint NOT NULL AUTO_INCREMENT COMMENT '职务ID', `position_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '职务名称', - `level` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '职级', - `sort` int(0) NULL DEFAULT 0 COMMENT '排序', - `remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', - `deleted_flag` tinyint(1) NULL DEFAULT 0, - `create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP, - `update_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0), + `position_level` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '职级', + `sort` int DEFAULT '0' COMMENT '排序', + `remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注', + `deleted_flag` tinyint(1) DEFAULT '0', + `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, + `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`position_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '职务表' ROW_FORMAT = Dynamic; +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='职务表'; -- ---------------------------- -- Records of t_position -- ---------------------------- -INSERT INTO `t_position` VALUES (3, '技术P7', 'L1', 3, '', 0, '2024-06-29 15:57:07', '2024-07-15 23:34:35'); -INSERT INTO `t_position` VALUES (4, '技术P8', 'L2', 1, NULL, 0, '2024-07-15 23:34:14', '2024-07-15 23:34:23'); -INSERT INTO `t_position` VALUES (5, '管理M5', 'L1', 4, NULL, 0, '2024-07-15 23:34:48', '2024-07-15 23:34:48'); -INSERT INTO `t_position` VALUES (6, '管理M6', 'L2', 5, NULL, 0, '2024-07-15 23:35:00', '2024-07-15 23:35:00'); + +INSERT INTO `t_position`(`position_id`, `position_name`, `position_level`, `sort`, `remark`, `deleted_flag`, `create_time`, `update_time`) VALUES (3, '技术P7', 'L1', 3, '', 0, '2024-06-29 15:57:07', '2024-07-15 23:34:35'); +INSERT INTO `t_position`(`position_id`, `position_name`, `position_level`, `sort`, `remark`, `deleted_flag`, `create_time`, `update_time`) VALUES (4, '技术P8', 'L2', 1, NULL, 0, '2024-07-15 23:34:14', '2024-07-15 23:34:23'); +INSERT INTO `t_position`(`position_id`, `position_name`, `position_level`, `sort`, `remark`, `deleted_flag`, `create_time`, `update_time`) VALUES (5, '管理M5', 'L1', 4, NULL, 0, '2024-07-15 23:34:48', '2024-07-15 23:34:48'); +INSERT INTO `t_position`(`position_id`, `position_name`, `position_level`, `sort`, `remark`, `deleted_flag`, `create_time`, `update_time`) VALUES (6, '管理M6', 'L2', 5, NULL, 0, '2024-07-15 23:35:00', '2024-07-15 23:35:00'); + + -- ---------------------------- -- Table structure for t_reload_item @@ -979,12 +982,12 @@ INSERT INTO `t_position` VALUES (6, '管理M6', 'L2', 5, NULL, 0, '2024-07-15 23 DROP TABLE IF EXISTS `t_reload_item`; CREATE TABLE `t_reload_item` ( `tag` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '项名称', - `args` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '参数 可选', + `args` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数 可选', `identification` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '运行标识', `update_time` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0), `create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`tag`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'reload项目' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'reload项目' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of t_reload_item @@ -996,13 +999,13 @@ INSERT INTO `t_reload_item` VALUES ('system_config', '4', '234', '2024-08-13 14: -- ---------------------------- DROP TABLE IF EXISTS `t_reload_result`; CREATE TABLE `t_reload_result` ( - `tag` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `identification` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '运行标识', - `args` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, + `tag` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + `identification` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '运行标识', + `args` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `result` tinyint unsigned NOT NULL COMMENT '是否成功 ', - `exception` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL, + `exception` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL, `create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'reload结果' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'reload结果' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_role @@ -1040,7 +1043,7 @@ CREATE TABLE `t_role_data_scope` ( `update_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间', `create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 69 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '角色的数据范围' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 69 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色的数据范围' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of t_role_data_scope @@ -1059,7 +1062,7 @@ CREATE TABLE `t_role_employee` ( `create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `uk_role_employee`(`role_id`, `employee_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 342 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '角色员工功能表' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 342 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色员工功能表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of t_role_employee @@ -1084,7 +1087,7 @@ CREATE TABLE `t_role_menu` ( PRIMARY KEY (`role_menu_id`) USING BTREE, INDEX `idx_role_id`(`role_id`) USING BTREE, INDEX `idx_menu_id`(`menu_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 820 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '角色-菜单\n' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 820 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色-菜单\n' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of t_role_menu diff --git a/sql/sql-update-log/v3.23.0.sql b/sql/sql-update-log/v3.23.0.sql new file mode 100644 index 00000000..9a2d83a5 --- /dev/null +++ b/sql/sql-update-log/v3.23.0.sql @@ -0,0 +1,54 @@ + +-- ---------------------------- +-- Table structure for t_position +-- ---------------------------- +DROP TABLE IF EXISTS `t_position`; +CREATE TABLE `t_position` ( + `position_id` bigint NOT NULL AUTO_INCREMENT COMMENT '职务ID', + `position_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '职务名称', + `position_level` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '职级', + `sort` int DEFAULT '0' COMMENT '排序', + `remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注', + `deleted_flag` tinyint(1) DEFAULT '0', + `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, + `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`position_id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='职务表'; + +-- ---------------------------- +-- Records of t_position +-- ---------------------------- + +INSERT INTO `t_position`(`position_id`, `position_name`, `position_level`, `sort`, `remark`, `deleted_flag`, `create_time`, `update_time`) VALUES (3, '技术P7', 'L1', 3, '', 0, '2024-06-29 15:57:07', '2024-07-15 23:34:35'); +INSERT INTO `t_position`(`position_id`, `position_name`, `position_level`, `sort`, `remark`, `deleted_flag`, `create_time`, `update_time`) VALUES (4, '技术P8', 'L2', 1, NULL, 0, '2024-07-15 23:34:14', '2024-07-15 23:34:23'); +INSERT INTO `t_position`(`position_id`, `position_name`, `position_level`, `sort`, `remark`, `deleted_flag`, `create_time`, `update_time`) VALUES (5, '管理M5', 'L1', 4, NULL, 0, '2024-07-15 23:34:48', '2024-07-15 23:34:48'); +INSERT INTO `t_position`(`position_id`, `position_name`, `position_level`, `sort`, `remark`, `deleted_flag`, `create_time`, `update_time`) VALUES (6, '管理M6', 'L2', 5, NULL, 0, '2024-07-15 23:35:00', '2024-07-15 23:35:00'); + + + + +-- ---------------------------- +-- Table structure for t_operate_log +-- ---------------------------- +DROP TABLE IF EXISTS `t_operate_log`; +CREATE TABLE `t_operate_log` ( + `operate_log_id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', + `operate_user_id` bigint NOT NULL COMMENT '用户id', + `operate_user_type` int NOT NULL COMMENT '用户类型', + `operate_user_name` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户名称', + `module` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '操作模块', + `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '操作内容', + `url` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '请求路径', + `method` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '请求方法', + `param` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '请求参数', + `ip` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '请求ip', + `ip_region` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '请求ip地区', + `user_agent` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '请求user-agent', + `success_flag` tinyint DEFAULT NULL COMMENT '请求结果 0失败 1成功', + `fail_reason` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '失败原因', + `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', + `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + PRIMARY KEY (`operate_log_id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=4499 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='操作记录'; + +