♻️ 重构代码
This commit is contained in:
1 parent
d4c1e83b1d
commit
f68536e683
22 files changed
+40
-39
No files matched your search
File renamed without changes.
+1
-1
@@ -37,7 +37,7 @@ pigx/pigx-config/src/main/resources/config/pigx-upms-dev.yml
|
||||
spring:
|
||||
datasource:
|
||||
type: com.zaxxer.hikari.HikariDataSource
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
username: root
|
||||
password: lengleng
|
||||
url: jdbc:pigx-mysql://mysql:3306/pigx?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai
|
||||
|
||||
@@ -46,7 +46,7 @@ spring:
|
||||
# 保存定时任务的数据源
|
||||
datasource:
|
||||
type: com.zaxxer.hikari.HikariDataSource
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
username: root
|
||||
password: 123456
|
||||
url: jdbc:mysql://mysql:3306/pigxx?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai
|
||||
|
||||
-1
@@ -27,7 +27,6 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.aspectj.lang.ProceedingJoinPoint;
|
||||
import org.aspectj.lang.annotation.Around;
|
||||
import org.aspectj.lang.annotation.Aspect;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 操作日志使用spring event异步入库
|
||||
|
||||
@@ -20,7 +20,7 @@ spring:
|
||||
check-process-definitions: false
|
||||
datasource:
|
||||
type: com.zaxxer.hikari.HikariDataSource
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
username: root
|
||||
password: root
|
||||
url: jdbc:mysql://pigx-mysql:3306/pigxx_ac?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai
|
||||
@@ -2,7 +2,7 @@
|
||||
spring:
|
||||
datasource:
|
||||
type: com.zaxxer.hikari.HikariDataSource
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
username: root
|
||||
password: root
|
||||
url: jdbc:mysql://pigx-mysql:3306/pigxx?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false
|
||||
|
||||
@@ -9,7 +9,7 @@ security:
|
||||
spring:
|
||||
datasource:
|
||||
type: com.zaxxer.hikari.HikariDataSource
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
username: root
|
||||
password: root
|
||||
url: jdbc:mysql://pigx-mysql:3306/pigxx?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai
|
||||
|
||||
@@ -10,7 +10,7 @@ spring:
|
||||
# 保存定时任务的数据源
|
||||
datasource:
|
||||
type: com.zaxxer.hikari.HikariDataSource
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
username: root
|
||||
password: root
|
||||
url: jdbc:mysql://pigx-mysql:3306/pigxx?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai
|
||||
|
||||
@@ -18,7 +18,7 @@ security:
|
||||
spring:
|
||||
datasource:
|
||||
type: com.zaxxer.hikari.HikariDataSource
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
username: root
|
||||
password: root
|
||||
url: jdbc:mysql://pigx-mysql:3306/pigxx?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&allowMultiQueries=true
|
||||
|
||||
-2
@@ -24,8 +24,6 @@ import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 部门关系表
|
||||
|
||||
@@ -28,7 +28,6 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
|
||||
-1
@@ -25,7 +25,6 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
|
||||
-1
@@ -22,7 +22,6 @@ package com.pig4cloud.pigx.admin.service.impl;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.pig4cloud.pigx.admin.api.entity.SysRole;
|
||||
import com.pig4cloud.pigx.admin.api.entity.SysRoleMenu;
|
||||
import com.pig4cloud.pigx.admin.mapper.SysRoleMenuMapper;
|
||||
import com.pig4cloud.pigx.admin.service.SysRoleMenuService;
|
||||
|
||||
@@ -18,6 +18,8 @@ spring:
|
||||
service-id: pigx-config
|
||||
autoconfigure:
|
||||
exclude: org.springframework.cloud.gateway.config.GatewayClassPathWarningAutoConfiguration
|
||||
main:
|
||||
allow-bean-definition-overriding: true
|
||||
|
||||
# 注册中心配置
|
||||
eureka:
|
||||
|
||||
@@ -137,6 +137,22 @@
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>true</filtering>
|
||||
<excludes>
|
||||
<exclude>**/*.woff</exclude>
|
||||
</excludes>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>false</filtering>
|
||||
<includes>
|
||||
<include>**/*.woff</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
+7
-6
@@ -29,6 +29,7 @@ import com.pig4cloud.pigx.act.mapper.LeaveBillMapper;
|
||||
import com.pig4cloud.pigx.act.service.ActTaskService;
|
||||
import com.pig4cloud.pigx.common.core.constant.PaginationConstant;
|
||||
import com.pig4cloud.pigx.common.core.constant.enums.TaskStatusEnum;
|
||||
import com.pig4cloud.pigx.common.core.util.TenantContextHolder;
|
||||
import com.pig4cloud.pigx.common.security.util.SecurityUtils;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -71,18 +72,18 @@ public class ActTaskServiceImpl implements ActTaskService {
|
||||
|
||||
@Override
|
||||
public IPage getTaskByName(Map<String, Object> params, String name) {
|
||||
TaskQuery taskQuery = taskService.createTaskQuery()
|
||||
.taskCandidateOrAssigned(name)
|
||||
.orderByTaskCreateTime().asc();
|
||||
|
||||
int page = MapUtil.getInt(params, PaginationConstant.CURRENT);
|
||||
int limit = MapUtil.getInt(params, PaginationConstant.SIZE);
|
||||
|
||||
TaskQuery taskQuery = taskService.createTaskQuery()
|
||||
.taskCandidateOrAssigned(name)
|
||||
.taskTenantId(String.valueOf(TenantContextHolder.getTenantId()));
|
||||
|
||||
IPage result = new Page(page, limit);
|
||||
result.setTotal(taskQuery.count());
|
||||
|
||||
List<TaskDTO> taskDTOList = taskQuery.list().stream()
|
||||
.map(task -> {
|
||||
List<TaskDTO> taskDTOList = taskQuery.orderByTaskCreateTime().desc()
|
||||
.listPage((page - 1) * limit, limit).stream().map(task -> {
|
||||
TaskDTO dto = new TaskDTO();
|
||||
dto.setTaskId(task.getId());
|
||||
dto.setTaskName(task.getName());
|
||||
|
||||
+1
@@ -110,6 +110,7 @@ public class ModelServiceImpl implements ModelService {
|
||||
@Override
|
||||
public IPage<Model> getModelPage(Map<String, Object> params) {
|
||||
ModelQuery modelQuery = repositoryService.createModelQuery()
|
||||
.modelTenantId(String.valueOf(TenantContextHolder.getTenantId()))
|
||||
.latestVersion().orderByLastUpdateTime().desc();
|
||||
String category = (String) params.get("category");
|
||||
if (StrUtil.isNotBlank(category)) {
|
||||
|
||||
+3
-1
@@ -64,7 +64,9 @@ public class ProcessServiceImpl implements ProcessService {
|
||||
*/
|
||||
@Override
|
||||
public IPage<ProcessDefDTO> getProcessByPage(Map<String, Object> params) {
|
||||
ProcessDefinitionQuery query = repositoryService.createProcessDefinitionQuery().latestVersion();
|
||||
ProcessDefinitionQuery query = repositoryService.createProcessDefinitionQuery()
|
||||
.processDefinitionTenantId(String.valueOf(TenantContextHolder.getTenantId())).latestVersion();
|
||||
|
||||
String category = MapUtil.getStr(params, "category");
|
||||
if (StrUtil.isNotBlank(category)) {
|
||||
query.processDefinitionCategory(category);
|
||||
|
||||
+1
-7
@@ -165,11 +165,5 @@ KISBPM.TOOLBAR_CONFIG = {
|
||||
],
|
||||
|
||||
"secondaryItems" : [
|
||||
{
|
||||
"type" : "button",
|
||||
"title" : "Close",
|
||||
"cssClass" : "editor-icon editor-icon-close",
|
||||
"action" : "KISBPM.TOOLBAR.ACTIONS.closeEditor"
|
||||
}
|
||||
]
|
||||
};
|
||||
};
|
||||
@@ -937,7 +937,7 @@ a.dropdown-toggle {
|
||||
}
|
||||
|
||||
.wrapper.full {
|
||||
padding: 40px 0px 0px 0px;
|
||||
padding: 5px 0px 0px 0px;
|
||||
overflow: hidden;
|
||||
max-width: 100%;
|
||||
min-width: 100%;
|
||||
@@ -1516,4 +1516,4 @@ button.selection:active, button.selection:focus {
|
||||
|
||||
.fullscreen .modal-header h3 .summary {
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
@@ -27,15 +27,6 @@
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="navbar navbar-fixed-top navbar-inverse" role="navigation" id="main-header">
|
||||
<div class="navbar-header">
|
||||
<a href="" ng-click="backToLanding()" class="navbar-brand"
|
||||
title="{{'GENERAL.MAIN-TITLE' | translate}}"><span
|
||||
class="sr-only">{{'GENERAL.MAIN-TITLE' | translate}}</span></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<div class="unsupported-browser">
|
||||
<p class="alert error">You are using an unsupported browser. Please upgrade your browser in order to use the
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
</developers>
|
||||
|
||||
<properties>
|
||||
<spring-boot.version>2.0.6.RELEASE</spring-boot.version>
|
||||
<spring-boot.version>2.0.7.RELEASE</spring-boot.version>
|
||||
<spring-cloud.version>Finchley.SR2</spring-cloud.version>
|
||||
<spring-platform.version>Cairo-SR5</spring-platform.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
|
||||
Reference in new issue
Block a user