给日志、菜单等页面优化接口

This commit is contained in:
jishenghua
2025-02-23 09:54:00 +08:00
parent a73a8d2db2
commit db090f8dd5
22 changed files with 275 additions and 431 deletions

View File

@@ -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'

View File

@@ -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 &gt;= #{beginTime}
</if>
<if test="endTime != null">
and l.create_time &lt;= #{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">

View File

@@ -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">