给日志、菜单等页面优化接口
This commit is contained in:
@@ -18,28 +18,8 @@
|
||||
</if>
|
||||
and ifnull(delete_flag,'0') !='1'
|
||||
order by sort asc, id desc
|
||||
<if test="offset != null and rows != null">
|
||||
limit #{offset},#{rows}
|
||||
</if>
|
||||
</select>
|
||||
<select id="countsByInOutItem" resultType="java.lang.Long">
|
||||
SELECT
|
||||
COUNT(id)
|
||||
FROM jsh_in_out_item
|
||||
WHERE 1=1
|
||||
<if test="name != null">
|
||||
<bind name="bindName" value="'%'+name+'%'"/>
|
||||
and name like #{bindName}
|
||||
</if>
|
||||
<if test="type != null">
|
||||
and type=#{type}
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
<bind name="bindRemark" value="'%'+remark+'%'"/>
|
||||
and remark like #{bindRemark}
|
||||
</if>
|
||||
and ifnull(delete_flag,'0') !='1'
|
||||
</select>
|
||||
|
||||
<update id="batchDeleteInOutItemByIds">
|
||||
update jsh_in_out_item
|
||||
set delete_flag='1'
|
||||
|
||||
@@ -41,45 +41,6 @@
|
||||
and l.content like #{bindContent}
|
||||
</if>
|
||||
order by l.create_time desc
|
||||
<if test="offset != null and rows != null">
|
||||
limit #{offset},#{rows}
|
||||
</if>
|
||||
</select>
|
||||
<select id="countsByLog" resultType="java.lang.Long">
|
||||
SELECT
|
||||
COUNT(1)
|
||||
FROM jsh_log l
|
||||
left join jsh_user u on l.user_id = u.id
|
||||
left join jsh_tenant t on l.tenant_id=t.tenant_id
|
||||
WHERE 1=1
|
||||
<if test="operation != null">
|
||||
<bind name="bindOperation" value="'%'+operation+'%'"/>
|
||||
and l.operation like #{bindOperation}
|
||||
</if>
|
||||
<if test="userInfo != null">
|
||||
<bind name="bindUserInfo" value="'%'+userInfo+'%'"/>
|
||||
and (u.username like #{bindUserInfo} or u.login_name like #{bindUserInfo})
|
||||
</if>
|
||||
<if test="clientIp != null">
|
||||
<bind name="bindClientIp" value="'%'+clientIp+'%'"/>
|
||||
and l.client_ip like #{bindClientIp}
|
||||
</if>
|
||||
<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}
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
and l.create_time <= #{endTime}
|
||||
</if>
|
||||
<if test="content != null">
|
||||
<bind name="bindContent" value="'%'+content+'%'"/>
|
||||
and l.content like #{bindContent}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getCountByIpAndDate" resultType="java.lang.Long">
|
||||
|
||||
@@ -16,24 +16,6 @@
|
||||
and msg_title like #{bindName}
|
||||
</if>
|
||||
order by create_time desc
|
||||
<if test="offset != null and rows != null">
|
||||
limit #{offset},#{rows}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="countsByMsg" resultType="java.lang.Long">
|
||||
SELECT
|
||||
COUNT(id)
|
||||
FROM jsh_msg
|
||||
WHERE 1=1
|
||||
and ifnull(delete_Flag,'0') !='1'
|
||||
<if test="userId != null">
|
||||
and user_id = #{userId}
|
||||
</if>
|
||||
<if test="name != null">
|
||||
<bind name="bindName" value="'%'+name+'%'"/>
|
||||
and msg_title like #{bindName}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<update id="batchDeleteMsgByIds">
|
||||
|
||||
Reference in New Issue
Block a user