优化账户和租户两个模块的接口

This commit is contained in:
jishenghua
2025-02-21 01:28:44 +08:00
parent 20b100b5e2
commit 53004b1fa5
19 changed files with 263 additions and 392 deletions

View File

@@ -49,29 +49,6 @@
</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="countsByAccount" resultType="java.lang.Long">
SELECT
COUNT(id)
FROM jsh_account
WHERE 1=1
<if test="name != null">
<bind name="bindName" value="'%'+name+'%'"/>
and name like #{bindName}
</if>
<if test="serialNo != null and serialNo !=''">
<bind name="bindSerialNo" value="'%'+serialNo+'%'"/>
and serial_no like #{bindSerialNo}
</if>
<if test="remark != null">
<bind name="bindRemark" value="'%'+remark+'%'"/>
and remark like #{bindRemark}
</if>
and ifnull(delete_flag,'0') !='1'
</select>
<select id="getAccountSum" resultType="java.math.BigDecimal">

View File

@@ -35,30 +35,6 @@
</if>
and ifnull(t.delete_flag,'0') !='1'
order by t.id desc
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="countsByTenant" resultType="java.lang.Long">
select
count(t.id)
from jsh_tenant t
where 1=1
<if test="loginName != null">
<bind name="bindLoginName" value="'%'+loginName+'%'"/>
and t.login_name like #{bindLoginName}
</if>
<if test="type != null and type != ''">
and t.type = #{type}
</if>
<if test="enabled != null and enabled != ''">
and t.enabled = #{enabled}
</if>
<if test="remark != null">
<bind name="bindRemark" value="'%'+remark+'%'"/>
and t.remark like #{bindRemark}
</if>
and ifnull(t.delete_flag,'0') !='1'
</select>
</mapper>