mirror of
https://gitee.com/jeelowcode/JeeLowCode.git
synced 2026-05-09 04:37:12 +08:00
统一租户类型,用户类型,增加达梦、oracle,pgsql等
This commit is contained in:
@@ -42,7 +42,7 @@ import java.util.Set;
|
||||
public interface IJeeLowCodeAdapter {
|
||||
|
||||
//获取当前在线人id
|
||||
String getOnlineUserId();
|
||||
Long getOnlineUserId();
|
||||
|
||||
//获取当前在线人账号
|
||||
String getOnlineUserName();
|
||||
@@ -51,10 +51,10 @@ public interface IJeeLowCodeAdapter {
|
||||
String getOnlineUserNickName();
|
||||
|
||||
//获取当前在线人部门id
|
||||
String getOnlineUserDeptId();
|
||||
Long getOnlineUserDeptId();
|
||||
|
||||
//获取当前在线人id
|
||||
String getTenantId();
|
||||
Long getTenantId();
|
||||
|
||||
//获取部门id
|
||||
Long getDeptId(Long userId);
|
||||
|
||||
@@ -123,9 +123,9 @@ public class DefaultValAspect {
|
||||
}
|
||||
|
||||
LocalDateTime current = LocalDateTime.now();
|
||||
String userId = proxyAdapter.getOnlineUserId();
|
||||
String tenantId = proxyAdapter.getTenantId();
|
||||
String deptId = proxyAdapter.getOnlineUserDeptId();
|
||||
Long userId = proxyAdapter.getOnlineUserId();
|
||||
Long tenantId = proxyAdapter.getTenantId();
|
||||
Long deptId = proxyAdapter.getOnlineUserDeptId();
|
||||
|
||||
//基本类
|
||||
if (obj instanceof BaseEntity) {//我们自定义的实体
|
||||
@@ -137,16 +137,16 @@ public class DefaultValAspect {
|
||||
baseEntity.setCreateTime(current);
|
||||
}
|
||||
if (FuncBase.isNotEmpty(userId) && FuncBase.isEmpty(createUser)) {
|
||||
baseEntity.setCreateUser(FuncBase.toLong(userId));
|
||||
baseEntity.setCreateUser(userId);
|
||||
}
|
||||
if (FuncBase.isNotEmpty(deptId) && FuncBase.isEmpty(createDept)) {
|
||||
baseEntity.setCreateDept(FuncBase.toLong(deptId));
|
||||
baseEntity.setCreateDept(deptId);
|
||||
}
|
||||
}
|
||||
|
||||
if (obj instanceof BaseTenantEntity) {//我们自定义的实体
|
||||
BaseTenantEntity baseEntity = (BaseTenantEntity) obj;
|
||||
String selectTenantId = baseEntity.getTenantId();
|
||||
Long selectTenantId = baseEntity.getTenantId();
|
||||
|
||||
if (FuncBase.isEmpty(selectTenantId) && FuncBase.isNotEmpty(tenantId)) {
|
||||
baseEntity.setTenantId(tenantId);
|
||||
@@ -200,13 +200,13 @@ public class DefaultValAspect {
|
||||
return;
|
||||
}
|
||||
|
||||
String userId = proxyAdapter.getOnlineUserId();
|
||||
Long userId = proxyAdapter.getOnlineUserId();
|
||||
BaseEntity baseEntity = (BaseEntity) obj;
|
||||
Long updateUser = baseEntity.getUpdateUser();
|
||||
|
||||
baseEntity.setUpdateTime(current);
|
||||
if (FuncBase.isEmpty(updateUser) && FuncBase.isNotEmpty(userId)) {
|
||||
baseEntity.setUpdateUser(FuncBase.toLong(userId));
|
||||
baseEntity.setUpdateUser(userId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -26,6 +26,6 @@ public abstract class BaseTenantEntity extends BaseEntity {
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
private String tenantId;
|
||||
private Long tenantId;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user