Compare commits

4 Commits

Author SHA1 Message Date
dependabot[bot]
4e6dffaec3 Bump vite from 4.0.3 to 4.5.14 in /smart-app
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.0.3 to 4.5.14.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v4.5.14/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v4.5.14/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 4.5.14
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-10 15:34:04 +00:00
zhuoda
983aac6c4d v3.24.0【优化】SM4依赖优化;【优化】前端样式 2025-07-10 23:32:55 +08:00
zhuoda
98cc6a09c7 v3.23.0 【新增】TS代码生成和优化;【优化】log日志格式;【优化】数据字典缓存;【优化】职位表结构 2025-06-19 20:44:14 +08:00
zhuoda
921ab8023f v3.22.0 【新增】优化代码生成;【新增】优化角色列宽 2025-05-27 20:01:56 +08:00
95 changed files with 1820 additions and 398 deletions

View File

@@ -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)

View File

@@ -29,7 +29,6 @@
<druid.version>1.2.23</druid.version>
<google-linkedhashmap.version>1.4.2</google-linkedhashmap.version>
<google-guava.version>20.0</google-guava.version>
<user-agent-utils.version>1.21</user-agent-utils.version>
<reflections.version>0.9.11</reflections.version>
<commons-io.version>2.15.0</commons-io.version>
<commons-lang3.version>3.12.0</commons-lang3.version>
@@ -45,8 +44,6 @@
<log4j-spring-boot.version>2.23.1</log4j-spring-boot.version>
<hutool.version>5.8.29</hutool.version>
<velocity-engine-core.version>2.3</velocity-engine-core.version>
<jjwt.version>0.9.1</jjwt.version>
<jwks-rsa.version>0.9.0</jwks-rsa.version>
<velocity-tools.version>3.1</velocity-tools.version>
<sa-token.version>1.41.0</sa-token.version>
<ip2region.version>2.7.0</ip2region.version>
@@ -129,12 +126,6 @@
<version>${google-guava.version}</version>
</dependency>
<dependency>
<groupId>eu.bitwalker</groupId>
<artifactId>UserAgentUtils</artifactId>
<version>${user-agent-utils.version}</version>
</dependency>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
@@ -200,19 +191,6 @@
<artifactId>hutool-all</artifactId>
<version>${hutool.version}</version>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>${jjwt.version}</version>
</dependency>
<dependency>
<groupId>com.auth0</groupId>
<artifactId>jwks-rsa</artifactId>
<version>${jwks-rsa.version}</version>
</dependency>
<!--velocity begin-->
<dependency>
<groupId>org.apache.velocity</groupId>
@@ -263,6 +241,10 @@
<artifactId>logback-classic</artifactId>
<groupId>ch.qos.logback</groupId>
</exclusion>
<exclusion>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
</exclusion>
</exclusions>
</dependency>

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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.*;

View File

