fix(系统管理): 组织日志按操作类型查询数据

--bug=1035355 --user=王旭 【系统管理】组织-日志,操作类型中除了增删改查部分类型无数据 https://www.tapd.cn/55049933/s/1461803
This commit is contained in:
WangXu10 2024-02-18 11:05:49 +08:00 committed by Craftsman
parent 86a0a5cd2f
commit d02b4273ec
2 changed files with 20 additions and 17 deletions

View File

@ -95,6 +95,7 @@
#{caseId}
</foreach>
AND abandoned = FALSE
AND status != 'UNDER_REVIEWED'
order by create_time desc
</select>

View File

@ -21,23 +21,25 @@
<if test="request.startTime != null and request.endTime != null">
AND t.create_time BETWEEN #{request.startTime} AND #{request.endTime}
</if>
<if test="request.level != null and request.level != 'SYSTEM'">
AND t.project_id <![CDATA[<>]]> 'SYSTEM'
</if>
<if test="request.level != null and request.level == 'PROJECT'">
AND t.project_id <![CDATA[<>]]> 'ORGANIZATION'
</if>
<if test="request.projectIds != null and request.projectIds.size > 0 ">
AND t.project_id IN
<foreach collection="request.projectIds" item="projectId" separator="," open="(" close=")">
#{projectId}
</foreach>
</if>
<if test="request.organizationIds != null and request.organizationIds.size > 0 ">
AND t.organization_id IN
<foreach collection="request.organizationIds" item="organizationId" separator="," open="(" close=")">
#{organizationId}
</foreach>
<if test="request.type != 'LOGOUT' and request.type !='LOGIN'">
<if test="request.level != null and request.level != 'SYSTEM'">
AND t.project_id <![CDATA[<>]]> 'SYSTEM'
</if>
<if test="request.level != null and request.level == 'PROJECT'">
AND t.project_id <![CDATA[<>]]> 'ORGANIZATION'
</if>
<if test="request.projectIds != null and request.projectIds.size > 0 ">
AND t.project_id IN
<foreach collection="request.projectIds" item="projectId" separator="," open="(" close=")">
#{projectId}
</foreach>
</if>
<if test="request.organizationIds != null and request.organizationIds.size > 0 ">
AND t.organization_id IN
<foreach collection="request.organizationIds" item="organizationId" separator="," open="(" close=")">
#{organizationId}
</foreach>
</if>
</if>
<if test="request.type != null and request.type != ''">
AND t.type = #{request.type}