给日志模块增加按租户查询的参数
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
select l.*,u.login_name,u.username userName
|
||||
FROM jsh_log l
|
||||
left join jsh_user u on l.user_id = u.id and ifnull(u.Status,'0') !='1'
|
||||
left join jsh_tenant t on l.tenant_id=t.tenant_id
|
||||
where 1=1
|
||||
<if test="operation != null">
|
||||
<bind name="bindOperation" value="'%'+operation+'%'"/>
|
||||
@@ -23,8 +24,11 @@
|
||||
<bind name="bindClientIp" value="'%'+clientIp+'%'"/>
|
||||
and l.client_ip like #{bindClientIp}
|
||||
</if>
|
||||
<if test="status != null">
|
||||
and l.status=#{status}
|
||||
<if test="tenantLoginName != null">
|
||||
and t.login_name = #{tenantLoginName}
|
||||
</if>
|
||||
<if test="tenantType != null">
|
||||
and t.type = #{tenantType}
|
||||
</if>
|
||||
<if test="beginTime != null">
|
||||
and l.create_time >= #{beginTime}
|
||||
@@ -46,6 +50,7 @@
|
||||
COUNT(1)
|
||||
FROM jsh_log l
|
||||
left join jsh_user u on l.user_id = u.id and ifnull(u.Status,'0') !='1'
|
||||
left join jsh_tenant t on l.tenant_id=t.tenant_id
|
||||
WHERE 1=1
|
||||
<if test="operation != null">
|
||||
<bind name="bindOperation" value="'%'+operation+'%'"/>
|
||||
@@ -59,8 +64,11 @@
|
||||
<bind name="bindClientIp" value="'%'+clientIp+'%'"/>
|
||||
and l.client_ip like #{bindClientIp}
|
||||
</if>
|
||||
<if test="status != null">
|
||||
and l.status = #{status}
|
||||
<if test="tenantLoginName != null">
|
||||
and t.login_name = #{tenantLoginName}
|
||||
</if>
|
||||
<if test="tenantType != null">
|
||||
and t.type = #{tenantType}
|
||||
</if>
|
||||
<if test="beginTime != null">
|
||||
and l.create_time >= #{beginTime}
|
||||
|
||||
Reference in New Issue
Block a user