add interface

This commit is contained in:
zhangchenbiao
2023-06-19 19:54:46 +08:00
parent 59b7102a65
commit 3c8b298706
32 changed files with 291 additions and 662 deletions

View File

@@ -280,4 +280,12 @@
</if>
</where>
</select>
<select id="getUserCountByRegionId" resultType="integer">
select count(1) from enterprise_user where deleted = 0 and user_region_ids like concat("%", #{regionId}, "%")
</select>
<select id="getUserListByDeptLeader" resultMap="BaseResultMap">
select user_id, leader_dept_ids from enterprise_user where leader_dept_ids like concat("%", #{regionId}, "%") and deleted = 0
</select>
</mapper>

View File

@@ -128,4 +128,13 @@
where type = #{type}
and deleted = 0
</select>
<select id="getZoneInfoByRegionIds" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from
hy_intend_dev_zone_info
where
deleted = 0 and <foreach collection="regionIds" separator="or" open="(" close=")" item="regionId">associated_region_id like concat("%", #{regionId}, "%")</foreach>
</select>
</mapper>

View File

@@ -204,4 +204,8 @@
<update id="deleteRegionByRegionId">
update region set deleted = 1 where region_id = #{regionId}
</update>
<select id="getSubRegionIds" resultType="string">
select region_id from region where deleted = 0 and <foreach collection="regionPathList" item="regionPath" open="(" close=")" separator="or"> region_path like (#{regionPath, '%'})</foreach>
</select>
</mapper>

View File

@@ -131,4 +131,8 @@
select region_id from user_region_mapping where user_id = #{userId}
</select>
<select id="getUserListByRegionIds" resultType="string">
select user_id from user_region_mapping where region_id in <foreach collection="regionIds" item="regionId" open="(" close=")" separator=",">#{regionId}</foreach>
</select>
</mapper>