@@ -34,7 +34,7 @@ public class PositionEntity {
/**
* 职级
*/
private String level;
private String positionLevel;
/**
* 排序

View File

@@ -21,7 +21,7 @@ public class PositionAddForm {
private String positionName;
@Schema(description = "职级")
private String level;
private String positionLevel;
@Schema(description = "排序")
@NotNull(message = "排序不能为空")

View File

@@ -23,7 +23,7 @@ public class PositionVO {
private String positionName;
@Schema(description = "职级")
private String level;
private String positionLevel;
@Schema(description = "排序")
private Integer sort;

View File

@@ -22,7 +22,6 @@ import net.lab1024.sa.base.common.util.SmartBeanUtil;
import net.lab1024.sa.base.common.util.SmartPageUtil;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map;

View File

@@ -5,12 +5,13 @@
-->
<Configuration status="INFO" monitorInterval="30">
<Properties>
<Property name="log-directory" value="${sys:project.log-directory}"/>
<Property name="log-directory" value="${spring:project.log-directory}"/>
</Properties>
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%blue{%d}][%highlight{%-5p}][%t][%cyan{%c{1.}:%L}] %m %n"
disableAnsi="false" noConsoleNoAnsi="false"/>
</Console>
<RollingFile name="debug" fileName="${log-directory}/debug/debug.log"
filePattern="${log-directory}/debug/debug-%d{yyyy-MM-dd}-%i.log">
@@ -18,7 +19,7 @@
<ThresholdFilter level="info" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="50 MB"/>
@@ -36,7 +37,7 @@
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="50 MB"/>
@@ -54,7 +55,7 @@
<ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="50 MB"/>
@@ -72,7 +73,7 @@
<ThresholdFilter level="fatal" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="10 MB"/>
@@ -86,7 +87,7 @@
</RollingFile>
<RollingFile name="druidSlowSqlLog" fileName="${log-directory}/slow-sql/slow-sql.log"
filePattern="${log-directory}/slow-sql/slow-sql-%d{yyyy-MM-dd}-%i.log">
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="50 MB"/>
@@ -101,11 +102,9 @@
</Appenders>
<Loggers>
<logger name="com.alibaba.druid.filter.stat.StatFilter" level="ERROR" additivity="false">
<AppenderRef ref="druidSlowSqlLog"/>
</logger>
<Root level="debug">
<AppenderRef ref="Console"/>
<AppenderRef ref="debug"/>

View File

@@ -5,12 +5,12 @@
-->
<Configuration status="INFO" monitorInterval="30">
<Properties>
<Property name="log-directory" value="${sys:project.log-directory}"/>
<Property name="log-directory" value="${spring:project.log-directory}"/>
</Properties>
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
</Console>
<RollingFile name="debug" fileName="${log-directory}/debug/debug.log"
filePattern="${log-directory}/debug/debug-%d{yyyy-MM-dd}-%i.log">
@@ -18,7 +18,7 @@
<ThresholdFilter level="info" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="50 MB"/>
@@ -36,7 +36,7 @@
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="50 MB"/>
@@ -54,7 +54,7 @@
<ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="50 MB"/>
@@ -72,7 +72,7 @@
<ThresholdFilter level="fatal" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="10 MB"/>
@@ -86,7 +86,7 @@
</RollingFile>
<RollingFile name="druidSlowSqlLog" fileName="${log-directory}/slow-sql/slow-sql.log"
filePattern="${log-directory}/slow-sql/slow-sql-%d{yyyy-MM-dd}-%i.log">
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="50 MB"/>

View File

@@ -5,12 +5,12 @@
-->
<Configuration status="INFO" monitorInterval="30">
<Properties>
<Property name="log-directory" value="${sys:project.log-directory}"/>
<Property name="log-directory" value="${spring:project.log-directory}"/>
</Properties>
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
</Console>
<RollingFile name="debug" fileName="${log-directory}/debug/debug.log"
filePattern="${log-directory}/debug/debug-%d{yyyy-MM-dd}-%i.log">
@@ -18,7 +18,7 @@
<ThresholdFilter level="info" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="50 MB"/>
@@ -36,7 +36,7 @@
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="50 MB"/>
@@ -54,7 +54,7 @@
<ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="50 MB"/>
@@ -72,7 +72,7 @@
<ThresholdFilter level="fatal" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="10 MB"/>
@@ -86,7 +86,7 @@
</RollingFile>
<RollingFile name="druidSlowSqlLog" fileName="${log-directory}/slow-sql/slow-sql.log"
filePattern="${log-directory}/slow-sql/slow-sql-%d{yyyy-MM-dd}-%i.log">
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="50 MB"/>

View File

@@ -5,12 +5,12 @@
-->
<Configuration status="INFO" monitorInterval="30">
<Properties>
<Property name="log-directory" value="${sys:project.log-directory}"/>
<Property name="log-directory" value="${spring:project.log-directory}"/>
</Properties>
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
</Console>
<RollingFile name="debug" fileName="${log-directory}/debug/debug.log"
filePattern="${log-directory}/debug/debug-%d{yyyy-MM-dd}-%i.log">
@@ -18,7 +18,7 @@
<ThresholdFilter level="info" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="50 MB"/>
@@ -36,7 +36,7 @@
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="50 MB"/>
@@ -54,7 +54,7 @@
<ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="50 MB"/>
@@ -72,7 +72,7 @@
<ThresholdFilter level="fatal" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="10 MB"/>
@@ -86,7 +86,7 @@
</RollingFile>
<RollingFile name="druidSlowSqlLog" fileName="${log-directory}/slow-sql/slow-sql.log"
filePattern="${log-directory}/slow-sql/slow-sql-%d{yyyy-MM-dd}-%i.log">
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="50 MB"/>

View File

@@ -187,16 +187,6 @@
<artifactId>hutool-all</artifactId>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
</dependency>
<dependency>
<groupId>com.auth0</groupId>
<artifactId>jwks-rsa</artifactId>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-engine-core</artifactId>
@@ -220,12 +210,6 @@
<dependency>
<groupId>cn.idev.excel</groupId>
<artifactId>fastexcel</artifactId>
<exclusions>
<exclusion>
<artifactId>logback-classic</artifactId>
<groupId>ch.qos.logback</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>

View File

@@ -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

View File

@@ -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;

View File

@@ -40,6 +40,12 @@ import java.util.Optional;
@Service
public class CodeGeneratorService {
private static final String COLUMN_NULLABLE_IDENTIFY = "NO";
private static final String COLUMN_PRIMARY_KEY = "PRI";
private static final String COLUMN_AUTO_INCREASE = "auto_increment";
@Resource
private CodeGeneratorDao codeGeneratorDao;
@@ -57,7 +63,13 @@ public class CodeGeneratorService {
* @return
*/
public List<TableColumnVO> getTableColumns(String tableName) {
return codeGeneratorDao.selectTableColumn(tableName);
List<TableColumnVO> tableColumns = codeGeneratorDao.selectTableColumn(tableName);
for (TableColumnVO tableColumn : tableColumns) {
tableColumn.setNullableFlag(!COLUMN_NULLABLE_IDENTIFY.equalsIgnoreCase(tableColumn.getIsNullable()));
tableColumn.setPrimaryKeyFlag(COLUMN_PRIMARY_KEY.equalsIgnoreCase(tableColumn.getColumnKey()));
tableColumn.setAutoIncreaseFlag(SmartStringUtil.isNotEmpty(tableColumn.getExtra()) && COLUMN_AUTO_INCREASE.equalsIgnoreCase(tableColumn.getExtra()));
}
return tableColumns;
}
@@ -150,7 +162,7 @@ public class CodeGeneratorService {
}
// 校验表必须有主键
if(!tableColumns.stream().filter( e -> "PRI".equalsIgnoreCase(e.getColumnKey())).findAny().isPresent()){
if (tableColumns.stream().noneMatch(e -> COLUMN_PRIMARY_KEY.equalsIgnoreCase(e.getColumnKey()))) {
return ResponseDTO.userErrorParam("表必须有主键,请联系后端查看下数据库表结构");
}
@@ -199,6 +211,7 @@ public class CodeGeneratorService {
/**
* 下载代码
*
* @param tableName
* @return
*/

View File

@@ -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) {

View File

@@ -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;");
}
//文件上传

View File

@@ -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:

View File

@@ -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;");
}
//文件上传

View File

@@ -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';");

View File

@@ -128,16 +128,6 @@ public class DataTracerChangeContentService {
return this.getAddDeleteContent(object);
}
/**
* 解析批量bean的内容
*
* @param objectList 对象列表
* @return 单个内容
*/
public <T> String getChangeContent(List<T> objectList) {
return this.getObjectListContent(objectList);
}
// ---------------------------- 以下 是 私有private 方法 ----------------------------
/**
@@ -170,6 +160,15 @@ public class DataTracerChangeContentService {
return "【原数据】:<br/>" + oldContent + "<br/>" + "【新数据】:<br/>" + newContent;
}
/**
* 解析批量bean的内容
*
* @param objectList 对象列表
* @return 单个内容
*/
public <T> String getChangeContent(List<T> objectList) {
return this.getObjectListContent(objectList);
}
/**
* 获取一个对象的内容信息

View File

@@ -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;

View File

@@ -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
};

View File

@@ -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
};

View File

@@ -0,0 +1,239 @@
<!--
* ${basic.description}
*
* @Author: ${basic.frontAuthor}
* @Date: ${basic.frontDate}
* @Copyright ${basic.copyright}
-->
<template>
<a-$!{insertAndUpdate.pageType}
:title="form.$!{primaryKeyFieldName} ? '编辑' : '添加'"
:width="$!{insertAndUpdate.width}"
:open="visibleFlag"
#if($!{insertAndUpdate.pageType} == 'drawer')
@close="onClose"
#else
@cancel="onClose"
#end
:maskClosable="false"
:destroyOnClose="true"
>
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 5 }" >
#if($insertAndUpdate.countPerLine == 1)
#foreach ($field in $formFields)
#if($field.frontComponent == "Input")
<a-form-item label="$!{field.label}" name="${field.fieldName}">
<a-input style="width: 100%" v-model:value="form.${field.fieldName}" placeholder="$!{field.label}" />
</a-form-item>
#end
#if($field.frontComponent == "InputNumber")
<a-form-item label="$!{field.label}" name="${field.fieldName}">
<a-input-number style="width: 100%" v-model:value="form.${field.fieldName}" placeholder="$!{field.label}" />
</a-form-item>
#end
#if($field.frontComponent == "Textarea")
<a-form-item label="$!{field.label}" name="${field.fieldName}">
<a-textarea style="width: 100%" v-model:value="form.${field.fieldName}" placeholder="$!{field.label}" />
</a-form-item>
#end
#if($field.frontComponent == "BooleanSelect")
<a-form-item label="$!{field.label}" name="${field.fieldName}">
<BooleanSelect v-model:value="form.${field.fieldName}" style="width: 100%" />
</a-form-item>
#end
#if($field.frontComponent == "SmartEnumSelect")
<a-form-item label="$codeGeneratorTool.removeEnumDesc($!{field.label})" name="${field.fieldName}">
<SmartEnumSelect width="100%" v-model:value="form.${field.fieldName}" enum-name="$!{field.upperUnderscoreEnum}" placeholder="$codeGeneratorTool.removeEnumDesc($!{field.label})"/>
</a-form-item>
#end
#if($field.frontComponent == "DictSelect")
<a-form-item label="$codeGeneratorTool.removeEnumDesc($!{field.label})" name="${field.fieldName}">
<DictSelect width="100%" v-model:value="form.${field.fieldName}" dict-code="DICT_CODE_ENUM.$!{field.dict} || '$!{field.dict}'" placeholder="$!{field.label}"/>
</a-form-item>
#end
#if($field.frontComponent == "Date")
<a-form-item label="$!{field.label}" name="${field.fieldName}">
<a-date-picker valueFormat="YYYY-MM-DD" v-model:value="form.$!{field.fieldName}" style="width: 100%" placeholder="$!{field.label}"/>
</a-form-item>
#end
#if($field.frontComponent == "DateTime")
<a-form-item label="$!{field.label}" name="${field.fieldName}">
<a-date-picker show-time valueFormat="YYYY-MM-DD HH:mm:ss" v-model:value="form.$!{field.fieldName}" style="width: 100%" placeholder="$!{field.label}" />
</a-form-item>
#end
#if($field.frontComponent == "FileUpload")
<a-form-item label="$!{field.label}" name="${field.fieldName}">
<FileUpload
:defaultFileList="form.$!{field.fieldName}"
:folder="FILE_FOLDER_TYPE_ENUM.COMMON.value"
buttonText="上传 $!{field.label}"
listType="text"
@change="e => form.$!{field.fieldName} = e"
/>
</a-form-item>
#end
#end
#end
#if($insertAndUpdate.countPerLine > 1)
<a-row>
#set($span=24 / $!insertAndUpdate.countPerLine )
#foreach ($field in $formFields)
<a-col :span="$!{span}">
#if($field.frontComponent == "Input")
<a-form-item label="$!{field.label}" name="${field.fieldName}">
<a-input style="width: 100%" v-model:value="form.${field.fieldName}" placeholder="$!{field.label}" />
</a-form-item>
#end
#if($field.frontComponent == "InputNumber")
<a-form-item label="$!{field.label}" name="${field.fieldName}">
<a-input-number style="width: 100%" v-model:value="form.${field.fieldName}" placeholder="$!{field.label}" />
</a-form-item>
#end
#if($field.frontComponent == "Textarea")
<a-form-item label="$!{field.label}" name="${field.fieldName}">
<a-textarea style="width: 100%" v-model:value="form.${field.fieldName}" placeholder="$!{field.label}" />
</a-form-item>
#end
#if($field.frontComponent == "BooleanSelect")
<a-form-item label="$!{field.label}" name="${field.fieldName}">
<BooleanSelect v-model:value="form.${field.fieldName}" style="width: 100%" />
</a-form-item>
#end
#if($field.frontComponent == "SmartEnumSelect")
<a-form-item label="$codeGeneratorTool.removeEnumDesc($!{field.label})" name="${field.fieldName}">
<SmartEnumSelect width="100%" v-model:value="form.${field.fieldName}" enum-name="$!{field.upperUnderscoreEnum}" placeholder="$codeGeneratorTool.removeEnumDesc($!{field.label})"/>
</a-form-item>
#end
#if($field.frontComponent == "DictSelect")
<a-form-item label="$codeGeneratorTool.removeEnumDesc($!{field.label})" name="${field.fieldName}">
<DictSelect width="100%" v-model:value="form.${field.fieldName}" dict-code="DICT_CODE_ENUM.$!{field.dict} || '$!{field.dict}'" placeholder="$!{field.label}"/>
</a-form-item>
#end
#if($field.frontComponent == "Date")
<a-form-item label="$!{field.label}" name="${field.fieldName}">
<a-date-picker valueFormat="YYYY-MM-DD" v-model:value="form.$!{field.fieldName}" style="width: 100%" placeholder="$!{field.label}"/>
</a-form-item>
#end
#if($field.frontComponent == "DateTime")
<a-form-item label="$!{field.label}" name="${field.fieldName}">
<a-date-picker show-time valueFormat="YYYY-MM-DD HH:mm:ss" v-model:value="form.$!{field.fieldName}" style="width: 100%" placeholder="$!{field.label}" />
</a-form-item>
#end
#if($field.frontComponent == "FileUpload")
<a-form-item label="$!{field.label}" name="${field.fieldName}">
<FileUpload
:defaultFileList="form.$!{field.fieldName}"
:folder="FILE_FOLDER_TYPE_ENUM.COMMON.value"
buttonText="上传 $!{field.label}"
listType="text"
@change="e => form.$!{field.fieldName} = e"
/>
</a-form-item>
#end
</a-col>
#end
</a-row>
#end
</a-form>
<template #footer>
<a-space>
<a-button @click="onClose">取消</a-button>
<a-button type="primary" @click="onSubmit">保存</a-button>
</a-space>
</template>
</a-$!{insertAndUpdate.pageType}>
</template>
<script setup lang="ts">
import { reactive, ref, nextTick } from 'vue';
import _ from 'lodash';
import { message } from 'ant-design-vue';
import { SmartLoading } from '/@/components/framework/smart-loading';
import { $!{name.lowerCamel}Api } from '/@/api/business/$!{name.lowerHyphenCamel}/$!{name.lowerHyphenCamel}-api';
import { smartSentry } from '/@/lib/smart-sentry';
#foreach ($import in $frontImportList)
$!{import}
#end
// ------------------------ 事件 ------------------------
const emits = defineEmits(['reloadList']);
// ------------------------ 显示与隐藏 ------------------------
// 是否显示
const visibleFlag = ref(false);
function show(rowData) {
Object.assign(form, formDefault);
if (rowData && !_.isEmpty(rowData)) {
Object.assign(form, rowData);
}
// 使用字典时把下面这注释修改成自己的字典字段 有多个字典字段就复制多份同理修改 不然打开表单时不显示字典初始值
// if (form.status && form.status.length > 0) {
// form.status = form.status.map((e) => e.valueCode);
// }
visibleFlag.value = true;
nextTick(() => {
formRef.value.clearValidate();
});
}
function onClose() {
Object.assign(form, formDefault);
visibleFlag.value = false;
}
// ------------------------ 表单 ------------------------
// 组件ref
const formRef = ref();
const formDefault = {
#foreach ($field in $formFields)
$!{field.fieldName}: undefined, //$!{field.label}
#end
};
let form = reactive({ ...formDefault });
const rules = {
#foreach ($field in $formFields)
#if($field.requiredFlag)
$!{field.fieldName}: [{ required: true, message: '$!{field.label} 必填' }],
#end
#end
};
// 点击确定,验证表单
async function onSubmit() {
try {
await formRef.value.validateFields();
save();
} catch (err) {
message.error('参数验证错误,请仔细填写表单数据!');
}
}
// 新建、编辑API
async function save() {
SmartLoading.show();
try {
if (form.$!{primaryKeyFieldName}) {
await $!{name.lowerCamel}Api.update(form);
} else {
await $!{name.lowerCamel}Api.add(form);
}
message.success('操作成功');
emits('reloadList');
onClose();
} catch (err) {
smartSentry.captureError(err);
} finally {
SmartLoading.hide();
}
}
defineExpose({
show,
});
</script>

View File

@@ -0,0 +1,348 @@
<!--
* ${basic.description}
*
* @Author: ${basic.frontAuthor}
* @Date: ${basic.frontDate}
* @Copyright ${basic.copyright}
-->
<template>
<!---------- 查询表单form begin ----------->
<a-form class="smart-query-form">
<a-row class="smart-query-form-row">
#foreach ($field in $queryFields)
#if($field.queryTypeEnum == "Like")
<a-form-item label="${field.label}" class="smart-query-form-item">
<a-input style="width: ${field.width}" v-model:value="queryForm.${field.fieldName}" placeholder="${field.label}" />
</a-form-item>
#end
#if($field.queryTypeEnum == "Equal")
<a-form-item label="${field.label}" class="smart-query-form-item">
<a-input style="width: ${field.width}" v-model:value="queryForm.${field.fieldName}" placeholder="${field.label}" />
</a-form-item>
#end
#if($field.queryTypeEnum == "Dict")
<a-form-item label="${field.label}" class="smart-query-form-item">
<DictSelect dict-code="DICT_CODE_ENUM.$!{field.dict} || '$!{field.dict}'" placeholder="${field.label}" v-model:value="queryForm.${field.fieldName}" width="${field.width}" />
</a-form-item>
#end
#if($field.queryTypeEnum == "Enum")
<a-form-item label="$codeGeneratorTool.removeEnumDesc(${field.label})" class="smart-query-form-item">
<SmartEnumSelect width="${field.width}" v-model:value="queryForm.${field.fieldName}" enum-name="$!{field.frontEnumName}" placeholder="$codeGeneratorTool.removeEnumDesc(${field.label})"/>
</a-form-item>
#end
#if($field.queryTypeEnum == "Date")
<a-form-item label="${field.label}" class="smart-query-form-item">
<a-date-picker valueFormat="YYYY-MM-DD" v-model:value="queryForm.$!{field.fieldName}" style="width: ${field.width}" />
</a-form-item>
#end
#if($field.queryTypeEnum == "DateRange")
<a-form-item label="${field.label}" class="smart-query-form-item">
<a-range-picker v-model:value="queryForm.$!{field.fieldName}" :presets="defaultTimeRanges" style="width: ${field.width}" @change="onChange$codeGeneratorTool.lowerCamel2UpperCamel(${field.fieldName})" />
</a-form-item>
#end
#end
<a-form-item class="smart-query-form-item">
<a-button type="primary" @click="onSearch">
<template #icon>
<SearchOutlined />
</template>
查询
</a-button>
<a-button @click="resetQuery" class="smart-margin-left10">
<template #icon>
<ReloadOutlined />
</template>
重置
</a-button>
</a-form-item>
</a-row>
</a-form>
<!---------- 查询表单form end ----------->
<a-card size="small" :bordered="false" :hoverable="true">
<!---------- 表格操作行 begin ----------->
<a-row class="smart-table-btn-block">
<div class="smart-table-operate-block">
#if($insertAndUpdate.isSupportInsertAndUpdate)
<a-button @click="showForm" type="primary" size="small">
<template #icon>
<PlusOutlined />
</template>
新建
</a-button>
#end
#if($deleteInfo.isSupportDelete && ($deleteInfo.deleteEnum == "Batch"||$deleteInfo.deleteEnum == "SingleAndBatch"))
<a-button @click="confirmBatchDelete" type="primary" danger size="small" :disabled="selectedRowKeyList.length == 0">
<template #icon>
<DeleteOutlined />
</template>
批量删除
</a-button>
#end
</div>
<div class="smart-table-setting-block">
<TableOperator v-model="columns" :tableId="null" :refresh="queryData" />
</div>
</a-row>
<!---------- 表格操作行 end ----------->
<!---------- 表格 begin ----------->
<a-table
size="small"
:scroll="{ y: 800 }"
:dataSource="tableData"
:columns="columns"
rowKey="$!{primaryKeyFieldName}"
bordered
:loading="tableLoading"
:pagination="false"
#if($deleteInfo.isSupportDelete && ($deleteInfo.deleteEnum == "Batch"||$deleteInfo.deleteEnum == "SingleAndBatch"))
:row-selection="{ selectedRowKeys: selectedRowKeyList, onChange: onSelectChange }"
#end
>
<template #bodyCell="{ text, record, column }">
#foreach ($field in $listFields)
#if($field.frontComponent == "FileUpload")
<template v-if="column.dataIndex === '$field.fieldName'">
<FilePreview :file-list="text" type="picture" />
</template>
#end
#end
#foreach ($field in $listFields)
#if($field.frontEnumPlugin)
<template v-if="column.dataIndex === '$!{field.fieldName}'">
<span>{{ $!{field.frontEnumPlugin} }}</span>
</template>
#end
#end
#foreach ($field in $listFields)
#if($field.dict)
<template v-if="column.dataIndex === '$!{field.fieldName}'">
<DictLabel :dict-code="DICT_CODE_ENUM.$!{field.dict} || '$!{field.dict}'" :data-value="text" />
</template>
#end
#end
<template v-if="column.dataIndex === 'action'">
<div class="smart-table-operate">
#if($insertAndUpdate.isSupportInsertAndUpdate)
<a-button @click="showForm(record)" type="link">编辑</a-button>
#end
#if($deleteInfo.isSupportDelete && ($deleteInfo.deleteEnum == "Single"||$deleteInfo.deleteEnum == "SingleAndBatch"))
<a-button @click="onDelete(record)" danger type="link">删除</a-button>
#end
</div>
</template>
</template>
</a-table>
<!---------- 表格 end ----------->
<div class="smart-query-table-page">
<a-pagination
showSizeChanger
showQuickJumper
show-less-items
:pageSizeOptions="PAGE_SIZE_OPTIONS"
:defaultPageSize="queryForm.pageSize"
v-model:current="queryForm.pageNum"
v-model:pageSize="queryForm.pageSize"
:total="total"
@change="queryData"
@showSizeChange="queryData"
:show-total="(total) => `共${total}条`"
/>
</div>
<$!{name.upperCamel}Form ref="formRef" @reloadList="queryData"/>
</a-card>
</template>
<script setup lang="ts">
import { reactive, ref, onMounted } from 'vue';
import { message, Modal } from 'ant-design-vue';
import { SmartLoading } from '/@/components/framework/smart-loading';
import { $!{name.lowerCamel}Api } from '/@/api/business/$!{name.lowerHyphenCamel}/$!{name.lowerHyphenCamel}-api';
import { PAGE_SIZE_OPTIONS } from '/@/constants/common-const';
import { smartSentry } from '/@/lib/smart-sentry';
import TableOperator from '/@/components/support/table-operator/index.vue';
#foreach ($import in $frontImportList)
$!{import}
#end
// ---------------------------- 表格列 ----------------------------
const columns = ref([
#foreach ($field in $tableFields)
#if($field.showFlag)
{
title: '$!{field.label}',
dataIndex: '$!{field.fieldName}',
ellipsis: $!{field.ellipsisFlag},
#if(${field.width} > 0)
width: $!{field.width},
#end
},
#end
#end
#if($insertAndUpdate.isSupportInsertAndUpdate || $insertAndUpdate.isSupportInsertAndUpdate)
{
title: '操作',
dataIndex: 'action',
fixed: 'right',
width: 90,
},
#end
]);
// ---------------------------- 查询数据表单和方法 ----------------------------
const queryFormState = {
#foreach ($field in $queryFields)
#if($field.queryTypeEnum == "DateRange")
$!{field.fieldName}: [], //$!{field.label}
$!{field.fieldName}Begin: undefined, //$!{field.label} 开始
$!{field.fieldName}End: undefined, //$!{field.label} 结束
#end
#if($field.queryTypeEnum != "DateRange")
$!{field.fieldName}: undefined, //$!{field.label}
#end
#end
pageNum: 1,
pageSize: 10,
};
// 查询表单form
const queryForm = reactive({ ...queryFormState });
// 表格加载loading
const tableLoading = ref(false);
// 表格数据
const tableData = ref([]);
// 总数
const total = ref(0);
// 重置查询条件
function resetQuery() {
let pageSize = queryForm.pageSize;
Object.assign(queryForm, queryFormState);
queryForm.pageSize = pageSize;
queryData();
}
// 搜索
function onSearch(){
queryForm.pageNum = 1;
queryData();
}
// 查询数据
async function queryData() {
tableLoading.value = true;
try {
let queryResult = await $!{name.lowerCamel}Api.queryPage(queryForm);
tableData.value = queryResult.data.list;
total.value = queryResult.data.total;
} catch (e) {
smartSentry.captureError(e);
} finally {
tableLoading.value = false;
}
}
#foreach ($field in $queryFields)
#if($field.queryTypeEnum == "DateRange")
function onChange$codeGeneratorTool.lowerCamel2UpperCamel(${field.fieldName})(dates, dateStrings){
queryForm.$!{field.fieldName}Begin = dateStrings[0];
queryForm.$!{field.fieldName}End = dateStrings[1];
}
#end
#end
onMounted(queryData);
#if($insertAndUpdate.isSupportInsertAndUpdate)
// ---------------------------- 添加/修改 ----------------------------
const formRef = ref();
function showForm(data) {
formRef.value.show(data);
}
#end
#if($deleteInfo.isSupportDelete)
#if($deleteInfo.deleteEnum == "Batch" || $deleteInfo.deleteEnum == "SingleAndBatch")
// ---------------------------- 单个删除 ----------------------------
//确认删除
function onDelete(data){
Modal.confirm({
title: '提示',
content: '确定要删除选吗?',
okText: '删除',
okType: 'danger',
onOk() {
requestDelete(data);
},
cancelText: '取消',
onCancel() {},
});
}
//请求删除
async function requestDelete(data){
SmartLoading.show();
try {
let deleteForm = {
goodsIdList: selectedRowKeyList.value,
};
await $!{name.lowerCamel}Api.delete(data.$!{primaryKeyFieldName});
message.success('删除成功');
queryData();
} catch (e) {
smartSentry.captureError(e);
} finally {
SmartLoading.hide();
}
}
#end
#if($deleteInfo.deleteEnum == "Single" || $deleteInfo.deleteEnum == "SingleAndBatch")
// ---------------------------- 批量删除 ----------------------------
// 选择表格行
const selectedRowKeyList = ref([]);
function onSelectChange(selectedRowKeys) {
selectedRowKeyList.value = selectedRowKeys;
}
// 批量删除
function confirmBatchDelete() {
Modal.confirm({
title: '提示',
content: '确定要批量删除这些数据吗?',
okText: '删除',
okType: 'danger',
onOk() {
requestBatchDelete();
},
cancelText: '取消',
onCancel() {},
});
}
//请求批量删除
async function requestBatchDelete() {
try {
SmartLoading.show();
await $!{name.lowerCamel}Api.batchDelete(selectedRowKeyList.value);
message.success('删除成功');
queryData();
} catch (e) {
smartSentry.captureError(e);
} finally {
SmartLoading.hide();
}
}
#end
#end
</script>

View File

@@ -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

View File

@@ -12,7 +12,9 @@
<select id="getAll" resultType="net.lab1024.sa.base.module.support.dict.domain.vo.DictDataVO">
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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -27,11 +27,10 @@
<p6spy.version>3.9.1</p6spy.version>
<springdoc-openapi-ui.version>1.7.0</springdoc-openapi-ui.version>
<knife4j.version>4.3.0</knife4j.version>
<fastjson.version>2.0.16</fastjson.version>
<fastjson.version>2.0.48</fastjson.version>
<druid.version>1.2.14</druid.version>
<google-linkedhashmap.version>1.4.2</google-linkedhashmap.version>
<google-guava.version>20.0</google-guava.version>
<user-agent-utils.version>1.21</user-agent-utils.version>
<reflections.version>0.9.11</reflections.version>
<commons-io.version>2.15.0</commons-io.version>
<commons-lang3.version>3.12.0</commons-lang3.version>
@@ -47,8 +46,6 @@
<log4j-spring-boot.version>2.23.1</log4j-spring-boot.version>
<hutool.version>5.7.22</hutool.version>
<velocity-engine-core.version>2.3</velocity-engine-core.version>
<jjwt.version>0.9.1</jjwt.version>
<jwks-rsa.version>0.9.0</jwks-rsa.version>
<velocity-tools.version>3.1</velocity-tools.version>
<sa-token.version>1.41.0</sa-token.version>
<ip2region.version>2.7.0</ip2region.version>
@@ -154,12 +151,6 @@
<version>${google-guava.version}</version>
</dependency>
<dependency>
<groupId>eu.bitwalker</groupId>
<artifactId>UserAgentUtils</artifactId>
<version>${user-agent-utils.version}</version>
</dependency>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
@@ -225,19 +216,6 @@
<artifactId>hutool-all</artifactId>
<version>${hutool.version}</version>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>${jjwt.version}</version>
</dependency>
<dependency>
<groupId>com.auth0</groupId>
<artifactId>jwks-rsa</artifactId>
<version>${jwks-rsa.version}</version>
</dependency>
<!--velocity begin-->
<dependency>
<groupId>org.apache.velocity</groupId>
@@ -289,6 +267,10 @@
<artifactId>logback-classic</artifactId>
<groupId>ch.qos.logback</groupId>
</exclusion>
<exclusion>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
</exclusion>
</exclusions>
</dependency>

View File

@@ -34,7 +34,7 @@ public class PositionEntity {
/**
* 职级
*/
private String level;
private String positionLevel;
/**
* 排序

View File

@@ -22,7 +22,7 @@ public class PositionAddForm {
private String positionName;
@Schema(description = "职级")
private String level;
private String positionLevel;
@Schema(description = "排序")
@NotNull(message = "排序不能为空")

View File

@@ -23,7 +23,7 @@ public class PositionVO {
private String positionName;
@Schema(description = "职级")
private String level;
private String positionLevel;
@Schema(description = "排序")
private Integer sort;

View File

@@ -5,12 +5,13 @@
-->
<Configuration status="INFO" monitorInterval="30">
<Properties>
<Property name="log-directory" value="${sys:project.log-directory}"/>
<Property name="log-directory" value="${spring:project.log-directory}"/>
</Properties>
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%blue{%d}][%highlight{%-5p}][%t][%cyan{%c{1.}:%L}] %m %n"
disableAnsi="false" noConsoleNoAnsi="false"/>
</Console>
<RollingFile name="debug" fileName="${log-directory}/debug/debug.log"
filePattern="${log-directory}/debug/debug-%d{yyyy-MM-dd}-%i.log">
@@ -18,7 +19,7 @@
<ThresholdFilter level="info" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="50 MB"/>
@@ -36,7 +37,7 @@
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="50 MB"/>
@@ -54,7 +55,7 @@
<ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="50 MB"/>
@@ -72,7 +73,7 @@
<ThresholdFilter level="fatal" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="10 MB"/>
@@ -86,7 +87,7 @@
</RollingFile>
<RollingFile name="druidSlowSqlLog" fileName="${log-directory}/slow-sql/slow-sql.log"
filePattern="${log-directory}/slow-sql/slow-sql-%d{yyyy-MM-dd}-%i.log">
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="50 MB"/>
@@ -101,11 +102,9 @@
</Appenders>
<Loggers>
<logger name="com.alibaba.druid.filter.stat.StatFilter" level="ERROR" additivity="false">
<AppenderRef ref="druidSlowSqlLog"/>
</logger>
<Root level="debug">
<AppenderRef ref="Console"/>
<AppenderRef ref="debug"/>

View File

@@ -5,12 +5,12 @@
-->
<Configuration status="INFO" monitorInterval="30">
<Properties>
<Property name="log-directory" value="${sys:project.log-directory}"/>
<Property name="log-directory" value="${spring:project.log-directory}"/>
</Properties>
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
</Console>
<RollingFile name="debug" fileName="${log-directory}/debug/debug.log"
filePattern="${log-directory}/debug/debug-%d{yyyy-MM-dd}-%i.log">
@@ -18,7 +18,7 @@
<ThresholdFilter level="info" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="50 MB"/>
@@ -36,7 +36,7 @@
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="50 MB"/>
@@ -54,7 +54,7 @@
<ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="50 MB"/>
@@ -72,7 +72,7 @@
<ThresholdFilter level="fatal" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="10 MB"/>
@@ -86,7 +86,7 @@
</RollingFile>
<RollingFile name="druidSlowSqlLog" fileName="${log-directory}/slow-sql/slow-sql.log"
filePattern="${log-directory}/slow-sql/slow-sql-%d{yyyy-MM-dd}-%i.log">
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="50 MB"/>

View File

@@ -5,12 +5,12 @@
-->
<Configuration status="INFO" monitorInterval="30">
<Properties>
<Property name="log-directory" value="${sys:project.log-directory}"/>
<Property name="log-directory" value="${spring:project.log-directory}"/>
</Properties>
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
</Console>
<RollingFile name="debug" fileName="${log-directory}/debug/debug.log"
filePattern="${log-directory}/debug/debug-%d{yyyy-MM-dd}-%i.log">
@@ -18,7 +18,7 @@
<ThresholdFilter level="info" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="50 MB"/>
@@ -36,7 +36,7 @@
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="50 MB"/>
@@ -54,7 +54,7 @@
<ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="50 MB"/>
@@ -72,7 +72,7 @@
<ThresholdFilter level="fatal" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="10 MB"/>
@@ -86,7 +86,7 @@
</RollingFile>
<RollingFile name="druidSlowSqlLog" fileName="${log-directory}/slow-sql/slow-sql.log"
filePattern="${log-directory}/slow-sql/slow-sql-%d{yyyy-MM-dd}-%i.log">
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="50 MB"/>

View File

@@ -5,12 +5,12 @@
-->
<Configuration status="INFO" monitorInterval="30">
<Properties>
<Property name="log-directory" value="${sys:project.log-directory}"/>
<Property name="log-directory" value="${spring:project.log-directory}"/>
</Properties>
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
</Console>
<RollingFile name="debug" fileName="${log-directory}/debug/debug.log"
filePattern="${log-directory}/debug/debug-%d{yyyy-MM-dd}-%i.log">
@@ -18,7 +18,7 @@
<ThresholdFilter level="info" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="50 MB"/>
@@ -36,7 +36,7 @@
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="50 MB"/>
@@ -54,7 +54,7 @@
<ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="50 MB"/>
@@ -72,7 +72,7 @@
<ThresholdFilter level="fatal" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="10 MB"/>
@@ -86,7 +86,7 @@
</RollingFile>
<RollingFile name="druidSlowSqlLog" fileName="${log-directory}/slow-sql/slow-sql.log"
filePattern="${log-directory}/slow-sql/slow-sql-%d{yyyy-MM-dd}-%i.log">
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="50 MB"/>

View File

@@ -208,16 +208,6 @@
<artifactId>hutool-all</artifactId>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
</dependency>
<dependency>
<groupId>com.auth0</groupId>
<artifactId>jwks-rsa</artifactId>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-engine-core</artifactId>
@@ -241,12 +231,6 @@
<dependency>
<groupId>cn.idev.excel</groupId>
<artifactId>fastexcel</artifactId>
<exclusions>
<exclusion>
<artifactId>logback-classic</artifactId>
<groupId>ch.qos.logback</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>

View File

@@ -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

View File

@@ -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;

View File

@@ -40,6 +40,12 @@ import java.util.Optional;
@Service
public class CodeGeneratorService {
private static final String COLUMN_NULLABLE_IDENTIFY = "NO";
private static final String COLUMN_PRIMARY_KEY = "PRI";
private static final String COLUMN_AUTO_INCREASE = "auto_increment";
@Resource
private CodeGeneratorDao codeGeneratorDao;
@@ -57,7 +63,13 @@ public class CodeGeneratorService {
* @return
*/
public List<TableColumnVO> getTableColumns(String tableName) {
return codeGeneratorDao.selectTableColumn(tableName);
List<TableColumnVO> tableColumns = codeGeneratorDao.selectTableColumn(tableName);
for (TableColumnVO tableColumn : tableColumns) {
tableColumn.setNullableFlag(!COLUMN_NULLABLE_IDENTIFY.equalsIgnoreCase(tableColumn.getIsNullable()));
tableColumn.setPrimaryKeyFlag(COLUMN_PRIMARY_KEY.equalsIgnoreCase(tableColumn.getColumnKey()));
tableColumn.setAutoIncreaseFlag(SmartStringUtil.isNotEmpty(tableColumn.getExtra()) && COLUMN_AUTO_INCREASE.equalsIgnoreCase(tableColumn.getExtra()));
}
return tableColumns;
}
@@ -150,7 +162,7 @@ public class CodeGeneratorService {
}
// 校验表必须有主键
if(!tableColumns.stream().filter( e -> "PRI".equalsIgnoreCase(e.getColumnKey())).findAny().isPresent()){
if (tableColumns.stream().noneMatch(e -> COLUMN_PRIMARY_KEY.equalsIgnoreCase(e.getColumnKey()))) {
return ResponseDTO.userErrorParam("表必须有主键,请联系后端查看下数据库表结构");
}
@@ -199,6 +211,7 @@ public class CodeGeneratorService {
/**
* 下载代码
*
* @param tableName
* @return
*/

View File

@@ -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) {

View File

@@ -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;");
}
//文件上传

View File

@@ -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:

View File

@@ -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;");
}
//文件上传

View File

@@ -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';");

View File

@@ -128,16 +128,6 @@ public class DataTracerChangeContentService {
return this.getAddDeleteContent(object);
}
/**
* 解析批量bean的内容
*
* @param objectList 对象列表
* @return 单个内容
*/
public <T> String getChangeContent(List<T> objectList) {
return this.getObjectListContent(objectList);
}
// ---------------------------- 以下 是 私有private 方法 ----------------------------
/**
@@ -170,6 +160,15 @@ public class DataTracerChangeContentService {
return "【原数据】:<br/>" + oldContent + "<br/>" + "【新数据】:<br/>" + newContent;
}
/**
* 解析批量bean的内容
*
* @param objectList 对象列表
* @return 单个内容
*/
public <T> String getChangeContent(List<T> objectList) {
return this.getObjectListContent(objectList);
}
/**
* 获取一个对象的内容信息

View File

@@ -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;

View File

@@ -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
};

View File

@@ -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
};

View File

@@ -0,0 +1,239 @@
<!--
* ${basic.description}
*
* @Author: ${basic.frontAuthor}
* @Date: ${basic.frontDate}
* @Copyright ${basic.copyright}
-->
<template>
<a-$!{insertAndUpdate.pageType}
:title="form.$!{primaryKeyFieldName} ? '编辑' : '添加'"
:width="$!{insertAndUpdate.width}"
:open="visibleFlag"
#if($!{insertAndUpdate.pageType} == 'drawer')
@close="onClose"
#else
@cancel="onClose"
#end
:maskClosable="false"
:destroyOnClose="true"
>
<a-form ref="formRef" :model="form" :rules="rules" :label-col="{ span: 5 }" >
#if($insertAndUpdate.countPerLine == 1)
#foreach ($field in $formFields)
#if($field.frontComponent == "Input")
<a-form-item label="$!{field.label}" name="${field.fieldName}">
<a-input style="width: 100%" v-model:value="form.${field.fieldName}" placeholder="$!{field.label}" />
</a-form-item>
#end
#if($field.frontComponent == "InputNumber")
<a-form-item label="$!{field.label}" name="${field.fieldName}">
<a-input-number style="width: 100%" v-model:value="form.${field.fieldName}" placeholder="$!{field.label}" />
</a-form-item>
#end
#if($field.frontComponent == "Textarea")
<a-form-item label="$!{field.label}" name="${field.fieldName}">
<a-textarea style="width: 100%" v-model:value="form.${field.fieldName}" placeholder="$!{field.label}" />
</a-form-item>
#end
#if($field.frontComponent == "BooleanSelect")
<a-form-item label="$!{field.label}" name="${field.fieldName}">
<BooleanSelect v-model:value="form.${field.fieldName}" style="width: 100%" />
</a-form-item>
#end
#if($field.frontComponent == "SmartEnumSelect")
<a-form-item label="$codeGeneratorTool.removeEnumDesc($!{field.label})" name="${field.fieldName}">
<SmartEnumSelect width="100%" v-model:value="form.${field.fieldName}" enum-name="$!{field.upperUnderscoreEnum}" placeholder="$codeGeneratorTool.removeEnumDesc($!{field.label})"/>
</a-form-item>
#end
#if($field.frontComponent == "DictSelect")
<a-form-item label="$codeGeneratorTool.removeEnumDesc($!{field.label})" name="${field.fieldName}">
<DictSelect width="100%" v-model:value="form.${field.fieldName}" dict-code="DICT_CODE_ENUM.$!{field.dict} || '$!{field.dict}'" placeholder="$!{field.label}"/>
</a-form-item>
#end
#if($field.frontComponent == "Date")
<a-form-item label="$!{field.label}" name="${field.fieldName}">
<a-date-picker valueFormat="YYYY-MM-DD" v-model:value="form.$!{field.fieldName}" style="width: 100%" placeholder="$!{field.label}"/>
</a-form-item>
#end
#if($field.frontComponent == "DateTime")
<a-form-item label="$!{field.label}" name="${field.fieldName}">
<a-date-picker show-time valueFormat="YYYY-MM-DD HH:mm:ss" v-model:value="form.$!{field.fieldName}" style="width: 100%" placeholder="$!{field.label}" />
</a-form-item>
#end
#if($field.frontComponent == "FileUpload")
<a-form-item label="$!{field.label}" name="${field.fieldName}">
<FileUpload
:defaultFileList="form.$!{field.fieldName}"
:folder="FILE_FOLDER_TYPE_ENUM.COMMON.value"
buttonText="上传 $!{field.label}"
listType="text"
@change="e => form.$!{field.fieldName} = e"
/>
</a-form-item>
#end
#end
#end
#if($insertAndUpdate.countPerLine > 1)
<a-row>
#set($span=24 / $!insertAndUpdate.countPerLine )
#foreach ($field in $formFields)
<a-col :span="$!{span}">
#if($field.frontComponent == "Input")
<a-form-item label="$!{field.label}" name="${field.fieldName}">
<a-input style="width: 100%" v-model:value="form.${field.fieldName}" placeholder="$!{field.label}" />
</a-form-item>
#end
#if($field.frontComponent == "InputNumber")
<a-form-item label="$!{field.label}" name="${field.fieldName}">
<a-input-number style="width: 100%" v-model:value="form.${field.fieldName}" placeholder="$!{field.label}" />
</a-form-item>
#end
#if($field.frontComponent == "Textarea")
<a-form-item label="$!{field.label}" name="${field.fieldName}">
<a-textarea style="width: 100%" v-model:value="form.${field.fieldName}" placeholder="$!{field.label}" />
</a-form-item>
#end
#if($field.frontComponent == "BooleanSelect")
<a-form-item label="$!{field.label}" name="${field.fieldName}">
<BooleanSelect v-model:value="form.${field.fieldName}" style="width: 100%" />
</a-form-item>
#end
#if($field.frontComponent == "SmartEnumSelect")
<a-form-item label="$codeGeneratorTool.removeEnumDesc($!{field.label})" name="${field.fieldName}">
<SmartEnumSelect width="100%" v-model:value="form.${field.fieldName}" enum-name="$!{field.upperUnderscoreEnum}" placeholder="$codeGeneratorTool.removeEnumDesc($!{field.label})"/>
</a-form-item>
#end
#if($field.frontComponent == "DictSelect")
<a-form-item label="$codeGeneratorTool.removeEnumDesc($!{field.label})" name="${field.fieldName}">
<DictSelect width="100%" v-model:value="form.${field.fieldName}" dict-code="DICT_CODE_ENUM.$!{field.dict} || '$!{field.dict}'" placeholder="$!{field.label}"/>
</a-form-item>
#end
#if($field.frontComponent == "Date")
<a-form-item label="$!{field.label}" name="${field.fieldName}">
<a-date-picker valueFormat="YYYY-MM-DD" v-model:value="form.$!{field.fieldName}" style="width: 100%" placeholder="$!{field.label}"/>
</a-form-item>
#end
#if($field.frontComponent == "DateTime")
<a-form-item label="$!{field.label}" name="${field.fieldName}">
<a-date-picker show-time valueFormat="YYYY-MM-DD HH:mm:ss" v-model:value="form.$!{field.fieldName}" style="width: 100%" placeholder="$!{field.label}" />
</a-form-item>
#end
#if($field.frontComponent == "FileUpload")
<a-form-item label="$!{field.label}" name="${field.fieldName}">
<FileUpload
:defaultFileList="form.$!{field.fieldName}"
:folder="FILE_FOLDER_TYPE_ENUM.COMMON.value"
buttonText="上传 $!{field.label}"
listType="text"
@change="e => form.$!{field.fieldName} = e"
/>
</a-form-item>
#end
</a-col>
#end
</a-row>
#end
</a-form>
<template #footer>
<a-space>
<a-button @click="onClose">取消</a-button>
<a-button type="primary" @click="onSubmit">保存</a-button>
</a-space>
</template>
</a-$!{insertAndUpdate.pageType}>
</template>
<script setup lang="ts">
import { reactive, ref, nextTick } from 'vue';
import _ from 'lodash';
import { message } from 'ant-design-vue';
import { SmartLoading } from '/@/components/framework/smart-loading';
import { $!{name.lowerCamel}Api } from '/@/api/business/$!{name.lowerHyphenCamel}/$!{name.lowerHyphenCamel}-api';
import { smartSentry } from '/@/lib/smart-sentry';
#foreach ($import in $frontImportList)
$!{import}
#end
// ------------------------ 事件 ------------------------
const emits = defineEmits(['reloadList']);
// ------------------------ 显示与隐藏 ------------------------
// 是否显示
const visibleFlag = ref(false);
function show(rowData) {
Object.assign(form, formDefault);
if (rowData && !_.isEmpty(rowData)) {
Object.assign(form, rowData);
}
// 使用字典时把下面这注释修改成自己的字典字段 有多个字典字段就复制多份同理修改 不然打开表单时不显示字典初始值
// if (form.status && form.status.length > 0) {
// form.status = form.status.map((e) => e.valueCode);
// }
visibleFlag.value = true;
nextTick(() => {
formRef.value.clearValidate();
});
}
function onClose() {
Object.assign(form, formDefault);
visibleFlag.value = false;
}
// ------------------------ 表单 ------------------------
// 组件ref
const formRef = ref();
const formDefault = {
#foreach ($field in $formFields)
$!{field.fieldName}: undefined, //$!{field.label}
#end
};
let form = reactive({ ...formDefault });
const rules = {
#foreach ($field in $formFields)
#if($field.requiredFlag)
$!{field.fieldName}: [{ required: true, message: '$!{field.label} 必填' }],
#end
#end
};
// 点击确定,验证表单
async function onSubmit() {
try {
await formRef.value.validateFields();
save();
} catch (err) {
message.error('参数验证错误,请仔细填写表单数据!');
}
}
// 新建、编辑API
async function save() {
SmartLoading.show();
try {
if (form.$!{primaryKeyFieldName}) {
await $!{name.lowerCamel}Api.update(form);
} else {
await $!{name.lowerCamel}Api.add(form);
}
message.success('操作成功');
emits('reloadList');
onClose();
} catch (err) {
smartSentry.captureError(err);
} finally {
SmartLoading.hide();
}
}
defineExpose({
show,
});
</script>

View File

@@ -0,0 +1,348 @@
<!--
* ${basic.description}
*
* @Author: ${basic.frontAuthor}
* @Date: ${basic.frontDate}
* @Copyright ${basic.copyright}
-->
<template>
<!---------- 查询表单form begin ----------->
<a-form class="smart-query-form">
<a-row class="smart-query-form-row">
#foreach ($field in $queryFields)
#if($field.queryTypeEnum == "Like")
<a-form-item label="${field.label}" class="smart-query-form-item">
<a-input style="width: ${field.width}" v-model:value="queryForm.${field.fieldName}" placeholder="${field.label}" />
</a-form-item>
#end
#if($field.queryTypeEnum == "Equal")
<a-form-item label="${field.label}" class="smart-query-form-item">
<a-input style="width: ${field.width}" v-model:value="queryForm.${field.fieldName}" placeholder="${field.label}" />
</a-form-item>
#end
#if($field.queryTypeEnum == "Dict")
<a-form-item label="${field.label}" class="smart-query-form-item">
<DictSelect dict-code="DICT_CODE_ENUM.$!{field.dict} || '$!{field.dict}'" placeholder="${field.label}" v-model:value="queryForm.${field.fieldName}" width="${field.width}" />
</a-form-item>
#end
#if($field.queryTypeEnum == "Enum")
<a-form-item label="$codeGeneratorTool.removeEnumDesc(${field.label})" class="smart-query-form-item">
<SmartEnumSelect width="${field.width}" v-model:value="queryForm.${field.fieldName}" enum-name="$!{field.frontEnumName}" placeholder="$codeGeneratorTool.removeEnumDesc(${field.label})"/>
</a-form-item>
#end
#if($field.queryTypeEnum == "Date")
<a-form-item label="${field.label}" class="smart-query-form-item">
<a-date-picker valueFormat="YYYY-MM-DD" v-model:value="queryForm.$!{field.fieldName}" style="width: ${field.width}" />
</a-form-item>
#end
#if($field.queryTypeEnum == "DateRange")
<a-form-item label="${field.label}" class="smart-query-form-item">
<a-range-picker v-model:value="queryForm.$!{field.fieldName}" :presets="defaultTimeRanges" style="width: ${field.width}" @change="onChange$codeGeneratorTool.lowerCamel2UpperCamel(${field.fieldName})" />
</a-form-item>
#end
#end
<a-form-item class="smart-query-form-item">
<a-button type="primary" @click="onSearch">
<template #icon>
<SearchOutlined />
</template>
查询
</a-button>
<a-button @click="resetQuery" class="smart-margin-left10">
<template #icon>
<ReloadOutlined />
</template>
重置
</a-button>
</a-form-item>
</a-row>
</a-form>
<!---------- 查询表单form end ----------->
<a-card size="small" :bordered="false" :hoverable="true">
<!---------- 表格操作行 begin ----------->
<a-row class="smart-table-btn-block">
<div class="smart-table-operate-block">
#if($insertAndUpdate.isSupportInsertAndUpdate)
<a-button @click="showForm" type="primary" size="small">
<template #icon>
<PlusOutlined />
</template>
新建
</a-button>
#end
#if($deleteInfo.isSupportDelete && ($deleteInfo.deleteEnum == "Batch"||$deleteInfo.deleteEnum == "SingleAndBatch"))
<a-button @click="confirmBatchDelete" type="primary" danger size="small" :disabled="selectedRowKeyList.length == 0">
<template #icon>
<DeleteOutlined />
</template>
批量删除
</a-button>
#end
</div>
<div class="smart-table-setting-block">
<TableOperator v-model="columns" :tableId="null" :refresh="queryData" />
</div>
</a-row>
<!---------- 表格操作行 end ----------->
<!---------- 表格 begin ----------->
<a-table
size="small"
:scroll="{ y: 800 }"
:dataSource="tableData"
:columns="columns"
rowKey="$!{primaryKeyFieldName}"
bordered
:loading="tableLoading"
:pagination="false"
#if($deleteInfo.isSupportDelete && ($deleteInfo.deleteEnum == "Batch"||$deleteInfo.deleteEnum == "SingleAndBatch"))
:row-selection="{ selectedRowKeys: selectedRowKeyList, onChange: onSelectChange }"
#end
>
<template #bodyCell="{ text, record, column }">
#foreach ($field in $listFields)
#if($field.frontComponent == "FileUpload")
<template v-if="column.dataIndex === '$field.fieldName'">
<FilePreview :file-list="text" type="picture" />
</template>
#end
#end
#foreach ($field in $listFields)
#if($field.frontEnumPlugin)
<template v-if="column.dataIndex === '$!{field.fieldName}'">
<span>{{ $!{field.frontEnumPlugin} }}</span>
</template>
#end
#end
#foreach ($field in $listFields)
#if($field.dict)
<template v-if="column.dataIndex === '$!{field.fieldName}'">
<DictLabel :dict-code="DICT_CODE_ENUM.$!{field.dict} || '$!{field.dict}'" :data-value="text" />
</template>
#end
#end
<template v-if="column.dataIndex === 'action'">
<div class="smart-table-operate">
#if($insertAndUpdate.isSupportInsertAndUpdate)
<a-button @click="showForm(record)" type="link">编辑</a-button>
#end
#if($deleteInfo.isSupportDelete && ($deleteInfo.deleteEnum == "Single"||$deleteInfo.deleteEnum == "SingleAndBatch"))
<a-button @click="onDelete(record)" danger type="link">删除</a-button>
#end
</div>
</template>
</template>
</a-table>
<!---------- 表格 end ----------->
<div class="smart-query-table-page">
<a-pagination
showSizeChanger
showQuickJumper
show-less-items
:pageSizeOptions="PAGE_SIZE_OPTIONS"
:defaultPageSize="queryForm.pageSize"
v-model:current="queryForm.pageNum"
v-model:pageSize="queryForm.pageSize"
:total="total"
@change="queryData"
@showSizeChange="queryData"
:show-total="(total) => `共${total}条`"
/>
</div>
<$!{name.upperCamel}Form ref="formRef" @reloadList="queryData"/>
</a-card>
</template>
<script setup lang="ts">
import { reactive, ref, onMounted } from 'vue';
import { message, Modal } from 'ant-design-vue';
import { SmartLoading } from '/@/components/framework/smart-loading';
import { $!{name.lowerCamel}Api } from '/@/api/business/$!{name.lowerHyphenCamel}/$!{name.lowerHyphenCamel}-api';
import { PAGE_SIZE_OPTIONS } from '/@/constants/common-const';
import { smartSentry } from '/@/lib/smart-sentry';
import TableOperator from '/@/components/support/table-operator/index.vue';
#foreach ($import in $frontImportList)
$!{import}
#end
// ---------------------------- 表格列 ----------------------------
const columns = ref([
#foreach ($field in $tableFields)
#if($field.showFlag)
{
title: '$!{field.label}',
dataIndex: '$!{field.fieldName}',
ellipsis: $!{field.ellipsisFlag},
#if(${field.width} > 0)
width: $!{field.width},
#end
},
#end
#end
#if($insertAndUpdate.isSupportInsertAndUpdate || $insertAndUpdate.isSupportInsertAndUpdate)
{
title: '操作',
dataIndex: 'action',
fixed: 'right',
width: 90,
},
#end
]);
// ---------------------------- 查询数据表单和方法 ----------------------------
const queryFormState = {
#foreach ($field in $queryFields)
#if($field.queryTypeEnum == "DateRange")
$!{field.fieldName}: [], //$!{field.label}
$!{field.fieldName}Begin: undefined, //$!{field.label} 开始
$!{field.fieldName}End: undefined, //$!{field.label} 结束
#end
#if($field.queryTypeEnum != "DateRange")
$!{field.fieldName}: undefined, //$!{field.label}
#end
#end
pageNum: 1,
pageSize: 10,
};
// 查询表单form
const queryForm = reactive({ ...queryFormState });
// 表格加载loading
const tableLoading = ref(false);
// 表格数据
const tableData = ref([]);
// 总数
const total = ref(0);
// 重置查询条件
function resetQuery() {
let pageSize = queryForm.pageSize;
Object.assign(queryForm, queryFormState);
queryForm.pageSize = pageSize;
queryData();
}
// 搜索
function onSearch(){
queryForm.pageNum = 1;
queryData();
}
// 查询数据
async function queryData() {
tableLoading.value = true;
try {
let queryResult = await $!{name.lowerCamel}Api.queryPage(queryForm);
tableData.value = queryResult.data.list;
total.value = queryResult.data.total;
} catch (e) {
smartSentry.captureError(e);
} finally {
tableLoading.value = false;
}
}
#foreach ($field in $queryFields)
#if($field.queryTypeEnum == "DateRange")
function onChange$codeGeneratorTool.lowerCamel2UpperCamel(${field.fieldName})(dates, dateStrings){
queryForm.$!{field.fieldName}Begin = dateStrings[0];
queryForm.$!{field.fieldName}End = dateStrings[1];
}
#end
#end
onMounted(queryData);
#if($insertAndUpdate.isSupportInsertAndUpdate)
// ---------------------------- 添加/修改 ----------------------------
const formRef = ref();
function showForm(data) {
formRef.value.show(data);
}
#end
#if($deleteInfo.isSupportDelete)
#if($deleteInfo.deleteEnum == "Batch" || $deleteInfo.deleteEnum == "SingleAndBatch")
// ---------------------------- 单个删除 ----------------------------
//确认删除
function onDelete(data){
Modal.confirm({
title: '提示',
content: '确定要删除选吗?',
okText: '删除',
okType: 'danger',
onOk() {
requestDelete(data);
},
cancelText: '取消',
onCancel() {},
});
}
//请求删除
async function requestDelete(data){
SmartLoading.show();
try {
let deleteForm = {
goodsIdList: selectedRowKeyList.value,
};
await $!{name.lowerCamel}Api.delete(data.$!{primaryKeyFieldName});
message.success('删除成功');
queryData();
} catch (e) {
smartSentry.captureError(e);
} finally {
SmartLoading.hide();
}
}
#end
#if($deleteInfo.deleteEnum == "Single" || $deleteInfo.deleteEnum == "SingleAndBatch")
// ---------------------------- 批量删除 ----------------------------
// 选择表格行
const selectedRowKeyList = ref([]);
function onSelectChange(selectedRowKeys) {
selectedRowKeyList.value = selectedRowKeys;
}
// 批量删除
function confirmBatchDelete() {
Modal.confirm({
title: '提示',
content: '确定要批量删除这些数据吗?',
okText: '删除',
okType: 'danger',
onOk() {
requestBatchDelete();
},
cancelText: '取消',
onCancel() {},
});
}
//请求批量删除
async function requestBatchDelete() {
try {
SmartLoading.show();
await $!{name.lowerCamel}Api.batchDelete(selectedRowKeyList.value);
message.success('删除成功');
queryData();
} catch (e) {
smartSentry.captureError(e);
} finally {
SmartLoading.hide();
}
}
#end
#end
</script>

View File

@@ -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

View File

@@ -12,7 +12,9 @@
<select id="getAll" resultType="net.lab1024.sa.base.module.support.dict.domain.vo.DictDataVO">
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

View File

@@ -28,15 +28,11 @@
</template>
<script setup>
import { onMounted, ref, watch } from 'vue';
import { dictApi } from '/@/api/support/dict-api';
defineExpose({
queryDict,
});
import { computed, ref, watch } from 'vue';
import { useDictStore } from '/@/store/modules/system/dict.js';
const props = defineProps({
value: [Array, String],
value: [Array, String, Number],
placeholder: {
type: String,
default: '请选择字典',
@@ -56,15 +52,9 @@
},
});
// -------------------------- 查询 字典数据 --------------------------
// -------------------------- 字典数据 --------------------------
const dictList = ref([]);
async function queryDict() {
let response = await dictApi.getAllDict();
dictList.value = response.data;
}
onMounted(queryDict);
const dictList = computed(() => useDictStore().dictList.filter((item) => !item.disabledFlag));
// -------------------------- 选中 相关、事件 --------------------------
const emit = defineEmits(['update:value', 'change']);

View File

@@ -28,12 +28,12 @@
</template>
<script setup>
import { onMounted, ref, watch } from 'vue';
import { computed, ref, watch } from 'vue';
import { useDictStore } from '/@/store/modules/system/dict.js';
const props = defineProps({
dictCode: String,
value: [Array, String],
value: [Array, String, Number],
mode: {
type: String,
default: 'combobox',
@@ -69,13 +69,11 @@
// -------------------------- 查询 字典数据 --------------------------
const dictDataList = ref([]);
function initDictData() {
let list = useDictStore().getDictData(props.dictCode);
dictDataList.value = list.filter((item) => !props.hiddenOption.includes(item.dataValue) && !item.disabledFlag);
}
onMounted(initDictData);
const dictDataList = computed(() =>
useDictStore()
.getDictData(props.dictCode)
.filter((item) => !props.hiddenOption.includes(item.dataValue) && !item.disabledFlag)
);
// -------------------------- 选中 相关、事件 --------------------------

View File

@@ -1,15 +1,22 @@
import { defineStore } from 'pinia';
import { DICT_SPLIT } from '/@/constants/support/dict-const.js';
import _ from 'lodash';
import { dictApi } from '/@/api/support/dict-api.js';
import { smartSentry } from '/@/lib/smart-sentry.js';
export const useDictStore = defineStore({
id: 'dict',
state: () => ({
// 字典code集合
dictList: [],
// 字典集合
dictMap: new Map(),
}),
actions: {
getDictList(){
return this.dictList;
},
// 获取字典数据
getDictData(dictCode) {
if (!dictCode) {
@@ -31,7 +38,7 @@ export const useDictStore = defineStore({
}
// 是数字的话,需要特殊处理
if(_.isNumber(dataValue)){
if (_.isNumber(dataValue)) {
let target = _.find(dict, { dataValue: dataValue });
return target ? target.dataLabel : '';
}
@@ -46,10 +53,25 @@ export const useDictStore = defineStore({
}
return result.join(DICT_SPLIT);
},
// 刷新字典
async refreshData(){
try{
const dictRes = await dictApi.getAllDictData();
this.initData(dictRes.data);
}catch (e){
smartSentry.captureError(e);
}
},
// 初始化字典
initData(dictDataList) {
this.dictMap.clear();
this.dictList = [];
for (let data of dictDataList) {
if (!_.some(this.dictList, { dictCode: data.dictCode })) {
this.dictList.push({ dictCode: data.dictCode, dictName: data.dictName ,disabledFlag: data.dictDisabledFlag});
}
let dataArray = this.dictMap.get(data.dictCode);
if (!dataArray) {
dataArray = [];
@@ -57,6 +79,8 @@ export const useDictStore = defineStore({
}
dataArray.push(data);
}
console.log(this.dictList,2)
},
},
});

View File

@@ -10,14 +10,14 @@
<template>
<div class="wrapper">
<div class="sider-fl">
<a-tree :tree-data="treeData" :fieldNames="{ title: 'name', key: 'departmentId' }" :selectable="false" v-model:expandedKeys="expandedKeys">
<a-tree :tree-data="treeData" :fieldNames="{ title: 'departmentName', key: 'departmentId' }" :selectable="false" v-model:expandedKeys="expandedKeys">
<template #switcherIcon="{ switcherCls }">
<caret-down-outlined :class="switcherCls" />
</template>
<template #title="{ name, departmentId }">
<template #title="{ departmentName, departmentId }">
<div class="list-item" :class="{ active: checkExists(departmentId) }">
<div class="list-item-title">{{ name }}</div>
<check-circle-filled class="check-icon-style" @click="onSelectAdd(name, departmentId)" />
<div class="list-item-title">{{ departmentName }}</div>
<check-circle-filled class="check-icon-style" @click="onSelectAdd(departmentName, departmentId)" />
</div>
</template>
</a-tree>

View File

@@ -88,6 +88,7 @@
}
department.id = department.departmentId;
department.name = department.departmentName;
department.key = 'department_' + department.departmentId;
department.dataType = NOTICE_VISIBLE_RANGE_DATA_TYPE_ENUM.DEPARTMENT.value;
let employeeChildren = employeeList

View File

@@ -110,20 +110,10 @@
ellipsis: true,
},
{
title: '代码配置',
title: '代码配置时间',
dataIndex: 'configTime',
width: 150,
},
{
title: '表创建时间',
dataIndex: 'createTime',
width: 150,
},
{
title: '表修改时间',
dataIndex: 'updateTime',
width: 150,
},
{
title: '操作',

View File

@@ -112,8 +112,8 @@ export const JS_FILE_LIST = [
export const TS_FILE_LIST = [
'ts/list.vue', //
'ts/form.vue', //
'ts/api.js', //
'ts/const.js', //
'ts/api.ts', //
'ts/const.ts', //
];
// -------------------------------- 后端文件 --------------------------------

View File

@@ -68,7 +68,6 @@
if (deletedFlagColumn) {
deleteFlagColumnName.value = deletedFlagColumn.columnName;
}
console.log(deletedFlagColumn);
//表单
let deleteInfo = config.deleteInfo;

View File

@@ -44,7 +44,7 @@
</template>
<template v-if="column.dataIndex === 'nullableFlag'">
<a-tag color="error" v-if="text">非空</a-tag>
<a-tag color="error" v-if="!text">非空</a-tag>
</template>
<template v-if="column.dataIndex === 'fieldName'">
@@ -84,10 +84,11 @@
import DictCodeSelect from '/@/components/support/dict-code-select/index.vue';
import { convertUpperCamel, convertLowerCamel } from '/@/utils/str-util';
import _ from 'lodash';
import { useDictStore } from '/@/store/modules/system/dict.js';
const dictRef = ref();
function refreshDict() {
dictRef.value.queryDict();
useDictStore().refreshData();
}
//------------------------ 全局数据 ---------------------

View File

@@ -87,7 +87,7 @@
</template>
<template v-if="column.dataIndex === 'nullableFlag'">
<a-tag color="error" v-if="text">非空</a-tag>
<a-tag color="error" v-if="!text">非空</a-tag>
</template>
<template v-if="column.dataIndex === 'required'">
@@ -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) {

View File

@@ -19,7 +19,7 @@
</a-form-item>
<a-form-item label="备注" name="remark">
<a-textarea v-model="form.remark" style="width: 100%; height: 100px; outline: none" />
<a-textarea v-model:value="form.remark" style="width: 100%; height: 100px; outline: none" />
</a-form-item>
</a-form>
</a-modal>

View File

@@ -19,8 +19,8 @@
<a-form-item label="职务名称" name="positionName">
<a-input style="width: 100%" v-model:value="form.positionName" placeholder="职务名称" />
</a-form-item>
<a-form-item label="职级" name="level">
<a-input style="width: 100%" v-model:value="form.level" placeholder="职级" />
<a-form-item label="职级" name="positionLevel">
<a-input style="width: 100%" v-model:value="form.positionLevel" placeholder="职级" />
</a-form-item>
<a-form-item label="排序" name="sort">
<a-input-number :min="0" :step="1" :precision="0" style="width: 100%" v-model:value="form.sort" placeholder="排序" />
@@ -92,7 +92,7 @@
const formDefault = {
positionId: undefined,
positionName: undefined, //职务名称
level: undefined, //职纪
positionLevel: undefined, //职纪
sort: 0,
remark: undefined, //备注
};

View File

@@ -115,7 +115,7 @@
},
{
title: '职级',
dataIndex: 'level',
dataIndex: 'positionLevel',
ellipsis: true,
},
{

View File

@@ -37,8 +37,3 @@
let activeKey = ref();
</script>
<style scoped lang="less">
.role-container {
height: 100%;
}
</style>

View File

@@ -41,6 +41,7 @@
<style scoped lang="less">
.height100 {
height: 100%;
flex-wrap: nowrap;
}
.role-setting {
width: calc(100% - 250px);

View File

@@ -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: {

View File

@@ -89,6 +89,7 @@
return text;
}
}
</script>
<style scoped lang="less">
:deep(.ant-table-column-sorters) {

View File

@@ -28,15 +28,11 @@
</template>
<script setup lang="ts">
import { onMounted, ref, watch } from 'vue';
import { dictApi } from '/@/api/support/dict-api';
defineExpose({
queryDict,
});
import { computed, ref, watch } from 'vue';
import { useDictStore } from '/@/store/modules/system/dict.js';
const props = defineProps({
value: [Array, String],
value: [Array, String, Number],
placeholder: {
type: String,
default: '请选择字典',
@@ -56,15 +52,9 @@
},
});
// -------------------------- 查询 字典数据 --------------------------
// -------------------------- 字典数据 --------------------------
const dictList = ref([]);
async function queryDict() {
let response = await dictApi.getAllDict();
dictList.value = response.data;
}
onMounted(queryDict);
const dictList = computed(() => useDictStore().dictList.filter((item) => !item.disabledFlag));
// -------------------------- 选中 相关、事件 --------------------------
const emit = defineEmits(['update:value', 'change']);

View File

@@ -28,12 +28,12 @@
</template>
<script setup lang="ts">
import { onMounted, ref, watch } from 'vue';
import { computed, ref, watch } from 'vue';
import { useDictStore } from '/@/store/modules/system/dict.js';
const props = defineProps({
dictCode: String,
value: [Array, String],
value: [Array, String, Number],
mode: {
type: String,
default: 'combobox',
@@ -69,13 +69,11 @@
// -------------------------- 查询 字典数据 --------------------------
const dictDataList = ref([]);
function initDictData() {
let list = useDictStore().getDictData(props.dictCode);
dictDataList.value = list.filter((item) => !props.hiddenOption.includes(item.dataValue) && !item.disabledFlag);
}
onMounted(initDictData);
const dictDataList = computed(() =>
useDictStore()
.getDictData(props.dictCode)
.filter((item) => !props.hiddenOption.includes(item.dataValue) && !item.disabledFlag)
);
// -------------------------- 选中 相关、事件 --------------------------

View File

@@ -1,15 +1,22 @@
import { defineStore } from 'pinia';
import { DICT_SPLIT } from '/@/constants/support/dict-const.js';
import _ from 'lodash';
import { dictApi } from '/@/api/support/dict-api.js';
import { smartSentry } from '/@/lib/smart-sentry.js';
export const useDictStore = defineStore({
id: 'dict',
state: () => ({
// 字典code集合
dictList: [],
// 字典集合
dictMap: new Map(),
}),
actions: {
getDictList(){
return this.dictList;
},
// 获取字典数据
getDictData(dictCode) {
if (!dictCode) {
@@ -31,7 +38,7 @@ export const useDictStore = defineStore({
}
// 是数字的话,需要特殊处理
if(_.isNumber(dataValue)){
if (_.isNumber(dataValue)) {
let target = _.find(dict, { dataValue: dataValue });
return target ? target.dataLabel : '';
}
@@ -46,10 +53,25 @@ export const useDictStore = defineStore({
}
return result.join(DICT_SPLIT);
},
// 刷新字典
async refreshData(){
try{
const dictRes = await dictApi.getAllDictData();
this.initData(dictRes.data);
}catch (e){
smartSentry.captureError(e);
}
},
// 初始化字典
initData(dictDataList) {
this.dictMap.clear();
this.dictList = [];
for (let data of dictDataList) {
if (!_.some(this.dictList, { dictCode: data.dictCode })) {
this.dictList.push({ dictCode: data.dictCode, dictName: data.dictName ,disabledFlag: data.dictDisabledFlag});
}
let dataArray = this.dictMap.get(data.dictCode);
if (!dataArray) {
dataArray = [];
@@ -57,6 +79,8 @@ export const useDictStore = defineStore({
}
dataArray.push(data);
}
console.log(this.dictList,2)
},
},
});

View File

@@ -10,14 +10,14 @@
<template>
<div class="wrapper">
<div class="sider-fl">
<a-tree :tree-data="treeData" :fieldNames="{ title: 'name', key: 'departmentId' }" :selectable="false" v-model:expandedKeys="expandedKeys">
<a-tree :tree-data="treeData" :fieldNames="{ title: 'departmentName', key: 'departmentId' }" :selectable="false" v-model:expandedKeys="expandedKeys">
<template #switcherIcon="{ switcherCls }">
<caret-down-outlined :class="switcherCls" />
</template>
<template #title="{ name, departmentId }">
<template #title="{ departmentName, departmentId }">
<div class="list-item" :class="{ active: checkExists(departmentId) }">
<div class="list-item-title">{{ name }}</div>
<check-circle-filled class="check-icon-style" @click="onSelectAdd(name, departmentId)" />
<div class="list-item-title">{{ departmentName }}</div>
<check-circle-filled class="check-icon-style" @click="onSelectAdd(departmentName, departmentId)" />
</div>
</template>
</a-tree>

View File

@@ -88,6 +88,7 @@
}
department.id = department.departmentId;
department.name = department.departmentName;
department.key = 'department_' + department.departmentId;
department.dataType = NOTICE_VISIBLE_RANGE_DATA_TYPE_ENUM.DEPARTMENT.value;
let employeeChildren = employeeList

View File

@@ -110,20 +110,10 @@
ellipsis: true,
},
{
title: '代码配置',
title: '代码配置时间',
dataIndex: 'configTime',
width: 150,
},
{
title: '表创建时间',
dataIndex: 'createTime',
width: 150,
},
{
title: '表修改时间',
dataIndex: 'updateTime',
width: 150,
},
{
title: '操作',

View File

@@ -112,8 +112,8 @@ export const JS_FILE_LIST = [
export const TS_FILE_LIST = [
'ts/list.vue', //
'ts/form.vue', //
'ts/api.js', //
'ts/const.js', //
'ts/api.ts', //
'ts/const.ts', //
];
// -------------------------------- 后端文件 --------------------------------

View File

@@ -68,7 +68,6 @@
if (deletedFlagColumn) {
deleteFlagColumnName.value = deletedFlagColumn.columnName;
}
console.log(deletedFlagColumn);
//表单
let deleteInfo = config.deleteInfo;

View File

@@ -44,7 +44,7 @@
</template>
<template v-if="column.dataIndex === 'nullableFlag'">
<a-tag color="error" v-if="text">非空</a-tag>
<a-tag color="error" v-if="!text">非空</a-tag>
</template>
<template v-if="column.dataIndex === 'fieldName'">
@@ -84,10 +84,11 @@
import DictCodeSelect from '/@/components/support/dict-code-select/index.vue';
import { convertUpperCamel, convertLowerCamel } from '/@/utils/str-util';
import _ from 'lodash';
import { useDictStore } from '/@/store/modules/system/dict.js';
const dictRef = ref();
function refreshDict() {
dictRef.value.queryDict();
useDictStore().refreshData();
}
//------------------------ 全局数据 ---------------------

View File

@@ -87,7 +87,7 @@
</template>
<template v-if="column.dataIndex === 'nullableFlag'">
<a-tag color="error" v-if="text">非空</a-tag>
<a-tag color="error" v-if="!text">非空</a-tag>
</template>
<template v-if="column.dataIndex === 'required'">
@@ -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) {

View File

@@ -19,7 +19,7 @@
</a-form-item>
<a-form-item label="备注" name="remark">
<a-textarea v-model="form.remark" style="width: 100%; height: 100px; outline: none" />
<a-textarea v-model:value="form.remark" style="width: 100%; height: 100px; outline: none" />
</a-form-item>
</a-form>
</a-modal>

View File

@@ -19,8 +19,8 @@
<a-form-item label="职务名称" name="positionName">
<a-input style="width: 100%" v-model:value="form.positionName" placeholder="职务名称" />
</a-form-item>
<a-form-item label="职级" name="level">
<a-input style="width: 100%" v-model:value="form.level" placeholder="职级" />
<a-form-item label="职级" name="positionLevel">
<a-input style="width: 100%" v-model:value="form.positionLevel" placeholder="职级" />
</a-form-item>
<a-form-item label="排序" name="sort">
<a-input-number :min="0" :step="1" :precision="0" style="width: 100%" v-model:value="form.sort" placeholder="排序" />
@@ -92,7 +92,7 @@
const formDefault = {
positionId: undefined,
positionName: undefined, //职务名称
level: undefined, //职纪
positionLevel: undefined, //职纪
sort: 0,
remark: undefined, //备注
};

View File

@@ -115,7 +115,7 @@
},
{
title: '职级',
dataIndex: 'level',
dataIndex: 'positionLevel',
ellipsis: true,
},
{

View File

@@ -37,8 +37,3 @@
let activeKey = ref();
</script>
<style scoped lang="less">
.role-container {
height: 100%;
}
</style>

View File

@@ -41,6 +41,7 @@
<style scoped lang="less">
.height100 {
height: 100%;
flex-wrap: nowrap;
}
.role-setting {
width: calc(100% - 250px);

View File

@@ -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: {

View File

@@ -84,6 +84,6 @@
"prettier": "3.0.2",
"sass": "1.69.7",
"sass-loader": "10.1.1",
"vite": "4.0.3"
"vite": "4.5.14"
}
}

View File

@@ -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

View File

@@ -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='操作记录';