|
@@ -570,4 +570,40 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="idCard != null and idCard != '' "> and c.id_card = #{idCard}</if>
|
|
<if test="idCard != null and idCard != '' "> and c.id_card = #{idCard}</if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
|
|
+ <select id="stsByAppletCz" resultMap="CzrkResult">
|
|
|
|
+ SELECT
|
|
|
|
+ czrk.id,
|
|
|
|
+ czrk.is_rl
|
|
|
|
+ from czrk
|
|
|
|
+ left join czrk_jzdz jzdz on czrk.id = jzdz.czrk_id
|
|
|
|
+ <where>
|
|
|
|
+ czrk.is_del = 'N'
|
|
|
|
+ <if test="userName != null and userName != ''">
|
|
|
|
+ and (czrk.user_name like concat('%', #{userName}, '%') or czrk.id_card like concat('%', #{userName}, '%'))
|
|
|
|
+ </if>
|
|
|
|
+
|
|
|
|
+ <choose>
|
|
|
|
+ <when test="type == 1">and jzdz.province_id = #{areaId}</when>
|
|
|
|
+ <when test="type == 2">and jzdz.city_id = #{areaId}</when>
|
|
|
|
+ <when test="type == 3">and jzdz.region_id = #{areaId}</when>
|
|
|
|
+ <when test="type == 4">and jzdz.village_towns_id = #{areaId}</when>
|
|
|
|
+ <when test="type == 5">and jzdz.village_id = #{areaId}</when>
|
|
|
|
+ </choose>
|
|
|
|
+
|
|
|
|
+ <!-- <if test="provinceIdXjd != null and provinceIdXjd != ''"> and jzdz.province_id = #{areaId}</if>
|
|
|
|
+ <if test="cityIdXjd != null and cityIdXjd != ''"> and jzdz.city_id = #{areaId}</if>
|
|
|
|
+ <if test="regionIdXjd != null and regionIdXjd != ''"> and jzdz.region_id = #{areaId}</if>
|
|
|
|
+ <if test="villageTownsIdXjd != null and villageTownsIdXjd != ''"> and jzdz.town_id = #{areaId}</if>
|
|
|
|
+ <if test="villageIdXjd != null and villageIdXjd != ''"> and jzdz.village_id = #{areaId}</if>-->
|
|
|
|
+
|
|
|
|
+ <!-- <if test="provinceId != null and provinceId != ''"> and czrk.province_id = #{areaId}</if>
|
|
|
|
+ <if test="cityId != null and cityId != ''"> and czrk.city_id = #{areaId}</if>
|
|
|
|
+ <if test="regionId != null and regionId != ''"> and czrk.region_id = #{areaId}</if>
|
|
|
|
+ <if test="villageTownsId != null and villageTownsId != ''"> and czrk.village_towns_id = #{areaId}</if>
|
|
|
|
+ <if test="villageId != null and villageId != ''"> and czrk.village_id = #{areaId}</if>
|
|
|
|
+ <if test="villagerGroupId != null and villagerGroupId != ''"> and czrk.villager_group_id = #{villagerGroupId}</if>-->
|
|
|
|
+ </where>
|
|
|
|
+ GROUP BY czrk.id
|
|
|
|
+ </select>
|
|
</mapper>
|
|
</mapper>
|