代码功能修改
This commit is contained in:
@@ -34,6 +34,28 @@ jero-boot 低代码开发平台
|
||||
- 缓存:Redis
|
||||
|
||||
|
||||
## 数据库设计规范
|
||||
|
||||
- 数据库表名全部使用小写,多个单词之间使用 _ 隔开
|
||||
- 字段内容全部使用小写,多个单词之间使用 _ 隔开,并且每个字段需要有注释
|
||||
- 每个表中都需要有id,用varchar(36)
|
||||
- 新建的表中必须要有创建人、创建时间、更新人、更新时间、所属部门五个字段
|
||||
|
||||
## 系统规范
|
||||
|
||||
- 日志记录
|
||||
方法中使用`@AutoLog` 记录日志
|
||||
- 异常处理
|
||||
所有异常使用`JeroBootException`抛出
|
||||
- 权限控制
|
||||
需要进行数据权限控制
|
||||
- 项目模块创建
|
||||
后续创建模块在`jero-boot-modules.com.jero.modules.laws`
|
||||
和`jero-boot-modules.com.jero.modules.project`下创建
|
||||
- 系统导入
|
||||
系统导入使用注解`@ExcelImport`进行字段校验
|
||||
- 系统常量定义在`com.jero.common.constant.CommonConstant`下
|
||||
|
||||
## 技术文档
|
||||
|
||||
- 在线文档: [http://doc.xxx.com](http://doc.xxx.com)
|
||||
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
package com.jero.common.aspect;
|
||||
|
||||
import com.jero.modules.base.service.BaseCommonService;
|
||||
import org.aspectj.lang.ProceedingJoinPoint;
|
||||
import org.aspectj.lang.annotation.Around;
|
||||
import org.aspectj.lang.annotation.Aspect;
|
||||
import org.aspectj.lang.annotation.Pointcut;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
|
||||
/**
|
||||
* 导入校验,切面处理类
|
||||
*
|
||||
* @Author wcj
|
||||
* @Date 2022年1月6日
|
||||
*/
|
||||
@Aspect
|
||||
@Component
|
||||
public class ExcelImportAspect {
|
||||
|
||||
@Resource
|
||||
private BaseCommonService baseCommonService;
|
||||
|
||||
@Pointcut("@annotation(com.jero.common.aspect.annotation.ExcelImport)")
|
||||
public void logPointCut() {
|
||||
|
||||
}
|
||||
|
||||
@Around("logPointCut()")
|
||||
public Object around(ProceedingJoinPoint point) throws Throwable {
|
||||
long beginTime = System.currentTimeMillis();
|
||||
//执行方法
|
||||
Object result = point.proceed();
|
||||
//执行时长(毫秒)
|
||||
long time = System.currentTimeMillis() - beginTime;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
package com.jero.common.aspect.annotation;
|
||||
|
||||
import com.jero.common.constant.enums.ModuleType;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* 日志导入校验
|
||||
*
|
||||
* @Author wcj
|
||||
* @Date 2022年1月6日
|
||||
*/
|
||||
@Target(ElementType.METHOD)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
public @interface ExcelImport {
|
||||
|
||||
/**
|
||||
* 是否必填,false
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean required() default false;
|
||||
|
||||
/**
|
||||
* 正则表达式
|
||||
*
|
||||
* @return 0:操作日志;1:登录日志;2:定时任务;
|
||||
*/
|
||||
String regular();
|
||||
|
||||
/**
|
||||
* 字符长度
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
int length() default 0;
|
||||
|
||||
/**
|
||||
* 日期格式 默认yyyy-MM-dd HH:mm:ss
|
||||
* @return
|
||||
*/
|
||||
String dateFormat() default "yyyy-MM-dd HH:mm:ss";
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>jero-boot</artifactId>
|
||||
<groupId>com.jero.boot</groupId>
|
||||
<version>2.4.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>jero-boot-modules</artifactId>
|
||||
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>aliyun</id>
|
||||
<name>aliyun Repository</name>
|
||||
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>jeecg</id>
|
||||
<name>jeecg Repository</name>
|
||||
<url>http://maven.jeecg.org/nexus/content/repositories/jeecg</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.jero.boot</groupId>
|
||||
<artifactId>jero-boot-module-system</artifactId>
|
||||
<version>${jero.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.jero.boot</groupId>
|
||||
<artifactId>jero-boot-module-demo</artifactId>
|
||||
<version>${jero.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.jero.boot</groupId>
|
||||
<artifactId>jero-boot-base-generater</artifactId>
|
||||
<version>${jero.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -27,9 +27,15 @@
|
||||
<artifactId>jero-boot-base-generater</artifactId>
|
||||
<version>${jero.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.jero.boot</groupId>
|
||||
<artifactId>jero-boot-modules</artifactId>
|
||||
<version>${jero.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>laws-weilai</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
spring:
|
||||
application:
|
||||
name: jero-system
|
||||
name: weilai-system
|
||||
profiles:
|
||||
active: @profile.name@
|
||||
+17
-16
@@ -53,6 +53,7 @@
|
||||
<module>jero-boot-starter</module>
|
||||
<!-- 单体应用启动类 -->
|
||||
<module>jero-boot-single-startup</module>
|
||||
<module>jero-boot-modules</module>
|
||||
</modules>
|
||||
|
||||
<distributionManagement>
|
||||
@@ -161,11 +162,11 @@
|
||||
</dependency>
|
||||
|
||||
<!--微服务模块-->
|
||||
<dependency>
|
||||
<groupId>com.jero.boot</groupId>
|
||||
<artifactId>jero-cloud-feign-config</artifactId>
|
||||
<version>${jero.version}</version>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.jero.boot</groupId>-->
|
||||
<!-- <artifactId>jero-cloud-feign-config</artifactId>-->
|
||||
<!-- <version>${jero.version}</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!--xxl-job定时任务-->
|
||||
<dependency>
|
||||
@@ -196,17 +197,17 @@
|
||||
</dependency>
|
||||
|
||||
<!-- 七牛云SDK -->
|
||||
<dependency>
|
||||
<groupId>com.qiniu</groupId>
|
||||
<artifactId>qiniu-java-sdk</artifactId>
|
||||
<version>${qiniu-java-sdk.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>okhttp</artifactId>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.qiniu</groupId>-->
|
||||
<!-- <artifactId>qiniu-java-sdk</artifactId>-->
|
||||
<!-- <version>${qiniu-java-sdk.version}</version>-->
|
||||
<!-- <exclusions>-->
|
||||
<!-- <exclusion>-->
|
||||
<!-- <artifactId>okhttp</artifactId>-->
|
||||
<!-- <groupId>com.squareup.okhttp3</groupId>-->
|
||||
<!-- </exclusion>-->
|
||||
<!-- </exclusions>-->
|
||||
<!-- </dependency>-->
|
||||
<!-- dom4j -->
|
||||
<dependency>
|
||||
<groupId>dom4j</groupId>
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<template>
|
||||
<div>
|
||||
<index-chart v-if="indexStyle==1"></index-chart>
|
||||
<index-bdc v-if="indexStyle==2"></index-bdc>
|
||||
<index-task v-if="indexStyle==3"></index-task>
|
||||
<div style="width: 100%;text-align: right;margin-top: 20px">
|
||||
请选择首页样式:
|
||||
<a-radio-group v-model="indexStyle">
|
||||
<a-radio :value="1">统计图表</a-radio>
|
||||
<a-radio :value="2">统计图表2</a-radio>
|
||||
<a-radio :value="3">任务表格</a-radio>
|
||||
</a-radio-group>
|
||||
</div>
|
||||
<!-- <index-chart v-if="indexStyle==1"></index-chart>-->
|
||||
<!-- <index-bdc v-if="indexStyle==2"></index-bdc>-->
|
||||
<!-- <index-task v-if="indexStyle==3"></index-task>-->
|
||||
<!-- <div style="width: 100%;text-align: right;margin-top: 20px">-->
|
||||
<!-- 请选择首页样式:-->
|
||||
<!-- <a-radio-group v-model="indexStyle">-->
|
||||
<!-- <a-radio :value="1">统计图表</a-radio>-->
|
||||
<!-- <a-radio :value="2">统计图表2</a-radio>-->
|
||||
<!-- <a-radio :value="3">任务表格</a-radio>-->
|
||||
<!-- </a-radio-group>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user