diff --git a/db/pig.sql b/db/pig.sql
index 55737036..5b67198a 100644
--- a/db/pig.sql
+++ b/db/pig.sql
@@ -19,6 +19,7 @@ CREATE DATABASE `pig` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;
+USE `pig`;
-- ----------------------------
-- Table structure for `sys_dept`
-- ----------------------------
@@ -185,8 +186,6 @@ CREATE TABLE `sys_role` (
`role_name` varchar(64) COLLATE utf8mb4_bin NOT NULL,
`role_code` varchar(64) COLLATE utf8mb4_bin NOT NULL,
`role_desc` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
- `ds_type` char(1) COLLATE utf8mb4_bin NOT NULL DEFAULT '2' COMMENT '数据权限类型',
- `ds_scope` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '数据权限范围',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
`del_flag` char(1) COLLATE utf8mb4_bin DEFAULT '0' COMMENT '删除标识(0-正常,1-删除)',
diff --git a/pig-auth/pom.xml b/pig-auth/pom.xml
index 4ed3448c..f709a5d2 100755
--- a/pig-auth/pom.xml
+++ b/pig-auth/pom.xml
@@ -21,7 +21,7 @@
com.pig4cloud
pig
- ${pig.version}
+ 2.0.1
pig-auth
@@ -39,13 +39,13 @@
com.pig4cloud
pig-upms-api
- ${pig.version}
+ 2.0.1
com.pig4cloud
pig-common-security
- ${pig.version}
+ 2.0.1
diff --git a/pig-common/pig-common-core/pom.xml b/pig-common/pig-common-core/pom.xml
index c82245d4..6762c4f4 100755
--- a/pig-common/pig-common-core/pom.xml
+++ b/pig-common/pig-common-core/pom.xml
@@ -21,7 +21,7 @@
com.pig4cloud
pig-common
- ${pig.version}
+ 2.0.1
pig-common-core
diff --git a/pig-common/pig-common-core/src/main/resources/banner.txt b/pig-common/pig-common-core/src/main/resources/banner.txt
index 63be6e1e..806a6a1b 100755
--- a/pig-common/pig-common-core/src/main/resources/banner.txt
+++ b/pig-common/pig-common-core/src/main/resources/banner.txt
@@ -1,12 +1,12 @@
${AnsiColor.BRIGHT_YELLOW}
- ::::::::: ::::::::::: :::::::: ::: :::
- :+: :+: :+: :+: :+: :+: :+:
- +:+ +:+ +:+ +:+ +:+ +:+
- +#++:++#+ +#+ :#: +#++:+
- +#+ +#+ +#+ +#+# +#+ +#+
- #+# #+# #+# #+# #+# #+#
- ### ########### ######## ### ###
+ ::::::::: ::::::::::: ::::::::
+ :+: :+: :+: :+: :+:
+ +:+ +:+ +:+ +:+
+ +#++:++#+ +#+ :#:
+ +#+ +#+ +#+ +#+#
+ #+# #+# #+# #+#
+ ### ########### ########
www.pig4cloud.com
diff --git a/pig-common/pig-common-log/pom.xml b/pig-common/pig-common-log/pom.xml
index f87ef87f..cf59c6b1 100755
--- a/pig-common/pig-common-log/pom.xml
+++ b/pig-common/pig-common-log/pom.xml
@@ -21,7 +21,7 @@
com.pig4cloud
pig-common
- ${pig.version}
+ 2.0.1
pig-common-log
@@ -35,13 +35,13 @@
com.pig4cloud
pig-common-core
- ${pig.version}
+ 2.0.1
com.pig4cloud
pig-upms-api
- ${pig.version}
+ 2.0.1
diff --git a/pig-common/pig-common-log/src/main/java/com/pig4cloud/pig/common/log/event/SysLogListener.java b/pig-common/pig-common-log/src/main/java/com/pig4cloud/pig/common/log/event/SysLogListener.java
index 3989bf04..5573c85a 100755
--- a/pig-common/pig-common-log/src/main/java/com/pig4cloud/pig/common/log/event/SysLogListener.java
+++ b/pig-common/pig-common-log/src/main/java/com/pig4cloud/pig/common/log/event/SysLogListener.java
@@ -18,6 +18,7 @@ package com.pig4cloud.pig.common.log.event;
import com.pig4cloud.pig.admin.api.entity.SysLog;
import com.pig4cloud.pig.admin.api.feign.RemoteLogService;
+import com.pig4cloud.pig.common.core.constant.SecurityConstants;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.event.EventListener;
@@ -39,6 +40,6 @@ public class SysLogListener {
@EventListener(SysLogEvent.class)
public void saveSysLog(SysLogEvent event) {
SysLog sysLog = (SysLog) event.getSource();
- remoteLogService.saveLog(sysLog);
+ remoteLogService.saveLog(sysLog, SecurityConstants.FROM_IN);
}
}
diff --git a/pig-common/pig-common-security/pom.xml b/pig-common/pig-common-security/pom.xml
index a194316e..83b49a2f 100755
--- a/pig-common/pig-common-security/pom.xml
+++ b/pig-common/pig-common-security/pom.xml
@@ -21,7 +21,7 @@
com.pig4cloud
pig-common
- ${pig.version}
+ 2.0.1
pig-common-security
@@ -35,7 +35,7 @@
com.pig4cloud
pig-common-core
- ${pig.version}
+ 2.0.1
@@ -46,7 +46,7 @@
com.pig4cloud
pig-upms-api
- ${pig.version}
+ 2.0.1
diff --git a/pig-common/pom.xml b/pig-common/pom.xml
index 3553d352..97419cbb 100755
--- a/pig-common/pom.xml
+++ b/pig-common/pom.xml
@@ -21,7 +21,7 @@
com.pig4cloud
pig
- ${pig.version}
+ 2.0.1
pig-common
diff --git a/pig-config/pom.xml b/pig-config/pom.xml
index a5ebd975..186a7b07 100755
--- a/pig-config/pom.xml
+++ b/pig-config/pom.xml
@@ -21,7 +21,7 @@
com.pig4cloud
pig
- ${pig.version}
+ 2.0.1
pig-config
diff --git a/pig-config/src/main/resources/banner.txt b/pig-config/src/main/resources/banner.txt
index 63be6e1e..806a6a1b 100755
--- a/pig-config/src/main/resources/banner.txt
+++ b/pig-config/src/main/resources/banner.txt
@@ -1,12 +1,12 @@
${AnsiColor.BRIGHT_YELLOW}
- ::::::::: ::::::::::: :::::::: ::: :::
- :+: :+: :+: :+: :+: :+: :+:
- +:+ +:+ +:+ +:+ +:+ +:+
- +#++:++#+ +#+ :#: +#++:+
- +#+ +#+ +#+ +#+# +#+ +#+
- #+# #+# #+# #+# #+# #+#
- ### ########### ######## ### ###
+ ::::::::: ::::::::::: ::::::::
+ :+: :+: :+: :+: :+:
+ +:+ +:+ +:+ +:+
+ +#++:++#+ +#+ :#:
+ +#+ +#+ +#+ +#+#
+ #+# #+# #+# #+#
+ ### ########### ########
www.pig4cloud.com
diff --git a/pig-eureka/pom.xml b/pig-eureka/pom.xml
index fc9bb410..efbcc32d 100755
--- a/pig-eureka/pom.xml
+++ b/pig-eureka/pom.xml
@@ -21,7 +21,7 @@
com.pig4cloud
pig
- ${pig.version}
+ 2.0.1
pig-eureka
diff --git a/pig-eureka/src/main/resources/banner.txt b/pig-eureka/src/main/resources/banner.txt
index 63be6e1e..806a6a1b 100755
--- a/pig-eureka/src/main/resources/banner.txt
+++ b/pig-eureka/src/main/resources/banner.txt
@@ -1,12 +1,12 @@
${AnsiColor.BRIGHT_YELLOW}
- ::::::::: ::::::::::: :::::::: ::: :::
- :+: :+: :+: :+: :+: :+: :+:
- +:+ +:+ +:+ +:+ +:+ +:+
- +#++:++#+ +#+ :#: +#++:+
- +#+ +#+ +#+ +#+# +#+ +#+
- #+# #+# #+# #+# #+# #+#
- ### ########### ######## ### ###
+ ::::::::: ::::::::::: ::::::::
+ :+: :+: :+: :+: :+:
+ +:+ +:+ +:+ +:+
+ +#++:++#+ +#+ :#:
+ +#+ +#+ +#+ +#+#
+ #+# #+# #+# #+#
+ ### ########### ########
www.pig4cloud.com
diff --git a/pig-gateway/pom.xml b/pig-gateway/pom.xml
index fde75b5a..5c40f551 100755
--- a/pig-gateway/pom.xml
+++ b/pig-gateway/pom.xml
@@ -21,7 +21,7 @@
com.pig4cloud
pig
- ${pig.version}
+ 2.0.1
pig-gateway
@@ -54,7 +54,7 @@
com.pig4cloud
pig-common-core
- ${pig.version}
+ 2.0.1
diff --git a/pig-upms/pig-upms-api/pom.xml b/pig-upms/pig-upms-api/pom.xml
index 75a2c365..e0a47445 100755
--- a/pig-upms/pig-upms-api/pom.xml
+++ b/pig-upms/pig-upms-api/pom.xml
@@ -21,7 +21,7 @@
com.pig4cloud
pig-upms
- ${pig.version}
+ 2.0.1
pig-upms-api
@@ -35,7 +35,7 @@
com.pig4cloud
pig-common-core
- ${pig.version}
+ 2.0.1
diff --git a/pig-upms/pig-upms-api/src/main/java/com/pig4cloud/pig/admin/api/entity/SysRole.java b/pig-upms/pig-upms-api/src/main/java/com/pig4cloud/pig/admin/api/entity/SysRole.java
index 17e4424a..0ca4b041 100644
--- a/pig-upms/pig-upms-api/src/main/java/com/pig4cloud/pig/admin/api/entity/SysRole.java
+++ b/pig-upms/pig-upms-api/src/main/java/com/pig4cloud/pig/admin/api/entity/SysRole.java
@@ -24,7 +24,6 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;
@@ -54,11 +53,6 @@ public class SysRole extends Model {
@NotBlank(message = "角色描述 不能为空")
private String roleDesc;
- @NotNull(message = "数据权限类型 不能为空")
- private Integer dsType;
-
- private String dsScope;
-
private LocalDateTime createTime;
private LocalDateTime updateTime;
/**
diff --git a/pig-upms/pig-upms-api/src/main/java/com/pig4cloud/pig/admin/api/feign/RemoteLogService.java b/pig-upms/pig-upms-api/src/main/java/com/pig4cloud/pig/admin/api/feign/RemoteLogService.java
index 03e0fa04..8061d45d 100755
--- a/pig-upms/pig-upms-api/src/main/java/com/pig4cloud/pig/admin/api/feign/RemoteLogService.java
+++ b/pig-upms/pig-upms-api/src/main/java/com/pig4cloud/pig/admin/api/feign/RemoteLogService.java
@@ -18,11 +18,13 @@ package com.pig4cloud.pig.admin.api.feign;
import com.pig4cloud.pig.admin.api.entity.SysLog;
import com.pig4cloud.pig.admin.api.feign.factory.RemoteLogServiceFallbackFactory;
+import com.pig4cloud.pig.common.core.constant.SecurityConstants;
import com.pig4cloud.pig.common.core.constant.ServiceNameConstants;
import com.pig4cloud.pig.common.core.util.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestHeader;
/**
* @author lengleng
@@ -34,8 +36,9 @@ public interface RemoteLogService {
* 保存日志
*
* @param sysLog 日志实体
+ * @param from 内部调用标志
* @return succes、false
*/
@PostMapping("/log")
- R saveLog(@RequestBody SysLog sysLog);
+ R saveLog(@RequestBody SysLog sysLog, @RequestHeader(SecurityConstants.FROM) String from);
}
diff --git a/pig-upms/pig-upms-api/src/main/java/com/pig4cloud/pig/admin/api/feign/fallback/RemoteLogServiceFallbackImpl.java b/pig-upms/pig-upms-api/src/main/java/com/pig4cloud/pig/admin/api/feign/fallback/RemoteLogServiceFallbackImpl.java
index 3e237a49..4d7d52a9 100755
--- a/pig-upms/pig-upms-api/src/main/java/com/pig4cloud/pig/admin/api/feign/fallback/RemoteLogServiceFallbackImpl.java
+++ b/pig-upms/pig-upms-api/src/main/java/com/pig4cloud/pig/admin/api/feign/fallback/RemoteLogServiceFallbackImpl.java
@@ -36,11 +36,12 @@ public class RemoteLogServiceFallbackImpl implements RemoteLogService {
/**
* 保存日志
*
- * @param sysLog
- * @return R
+ * @param sysLog 日志实体
+ * @param from 内部调用标志
+ * @return succes、false
*/
@Override
- public R saveLog(SysLog sysLog) {
+ public R saveLog(SysLog sysLog, String from) {
log.error("feign 插入日志失败", cause);
return null;
}
diff --git a/pig-upms/pig-upms-biz/pom.xml b/pig-upms/pig-upms-biz/pom.xml
index f2cf8c73..2ebd499a 100644
--- a/pig-upms/pig-upms-biz/pom.xml
+++ b/pig-upms/pig-upms-biz/pom.xml
@@ -21,7 +21,7 @@
com.pig4cloud
pig-upms
- ${pig.version}
+ 2.0.1
pig-upms-biz
@@ -34,19 +34,19 @@
com.pig4cloud
pig-upms-api
- ${pig.version}
+ 2.0.1
com.pig4cloud
pig-common-security
- ${pig.version}
+ 2.0.1
com.pig4cloud
pig-common-log
- ${pig.version}
+ 2.0.1
diff --git a/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/controller/LogController.java b/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/controller/LogController.java
index 870e78e0..78d65a12 100644
--- a/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/controller/LogController.java
+++ b/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/controller/LogController.java
@@ -76,7 +76,7 @@ public class LogController {
* @return success/false
*/
@Inner
- @PostMapping("/save")
+ @PostMapping
public R save(@Valid @RequestBody SysLog sysLog) {
return new R<>(sysLogService.save(sysLog));
}
diff --git a/pig-upms/pig-upms-biz/src/main/resources/mapper/SysRoleMapper.xml b/pig-upms/pig-upms-biz/src/main/resources/mapper/SysRoleMapper.xml
index 9c8d19d6..eb94e1eb 100644
--- a/pig-upms/pig-upms-biz/src/main/resources/mapper/SysRoleMapper.xml
+++ b/pig-upms/pig-upms-biz/src/main/resources/mapper/SysRoleMapper.xml
@@ -24,8 +24,6 @@
-
-
diff --git a/pig-upms/pig-upms-biz/src/main/resources/mapper/SysUserMapper.xml b/pig-upms/pig-upms-biz/src/main/resources/mapper/SysUserMapper.xml
index 43d3c0c3..893b33e5 100644
--- a/pig-upms/pig-upms-biz/src/main/resources/mapper/SysUserMapper.xml
+++ b/pig-upms/pig-upms-biz/src/main/resources/mapper/SysUserMapper.xml
@@ -147,7 +147,8 @@
`user`.update_time AS uupdate_time,
`user`.del_flag AS udel_flag,
`user`.lock_flag AS lock_flag,
- `user`.dept_id AS deptId
+ `user`.dept_id AS deptId,
+ d.name AS deptName
FROM
sys_user AS `user`
LEFT JOIN sys_dept AS d ON d.dept_id = `user`.dept_id
@@ -155,9 +156,6 @@
and `user`.username LIKE CONCAT('%',#{query.username},'%')
-
- and `user`.dept_id = #{query.deptId}
-
ORDER BY `user`.create_time DESC
diff --git a/pig-upms/pom.xml b/pig-upms/pom.xml
index f8e991db..fc7eca1c 100755
--- a/pig-upms/pom.xml
+++ b/pig-upms/pom.xml
@@ -21,7 +21,7 @@
com.pig4cloud
pig
- ${pig.version}
+ 2.0.1
pig-upms
diff --git a/pig-visual/pig-codegen/pom.xml b/pig-visual/pig-codegen/pom.xml
index 31a2f619..f5402e58 100755
--- a/pig-visual/pig-codegen/pom.xml
+++ b/pig-visual/pig-codegen/pom.xml
@@ -22,7 +22,7 @@
com.pig4cloud
pig-visual
- ${pig.version}
+ 2.0.1
pig-codegen
@@ -50,13 +50,13 @@
com.pig4cloud
pig-common-core
- ${pig.version}
+ 2.0.1
com.pig4cloud
pig-common-security
- ${pig.version}
+ 2.0.1
diff --git a/pig-visual/pig-monitor/pom.xml b/pig-visual/pig-monitor/pom.xml
index f6595c65..318ceea6 100755
--- a/pig-visual/pig-monitor/pom.xml
+++ b/pig-visual/pig-monitor/pom.xml
@@ -21,7 +21,7 @@
com.pig4cloud
pig-visual
- ${pig.version}
+ 2.0.1
pig-monitor
diff --git a/pig-visual/pom.xml b/pig-visual/pom.xml
index 2eede87f..a9bf4cb0 100755
--- a/pig-visual/pom.xml
+++ b/pig-visual/pom.xml
@@ -21,7 +21,7 @@
com.pig4cloud
pig
- ${pig.version}
+ 2.0.1
pig-visual
diff --git a/pom.xml b/pom.xml
index 667a6ba3..e4610e28 100755
--- a/pom.xml
+++ b/pom.xml
@@ -21,13 +21,12 @@
com.pig4cloud
pig
- ${pig.version}
+ 2.0.1
${project.artifactId}
pom
https://www.pig4cloud.com
- 2.0.0
2.0.8.RELEASE
Finchley.SR2
Cairo-SR5