| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="cn.com.goldenwater.dcproj.dao.BisInspProSourceProtectDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.BisInspProSourceProtect" id="bisInspProSourceProtectResultMap">
- <result property="wtsrCd" column="WTSR_CD"/>
- <result property="proPlbm" column="PRO_PLBM"/>
- <result property="mkPlbm" column="MK_PLBM"/>
- <result property="pollPlbm" column="POLL_PLBM"/>
- <result property="spPlbm" column="SP_PLBM"/>
- <result property="lgtd" column="LGTD"/>
- <result property="lttd" column="LTTD"/>
- <result property="lgtdpc" column="LGTDPC"/>
- <result property="lttdpc" column="LTTDPC"/>
- <result property="engSurId" column="ENG_SUR_ID"/>
- <result property="engId" column="ENG_ID"/>
- <result property="waterSourceNm" column="WATER_SOURCE_NM"/>
- <result property="villageNm" column="VILLAGE_NM"/>
- <result property="cwsCode" column="CWS_CODE"/>
- <result property="planInsAmount" column="PLAN_INS_AMOUNT"/>
- <result property="sourceType" column="SOURCE_TYPE"/>
- <result property="isProtectArea" column="IS_PROTECT_AREA"/>
- <result property="waterQuality" column="WATER_QUALITY"/>
- <result property="isProtectMark" column="IS_PROTECT_MARK"/>
- <result property="isPollSource" column="IS_POLL_SOURCE"/>
- <result property="isSpare" column="IS_SPARE"/>
- <result property="visitDate" column="VISIT_DATE"/>
- <result property="recPersId" column="REC_PERS_ID"/>
- <result property="recPers2" column="REC_PERS2"/>
- <result property="recPersTel" column="REC_PERS_TEL"/>
- <result property="createTime" column="CREATE_TIME"/>
- <result property="updateTime" column="UPDATE_TIME"/>
- <result property="status" column="STATUS"/>
- <result property="pollNote" column="POLL_NOTE"/>
- </resultMap>
- <sql id="table_columns">
- WTSR_CD ,
- PRO_PLBM ,
- MK_PLBM ,
- POLL_PLBM ,
- SP_PLBM ,
- LGTD ,
- LTTD ,
- LGTDPC ,
- LTTDPC ,
- ENG_SUR_ID ,
- ENG_ID ,
- WATER_SOURCE_NM ,
- VILLAGE_NM ,
- CWS_CODE ,
- PLAN_INS_AMOUNT ,
- SOURCE_TYPE ,
- IS_PROTECT_AREA ,
- WATER_QUALITY ,
- IS_PROTECT_MARK ,
- IS_POLL_SOURCE ,
- IS_SPARE ,
- DATE_FORMAT(VISIT_DATE,'%Y-%m-%d') VISIT_DATE,
- REC_PERS_ID ,
- REC_PERS2 ,
- REC_PERS_TEL ,
- DATE_FORMAT(CREATE_TIME,'%Y-%m-%d %T') CREATE_TIME,
- DATE_FORMAT(UPDATE_TIME,'%Y-%m-%d %T') UPDATE_TIME,
- STATUS,
- POLL_NOTE
- </sql>
- <sql id="table_columns2">
- WTSR_CD ,
- PRO_PLBM ,
- MK_PLBM ,
- POLL_PLBM ,
- SP_PLBM ,
- LGTD ,
- LTTD ,
- LGTDPC ,
- LTTDPC ,
- ENG_SUR_ID ,
- ENG_ID ,
- WATER_SOURCE_NM ,
- VILLAGE_NM ,
- CWS_CODE ,
- PLAN_INS_AMOUNT ,
- SOURCE_TYPE ,
- IS_PROTECT_AREA ,
- WATER_QUALITY ,
- IS_PROTECT_MARK ,
- IS_POLL_SOURCE ,
- IS_SPARE ,
- VISIT_DATE ,
- REC_PERS_ID ,
- REC_PERS2 ,
- REC_PERS_TEL ,
- CREATE_TIME ,
- UPDATE_TIME ,
- STATUS,
- POLL_NOTE
- </sql>
- <sql id="entity_properties">
- #{wtsrCd},
- #{proPlbm},
- #{mkPlbm},
- #{pollPlbm},
- #{spPlbm},
- #{lgtd},
- #{lttd},
- #{lgtdpc},
- #{lttdpc},
- #{engSurId},
- #{engId},
- #{waterSourceNm},
- #{villageNm},
- #{cwsCode},
- #{planInsAmount},
- #{sourceType},
- #{isProtectArea},
- #{waterQuality},
- #{isProtectMark},
- #{isPollSource},
- #{isSpare},
- STR_TO_DATE(#{visitDate},'%Y-%m-%d'),
- #{recPersId},
- #{recPers2},
- #{recPersTel},
- STR_TO_DATE(#{createTime},'%Y-%m-%d %T') ,
- STR_TO_DATE(#{updateTime},'%Y-%m-%d %T') ,
- #{status},
- #{pollNote}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="wtsrCd != null and wtsrCd != ''">and WTSR_CD = #{wtsrCd}</if>
- <if test="proPlbm != null and proPlbm != ''">and PRO_PLBM = #{proPlbm}</if>
- <if test="mkPlbm != null and mkPlbm != ''">and MK_PLBM = #{mkPlbm}</if>
- <if test="pollPlbm != null and pollPlbm != ''">and POLL_PLBM = #{pollPlbm}</if>
- <if test="spPlbm != null and spPlbm != ''">and SP_PLBM = #{spPlbm}</if>
- <if test="lgtd != null and lgtd != ''">and LGTD = #{lgtd}</if>
- <if test="lttd != null and lttd != ''">and LTTD = #{lttd}</if>
- <if test="lgtdpc != null and lgtdpc != ''">and LGTDPC = #{lgtdpc}</if>
- <if test="lttdpc != null and lttdpc != ''">and LTTDPC = #{lttdpc}</if>
- <if test="engSurId != null and engSurId != ''">and ENG_SUR_ID = #{engSurId}</if>
- <if test="engId != null and engId != ''">and ENG_ID = #{engId}</if>
- <if test="waterSourceNm != null and waterSourceNm != ''">and WATER_SOURCE_NM LIKE
- CONCAT('%', #{waterSourceNm}, '%')
- </if>
- <if test="villageNm != null and villageNm != ''">and VILLAGE_NM LIKE CONCAT('%', #{villageNm}, '%')</if>
- <if test="cwsCode != null and cwsCode != ''">and CWS_CODE = #{cwsCode}</if>
- <if test="planInsAmount != null and planInsAmount != ''">and PLAN_INS_AMOUNT = #{planInsAmount}</if>
- <if test="sourceType != null and sourceType != ''">and SOURCE_TYPE = #{sourceType}</if>
- <if test="isProtectArea != null and isProtectArea != ''">and IS_PROTECT_AREA = #{isProtectArea}</if>
- <if test="waterQuality != null and waterQuality != ''">and WATER_QUALITY = #{waterQuality}</if>
- <if test="isProtectMark != null and isProtectMark != ''">and IS_PROTECT_MARK = #{isProtectMark}</if>
- <if test="isPollSource != null and isPollSource != ''">and IS_POLL_SOURCE = #{isPollSource}</if>
- <if test="isSpare != null and isSpare != ''">and IS_SPARE = #{isSpare}</if>
- <if test="visitDate != null and visitDate != ''">and VISIT_DATE = STR_TO_DATE(#{visitDate},'%Y-%m-%d')</if>
- <if test="recPersId != null and recPersId != ''">and REC_PERS_ID = #{recPersId}</if>
- <if test="recPers2 != null and recPers2 != ''">and REC_PERS2 = #{recPers2}</if>
- <if test="recPersTel != null and recPersTel != ''">and REC_PERS_TEL = #{recPersTel}</if>
- <if test="createTime != null and createTime != ''">and CREATE_TIME = STR_TO_DATE(#{createTime},'%Y-%m-%d %T')
- </if>
- <if test="updateTime != null and updateTime != ''">and UPDATE_TIME = STR_TO_DATE(#{updateTime},'%Y-%m-%d %T')
- </if>
- <if test="status != null and status != ''">and STATUS = #{status}</if>
- <if test="pollNote != null and pollNote != ''">and POLL_NOTE = #{pollNote}</if>
- </trim>
- </sql>
- <select id="get" resultMap="bisInspProSourceProtectResultMap" parameterType="String">
- select
- <include refid="table_columns"/>
- from BIS_INSP_PRO_SOURCE_PROTECT where ENG_SUR_ID = #{id}
- </select>
- <select id="getBy" resultMap="bisInspProSourceProtectResultMap">
- select
- <include refid="table_columns"/>
- from BIS_INSP_PRO_SOURCE_PROTECT
- <include refid="page_where"/>
- </select>
- <select id="findAll" resultMap="bisInspProSourceProtectResultMap">
- select
- <include refid="table_columns"/>
- from BIS_INSP_PRO_SOURCE_PROTECT
- </select>
- <select id="findList" resultMap="bisInspProSourceProtectResultMap">
- select
- <include refid="table_columns"/>
- from BIS_INSP_PRO_SOURCE_PROTECT
- <include refid="page_where"/>
- ORDER BY UPDATE_TIME DESC
- </select>
- <select id="selectCount" resultType="int">
- select count(ENG_SUR_ID) from BIS_INSP_PRO_SOURCE_PROTECT
- <include refid="page_where"/>
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspProSourceProtect">
- insert into BIS_INSP_PRO_SOURCE_PROTECT(
- <include refid="table_columns2"/>
- )
- values (
- <include refid="entity_properties"/>
- )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from BIS_INSP_PRO_SOURCE_PROTECT where ENG_SUR_ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspProSourceProtect">
- delete from BIS_INSP_PRO_SOURCE_PROTECT
- <include refid="page_where"/>
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update BIS_INSP_PRO_SOURCE_PROTECT set flag_valid = 0 where ENG_SUR_ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspProSourceProtect">
- update BIS_INSP_PRO_SOURCE_PROTECT
- <trim prefix="set" suffixOverrides=",">
- <if test="wtsrCd != null and wtsrCd != ''">WTSR_CD = #{wtsrCd},</if>
- <if test="proPlbm != null and proPlbm != ''">PRO_PLBM = #{proPlbm},</if>
- <if test="mkPlbm != null and mkPlbm != ''">MK_PLBM = #{mkPlbm},</if>
- <if test="pollPlbm != null and pollPlbm != ''">POLL_PLBM = #{pollPlbm},</if>
- <if test="spPlbm != null and spPlbm != ''">SP_PLBM = #{spPlbm},</if>
- <if test="lgtd != null and lgtd != ''">LGTD = #{lgtd},</if>
- <if test="lttd != null and lttd != ''">LTTD = #{lttd},</if>
- <if test="lgtdpc != null and lgtdpc != ''">LGTDPC = #{lgtdpc},</if>
- <if test="lttdpc != null and lttdpc != ''">LTTDPC = #{lttdpc},</if>
- <if test="engId != null and engId != ''">ENG_ID = #{engId},</if>
- <if test="waterSourceNm != null and waterSourceNm != ''">WATER_SOURCE_NM = #{waterSourceNm},</if>
- <if test="villageNm != null and villageNm != ''">VILLAGE_NM = #{villageNm},</if>
- <if test="cwsCode != null and cwsCode != ''">CWS_CODE = #{cwsCode},</if>
- <if test="planInsAmount != null and planInsAmount != ''">PLAN_INS_AMOUNT = #{planInsAmount},</if>
- <if test="sourceType != null and sourceType != ''">SOURCE_TYPE = #{sourceType},</if>
- <if test="isProtectArea != null and isProtectArea != ''">IS_PROTECT_AREA = #{isProtectArea},</if>
- <if test="waterQuality != null and waterQuality != ''">WATER_QUALITY = #{waterQuality},</if>
- <if test="isProtectMark != null and isProtectMark != ''">IS_PROTECT_MARK = #{isProtectMark},</if>
- <if test="isPollSource != null and isPollSource != ''">IS_POLL_SOURCE = #{isPollSource},</if>
- <if test="isSpare != null and isSpare != ''">IS_SPARE = #{isSpare},</if>
- <if test="visitDate != null and visitDate != ''">VISIT_DATE = STR_TO_DATE(#{visitDate},'%Y-%m-%d'),</if>
- <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
- <if test="recPers2 != null and recPers2 != ''">REC_PERS2 = #{recPers2},</if>
- <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL = #{recPersTel},</if>
- <if test="createTime != null and createTime != ''">CREATE_TIME = STR_TO_DATE(#{createTime},'%Y-%m-%d %T'),
- </if>
- <if test="updateTime != null and updateTime != ''">UPDATE_TIME = STR_TO_DATE(#{updateTime},'%Y-%m-%d %T'),
- </if>
- <if test="status != null and status != ''">STATUS = #{status},</if>
- <if test="pollNote != null and pollNote != ''">POLL_NOTE = #{pollNote},</if>
- </trim>
- <where>ENG_SUR_ID = #{engSurId}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspProSourceProtect">
- update BIS_INSP_PRO_SOURCE_PROTECT
- <trim prefix="set" suffixOverrides=",">
- <if test="wtsrCd != null and wtsrCd != ''">WTSR_CD = #{wtsrCd},</if>
- <if test="proPlbm != null and proPlbm != ''">PRO_PLBM = #{proPlbm},</if>
- <if test="mkPlbm != null and mkPlbm != ''">MK_PLBM = #{mkPlbm},</if>
- <if test="pollPlbm != null and pollPlbm != ''">POLL_PLBM = #{pollPlbm},</if>
- <if test="spPlbm != null and spPlbm != ''">SP_PLBM = #{spPlbm},</if>
- <if test="lgtd != null and lgtd != ''">LGTD = #{lgtd},</if>
- <if test="lttd != null and lttd != ''">LTTD = #{lttd},</if>
- <if test="lgtdpc != null and lgtdpc != ''">LGTDPC = #{lgtdpc},</if>
- <if test="lttdpc != null and lttdpc != ''">LTTDPC = #{lttdpc},</if>
- <if test="engId != null and engId != ''">ENG_ID = #{engId},</if>
- <if test="waterSourceNm != null and waterSourceNm != ''">WATER_SOURCE_NM = #{waterSourceNm},</if>
- <if test="villageNm != null and villageNm != ''">VILLAGE_NM = #{villageNm},</if>
- <if test="cwsCode != null and cwsCode != ''">CWS_CODE = #{cwsCode},</if>
- <if test="planInsAmount != null and planInsAmount != ''">PLAN_INS_AMOUNT = #{planInsAmount},</if>
- <if test="sourceType != null and sourceType != ''">SOURCE_TYPE = #{sourceType},</if>
- <if test="isProtectArea != null and isProtectArea != ''">IS_PROTECT_AREA = #{isProtectArea},</if>
- <if test="waterQuality != null and waterQuality != ''">WATER_QUALITY = #{waterQuality},</if>
- <if test="isProtectMark != null and isProtectMark != ''">IS_PROTECT_MARK = #{isProtectMark},</if>
- <if test="isPollSource != null and isPollSource != ''">IS_POLL_SOURCE = #{isPollSource},</if>
- <if test="isSpare != null and isSpare != ''">IS_SPARE = #{isSpare},</if>
- <if test="visitDate != null and visitDate != ''">VISIT_DATE = STR_TO_DATE(#{visitDate},'%Y-%m-%d'),</if>
- <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
- <if test="recPers2 != null and recPers2 != ''">REC_PERS2 = #{recPers2},</if>
- <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL = #{recPersTel},</if>
- <if test="createTime != null and createTime != ''">CREATE_TIME = STR_TO_DATE(#{createTime},'%Y-%m-%d %T'),
- </if>
- <if test="updateTime != null and updateTime != ''">UPDATE_TIME = STR_TO_DATE(#{updateTime},'%Y-%m-%d %T'),
- </if>
- <if test="status != null and status != ''">STATUS = #{status},</if>
- <if test="pollNote != null and pollNote != ''">POLL_NOTE = #{pollNote},</if>
- </trim>
- <include refid="page_where"/>
- </update>
- <!-- 其他自定义SQL -->
- <select id="queryListByObjId" resultType="cn.com.goldenwater.dcproj.dto.BisInspProSourceProtectDto"
- parameterType="string">
- SELECT * FROM ( SELECT sws_cd ws_cd,CASE WHEN B.WATER_SOURCE_NM IS NULL THEN sws_nm ELSE B.WATER_SOURCE_NM END
- ws_nm,
- B.lgtd,B.lttd,B.lgtdpc,B.lttdpc,CASE WHEN B.SOURCE_TYPE IS NULL THEN 'A' ELSE B.SOURCE_TYPE END TYPE,A.TS TM,
- CASE WHEN B.ENG_ID =#{engId} THEN 1 ELSE 0 end STATUS,CASE WHEN B.ENG_SUR_ID IS NULL THEN sws_cd ELSE
- B.ENG_SUR_ID END ID FROM WR_SWS_B A
- LEFT JOIN BIS_INSP_PRO_SOURCE_PROTECT B ON A.sws_cd = B.WTSR_CD WHERE A.sws_cd like CONCAT(#{objId}, '%')
- <if test="name != null and name != ''">AND B.WATER_SOURCE_NM LIKE CONCAT('%', #{name}, '%')</if>
- union all
- SELECT gws_cd ws_cd,CASE WHEN B.WATER_SOURCE_NM IS NULL THEN Gws_nm ELSE B.WATER_SOURCE_NM END ws_nm,
- B.lgtd,B.lttd,B.lgtdpc,B.lttdpc,CASE WHEN B.SOURCE_TYPE IS NULL THEN 'B' ELSE B.SOURCE_TYPE END TYPE,A.TS TM,
- CASE WHEN B.ENG_ID =#{engId} THEN 1 ELSE 0 end STATUS,CASE WHEN B.ENG_SUR_ID IS NULL THEN gws_cd ELSE
- B.ENG_SUR_ID END ID FROM WR_GWS_B A
- LEFT JOIN BIS_INSP_PRO_SOURCE_PROTECT B ON A.gws_cd = B.WTSR_CD WHERE A.gws_cd like CONCAT(#{objId}, '%')
- <if test="name != null and name != ''">AND B.WATER_SOURCE_NM LIKE CONCAT('%', #{name}, '%')</if>
- UNION ALL
- SELECT A.WTSR_CD WS_CD,A.WATER_SOURCE_NM WS_NM,A.LGTD,A.lttd,A.lgtdpc,A.lttdpc,A.SOURCE_TYPE TYPE,A.UPDATE_TIME
- TM,1 STATUS,A.ENG_SUR_ID ID FROM BIS_INSP_PRO_SOURCE_PROTECT A
- LEFT JOIN (SELECT sws_cd WS_CD FROM WR_SWS_B WHERE sws_cd like CONCAT(#{objId}, '%') UNION ALL SELECT Gws_cd WS_CD FROM
- WR_GWS_B WHERE Gws_cd like CONCAT(#{objId}, '%') ) B on A.WTSR_CD=B.WS_CD
- WHERE B.WS_CD IS NULL AND A.ENG_ID=#{engId} <if test="name != null and name != ''">AND A.WATER_SOURCE_NM LIKE
- CONCAT('%', #{name}, '%')</if>) w
- ORDER BY STATUS DESC,TM DESC
- </select>
- <select id="getListByCodeAndPerId" parameterType="cn.com.goldenwater.dcproj.dto.VillRgstrDto"
- resultType="cn.com.goldenwater.dcproj.model.BisInspProSourceProtect">
- SELECT * FROM BIS_INSP_PRO_SOURCE_PROTECT A LEFT JOIN BIS_INSP_VILL_RGSTR B ON A.ENG_ID = B.ENG_ID
- LEFT JOIN BIS_INSP_ALL_OBJ C ON B.OBJ_ID = C.OBJ_ID
- WHERE
- C.id in (${inIdsSql})
- AND C.CODE LIKE '${adCode}%' AND C.PTYPE = '2'
- <if test="adNm != null and adNm != ''">AND A.WATER_SOURCE_NM LIKE '%${adNm}%'</if>
- </select>
- <select id="getPageByNodeId" parameterType="cn.com.goldenwater.dcproj.param.GetVillPageByNodeIdParam"
- resultType="cn.com.goldenwater.dcproj.dto.BisInspProSourceProtectDcdxDto">
- select A.WTSR_CD ,
- A.PRO_PLBM ,
- A.MK_PLBM ,
- A.POLL_PLBM ,
- A.SP_PLBM ,
- A.LGTD ,
- A.LTTD ,
- A.LGTDPC ,
- A.LTTDPC ,
- A.ENG_SUR_ID ,
- A.ENG_ID ,
- A.WATER_SOURCE_NM ,
- A.VILLAGE_NM ,
- A.CWS_CODE ,
- A.PLAN_INS_AMOUNT ,
- A.SOURCE_TYPE ,
- A.IS_PROTECT_AREA ,
- A.WATER_QUALITY ,
- A.IS_PROTECT_MARK ,
- A.IS_POLL_SOURCE ,
- A.IS_SPARE ,
- DATE_FORMAT(A.VISIT_DATE,'%Y-%m-%d') VISIT_DATE,
- A.REC_PERS_ID ,
- A.REC_PERS2 ,
- A.REC_PERS_TEL ,
- DATE_FORMAT(A.CREATE_TIME,'%Y-%m-%d %T') CREATE_TIME,
- DATE_FORMAT(A.UPDATE_TIME,'%Y-%m-%d %T') UPDATE_TIME,
- A.STATUS,
- A.POLL_NOTE,D.PNM GROUP_NM,F.PNM CHKCOM from
- BIS_INSP_PRO_SOURCE_PROTECT A LEFT JOIN BIS_INSP_VILL_RGSTR B ON A.ENG_ID=B.ENG_ID LEFT JOIN bis_insp_all_obj C
- ON B.OBJ_ID=C.OBJ_ID
- LEFT JOIN BIS_INSP_ALL D ON C.ID=D.ID LEFT JOIN BIS_INSP_ALL E ON D.PID=E.ID LEFT JOIN BIS_INSP_ALL F ON
- E.PID=F.ID WHERE 1=1
- <if test="nodeId != null and nodeId != ''">
- and C.ID like CONCAT(#{nodeId}, '%')
- </if>
- <if test="startDate != null and startDate != ''">
- AND A.VISIT_DATE >=STR_TO_DATE(#{startDate},'%Y-%m-%d')
- </if>
- <if test="endDate != null and endDate != ''">
- AND A.VISIT_DATE <=STR_TO_DATE(#{endDate},'%Y-%m-%d')
- </if>
- <if test="chkComId != null and chkComId != ''">
- AND F.ID =#{chkComId}
- </if>
- <if test="groupId != null and groupId != ''">
- AND D.ID =#{groupId}
- </if>
- <if test="adNm != null and adNm != ''">
- AND A.VILLAGE_NM LIKE CONCAT('%', #{adNm}, '%')
- </if>
- ORDER BY A.UPDATE_TIME DESC,A.VISIT_DATE DESC
- </select>
- </mapper>
|