data模块 存储租户信息,支持基于租户隔离信息
This commit is contained in:
@@ -7,7 +7,10 @@
|
||||
dirId,
|
||||
SUM(fileSize) AS totalSize
|
||||
FROM file_storage
|
||||
WHERE dirId IN
|
||||
WHERE
|
||||
file_storage.tenantId = #{tenantId}
|
||||
and
|
||||
dirId IN
|
||||
<foreach collection="directoryIds" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
@@ -26,6 +29,8 @@
|
||||
SUM(fileSize) AS totalSize -- 总占用字节数(原始单位)
|
||||
FROM file_storage
|
||||
WHERE
|
||||
file_storage.tenantId = #{tenantId}
|
||||
and
|
||||
dirId IN
|
||||
<foreach collection="dirIds" item="dirId" open="(" separator="," close=")">
|
||||
#{dirId}
|
||||
@@ -42,6 +47,8 @@
|
||||
SUM(fileSize) AS totalSize
|
||||
FROM file_storage
|
||||
WHERE
|
||||
file_storage.tenantId = #{tenantId}
|
||||
and
|
||||
dirId IN
|
||||
<foreach collection="dirIds" item="dirId" open="(" separator="," close=")">
|
||||
#{dirId}
|
||||
@@ -55,7 +62,10 @@
|
||||
userId,
|
||||
SUM(fileSize) AS totalSize
|
||||
FROM file_storage
|
||||
WHERE userId IN
|
||||
WHERE
|
||||
file_storage.tenantId = #{tenantId}
|
||||
and
|
||||
userId IN
|
||||
<foreach collection="userIds" item="userId" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
@@ -74,7 +84,10 @@
|
||||
'BEFORE' AS statDimension,
|
||||
SUM(fileSize) AS totalSize
|
||||
FROM file_storage
|
||||
WHERE userId IN
|
||||
WHERE
|
||||
file_storage.tenantId = #{tenantId}
|
||||
and
|
||||
userId IN
|
||||
<foreach collection="userIds" item="userId" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
@@ -89,7 +102,10 @@
|
||||
'INCREMENT' AS statDimension,
|
||||
SUM(fileSize) AS totalSize
|
||||
FROM file_storage
|
||||
WHERE userId IN
|
||||
WHERE
|
||||
file_storage.tenantId = #{tenantId}
|
||||
and
|
||||
userId IN
|
||||
<foreach collection="userIds" item="userId" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
@@ -106,6 +122,8 @@
|
||||
<where>
|
||||
file_metadata_info.id is not null
|
||||
and file_metadata_info.isLatest = #{queryBigFileReq.isLatest}
|
||||
and file_metadata_info.tenantId = #{tenantId}
|
||||
and file_storage.tenantId = #{tenantId}
|
||||
<if test="queryBigFileReq.approveTypeList != null and queryBigFileReq.approveTypeList.size()>0">
|
||||
AND file_metadata_info.approveType IN
|
||||
<foreach collection="queryBigFileReq.approveTypeList" item="approveType" open="(" separator="," close=")">
|
||||
|
||||
Reference in New Issue
Block a user