统一租户类型,用户类型,增加达梦、oracle,pgsql等

This commit is contained in:
JeeLowCode
2025-01-21 14:50:31 +08:00
parent 9c6ee9b8a2
commit d58b02117f
63 changed files with 5779 additions and 175 deletions

View File

@@ -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);

View File

@@ -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);
}
}

View File

@@ -26,6 +26,6 @@ public abstract class BaseTenantEntity extends BaseEntity {
/**
* 租户id
*/
private String tenantId;
private Long tenantId;
}