feat(iam): 添加日志
This commit is contained in:
+9
@@ -468,13 +468,19 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
||||
//step.1 保存用户
|
||||
// 对手机号、邮箱进行加密处理
|
||||
this.proceedUserInfoEncrypt(user);
|
||||
long a = System.currentTimeMillis();
|
||||
this.save(user);
|
||||
long b = System.currentTimeMillis();
|
||||
log.info("保存用户耗时:" + (b - a));
|
||||
//step.2 保存角色
|
||||
if(oConvertUtils.isNotEmpty(selectedRoles)) {
|
||||
String[] arr = selectedRoles.split(",");
|
||||
for (String roleId : arr) {
|
||||
SysUserRole userRole = new SysUserRole(user.getId(), roleId);
|
||||
long c = System.currentTimeMillis();
|
||||
sysUserRoleMapper.insert(userRole);
|
||||
long d = System.currentTimeMillis();
|
||||
log.info("保存角色耗时:" + (c - d));
|
||||
}
|
||||
}
|
||||
//step.3 保存所属部门
|
||||
@@ -482,7 +488,10 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
||||
String[] arr = selectedDeparts.split(",");
|
||||
for (String deaprtId : arr) {
|
||||
SysUserDepart userDeaprt = new SysUserDepart(user.getId(), deaprtId);
|
||||
long e = System.currentTimeMillis();
|
||||
sysUserDepartMapper.insert(userDeaprt);
|
||||
long f = System.currentTimeMillis();
|
||||
log.info("保存部门耗时:" + (e - f));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -218,8 +218,11 @@ public class SyncIamService {
|
||||
String selectedRoles = "123"; // 一般用户的角色ID
|
||||
|
||||
// 存储到用户表中
|
||||
long a = System.currentTimeMillis();
|
||||
log.info("--------" + a + "开始处理保存用户、角色、部门--------");
|
||||
this.sysUserService.saveUser(sysUser, selectedRoles, selectedDeparts);
|
||||
|
||||
long b = System.currentTimeMillis();
|
||||
log.info("--------处理结束耗时" + (b - a) + "--------");
|
||||
iamUserCreateResponse.setUid(sysUser.getId());
|
||||
|
||||
return iamUserCreateResponse;
|
||||
|
||||
@@ -135,7 +135,7 @@ spring:
|
||||
minEvictableIdleTimeMillis: 300000
|
||||
validationQuery: SELECT 1
|
||||
testWhileIdle: true
|
||||
testOnBorrow: false
|
||||
testOnBorrow: true
|
||||
testOnReturn: false
|
||||
# 打开PSCache,并且指定每个连接上PSCache的大小
|
||||
poolPreparedStatements: true
|
||||
@@ -150,10 +150,13 @@ spring:
|
||||
# username: root
|
||||
# password: hzwlsoft.com
|
||||
# driver-class-name: com.p6spy.engine.spy.P6SpyDriver
|
||||
url: jdbc:p6spy:mysql://lijiarao.cn:3306/laws-sinotruk-demo?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true
|
||||
url: jdbc:p6spy:mysql://lijiarao.cn:3306/laws-sinotruk-demo?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&autoReconnect=true
|
||||
username: root
|
||||
password: 704670af746903fa
|
||||
driver-class-name: com.p6spy.engine.spy.P6SpyDriver
|
||||
# url: jdbc:p6spy:mysql://10.10.10.44:3306/laws-sinotruk-test?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true
|
||||
# username: root
|
||||
# password: hzwlsoft.com
|
||||
# url: jdbc:mysql://127.0.0.1:3306/jero-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
# username: root
|
||||
# password: 123456
|
||||
@@ -177,7 +180,8 @@ spring:
|
||||
# shutdown-timeout: 100ms
|
||||
redis:
|
||||
database: 11
|
||||
host: 121.36.69.172
|
||||
# host: 121.36.69.172
|
||||
host: localhost
|
||||
lettuce:
|
||||
pool:
|
||||
max-active: 8 #最大连接数据库连接数,设 0 为没有限制
|
||||
@@ -185,8 +189,9 @@ spring:
|
||||
max-wait: -1ms #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
|
||||
min-idle: 0 #最小等待连接中的数量,设 0 为没有限制
|
||||
shutdown-timeout: 100ms
|
||||
password: hzwlsoft.com
|
||||
port: 4780
|
||||
# password: hzwlsoft.com
|
||||
# port: 4780
|
||||
port: 6379
|
||||
|
||||
#rabbitmq 配置
|
||||
rabbitmq:
|
||||
|
||||
Reference in New Issue
Block a user