mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-09-17 10:56:39 +08:00
v3.23.0 【新增】TS代码生成和优化;【优化】log日志格式;【优化】数据字典缓存;【优化】职位表结构
This commit is contained in:
parent
245f8c7856
commit
7ae4e898ad
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
- 前端:JavaScript/TypeScript + Vue3 + Vite5 + Pinia + Ant Design Vue 4.X
|
- 前端:JavaScript/TypeScript + Vue3 + Vite5 + Pinia + Ant Design Vue 4.X
|
||||||
- 移动端:uniapp (vue3版本) + uni-ui + (同时支持APP、小程序、H5)
|
- 移动端: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://smartadmin.vip](https://smartadmin.vip)
|
||||||
- 电脑在线预览:[https://preview.smartadmin.vip](https://preview.smartadmin.vip)
|
- 电脑在线预览:[https://preview.smartadmin.vip](https://preview.smartadmin.vip)
|
||||||
- 移动端在线预览:[https://app.smartadmin.vip](https://app.smartadmin.vip/#/pages/login/login)
|
- 移动端在线预览:[https://app.smartadmin.vip](https://app.smartadmin.vip/#/pages/login/login)
|
||||||
|
@ -29,7 +29,6 @@
|
|||||||
<druid.version>1.2.23</druid.version>
|
<druid.version>1.2.23</druid.version>
|
||||||
<google-linkedhashmap.version>1.4.2</google-linkedhashmap.version>
|
<google-linkedhashmap.version>1.4.2</google-linkedhashmap.version>
|
||||||
<google-guava.version>20.0</google-guava.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>
|
<reflections.version>0.9.11</reflections.version>
|
||||||
<commons-io.version>2.15.0</commons-io.version>
|
<commons-io.version>2.15.0</commons-io.version>
|
||||||
<commons-lang3.version>3.12.0</commons-lang3.version>
|
<commons-lang3.version>3.12.0</commons-lang3.version>
|
||||||
@ -127,12 +126,6 @@
|
|||||||
<version>${google-guava.version}</version>
|
<version>${google-guava.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>eu.bitwalker</groupId>
|
|
||||||
<artifactId>UserAgentUtils</artifactId>
|
|
||||||
<version>${user-agent-utils.version}</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.reflections</groupId>
|
<groupId>org.reflections</groupId>
|
||||||
<artifactId>reflections</artifactId>
|
<artifactId>reflections</artifactId>
|
||||||
@ -198,7 +191,6 @@
|
|||||||
<artifactId>hutool-all</artifactId>
|
<artifactId>hutool-all</artifactId>
|
||||||
<version>${hutool.version}</version>
|
<version>${hutool.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!--velocity begin-->
|
<!--velocity begin-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.velocity</groupId>
|
<groupId>org.apache.velocity</groupId>
|
||||||
|
@ -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 cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
@ -8,6 +8,7 @@ import jakarta.servlet.http.HttpServletResponse;
|
|||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import net.lab1024.sa.admin.constant.AdminSwaggerTagConst;
|
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.form.*;
|
||||||
import net.lab1024.sa.admin.module.business.oa.enterprise.domain.vo.EnterpriseEmployeeVO;
|
import net.lab1024.sa.admin.module.business.oa.enterprise.domain.vo.EnterpriseEmployeeVO;
|
||||||
import net.lab1024.sa.admin.module.business.oa.enterprise.domain.vo.EnterpriseExcelVO;
|
import net.lab1024.sa.admin.module.business.oa.enterprise.domain.vo.EnterpriseExcelVO;
|
@ -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 com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import net.lab1024.sa.admin.module.business.oa.enterprise.dao.EnterpriseEmployeeDao;
|
import net.lab1024.sa.admin.module.business.oa.enterprise.dao.EnterpriseEmployeeDao;
|
@ -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.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.google.common.collect.Lists;
|
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.EnterpriseExcelVO;
|
||||||
import net.lab1024.sa.admin.module.business.oa.enterprise.domain.vo.EnterpriseListVO;
|
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.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.admin.module.system.department.service.DepartmentService;
|
||||||
import net.lab1024.sa.base.common.code.UserErrorCode;
|
import net.lab1024.sa.base.common.code.UserErrorCode;
|
||||||
import net.lab1024.sa.base.common.domain.PageResult;
|
import net.lab1024.sa.base.common.domain.PageResult;
|
@ -3,7 +3,7 @@ package net.lab1024.sa.admin.module.business.oa.invoice.service;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
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.enterprise.domain.vo.EnterpriseVO;
|
||||||
import net.lab1024.sa.admin.module.business.oa.invoice.dao.InvoiceDao;
|
import net.lab1024.sa.admin.module.business.oa.invoice.dao.InvoiceDao;
|
||||||
import net.lab1024.sa.admin.module.business.oa.invoice.domain.*;
|
import net.lab1024.sa.admin.module.business.oa.invoice.domain.*;
|
||||||
|
@ -34,7 +34,7 @@ public class PositionEntity {
|
|||||||
/**
|
/**
|
||||||
* 职级
|
* 职级
|
||||||
*/
|
*/
|
||||||
private String level;
|
private String positionLevel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 排序
|
* 排序
|
||||||
|
@ -21,7 +21,7 @@ public class PositionAddForm {
|
|||||||
private String positionName;
|
private String positionName;
|
||||||
|
|
||||||
@Schema(description = "职级")
|
@Schema(description = "职级")
|
||||||
private String level;
|
private String positionLevel;
|
||||||
|
|
||||||
@Schema(description = "排序")
|
@Schema(description = "排序")
|
||||||
@NotNull(message = "排序不能为空")
|
@NotNull(message = "排序不能为空")
|
||||||
|
@ -23,7 +23,7 @@ public class PositionVO {
|
|||||||
private String positionName;
|
private String positionName;
|
||||||
|
|
||||||
@Schema(description = "职级")
|
@Schema(description = "职级")
|
||||||
private String level;
|
private String positionLevel;
|
||||||
|
|
||||||
@Schema(description = "排序")
|
@Schema(description = "排序")
|
||||||
private Integer sort;
|
private Integer sort;
|
||||||
|
@ -5,15 +5,13 @@
|
|||||||
-->
|
-->
|
||||||
<Configuration status="INFO" monitorInterval="30">
|
<Configuration status="INFO" monitorInterval="30">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="log-directory" value="${sys:project.log-directory}"/>
|
<Property name="log-directory" value="${spring:project.log-directory}"/>
|
||||||
</Properties>
|
</Properties>
|
||||||
<Appenders>
|
<Appenders>
|
||||||
<Console name="Console" target="SYSTEM_OUT">
|
<Console name="Console" target="SYSTEM_OUT">
|
||||||
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
<!--设置日志格式及颜色-->
|
<PatternLayout pattern="[%blue{%d}][%highlight{%-5p}][%t][%cyan{%c{1.}:%L}] %m %n"
|
||||||
<PatternLayout
|
disableAnsi="false" noConsoleNoAnsi="false"/>
|
||||||
pattern="%blue{%d{yyyy-MM-dd HH:mm:ss.SSS}} [%highlight{%-5level} ][%t] [%cyan{%c{1.}}:%L] %m%n"
|
|
||||||
disableAnsi="false" noConsoleNoAnsi="false"/>
|
|
||||||
</Console>
|
</Console>
|
||||||
<RollingFile name="debug" fileName="${log-directory}/debug/debug.log"
|
<RollingFile name="debug" fileName="${log-directory}/debug/debug.log"
|
||||||
filePattern="${log-directory}/debug/debug-%d{yyyy-MM-dd}-%i.log">
|
filePattern="${log-directory}/debug/debug-%d{yyyy-MM-dd}-%i.log">
|
||||||
@ -21,7 +19,7 @@
|
|||||||
<ThresholdFilter level="info" onMatch="DENY" onMismatch="NEUTRAL"/>
|
<ThresholdFilter level="info" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||||
<ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/>
|
<ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
</Filters>
|
</Filters>
|
||||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
|
||||||
<Policies>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||||
@ -39,7 +37,7 @@
|
|||||||
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
|
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||||
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
</Filters>
|
</Filters>
|
||||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
|
||||||
<Policies>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||||
@ -57,7 +55,7 @@
|
|||||||
<ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL"/>
|
<ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||||
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
|
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
</Filters>
|
</Filters>
|
||||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
|
||||||
<Policies>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||||
@ -75,7 +73,7 @@
|
|||||||
<ThresholdFilter level="fatal" onMatch="DENY" onMismatch="NEUTRAL"/>
|
<ThresholdFilter level="fatal" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||||
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
|
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
</Filters>
|
</Filters>
|
||||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
|
||||||
<Policies>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="10 MB"/>
|
<SizeBasedTriggeringPolicy size="10 MB"/>
|
||||||
@ -89,7 +87,7 @@
|
|||||||
</RollingFile>
|
</RollingFile>
|
||||||
<RollingFile name="druidSlowSqlLog" fileName="${log-directory}/slow-sql/slow-sql.log"
|
<RollingFile name="druidSlowSqlLog" fileName="${log-directory}/slow-sql/slow-sql.log"
|
||||||
filePattern="${log-directory}/slow-sql/slow-sql-%d{yyyy-MM-dd}-%i.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>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||||
@ -104,11 +102,9 @@
|
|||||||
</Appenders>
|
</Appenders>
|
||||||
|
|
||||||
<Loggers>
|
<Loggers>
|
||||||
|
|
||||||
<logger name="com.alibaba.druid.filter.stat.StatFilter" level="ERROR" additivity="false">
|
<logger name="com.alibaba.druid.filter.stat.StatFilter" level="ERROR" additivity="false">
|
||||||
<AppenderRef ref="druidSlowSqlLog"/>
|
<AppenderRef ref="druidSlowSqlLog"/>
|
||||||
</logger>
|
</logger>
|
||||||
|
|
||||||
<Root level="debug">
|
<Root level="debug">
|
||||||
<AppenderRef ref="Console"/>
|
<AppenderRef ref="Console"/>
|
||||||
<AppenderRef ref="debug"/>
|
<AppenderRef ref="debug"/>
|
||||||
|
@ -5,12 +5,12 @@
|
|||||||
-->
|
-->
|
||||||
<Configuration status="INFO" monitorInterval="30">
|
<Configuration status="INFO" monitorInterval="30">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="log-directory" value="${sys:project.log-directory}"/>
|
<Property name="log-directory" value="${spring:project.log-directory}"/>
|
||||||
</Properties>
|
</Properties>
|
||||||
<Appenders>
|
<Appenders>
|
||||||
<Console name="Console" target="SYSTEM_OUT">
|
<Console name="Console" target="SYSTEM_OUT">
|
||||||
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
<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>
|
</Console>
|
||||||
<RollingFile name="debug" fileName="${log-directory}/debug/debug.log"
|
<RollingFile name="debug" fileName="${log-directory}/debug/debug.log"
|
||||||
filePattern="${log-directory}/debug/debug-%d{yyyy-MM-dd}-%i.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="info" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||||
<ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/>
|
<ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
</Filters>
|
</Filters>
|
||||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
|
||||||
<Policies>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||||
@ -36,7 +36,7 @@
|
|||||||
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
|
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||||
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
</Filters>
|
</Filters>
|
||||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
|
||||||
<Policies>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||||
@ -54,7 +54,7 @@
|
|||||||
<ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL"/>
|
<ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||||
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
|
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
</Filters>
|
</Filters>
|
||||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
|
||||||
<Policies>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||||
@ -72,7 +72,7 @@
|
|||||||
<ThresholdFilter level="fatal" onMatch="DENY" onMismatch="NEUTRAL"/>
|
<ThresholdFilter level="fatal" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||||
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
|
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
</Filters>
|
</Filters>
|
||||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
|
||||||
<Policies>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="10 MB"/>
|
<SizeBasedTriggeringPolicy size="10 MB"/>
|
||||||
@ -86,7 +86,7 @@
|
|||||||
</RollingFile>
|
</RollingFile>
|
||||||
<RollingFile name="druidSlowSqlLog" fileName="${log-directory}/slow-sql/slow-sql.log"
|
<RollingFile name="druidSlowSqlLog" fileName="${log-directory}/slow-sql/slow-sql.log"
|
||||||
filePattern="${log-directory}/slow-sql/slow-sql-%d{yyyy-MM-dd}-%i.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>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||||
|
@ -5,12 +5,12 @@
|
|||||||
-->
|
-->
|
||||||
<Configuration status="INFO" monitorInterval="30">
|
<Configuration status="INFO" monitorInterval="30">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="log-directory" value="${sys:project.log-directory}"/>
|
<Property name="log-directory" value="${spring:project.log-directory}"/>
|
||||||
</Properties>
|
</Properties>
|
||||||
<Appenders>
|
<Appenders>
|
||||||
<Console name="Console" target="SYSTEM_OUT">
|
<Console name="Console" target="SYSTEM_OUT">
|
||||||
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
<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>
|
</Console>
|
||||||
<RollingFile name="debug" fileName="${log-directory}/debug/debug.log"
|
<RollingFile name="debug" fileName="${log-directory}/debug/debug.log"
|
||||||
filePattern="${log-directory}/debug/debug-%d{yyyy-MM-dd}-%i.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="info" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||||
<ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/>
|
<ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
</Filters>
|
</Filters>
|
||||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
|
||||||
<Policies>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||||
@ -36,7 +36,7 @@
|
|||||||
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
|
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||||
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
</Filters>
|
</Filters>
|
||||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
|
||||||
<Policies>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||||
@ -54,7 +54,7 @@
|
|||||||
<ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL"/>
|
<ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||||
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
|
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
</Filters>
|
</Filters>
|
||||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
|
||||||
<Policies>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||||
@ -72,7 +72,7 @@
|
|||||||
<ThresholdFilter level="fatal" onMatch="DENY" onMismatch="NEUTRAL"/>
|
<ThresholdFilter level="fatal" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||||
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
|
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
</Filters>
|
</Filters>
|
||||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
|
||||||
<Policies>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="10 MB"/>
|
<SizeBasedTriggeringPolicy size="10 MB"/>
|
||||||
@ -86,7 +86,7 @@
|
|||||||
</RollingFile>
|
</RollingFile>
|
||||||
<RollingFile name="druidSlowSqlLog" fileName="${log-directory}/slow-sql/slow-sql.log"
|
<RollingFile name="druidSlowSqlLog" fileName="${log-directory}/slow-sql/slow-sql.log"
|
||||||
filePattern="${log-directory}/slow-sql/slow-sql-%d{yyyy-MM-dd}-%i.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>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||||
|
@ -5,12 +5,12 @@
|
|||||||
-->
|
-->
|
||||||
<Configuration status="INFO" monitorInterval="30">
|
<Configuration status="INFO" monitorInterval="30">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="log-directory" value="${sys:project.log-directory}"/>
|
<Property name="log-directory" value="${spring:project.log-directory}"/>
|
||||||
</Properties>
|
</Properties>
|
||||||
<Appenders>
|
<Appenders>
|
||||||
<Console name="Console" target="SYSTEM_OUT">
|
<Console name="Console" target="SYSTEM_OUT">
|
||||||
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
<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>
|
</Console>
|
||||||
<RollingFile name="debug" fileName="${log-directory}/debug/debug.log"
|
<RollingFile name="debug" fileName="${log-directory}/debug/debug.log"
|
||||||
filePattern="${log-directory}/debug/debug-%d{yyyy-MM-dd}-%i.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="info" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||||
<ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/>
|
<ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
</Filters>
|
</Filters>
|
||||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
|
||||||
<Policies>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||||
@ -36,7 +36,7 @@
|
|||||||
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
|
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||||
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
</Filters>
|
</Filters>
|
||||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
|
||||||
<Policies>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||||
@ -54,7 +54,7 @@
|
|||||||
<ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL"/>
|
<ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||||
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
|
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
</Filters>
|
</Filters>
|
||||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
|
||||||
<Policies>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||||
@ -72,7 +72,7 @@
|
|||||||
<ThresholdFilter level="fatal" onMatch="DENY" onMismatch="NEUTRAL"/>
|
<ThresholdFilter level="fatal" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||||
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
|
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
</Filters>
|
</Filters>
|
||||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
|
||||||
<Policies>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="10 MB"/>
|
<SizeBasedTriggeringPolicy size="10 MB"/>
|
||||||
@ -86,7 +86,7 @@
|
|||||||
</RollingFile>
|
</RollingFile>
|
||||||
<RollingFile name="druidSlowSqlLog" fileName="${log-directory}/slow-sql/slow-sql.log"
|
<RollingFile name="druidSlowSqlLog" fileName="${log-directory}/slow-sql/slow-sql.log"
|
||||||
filePattern="${log-directory}/slow-sql/slow-sql-%d{yyyy-MM-dd}-%i.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>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package net.lab1024.sa.base.config;
|
package net.lab1024.sa.base.config;
|
||||||
|
|
||||||
import com.alibaba.fastjson.support.spring.GenericFastJsonRedisSerializer;
|
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.CacheService;
|
||||||
import net.lab1024.sa.base.module.support.cache.CaffeineCacheServiceImpl;
|
import net.lab1024.sa.base.module.support.cache.CaffeineCacheServiceImpl;
|
||||||
import net.lab1024.sa.base.module.support.cache.RedisCacheServiceImpl;
|
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.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.data.redis.cache.RedisCacheConfiguration;
|
import org.springframework.data.redis.cache.RedisCacheConfiguration;
|
||||||
|
import org.springframework.data.redis.connection.RedisConnectionFactory;
|
||||||
import org.springframework.data.redis.serializer.RedisSerializationContext;
|
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 REDIS_CACHE = "redis";
|
||||||
private static final String CAFFEINE_CACHE = "caffeine";
|
private static final String CAFFEINE_CACHE = "caffeine";
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private RedisConnectionFactory factory;
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@ConditionalOnProperty(prefix = "spring.cache", name = {"type"}, havingValue = REDIS_CACHE)
|
@ConditionalOnProperty(prefix = "spring.cache", name = {"type"}, havingValue = REDIS_CACHE)
|
||||||
public RedisCacheConfiguration redisCacheConfiguration() {
|
public RedisCacheConfiguration redisCacheConfiguration() {
|
||||||
return RedisCacheConfiguration.defaultCacheConfig()
|
return RedisCacheConfiguration.defaultCacheConfig()
|
||||||
.disableCachingNullValues()
|
.disableCachingNullValues()
|
||||||
.computePrefixWith(name -> "cache:" + name + ":")
|
.computePrefixWith(name -> "cache:" + name + ":")
|
||||||
// .serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(new GenericFastJsonRedisSerializer()));
|
.serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(new GenericFastJsonRedisSerializer()));
|
||||||
;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
@ -25,12 +25,6 @@ public class TableVO {
|
|||||||
@Schema(description = "表备注")
|
@Schema(description = "表备注")
|
||||||
private String tableComment;
|
private String tableComment;
|
||||||
|
|
||||||
@Schema(description = "创建时间")
|
|
||||||
private LocalDateTime createTime;
|
|
||||||
|
|
||||||
@Schema(description = "更新时间")
|
|
||||||
private LocalDateTime updateTime;
|
|
||||||
|
|
||||||
@Schema(description = "配置时间")
|
@Schema(description = "配置时间")
|
||||||
private LocalDateTime configTime;
|
private LocalDateTime configTime;
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ public class CodeGeneratorService {
|
|||||||
List<TableColumnVO> tableColumns = getTableColumns(form.getTableName());
|
List<TableColumnVO> tableColumns = getTableColumns(form.getTableName());
|
||||||
if (null != form.getDeleteInfo() && form.getDeleteInfo().getIsSupportDelete() && !form.getDeleteInfo().getIsPhysicallyDeleted()) {
|
if (null != form.getDeleteInfo() && form.getDeleteInfo().getIsSupportDelete() && !form.getDeleteInfo().getIsPhysicallyDeleted()) {
|
||||||
Optional<TableColumnVO> any = tableColumns.stream().filter(e -> e.getColumnName().equals(CodeGeneratorConstant.DELETED_FLAG)).findAny();
|
Optional<TableColumnVO> any = tableColumns.stream().filter(e -> e.getColumnName().equals(CodeGeneratorConstant.DELETED_FLAG)).findAny();
|
||||||
if (any.isEmpty()) {
|
if (!any.isPresent()) {
|
||||||
return ResponseDTO.userErrorParam("表结构中没有假删字段:" + CodeGeneratorConstant.DELETED_FLAG + ",请仔细排查");
|
return ResponseDTO.userErrorParam("表结构中没有假删字段:" + CodeGeneratorConstant.DELETED_FLAG + ",请仔细排查");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,6 @@ import org.springframework.stereotype.Service;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.io.StringWriter;
|
import java.io.StringWriter;
|
||||||
import java.nio.charset.Charset;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@ -75,6 +74,11 @@ public class CodeGeneratorTemplateService {
|
|||||||
map.put("js/const.js", new ConstVariableService());
|
map.put("js/const.js", new ConstVariableService());
|
||||||
map.put("js/list.vue", new ListVariableService());
|
map.put("js/list.vue", new ListVariableService());
|
||||||
map.put("js/form.vue", new FormVariableService());
|
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) {
|
public void zipGeneratedFiles(OutputStream outputStream, String tableName, CodeGeneratorConfigEntity codeGeneratorConfigEntity) {
|
||||||
|
@ -103,9 +103,9 @@ public class AddFormVariableService extends CodeGenerateBaseVariableService {
|
|||||||
|
|
||||||
//字典
|
//字典
|
||||||
if (SmartStringUtil.isNotEmpty(codeField.getDict())) {
|
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 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;");
|
||||||
}
|
}
|
||||||
|
|
||||||
//文件上传
|
//文件上传
|
||||||
|
@ -106,9 +106,9 @@ public class QueryFormVariableService extends CodeGenerateBaseVariableService {
|
|||||||
case DICT:
|
case DICT:
|
||||||
codeField = getCodeFieldByColumnName(field.getColumnNameList().get(0), form);
|
codeField = getCodeFieldByColumnName(field.getColumnNameList().get(0), form);
|
||||||
if (SmartStringUtil.isNotEmpty(codeField.getDict())) {
|
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 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");
|
finalFieldMap.put("javaType", "String");
|
||||||
default:
|
default:
|
||||||
|
@ -118,9 +118,9 @@ public class UpdateFormVariableService extends CodeGenerateBaseVariableService {
|
|||||||
|
|
||||||
//字典
|
//字典
|
||||||
if (SmartStringUtil.isNotEmpty(codeField.getDict())) {
|
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 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;");
|
||||||
}
|
}
|
||||||
|
|
||||||
//文件上传
|
//文件上传
|
||||||
|
@ -46,7 +46,7 @@ public class ListVariableService extends CodeGenerateBaseVariableService {
|
|||||||
|
|
||||||
CodeField codeField = getCodeFieldByColumnName(queryField.getColumnNameList().get(0), form);
|
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());
|
String upperUnderscoreEnum = CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, codeField.getEnumName());
|
||||||
objectMap.put("frontEnumName", upperUnderscoreEnum);
|
objectMap.put("frontEnumName", upperUnderscoreEnum);
|
||||||
frontImportSet.add("import SmartEnumSelect from '/@/components/framework/smart-enum-select/index.vue';");
|
frontImportSet.add("import SmartEnumSelect from '/@/components/framework/smart-enum-select/index.vue';");
|
||||||
|
@ -3,6 +3,7 @@ package net.lab1024.sa.base.module.support.dict.domain.vo;
|
|||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -25,6 +26,12 @@ public class DictDataVO implements Serializable {
|
|||||||
@Schema(description = "字典编码")
|
@Schema(description = "字典编码")
|
||||||
private String dictCode;
|
private String dictCode;
|
||||||
|
|
||||||
|
@Schema(description = "字典名字")
|
||||||
|
private String dictName;
|
||||||
|
|
||||||
|
@Schema(description = "字典禁用状态")
|
||||||
|
private Integer dictDisabledFlag;
|
||||||
|
|
||||||
@Schema(description = "字典项值")
|
@Schema(description = "字典项值")
|
||||||
private String dataValue;
|
private String dataValue;
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
};
|
@ -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
|
||||||
|
};
|
@ -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>
|
@ -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>
|
@ -21,8 +21,6 @@
|
|||||||
select
|
select
|
||||||
`tables`.table_name,
|
`tables`.table_name,
|
||||||
`tables`.table_comment,
|
`tables`.table_comment,
|
||||||
`tables`.create_time,
|
|
||||||
`tables`.update_time,
|
|
||||||
t_code_generator_config.update_time configTime
|
t_code_generator_config.update_time configTime
|
||||||
from information_schema.tables `tables`
|
from information_schema.tables `tables`
|
||||||
left join t_code_generator_config on `tables`.table_name = t_code_generator_config.table_name
|
left join t_code_generator_config on `tables`.table_name = t_code_generator_config.table_name
|
||||||
|
@ -12,7 +12,9 @@
|
|||||||
|
|
||||||
<select id="getAll" resultType="net.lab1024.sa.base.module.support.dict.domain.vo.DictDataVO">
|
<select id="getAll" resultType="net.lab1024.sa.base.module.support.dict.domain.vo.DictDataVO">
|
||||||
select t_dict_data.*,
|
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
|
from t_dict_data
|
||||||
left join t_dict on t_dict_data.dict_id = t_dict.dict_id
|
left join t_dict on t_dict_data.dict_id = t_dict.dict_id
|
||||||
order by t_dict_data.sort_order desc
|
order by t_dict_data.sort_order desc
|
||||||
|
@ -134,7 +134,7 @@ reload:
|
|||||||
sa-token:
|
sa-token:
|
||||||
# token 名称(同时也是 cookie 名称)
|
# token 名称(同时也是 cookie 名称)
|
||||||
token-name: Authorization
|
token-name: Authorization
|
||||||
# token 前缀 例如:Bearer
|
# token 前缀 例如:Bear
|
||||||
token-prefix: Bearer
|
token-prefix: Bearer
|
||||||
# token 有效期(单位:秒) 默认30天(2592000秒),-1 代表永久有效
|
# token 有效期(单位:秒) 默认30天(2592000秒),-1 代表永久有效
|
||||||
timeout: 2592000
|
timeout: 2592000
|
||||||
|
@ -102,6 +102,7 @@ springdoc:
|
|||||||
enabled: true # 开关
|
enabled: true # 开关
|
||||||
doc-expansion: none #关闭展开
|
doc-expansion: none #关闭展开
|
||||||
tags-sorter: alpha
|
tags-sorter: alpha
|
||||||
|
server-base-url: https://preview.smartadmin.vip/smart-admin-api
|
||||||
api-docs:
|
api-docs:
|
||||||
enabled: true # 开关
|
enabled: true # 开关
|
||||||
knife4j:
|
knife4j:
|
||||||
@ -132,7 +133,7 @@ reload:
|
|||||||
sa-token:
|
sa-token:
|
||||||
# token 名称(同时也是 cookie 名称)
|
# token 名称(同时也是 cookie 名称)
|
||||||
token-name: Authorization
|
token-name: Authorization
|
||||||
# token 前缀 例如:Bearer
|
# token 前缀 例如:Bear
|
||||||
token-prefix: Bearer
|
token-prefix: Bearer
|
||||||
# token 有效期(单位:秒) 默认30天(2592000秒),-1 代表永久有效
|
# token 有效期(单位:秒) 默认30天(2592000秒),-1 代表永久有效
|
||||||
timeout: 2592000
|
timeout: 2592000
|
||||||
|
@ -134,7 +134,7 @@ reload:
|
|||||||
sa-token:
|
sa-token:
|
||||||
# token 名称(同时也是 cookie 名称)
|
# token 名称(同时也是 cookie 名称)
|
||||||
token-name: Authorization
|
token-name: Authorization
|
||||||
# token 前缀 例如:Bearer
|
# token 前缀 例如:Bear
|
||||||
token-prefix: Bearer
|
token-prefix: Bearer
|
||||||
# token 有效期(单位:秒) 默认30天(2592000秒),-1 代表永久有效
|
# token 有效期(单位:秒) 默认30天(2592000秒),-1 代表永久有效
|
||||||
timeout: 2592000
|
timeout: 2592000
|
||||||
|
@ -27,11 +27,10 @@
|
|||||||
<p6spy.version>3.9.1</p6spy.version>
|
<p6spy.version>3.9.1</p6spy.version>
|
||||||
<springdoc-openapi-ui.version>1.7.0</springdoc-openapi-ui.version>
|
<springdoc-openapi-ui.version>1.7.0</springdoc-openapi-ui.version>
|
||||||
<knife4j.version>4.3.0</knife4j.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>
|
<druid.version>1.2.14</druid.version>
|
||||||
<google-linkedhashmap.version>1.4.2</google-linkedhashmap.version>
|
<google-linkedhashmap.version>1.4.2</google-linkedhashmap.version>
|
||||||
<google-guava.version>20.0</google-guava.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>
|
<reflections.version>0.9.11</reflections.version>
|
||||||
<commons-io.version>2.15.0</commons-io.version>
|
<commons-io.version>2.15.0</commons-io.version>
|
||||||
<commons-lang3.version>3.12.0</commons-lang3.version>
|
<commons-lang3.version>3.12.0</commons-lang3.version>
|
||||||
@ -152,12 +151,6 @@
|
|||||||
<version>${google-guava.version}</version>
|
<version>${google-guava.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>eu.bitwalker</groupId>
|
|
||||||
<artifactId>UserAgentUtils</artifactId>
|
|
||||||
<version>${user-agent-utils.version}</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.reflections</groupId>
|
<groupId>org.reflections</groupId>
|
||||||
<artifactId>reflections</artifactId>
|
<artifactId>reflections</artifactId>
|
||||||
|
@ -34,7 +34,7 @@ public class PositionEntity {
|
|||||||
/**
|
/**
|
||||||
* 职级
|
* 职级
|
||||||
*/
|
*/
|
||||||
private String level;
|
private String positionLevel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 排序
|
* 排序
|
||||||
|
@ -22,7 +22,7 @@ public class PositionAddForm {
|
|||||||
private String positionName;
|
private String positionName;
|
||||||
|
|
||||||
@Schema(description = "职级")
|
@Schema(description = "职级")
|
||||||
private String level;
|
private String positionLevel;
|
||||||
|
|
||||||
@Schema(description = "排序")
|
@Schema(description = "排序")
|
||||||
@NotNull(message = "排序不能为空")
|
@NotNull(message = "排序不能为空")
|
||||||
|
@ -23,7 +23,7 @@ public class PositionVO {
|
|||||||
private String positionName;
|
private String positionName;
|
||||||
|
|
||||||
@Schema(description = "职级")
|
@Schema(description = "职级")
|
||||||
private String level;
|
private String positionLevel;
|
||||||
|
|
||||||
@Schema(description = "排序")
|
@Schema(description = "排序")
|
||||||
private Integer sort;
|
private Integer sort;
|
||||||
|
@ -5,12 +5,13 @@
|
|||||||
-->
|
-->
|
||||||
<Configuration status="INFO" monitorInterval="30">
|
<Configuration status="INFO" monitorInterval="30">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="log-directory" value="${sys:project.log-directory}"/>
|
<Property name="log-directory" value="${spring:project.log-directory}"/>
|
||||||
</Properties>
|
</Properties>
|
||||||
<Appenders>
|
<Appenders>
|
||||||
<Console name="Console" target="SYSTEM_OUT">
|
<Console name="Console" target="SYSTEM_OUT">
|
||||||
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
<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>
|
</Console>
|
||||||
<RollingFile name="debug" fileName="${log-directory}/debug/debug.log"
|
<RollingFile name="debug" fileName="${log-directory}/debug/debug.log"
|
||||||
filePattern="${log-directory}/debug/debug-%d{yyyy-MM-dd}-%i.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="info" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||||
<ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/>
|
<ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
</Filters>
|
</Filters>
|
||||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
|
||||||
<Policies>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||||
@ -36,7 +37,7 @@
|
|||||||
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
|
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||||
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
</Filters>
|
</Filters>
|
||||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
|
||||||
<Policies>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||||
@ -54,7 +55,7 @@
|
|||||||
<ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL"/>
|
<ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||||
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
|
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
</Filters>
|
</Filters>
|
||||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
|
||||||
<Policies>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||||
@ -72,7 +73,7 @@
|
|||||||
<ThresholdFilter level="fatal" onMatch="DENY" onMismatch="NEUTRAL"/>
|
<ThresholdFilter level="fatal" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||||
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
|
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
</Filters>
|
</Filters>
|
||||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
|
||||||
<Policies>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="10 MB"/>
|
<SizeBasedTriggeringPolicy size="10 MB"/>
|
||||||
@ -86,7 +87,7 @@
|
|||||||
</RollingFile>
|
</RollingFile>
|
||||||
<RollingFile name="druidSlowSqlLog" fileName="${log-directory}/slow-sql/slow-sql.log"
|
<RollingFile name="druidSlowSqlLog" fileName="${log-directory}/slow-sql/slow-sql.log"
|
||||||
filePattern="${log-directory}/slow-sql/slow-sql-%d{yyyy-MM-dd}-%i.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>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||||
@ -101,11 +102,9 @@
|
|||||||
</Appenders>
|
</Appenders>
|
||||||
|
|
||||||
<Loggers>
|
<Loggers>
|
||||||
|
|
||||||
<logger name="com.alibaba.druid.filter.stat.StatFilter" level="ERROR" additivity="false">
|
<logger name="com.alibaba.druid.filter.stat.StatFilter" level="ERROR" additivity="false">
|
||||||
<AppenderRef ref="druidSlowSqlLog"/>
|
<AppenderRef ref="druidSlowSqlLog"/>
|
||||||
</logger>
|
</logger>
|
||||||
|
|
||||||
<Root level="debug">
|
<Root level="debug">
|
||||||
<AppenderRef ref="Console"/>
|
<AppenderRef ref="Console"/>
|
||||||
<AppenderRef ref="debug"/>
|
<AppenderRef ref="debug"/>
|
||||||
|
@ -5,12 +5,12 @@
|
|||||||
-->
|
-->
|
||||||
<Configuration status="INFO" monitorInterval="30">
|
<Configuration status="INFO" monitorInterval="30">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="log-directory" value="${sys:project.log-directory}"/>
|
<Property name="log-directory" value="${spring:project.log-directory}"/>
|
||||||
</Properties>
|
</Properties>
|
||||||
<Appenders>
|
<Appenders>
|
||||||
<Console name="Console" target="SYSTEM_OUT">
|
<Console name="Console" target="SYSTEM_OUT">
|
||||||
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
<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>
|
</Console>
|
||||||
<RollingFile name="debug" fileName="${log-directory}/debug/debug.log"
|
<RollingFile name="debug" fileName="${log-directory}/debug/debug.log"
|
||||||
filePattern="${log-directory}/debug/debug-%d{yyyy-MM-dd}-%i.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="info" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||||
<ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/>
|
<ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
</Filters>
|
</Filters>
|
||||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
|
||||||
<Policies>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||||
@ -36,7 +36,7 @@
|
|||||||
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
|
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||||
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
</Filters>
|
</Filters>
|
||||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
|
||||||
<Policies>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||||
@ -54,7 +54,7 @@
|
|||||||
<ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL"/>
|
<ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||||
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
|
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
</Filters>
|
</Filters>
|
||||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
|
||||||
<Policies>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||||
@ -72,7 +72,7 @@
|
|||||||
<ThresholdFilter level="fatal" onMatch="DENY" onMismatch="NEUTRAL"/>
|
<ThresholdFilter level="fatal" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||||
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
|
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
</Filters>
|
</Filters>
|
||||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
|
||||||
<Policies>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="10 MB"/>
|
<SizeBasedTriggeringPolicy size="10 MB"/>
|
||||||
@ -86,7 +86,7 @@
|
|||||||
</RollingFile>
|
</RollingFile>
|
||||||
<RollingFile name="druidSlowSqlLog" fileName="${log-directory}/slow-sql/slow-sql.log"
|
<RollingFile name="druidSlowSqlLog" fileName="${log-directory}/slow-sql/slow-sql.log"
|
||||||
filePattern="${log-directory}/slow-sql/slow-sql-%d{yyyy-MM-dd}-%i.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>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||||
|
@ -5,12 +5,12 @@
|
|||||||
-->
|
-->
|
||||||
<Configuration status="INFO" monitorInterval="30">
|
<Configuration status="INFO" monitorInterval="30">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="log-directory" value="${sys:project.log-directory}"/>
|
<Property name="log-directory" value="${spring:project.log-directory}"/>
|
||||||
</Properties>
|
</Properties>
|
||||||
<Appenders>
|
<Appenders>
|
||||||
<Console name="Console" target="SYSTEM_OUT">
|
<Console name="Console" target="SYSTEM_OUT">
|
||||||
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
<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>
|
</Console>
|
||||||
<RollingFile name="debug" fileName="${log-directory}/debug/debug.log"
|
<RollingFile name="debug" fileName="${log-directory}/debug/debug.log"
|
||||||
filePattern="${log-directory}/debug/debug-%d{yyyy-MM-dd}-%i.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="info" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||||
<ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/>
|
<ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
</Filters>
|
</Filters>
|
||||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
|
||||||
<Policies>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||||
@ -36,7 +36,7 @@
|
|||||||
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
|
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||||
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
</Filters>
|
</Filters>
|
||||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
|
||||||
<Policies>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||||
@ -54,7 +54,7 @@
|
|||||||
<ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL"/>
|
<ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||||
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
|
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
</Filters>
|
</Filters>
|
||||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
|
||||||
<Policies>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||||
@ -72,7 +72,7 @@
|
|||||||
<ThresholdFilter level="fatal" onMatch="DENY" onMismatch="NEUTRAL"/>
|
<ThresholdFilter level="fatal" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||||
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
|
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
</Filters>
|
</Filters>
|
||||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
|
||||||
<Policies>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="10 MB"/>
|
<SizeBasedTriggeringPolicy size="10 MB"/>
|
||||||
@ -86,7 +86,7 @@
|
|||||||
</RollingFile>
|
</RollingFile>
|
||||||
<RollingFile name="druidSlowSqlLog" fileName="${log-directory}/slow-sql/slow-sql.log"
|
<RollingFile name="druidSlowSqlLog" fileName="${log-directory}/slow-sql/slow-sql.log"
|
||||||
filePattern="${log-directory}/slow-sql/slow-sql-%d{yyyy-MM-dd}-%i.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>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||||
|
@ -5,12 +5,12 @@
|
|||||||
-->
|
-->
|
||||||
<Configuration status="INFO" monitorInterval="30">
|
<Configuration status="INFO" monitorInterval="30">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="log-directory" value="${sys:project.log-directory}"/>
|
<Property name="log-directory" value="${spring:project.log-directory}"/>
|
||||||
</Properties>
|
</Properties>
|
||||||
<Appenders>
|
<Appenders>
|
||||||
<Console name="Console" target="SYSTEM_OUT">
|
<Console name="Console" target="SYSTEM_OUT">
|
||||||
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
<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>
|
</Console>
|
||||||
<RollingFile name="debug" fileName="${log-directory}/debug/debug.log"
|
<RollingFile name="debug" fileName="${log-directory}/debug/debug.log"
|
||||||
filePattern="${log-directory}/debug/debug-%d{yyyy-MM-dd}-%i.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="info" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||||
<ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/>
|
<ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
</Filters>
|
</Filters>
|
||||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
|
||||||
<Policies>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||||
@ -36,7 +36,7 @@
|
|||||||
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
|
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||||
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
</Filters>
|
</Filters>
|
||||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
|
||||||
<Policies>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||||
@ -54,7 +54,7 @@
|
|||||||
<ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL"/>
|
<ThresholdFilter level="error" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||||
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
|
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
</Filters>
|
</Filters>
|
||||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
|
||||||
<Policies>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||||
@ -72,7 +72,7 @@
|
|||||||
<ThresholdFilter level="fatal" onMatch="DENY" onMismatch="NEUTRAL"/>
|
<ThresholdFilter level="fatal" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||||
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
|
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
</Filters>
|
</Filters>
|
||||||
<PatternLayout pattern="[%d][%-5p][%t] %m (%F:%L)%n"/>
|
<PatternLayout pattern="[%d][%-5p][%t][%c{1.}:%L] %m %n"/>
|
||||||
<Policies>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="10 MB"/>
|
<SizeBasedTriggeringPolicy size="10 MB"/>
|
||||||
@ -86,7 +86,7 @@
|
|||||||
</RollingFile>
|
</RollingFile>
|
||||||
<RollingFile name="druidSlowSqlLog" fileName="${log-directory}/slow-sql/slow-sql.log"
|
<RollingFile name="druidSlowSqlLog" fileName="${log-directory}/slow-sql/slow-sql.log"
|
||||||
filePattern="${log-directory}/slow-sql/slow-sql-%d{yyyy-MM-dd}-%i.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>
|
<Policies>
|
||||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
<SizeBasedTriggeringPolicy size="50 MB"/>
|
<SizeBasedTriggeringPolicy size="50 MB"/>
|
||||||
|
@ -35,8 +35,7 @@ public class CacheConfig {
|
|||||||
return RedisCacheConfiguration.defaultCacheConfig()
|
return RedisCacheConfiguration.defaultCacheConfig()
|
||||||
.disableCachingNullValues()
|
.disableCachingNullValues()
|
||||||
.computePrefixWith(name -> "cache:" + name + ":")
|
.computePrefixWith(name -> "cache:" + name + ":")
|
||||||
// .serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(new GenericFastJsonRedisSerializer()));
|
.serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(new GenericFastJsonRedisSerializer()));
|
||||||
;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
@ -25,12 +25,6 @@ public class TableVO {
|
|||||||
@Schema(description = "表备注")
|
@Schema(description = "表备注")
|
||||||
private String tableComment;
|
private String tableComment;
|
||||||
|
|
||||||
@Schema(description = "创建时间")
|
|
||||||
private LocalDateTime createTime;
|
|
||||||
|
|
||||||
@Schema(description = "更新时间")
|
|
||||||
private LocalDateTime updateTime;
|
|
||||||
|
|
||||||
@Schema(description = "配置时间")
|
@Schema(description = "配置时间")
|
||||||
private LocalDateTime configTime;
|
private LocalDateTime configTime;
|
||||||
|
|
||||||
|
@ -74,6 +74,11 @@ public class CodeGeneratorTemplateService {
|
|||||||
map.put("js/const.js", new ConstVariableService());
|
map.put("js/const.js", new ConstVariableService());
|
||||||
map.put("js/list.vue", new ListVariableService());
|
map.put("js/list.vue", new ListVariableService());
|
||||||
map.put("js/form.vue", new FormVariableService());
|
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) {
|
public void zipGeneratedFiles(OutputStream outputStream, String tableName, CodeGeneratorConfigEntity codeGeneratorConfigEntity) {
|
||||||
|
@ -103,9 +103,9 @@ public class AddFormVariableService extends CodeGenerateBaseVariableService {
|
|||||||
|
|
||||||
//字典
|
//字典
|
||||||
if (SmartStringUtil.isNotEmpty(codeField.getDict())) {
|
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 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;");
|
||||||
}
|
}
|
||||||
|
|
||||||
//文件上传
|
//文件上传
|
||||||
|
@ -107,9 +107,9 @@ public class QueryFormVariableService extends CodeGenerateBaseVariableService {
|
|||||||
case DICT:
|
case DICT:
|
||||||
codeField = getCodeFieldByColumnName(field.getColumnNameList().get(0), form);
|
codeField = getCodeFieldByColumnName(field.getColumnNameList().get(0), form);
|
||||||
if (SmartStringUtil.isNotEmpty(codeField.getDict())) {
|
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 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");
|
finalFieldMap.put("javaType", "String");
|
||||||
default:
|
default:
|
||||||
|
@ -118,9 +118,9 @@ public class UpdateFormVariableService extends CodeGenerateBaseVariableService {
|
|||||||
|
|
||||||
//字典
|
//字典
|
||||||
if (SmartStringUtil.isNotEmpty(codeField.getDict())) {
|
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 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;");
|
||||||
}
|
}
|
||||||
|
|
||||||
//文件上传
|
//文件上传
|
||||||
|
@ -47,7 +47,7 @@ public class ListVariableService extends CodeGenerateBaseVariableService {
|
|||||||
|
|
||||||
CodeField codeField = getCodeFieldByColumnName(queryField.getColumnNameList().get(0), form);
|
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());
|
String upperUnderscoreEnum = CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, codeField.getEnumName());
|
||||||
objectMap.put("frontEnumName", upperUnderscoreEnum);
|
objectMap.put("frontEnumName", upperUnderscoreEnum);
|
||||||
frontImportSet.add("import SmartEnumSelect from '/@/components/framework/smart-enum-select/index.vue';");
|
frontImportSet.add("import SmartEnumSelect from '/@/components/framework/smart-enum-select/index.vue';");
|
||||||
|
@ -3,6 +3,7 @@ package net.lab1024.sa.base.module.support.dict.domain.vo;
|
|||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -14,7 +15,7 @@ import java.time.LocalDateTime;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class DictDataVO {
|
public class DictDataVO implements Serializable {
|
||||||
|
|
||||||
@Schema(description = "字典数据id")
|
@Schema(description = "字典数据id")
|
||||||
private Long dictDataId;
|
private Long dictDataId;
|
||||||
@ -25,6 +26,12 @@ public class DictDataVO {
|
|||||||
@Schema(description = "字典编码")
|
@Schema(description = "字典编码")
|
||||||
private String dictCode;
|
private String dictCode;
|
||||||
|
|
||||||
|
@Schema(description = "字典名字")
|
||||||
|
private String dictName;
|
||||||
|
|
||||||
|
@Schema(description = "字典禁用状态")
|
||||||
|
private Integer dictDisabledFlag;
|
||||||
|
|
||||||
@Schema(description = "字典项值")
|
@Schema(description = "字典项值")
|
||||||
private String dataValue;
|
private String dataValue;
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
};
|
@ -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
|
||||||
|
};
|
@ -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>
|
@ -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>
|
@ -21,8 +21,6 @@
|
|||||||
select
|
select
|
||||||
`tables`.table_name,
|
`tables`.table_name,
|
||||||
`tables`.table_comment,
|
`tables`.table_comment,
|
||||||
`tables`.create_time,
|
|
||||||
`tables`.update_time,
|
|
||||||
t_code_generator_config.update_time configTime
|
t_code_generator_config.update_time configTime
|
||||||
from information_schema.tables `tables`
|
from information_schema.tables `tables`
|
||||||
left join t_code_generator_config on `tables`.table_name = t_code_generator_config.table_name
|
left join t_code_generator_config on `tables`.table_name = t_code_generator_config.table_name
|
||||||
|
@ -12,7 +12,9 @@
|
|||||||
|
|
||||||
<select id="getAll" resultType="net.lab1024.sa.base.module.support.dict.domain.vo.DictDataVO">
|
<select id="getAll" resultType="net.lab1024.sa.base.module.support.dict.domain.vo.DictDataVO">
|
||||||
select t_dict_data.*,
|
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
|
from t_dict_data
|
||||||
left join t_dict on t_dict_data.dict_id = t_dict.dict_id
|
left join t_dict on t_dict_data.dict_id = t_dict.dict_id
|
||||||
order by t_dict_data.sort_order desc
|
order by t_dict_data.sort_order desc
|
||||||
|
@ -28,12 +28,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, ref, watch } from 'vue';
|
import { computed, ref, watch } from 'vue';
|
||||||
import { dictApi } from '/@/api/support/dict-api';
|
import { useDictStore } from '/@/store/modules/system/dict.js';
|
||||||
|
|
||||||
defineExpose({
|
|
||||||
queryDict,
|
|
||||||
});
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
value: [Array, String, Number],
|
value: [Array, String, Number],
|
||||||
@ -54,27 +50,11 @@
|
|||||||
type: Number,
|
type: Number,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
dictList: {
|
|
||||||
type: Array,
|
|
||||||
default: null,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// -------------------------- 查询 字典数据 --------------------------
|
// -------------------------- 字典数据 --------------------------
|
||||||
|
|
||||||
const dictList = ref(props.dictList || []);
|
const dictList = computed(() => useDictStore().dictList.filter((item) => !item.disabledFlag));
|
||||||
async function queryDict() {
|
|
||||||
if (props.dictList) {
|
|
||||||
dictList.value = props.dictList;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
let response = await dictApi.getAllDict();
|
|
||||||
dictList.value = response.data;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!props.dictList) {
|
|
||||||
queryDict();
|
|
||||||
}
|
|
||||||
|
|
||||||
// -------------------------- 选中 相关、事件 --------------------------
|
// -------------------------- 选中 相关、事件 --------------------------
|
||||||
const emit = defineEmits(['update:value', 'change']);
|
const emit = defineEmits(['update:value', 'change']);
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, ref, watch } from 'vue';
|
import { computed, ref, watch } from 'vue';
|
||||||
import { useDictStore } from '/@/store/modules/system/dict.js';
|
import { useDictStore } from '/@/store/modules/system/dict.js';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@ -69,13 +69,11 @@
|
|||||||
|
|
||||||
// -------------------------- 查询 字典数据 --------------------------
|
// -------------------------- 查询 字典数据 --------------------------
|
||||||
|
|
||||||
const dictDataList = ref([]);
|
const dictDataList = computed(() =>
|
||||||
function initDictData() {
|
useDictStore()
|
||||||
let list = useDictStore().getDictData(props.dictCode);
|
.getDictData(props.dictCode)
|
||||||
dictDataList.value = list.filter((item) => !props.hiddenOption.includes(item.dataValue) && !item.disabledFlag);
|
.filter((item) => !props.hiddenOption.includes(item.dataValue) && !item.disabledFlag)
|
||||||
}
|
);
|
||||||
|
|
||||||
onMounted(initDictData);
|
|
||||||
|
|
||||||
// -------------------------- 选中 相关、事件 --------------------------
|
// -------------------------- 选中 相关、事件 --------------------------
|
||||||
|
|
||||||
|
@ -1,15 +1,22 @@
|
|||||||
import { defineStore } from 'pinia';
|
import { defineStore } from 'pinia';
|
||||||
import { DICT_SPLIT } from '/@/constants/support/dict-const.js';
|
import { DICT_SPLIT } from '/@/constants/support/dict-const.js';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
import { dictApi } from '/@/api/support/dict-api.js';
|
||||||
|
import { smartSentry } from '/@/lib/smart-sentry.js';
|
||||||
|
|
||||||
export const useDictStore = defineStore({
|
export const useDictStore = defineStore({
|
||||||
id: 'dict',
|
id: 'dict',
|
||||||
state: () => ({
|
state: () => ({
|
||||||
|
// 字典code集合
|
||||||
|
dictList: [],
|
||||||
// 字典集合
|
// 字典集合
|
||||||
dictMap: new Map(),
|
dictMap: new Map(),
|
||||||
}),
|
}),
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
|
getDictList(){
|
||||||
|
return this.dictList;
|
||||||
|
},
|
||||||
// 获取字典数据
|
// 获取字典数据
|
||||||
getDictData(dictCode) {
|
getDictData(dictCode) {
|
||||||
if (!dictCode) {
|
if (!dictCode) {
|
||||||
@ -31,7 +38,7 @@ export const useDictStore = defineStore({
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 是数字的话,需要特殊处理
|
// 是数字的话,需要特殊处理
|
||||||
if(_.isNumber(dataValue)){
|
if (_.isNumber(dataValue)) {
|
||||||
let target = _.find(dict, { dataValue: dataValue });
|
let target = _.find(dict, { dataValue: dataValue });
|
||||||
return target ? target.dataLabel : '';
|
return target ? target.dataLabel : '';
|
||||||
}
|
}
|
||||||
@ -46,10 +53,25 @@ export const useDictStore = defineStore({
|
|||||||
}
|
}
|
||||||
return result.join(DICT_SPLIT);
|
return result.join(DICT_SPLIT);
|
||||||
},
|
},
|
||||||
|
// 刷新字典
|
||||||
|
async refreshData(){
|
||||||
|
try{
|
||||||
|
const dictRes = await dictApi.getAllDictData();
|
||||||
|
this.initData(dictRes.data);
|
||||||
|
}catch (e){
|
||||||
|
smartSentry.captureError(e);
|
||||||
|
}
|
||||||
|
},
|
||||||
// 初始化字典
|
// 初始化字典
|
||||||
initData(dictDataList) {
|
initData(dictDataList) {
|
||||||
this.dictMap.clear();
|
this.dictMap.clear();
|
||||||
|
this.dictList = [];
|
||||||
|
|
||||||
for (let data of dictDataList) {
|
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);
|
let dataArray = this.dictMap.get(data.dictCode);
|
||||||
if (!dataArray) {
|
if (!dataArray) {
|
||||||
dataArray = [];
|
dataArray = [];
|
||||||
@ -57,6 +79,8 @@ export const useDictStore = defineStore({
|
|||||||
}
|
}
|
||||||
dataArray.push(data);
|
dataArray.push(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log(this.dictList,2)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -79,7 +79,7 @@
|
|||||||
smartSentry.captureError(err);
|
smartSentry.captureError(err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
buildDepartmentEmployeeTree
|
|
||||||
// 递归构建部门员工树
|
// 递归构建部门员工树
|
||||||
function buildDepartmentEmployeeTree(departmentTree, employeeList) {
|
function buildDepartmentEmployeeTree(departmentTree, employeeList) {
|
||||||
for (const department of departmentTree) {
|
for (const department of departmentTree) {
|
||||||
|
@ -110,20 +110,10 @@
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '代码配置',
|
title: '代码配置时间',
|
||||||
dataIndex: 'configTime',
|
dataIndex: 'configTime',
|
||||||
width: 150,
|
width: 150,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: '表创建时间',
|
|
||||||
dataIndex: 'createTime',
|
|
||||||
width: 150,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '表修改时间',
|
|
||||||
dataIndex: 'updateTime',
|
|
||||||
width: 150,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
|
@ -112,8 +112,8 @@ export const JS_FILE_LIST = [
|
|||||||
export const TS_FILE_LIST = [
|
export const TS_FILE_LIST = [
|
||||||
'ts/list.vue', //
|
'ts/list.vue', //
|
||||||
'ts/form.vue', //
|
'ts/form.vue', //
|
||||||
'ts/api.js', //
|
'ts/api.ts', //
|
||||||
'ts/const.js', //
|
'ts/const.ts', //
|
||||||
];
|
];
|
||||||
|
|
||||||
// -------------------------------- 后端文件 --------------------------------
|
// -------------------------------- 后端文件 --------------------------------
|
||||||
|
@ -68,7 +68,6 @@
|
|||||||
if (deletedFlagColumn) {
|
if (deletedFlagColumn) {
|
||||||
deleteFlagColumnName.value = deletedFlagColumn.columnName;
|
deleteFlagColumnName.value = deletedFlagColumn.columnName;
|
||||||
}
|
}
|
||||||
console.log(deletedFlagColumn);
|
|
||||||
|
|
||||||
//表单
|
//表单
|
||||||
let deleteInfo = config.deleteInfo;
|
let deleteInfo = config.deleteInfo;
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="column.dataIndex === 'nullableFlag'">
|
<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>
|
||||||
|
|
||||||
<template v-if="column.dataIndex === 'fieldName'">
|
<template v-if="column.dataIndex === 'fieldName'">
|
||||||
@ -68,7 +68,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="column.dataIndex === 'dict'">
|
<template v-if="column.dataIndex === 'dict'">
|
||||||
<DictCodeSelect ref="dictRef" v-model:value="record.dict" :dict-list="dictList" />
|
<DictCodeSelect ref="dictRef" v-model:value="record.dict" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="column.dataIndex === 'enumName'">
|
<template v-if="column.dataIndex === 'enumName'">
|
||||||
@ -84,18 +84,11 @@
|
|||||||
import DictCodeSelect from '/@/components/support/dict-code-select/index.vue';
|
import DictCodeSelect from '/@/components/support/dict-code-select/index.vue';
|
||||||
import { convertUpperCamel, convertLowerCamel } from '/@/utils/str-util';
|
import { convertUpperCamel, convertLowerCamel } from '/@/utils/str-util';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { dictApi } from '/@/api/support/dict-api';
|
import { useDictStore } from '/@/store/modules/system/dict.js';
|
||||||
|
|
||||||
const dictRef = ref();
|
const dictRef = ref();
|
||||||
const dictList = ref([]);
|
|
||||||
async function loadDictList() {
|
|
||||||
const response = await dictApi.getAllDict();
|
|
||||||
dictList.value = response.data;
|
|
||||||
}
|
|
||||||
loadDictList();
|
|
||||||
|
|
||||||
function refreshDict() {
|
function refreshDict() {
|
||||||
dictRef.value.queryDict();
|
useDictStore().refreshData();
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------ 全局数据 ---------------------
|
//------------------------ 全局数据 ---------------------
|
||||||
@ -239,4 +232,4 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped></style>
|
<style lang="less" scoped></style>
|
||||||
|
@ -87,7 +87,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="column.dataIndex === 'nullableFlag'">
|
<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>
|
||||||
|
|
||||||
<template v-if="column.dataIndex === 'required'">
|
<template v-if="column.dataIndex === 'required'">
|
||||||
@ -222,8 +222,8 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
//表单
|
//表单
|
||||||
field.requiredFlag = configField ? configField.requiredFlag : field.nullableFlag;
|
field.requiredFlag = configField ? configField.requiredFlag : !field.nullableFlag;
|
||||||
field.insertFlag = configField ? configField.insertFlag : field.nullableFlag;
|
field.insertFlag = configField ? configField.insertFlag : !field.nullableFlag;
|
||||||
field.updateFlag = configField ? configField.updateFlag : false;
|
field.updateFlag = configField ? configField.updateFlag : false;
|
||||||
|
|
||||||
if (configField && configField.frontComponent) {
|
if (configField && configField.frontComponent) {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<a-form-item label="备注" name="remark">
|
<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-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
|
@ -19,8 +19,8 @@
|
|||||||
<a-form-item label="职务名称" name="positionName">
|
<a-form-item label="职务名称" name="positionName">
|
||||||
<a-input style="width: 100%" v-model:value="form.positionName" placeholder="职务名称" />
|
<a-input style="width: 100%" v-model:value="form.positionName" placeholder="职务名称" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="职级" name="level">
|
<a-form-item label="职级" name="positionLevel">
|
||||||
<a-input style="width: 100%" v-model:value="form.level" placeholder="职级" />
|
<a-input style="width: 100%" v-model:value="form.positionLevel" placeholder="职级" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="排序" name="sort">
|
<a-form-item label="排序" name="sort">
|
||||||
<a-input-number :min="0" :step="1" :precision="0" style="width: 100%" v-model:value="form.sort" placeholder="排序" />
|
<a-input-number :min="0" :step="1" :precision="0" style="width: 100%" v-model:value="form.sort" placeholder="排序" />
|
||||||
@ -92,7 +92,7 @@
|
|||||||
const formDefault = {
|
const formDefault = {
|
||||||
positionId: undefined,
|
positionId: undefined,
|
||||||
positionName: undefined, //职务名称
|
positionName: undefined, //职务名称
|
||||||
level: undefined, //职纪
|
positionLevel: undefined, //职纪
|
||||||
sort: 0,
|
sort: 0,
|
||||||
remark: undefined, //备注
|
remark: undefined, //备注
|
||||||
};
|
};
|
||||||
|
@ -115,7 +115,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '职级',
|
title: '职级',
|
||||||
dataIndex: 'level',
|
dataIndex: 'positionLevel',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -35,10 +35,19 @@ export default {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
// 服务端渲染
|
|
||||||
server: {
|
server: {
|
||||||
host: '0.0.0.0',
|
host: '0.0.0.0',
|
||||||
port: 8081,
|
port: 8081,
|
||||||
|
server: {
|
||||||
|
proxy: {
|
||||||
|
// 代理路径
|
||||||
|
'/': {
|
||||||
|
target: 'http://127.0.0.1:1024/', // 目标服务器地址
|
||||||
|
changeOrigin: true, // 是否修改请求头中的 Origin 字段
|
||||||
|
rewrite: (path) => path, // 重写路径
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
},
|
},
|
||||||
plugins: [vue()],
|
plugins: [vue()],
|
||||||
optimizeDeps: {
|
optimizeDeps: {
|
||||||
|
@ -89,6 +89,7 @@
|
|||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
:deep(.ant-table-column-sorters) {
|
:deep(.ant-table-column-sorters) {
|
||||||
|
@ -28,12 +28,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, ref, watch } from 'vue';
|
import { computed, ref, watch } from 'vue';
|
||||||
import { dictApi } from '/@/api/support/dict-api';
|
import { useDictStore } from '/@/store/modules/system/dict.js';
|
||||||
|
|
||||||
defineExpose({
|
|
||||||
queryDict,
|
|
||||||
});
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
value: [Array, String, Number],
|
value: [Array, String, Number],
|
||||||
@ -54,27 +50,11 @@
|
|||||||
type: Number,
|
type: Number,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
dictList: {
|
|
||||||
type: Array,
|
|
||||||
default: null,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// -------------------------- 查询 字典数据 --------------------------
|
// -------------------------- 字典数据 --------------------------
|
||||||
|
|
||||||
const dictList = ref(props.dictList || []);
|
const dictList = computed(() => useDictStore().dictList.filter((item) => !item.disabledFlag));
|
||||||
async function queryDict() {
|
|
||||||
if (props.dictList) {
|
|
||||||
dictList.value = props.dictList;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
let response = await dictApi.getAllDict();
|
|
||||||
dictList.value = response.data;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!props.dictList) {
|
|
||||||
queryDict();
|
|
||||||
}
|
|
||||||
|
|
||||||
// -------------------------- 选中 相关、事件 --------------------------
|
// -------------------------- 选中 相关、事件 --------------------------
|
||||||
const emit = defineEmits(['update:value', 'change']);
|
const emit = defineEmits(['update:value', 'change']);
|
||||||
@ -90,4 +70,4 @@
|
|||||||
emit('update:value', value);
|
emit('update:value', value);
|
||||||
emit('change', value);
|
emit('change', value);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, ref, watch } from 'vue';
|
import { computed, ref, watch } from 'vue';
|
||||||
import { useDictStore } from '/@/store/modules/system/dict.js';
|
import { useDictStore } from '/@/store/modules/system/dict.js';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@ -69,13 +69,11 @@
|
|||||||
|
|
||||||
// -------------------------- 查询 字典数据 --------------------------
|
// -------------------------- 查询 字典数据 --------------------------
|
||||||
|
|
||||||
const dictDataList = ref([]);
|
const dictDataList = computed(() =>
|
||||||
function initDictData() {
|
useDictStore()
|
||||||
let list = useDictStore().getDictData(props.dictCode);
|
.getDictData(props.dictCode)
|
||||||
dictDataList.value = list.filter((item) => !props.hiddenOption.includes(item.dataValue) && !item.disabledFlag);
|
.filter((item) => !props.hiddenOption.includes(item.dataValue) && !item.disabledFlag)
|
||||||
}
|
);
|
||||||
|
|
||||||
onMounted(initDictData);
|
|
||||||
|
|
||||||
// -------------------------- 选中 相关、事件 --------------------------
|
// -------------------------- 选中 相关、事件 --------------------------
|
||||||
|
|
||||||
|
@ -1,15 +1,22 @@
|
|||||||
import { defineStore } from 'pinia';
|
import { defineStore } from 'pinia';
|
||||||
import { DICT_SPLIT } from '/@/constants/support/dict-const.js';
|
import { DICT_SPLIT } from '/@/constants/support/dict-const.js';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
import { dictApi } from '/@/api/support/dict-api.js';
|
||||||
|
import { smartSentry } from '/@/lib/smart-sentry.js';
|
||||||
|
|
||||||
export const useDictStore = defineStore({
|
export const useDictStore = defineStore({
|
||||||
id: 'dict',
|
id: 'dict',
|
||||||
state: () => ({
|
state: () => ({
|
||||||
|
// 字典code集合
|
||||||
|
dictList: [],
|
||||||
// 字典集合
|
// 字典集合
|
||||||
dictMap: new Map(),
|
dictMap: new Map(),
|
||||||
}),
|
}),
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
|
getDictList(){
|
||||||
|
return this.dictList;
|
||||||
|
},
|
||||||
// 获取字典数据
|
// 获取字典数据
|
||||||
getDictData(dictCode) {
|
getDictData(dictCode) {
|
||||||
if (!dictCode) {
|
if (!dictCode) {
|
||||||
@ -31,7 +38,7 @@ export const useDictStore = defineStore({
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 是数字的话,需要特殊处理
|
// 是数字的话,需要特殊处理
|
||||||
if(_.isNumber(dataValue)){
|
if (_.isNumber(dataValue)) {
|
||||||
let target = _.find(dict, { dataValue: dataValue });
|
let target = _.find(dict, { dataValue: dataValue });
|
||||||
return target ? target.dataLabel : '';
|
return target ? target.dataLabel : '';
|
||||||
}
|
}
|
||||||
@ -46,10 +53,25 @@ export const useDictStore = defineStore({
|
|||||||
}
|
}
|
||||||
return result.join(DICT_SPLIT);
|
return result.join(DICT_SPLIT);
|
||||||
},
|
},
|
||||||
|
// 刷新字典
|
||||||
|
async refreshData(){
|
||||||
|
try{
|
||||||
|
const dictRes = await dictApi.getAllDictData();
|
||||||
|
this.initData(dictRes.data);
|
||||||
|
}catch (e){
|
||||||
|
smartSentry.captureError(e);
|
||||||
|
}
|
||||||
|
},
|
||||||
// 初始化字典
|
// 初始化字典
|
||||||
initData(dictDataList) {
|
initData(dictDataList) {
|
||||||
this.dictMap.clear();
|
this.dictMap.clear();
|
||||||
|
this.dictList = [];
|
||||||
|
|
||||||
for (let data of dictDataList) {
|
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);
|
let dataArray = this.dictMap.get(data.dictCode);
|
||||||
if (!dataArray) {
|
if (!dataArray) {
|
||||||
dataArray = [];
|
dataArray = [];
|
||||||
@ -57,6 +79,8 @@ export const useDictStore = defineStore({
|
|||||||
}
|
}
|
||||||
dataArray.push(data);
|
dataArray.push(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log(this.dictList,2)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -10,14 +10,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<div class="sider-fl">
|
<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 }">
|
<template #switcherIcon="{ switcherCls }">
|
||||||
<caret-down-outlined :class="switcherCls" />
|
<caret-down-outlined :class="switcherCls" />
|
||||||
</template>
|
</template>
|
||||||
<template #title="{ name, departmentId }">
|
<template #title="{ departmentName, departmentId }">
|
||||||
<div class="list-item" :class="{ active: checkExists(departmentId) }">
|
<div class="list-item" :class="{ active: checkExists(departmentId) }">
|
||||||
<div class="list-item-title">{{ name }}</div>
|
<div class="list-item-title">{{ departmentName }}</div>
|
||||||
<check-circle-filled class="check-icon-style" @click="onSelectAdd(name, departmentId)" />
|
<check-circle-filled class="check-icon-style" @click="onSelectAdd(departmentName, departmentId)" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</a-tree>
|
</a-tree>
|
||||||
|
@ -88,6 +88,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
department.id = department.departmentId;
|
department.id = department.departmentId;
|
||||||
|
department.name = department.departmentName;
|
||||||
department.key = 'department_' + department.departmentId;
|
department.key = 'department_' + department.departmentId;
|
||||||
department.dataType = NOTICE_VISIBLE_RANGE_DATA_TYPE_ENUM.DEPARTMENT.value;
|
department.dataType = NOTICE_VISIBLE_RANGE_DATA_TYPE_ENUM.DEPARTMENT.value;
|
||||||
let employeeChildren = employeeList
|
let employeeChildren = employeeList
|
||||||
|
@ -110,20 +110,10 @@
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '代码配置',
|
title: '代码配置时间',
|
||||||
dataIndex: 'configTime',
|
dataIndex: 'configTime',
|
||||||
width: 150,
|
width: 150,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: '表创建时间',
|
|
||||||
dataIndex: 'createTime',
|
|
||||||
width: 150,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '表修改时间',
|
|
||||||
dataIndex: 'updateTime',
|
|
||||||
width: 150,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
|
@ -112,8 +112,8 @@ export const JS_FILE_LIST = [
|
|||||||
export const TS_FILE_LIST = [
|
export const TS_FILE_LIST = [
|
||||||
'ts/list.vue', //
|
'ts/list.vue', //
|
||||||
'ts/form.vue', //
|
'ts/form.vue', //
|
||||||
'ts/api.js', //
|
'ts/api.ts', //
|
||||||
'ts/const.js', //
|
'ts/const.ts', //
|
||||||
];
|
];
|
||||||
|
|
||||||
// -------------------------------- 后端文件 --------------------------------
|
// -------------------------------- 后端文件 --------------------------------
|
||||||
|
@ -68,7 +68,6 @@
|
|||||||
if (deletedFlagColumn) {
|
if (deletedFlagColumn) {
|
||||||
deleteFlagColumnName.value = deletedFlagColumn.columnName;
|
deleteFlagColumnName.value = deletedFlagColumn.columnName;
|
||||||
}
|
}
|
||||||
console.log(deletedFlagColumn);
|
|
||||||
|
|
||||||
//表单
|
//表单
|
||||||
let deleteInfo = config.deleteInfo;
|
let deleteInfo = config.deleteInfo;
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="column.dataIndex === 'nullableFlag'">
|
<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>
|
||||||
|
|
||||||
<template v-if="column.dataIndex === 'fieldName'">
|
<template v-if="column.dataIndex === 'fieldName'">
|
||||||
@ -68,7 +68,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="column.dataIndex === 'dict'">
|
<template v-if="column.dataIndex === 'dict'">
|
||||||
<DictCodeSelect ref="dictRef" v-model:value="record.dict" :dict-list="dictList" />
|
<DictCodeSelect ref="dictRef" v-model:value="record.dict" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="column.dataIndex === 'enumName'">
|
<template v-if="column.dataIndex === 'enumName'">
|
||||||
@ -83,19 +83,12 @@
|
|||||||
import { checkExistEnum, convertJavaEnumName, getJavaType, getJsType, JavaTypeList, JsTypeList } from '../../code-generator-util';
|
import { checkExistEnum, convertJavaEnumName, getJavaType, getJsType, JavaTypeList, JsTypeList } from '../../code-generator-util';
|
||||||
import DictCodeSelect from '/@/components/support/dict-code-select/index.vue';
|
import DictCodeSelect from '/@/components/support/dict-code-select/index.vue';
|
||||||
import { convertUpperCamel, convertLowerCamel } from '/@/utils/str-util';
|
import { convertUpperCamel, convertLowerCamel } from '/@/utils/str-util';
|
||||||
import { dictApi } from '/@/api/support/dict-api';
|
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
import { useDictStore } from '/@/store/modules/system/dict.js';
|
||||||
|
|
||||||
const dictRef = ref();
|
const dictRef = ref();
|
||||||
const dictList = ref([]);
|
|
||||||
async function loadDictList() {
|
|
||||||
const response = await dictApi.getAllDict();
|
|
||||||
dictList.value = response.data;
|
|
||||||
}
|
|
||||||
loadDictList();
|
|
||||||
|
|
||||||
function refreshDict() {
|
function refreshDict() {
|
||||||
dictRef.value.queryDict();
|
useDictStore().refreshData();
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------ 全局数据 ---------------------
|
//------------------------ 全局数据 ---------------------
|
||||||
@ -239,4 +232,4 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped></style>
|
<style lang="less" scoped></style>
|
||||||
|
@ -87,7 +87,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="column.dataIndex === 'nullableFlag'">
|
<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>
|
||||||
|
|
||||||
<template v-if="column.dataIndex === 'required'">
|
<template v-if="column.dataIndex === 'required'">
|
||||||
@ -222,8 +222,8 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
//表单
|
//表单
|
||||||
field.requiredFlag = configField ? configField.requiredFlag : field.nullableFlag;
|
field.requiredFlag = configField ? configField.requiredFlag : !field.nullableFlag;
|
||||||
field.insertFlag = configField ? configField.insertFlag : field.nullableFlag;
|
field.insertFlag = configField ? configField.insertFlag : !field.nullableFlag;
|
||||||
field.updateFlag = configField ? configField.updateFlag : false;
|
field.updateFlag = configField ? configField.updateFlag : false;
|
||||||
|
|
||||||
if (configField && configField.frontComponent) {
|
if (configField && configField.frontComponent) {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<a-form-item label="备注" name="remark">
|
<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-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
|
@ -19,8 +19,8 @@
|
|||||||
<a-form-item label="职务名称" name="positionName">
|
<a-form-item label="职务名称" name="positionName">
|
||||||
<a-input style="width: 100%" v-model:value="form.positionName" placeholder="职务名称" />
|
<a-input style="width: 100%" v-model:value="form.positionName" placeholder="职务名称" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="职级" name="level">
|
<a-form-item label="职级" name="positionLevel">
|
||||||
<a-input style="width: 100%" v-model:value="form.level" placeholder="职级" />
|
<a-input style="width: 100%" v-model:value="form.positionLevel" placeholder="职级" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="排序" name="sort">
|
<a-form-item label="排序" name="sort">
|
||||||
<a-input-number :min="0" :step="1" :precision="0" style="width: 100%" v-model:value="form.sort" placeholder="排序" />
|
<a-input-number :min="0" :step="1" :precision="0" style="width: 100%" v-model:value="form.sort" placeholder="排序" />
|
||||||
@ -92,7 +92,7 @@
|
|||||||
const formDefault = {
|
const formDefault = {
|
||||||
positionId: undefined,
|
positionId: undefined,
|
||||||
positionName: undefined, //职务名称
|
positionName: undefined, //职务名称
|
||||||
level: undefined, //职纪
|
positionLevel: undefined, //职纪
|
||||||
sort: 0,
|
sort: 0,
|
||||||
remark: undefined, //备注
|
remark: undefined, //备注
|
||||||
};
|
};
|
||||||
|
@ -115,7 +115,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '职级',
|
title: '职级',
|
||||||
dataIndex: 'level',
|
dataIndex: 'positionLevel',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -39,6 +39,16 @@ export default {
|
|||||||
server: {
|
server: {
|
||||||
host: '0.0.0.0',
|
host: '0.0.0.0',
|
||||||
port: 8081,
|
port: 8081,
|
||||||
|
server: {
|
||||||
|
proxy: {
|
||||||
|
// 代理路径
|
||||||
|
'/': {
|
||||||
|
target: 'http://127.0.0.1:1024/', // 目标服务器地址
|
||||||
|
changeOrigin: true, // 是否修改请求头中的 Origin 字段
|
||||||
|
rewrite: (path) => path, // 重写路径
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
},
|
},
|
||||||
plugins: [vue()],
|
plugins: [vue()],
|
||||||
optimizeDeps: {
|
optimizeDeps: {
|
||||||
|
@ -105,14 +105,14 @@ CREATE TABLE `t_code_generator_config` (
|
|||||||
DROP TABLE IF EXISTS `t_config`;
|
DROP TABLE IF EXISTS `t_config`;
|
||||||
CREATE TABLE `t_config` (
|
CREATE TABLE `t_config` (
|
||||||
`config_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
`config_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||||
`config_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '参数名字',
|
`config_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '参数名字',
|
||||||
`config_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '参数key',
|
`config_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '参数key',
|
||||||
`config_value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
`config_value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||||
`remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT 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 '上次修改时间',
|
`update_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '上次修改时间',
|
||||||
`create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
`create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
PRIMARY KEY (`config_id`) USING BTREE
|
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
|
-- Records of t_config
|
||||||
@ -128,21 +128,21 @@ CREATE TABLE `t_data_tracer` (
|
|||||||
`data_tracer_id` bigint(0) NOT NULL AUTO_INCREMENT,
|
`data_tracer_id` bigint(0) NOT NULL AUTO_INCREMENT,
|
||||||
`data_id` bigint(0) NOT NULL COMMENT '各种单据的id',
|
`data_id` bigint(0) NOT NULL COMMENT '各种单据的id',
|
||||||
`type` int(0) NOT NULL COMMENT '单据类型',
|
`type` int(0) NOT NULL COMMENT '单据类型',
|
||||||
`content` 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_unicode_ci NULL COMMENT '差异:旧的数据',
|
`diff_old` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '差异:旧的数据',
|
||||||
`diff_new` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '差异:新的数据',
|
`diff_new` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '差异:新的数据',
|
||||||
`extra_data` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '额外信息',
|
`extra_data` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '额外信息',
|
||||||
`user_id` bigint(0) NOT NULL COMMENT '用户id',
|
`user_id` bigint(0) NOT NULL COMMENT '用户id',
|
||||||
`user_type` int(0) NOT NULL COMMENT '用户类型:1 后管用户 ',
|
`user_type` int(0) NOT NULL COMMENT '用户类型:1 后管用户 ',
|
||||||
`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 '用户名称',
|
||||||
`ip` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT 'ip',
|
`ip` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'ip',
|
||||||
`ip_region` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_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_unicode_ci NULL DEFAULT NULL COMMENT '用户ua',
|
`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 '更新时间',
|
`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_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
PRIMARY KEY (`data_tracer_id`) USING BTREE,
|
PRIMARY KEY (`data_tracer_id`) USING BTREE,
|
||||||
INDEX `order_id_order_type`(`data_id`, `type`) 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
|
-- 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`;
|
DROP TABLE IF EXISTS `t_department`;
|
||||||
CREATE TABLE `t_department` (
|
CREATE TABLE `t_department` (
|
||||||
`department_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '部门主键id',
|
`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',
|
`manager_id` bigint(0) NULL DEFAULT NULL COMMENT '部门负责人id',
|
||||||
`parent_id` bigint(0) NOT NULL DEFAULT 0 COMMENT '部门的父级id',
|
`parent_id` bigint(0) NOT NULL DEFAULT 0 COMMENT '部门的父级id',
|
||||||
`sort` int(0) NOT NULL COMMENT '部门排序',
|
`sort` int(0) NOT NULL COMMENT '部门排序',
|
||||||
@ -172,7 +172,7 @@ CREATE TABLE `t_department` (
|
|||||||
`create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
`create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
PRIMARY KEY (`department_id`) USING BTREE,
|
PRIMARY KEY (`department_id`) USING BTREE,
|
||||||
INDEX `parent_id`(`parent_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
|
-- 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_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 '登录密码',
|
`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 '员工名称',
|
`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 '性别',
|
`gender` tinyint(1) NOT NULL DEFAULT 0 COMMENT '性别',
|
||||||
`phone` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '手机号码',
|
`phone` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '手机号码',
|
||||||
`department_id` bigint(0) NOT NULL COMMENT '部门id',
|
`department_id` bigint(0) NOT NULL COMMENT '部门id',
|
||||||
`position_id` bigint(0) NULL DEFAULT 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是',
|
`disabled_flag` tinyint unsigned NOT NULL COMMENT '是否被禁用 0否1是',
|
||||||
`deleted_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是',
|
`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 '更新时间',
|
`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_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
PRIMARY KEY (`employee_id`) USING BTREE
|
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
|
-- 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`;
|
DROP TABLE IF EXISTS `t_feedback`;
|
||||||
CREATE TABLE `t_feedback` (
|
CREATE TABLE `t_feedback` (
|
||||||
`feedback_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
`feedback_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||||
`feedback_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '反馈内容',
|
`feedback_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '反馈内容',
|
||||||
`feedback_attachment` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT 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_id` bigint(0) NOT NULL COMMENT '创建人id',
|
||||||
`user_type` int(0) NOT NULL COMMENT '创建人用户类型',
|
`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 '创建时间',
|
`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 '更新时间',
|
`update_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
|
||||||
PRIMARY KEY (`feedback_id`) USING BTREE
|
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
|
-- 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
|
-- Table structure for t_operate_log
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
DROP TABLE IF EXISTS `t_operate_log`;
|
DROP TABLE IF EXISTS `t_operate_log`;
|
||||||
CREATE TABLE `t_operate_log` (
|
CREATE TABLE `t_operate_log` (
|
||||||
`operate_log_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
`operate_log_id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||||
`operate_user_id` bigint(0) NOT NULL COMMENT '用户id',
|
`operate_user_id` bigint NOT NULL COMMENT '用户id',
|
||||||
`operate_user_type` int(0) NOT NULL COMMENT '用户类型',
|
`operate_user_type` int NOT NULL COMMENT '用户类型',
|
||||||
`operate_user_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '用户名称',
|
`operate_user_name` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户名称',
|
||||||
`module` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '操作模块',
|
`module` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '操作模块',
|
||||||
`content` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '操作内容',
|
`content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '操作内容',
|
||||||
`url` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '请求路径',
|
`url` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '请求路径',
|
||||||
`method` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '请求方法',
|
`method` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '请求方法',
|
||||||
`param` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '请求参数',
|
`param` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '请求参数',
|
||||||
`ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '请求ip',
|
`ip` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '请求ip',
|
||||||
`ip_region` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL 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_unicode_ci NULL COMMENT '请求user-agent',
|
`user_agent` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '请求user-agent',
|
||||||
`success_flag` tinyint(0) NULL DEFAULT NULL COMMENT '请求结果 0失败 1成功',
|
`success_flag` tinyint DEFAULT NULL COMMENT '请求结果 0失败 1成功',
|
||||||
`fail_reason` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '失败原因',
|
`fail_reason` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '失败原因',
|
||||||
`update_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
|
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||||
`create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
PRIMARY KEY (`operate_log_id`) USING BTREE
|
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
|
-- Table structure for t_password_log
|
||||||
@ -953,25 +953,28 @@ CREATE TABLE `t_password_log` (
|
|||||||
-- Table structure for t_position
|
-- Table structure for t_position
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
DROP TABLE IF EXISTS `t_position`;
|
DROP TABLE IF EXISTS `t_position`;
|
||||||
CREATE TABLE `t_position` (
|
CREATE TABLE `t_position` (
|
||||||
`position_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '职务ID',
|
`position_id` bigint NOT NULL AUTO_INCREMENT COMMENT '职务ID',
|
||||||
`position_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '职务名称',
|
`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 '职级',
|
`position_level` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '职级',
|
||||||
`sort` int(0) NULL DEFAULT 0 COMMENT '排序',
|
`sort` int DEFAULT '0' COMMENT '排序',
|
||||||
`remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
|
`remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注',
|
||||||
`deleted_flag` tinyint(1) NULL DEFAULT 0,
|
`deleted_flag` tinyint(1) DEFAULT '0',
|
||||||
`create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
`update_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0),
|
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||||
PRIMARY KEY (`position_id`) USING BTREE
|
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
|
-- 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`(`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` 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 (4, '技术P8', 'L2', 1, NULL, 0, '2024-07-15 23:34:14', '2024-07-15 23:34:23');
|
||||||
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 (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
|
-- 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`;
|
DROP TABLE IF EXISTS `t_reload_item`;
|
||||||
CREATE TABLE `t_reload_item` (
|
CREATE TABLE `t_reload_item` (
|
||||||
`tag` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '项名称',
|
`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 '运行标识',
|
`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),
|
`update_time` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0),
|
||||||
`create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
`create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
PRIMARY KEY (`tag`) USING BTREE
|
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
|
-- 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`;
|
DROP TABLE IF EXISTS `t_reload_result`;
|
||||||
CREATE TABLE `t_reload_result` (
|
CREATE TABLE `t_reload_result` (
|
||||||
`tag` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
`tag` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||||
`identification` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '运行标识',
|
`identification` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '运行标识',
|
||||||
`args` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
|
`args` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
|
||||||
`result` tinyint unsigned NOT NULL COMMENT '是否成功 ',
|
`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
|
`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
|
-- 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 '更新时间',
|
`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_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
PRIMARY KEY (`id`) USING BTREE
|
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
|
-- 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 '创建时间',
|
`create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
PRIMARY KEY (`id`) USING BTREE,
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
UNIQUE INDEX `uk_role_employee`(`role_id`, `employee_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
|
-- Records of t_role_employee
|
||||||
@ -1084,7 +1087,7 @@ CREATE TABLE `t_role_menu` (
|
|||||||
PRIMARY KEY (`role_menu_id`) USING BTREE,
|
PRIMARY KEY (`role_menu_id`) USING BTREE,
|
||||||
INDEX `idx_role_id`(`role_id`) USING BTREE,
|
INDEX `idx_role_id`(`role_id`) USING BTREE,
|
||||||
INDEX `idx_menu_id`(`menu_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
|
-- Records of t_role_menu
|
||||||
|
54
sql/sql-update-log/v3.23.0.sql
Normal file
54
sql/sql-update-log/v3.23.0.sql
Normal 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='操作记录';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user