@@ -120,7 +120,7 @@
|
||||
<if test="orgId != null">and o.org_id = #{orgId}</if>
|
||||
<if test="orgName != null and orgName != ''">and o.org_name like concat('%', #{orgName}, '%')</if>
|
||||
order by o.org_id desc
|
||||
LIMIT 5
|
||||
LIMIT 10
|
||||
</select>
|
||||
|
||||
<!--
|
||||
@@ -146,7 +146,7 @@
|
||||
<if test="orgId != null">and o.org_id = #{orgId}</if>
|
||||
<if test="orgName != null and orgName != ''">and o.org_name like concat('%', #{orgName}, '%')</if>
|
||||
order by o.org_id desc
|
||||
LIMIT 5
|
||||
LIMIT 10
|
||||
</select>
|
||||
|
||||
<!--
|
||||
@@ -198,4 +198,12 @@
|
||||
(select org_id from biz_person where user_id = #{userId} limit 1)
|
||||
)
|
||||
</select>
|
||||
|
||||
<!-- 单位名称查重 (新增/改名前): 同 orgType 下 org_name 精确匹配 (trim 后) 的条数; orgId 传非空则排除自身 (改名用) -->
|
||||
<select id="countByOrgName" parameterType="BizOrg" resultType="int">
|
||||
select count(*) from biz_org
|
||||
where org_type = #{orgType}
|
||||
and trim(org_name) = #{orgName}
|
||||
<if test="orgId != null"> and org_id != #{orgId}</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user