| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- <?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.BisZhejiangDcuserRelVillDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.BisZhejiangDcuserRelVill" id="bisZhejiangDcuserRelVillResultMap">
- <result property="id" column="ID"/>
- <result property="villCode" column="VILL_CODE"/>
- <result property="rgstrId" column="RGSTR_ID"/>
- <result property="villageNm" column="VILLAGE_NM"/>
- <result property="adCode" column="AD_CODE"/>
- <result property="persId" column="PERS_ID"/>
- <result property="recPers2" column="REC_PERS2"/>
- <result property="createTime" column="CREATE_TIME"/>
- <result property="updateTime" column="UPDATE_TIME"/>
- <result property="status" column="STATUS"/>
- <result property="townName" column="TOWN_NAME"/>
- </resultMap>
-
- <sql id="table_columns">
- ID,
- VILL_CODE,
- RGSTR_ID,
- VILLAGE_NM,
- AD_CODE,
- PERS_ID,
- REC_PERS2,
- CREATE_TIME,
- UPDATE_TIME,
- STATUS,
- TOWN_NAME
- </sql>
- <sql id="entity_properties">
- #{id},
- #{villCode},
- #{rgstrId},
- #{villageNm},
- #{adCode},
- #{persId},
- #{recPers2},
- #{createTime},
- #{updateTime},
- #{status},
- #{townName}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="villCode != null and villCode != ''">and VILL_CODE = #{villCode}</if>
- <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
- <if test="villageNm != null and villageNm != ''">and VILLAGE_NM = #{villageNm}</if>
- <if test="adCode != null and adCode != ''">and AD_CODE = #{adCode}</if>
- <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
- <if test="recPers2 != null and recPers2 != ''">and REC_PERS2 = #{recPers2}</if>
- <if test="createTime != null">and CREATE_TIME = #{createTime}</if>
- <if test="updateTime != null">and UPDATE_TIME = #{updateTime}</if>
- <if test="status != null and status != ''">and STATUS = #{status}</if>
- <if test="townName != null and townName != ''">and TOWN_NAME = #{townName}</if>
- </trim>
- </sql>
- <select id="get" resultMap="bisZhejiangDcuserRelVillResultMap" parameterType="String" >
- select <include refid="table_columns" /> from BIS_ZHEJIANG_DCUSER_REL_VILL where ID = #{id}
- </select>
- <select id="getBy" resultMap="bisZhejiangDcuserRelVillResultMap">
- select <include refid="table_columns" /> from BIS_ZHEJIANG_DCUSER_REL_VILL <include refid="page_where" />
- </select>
- <select id="findAll" resultMap="bisZhejiangDcuserRelVillResultMap">
- select <include refid="table_columns" /> from BIS_ZHEJIANG_DCUSER_REL_VILL
- </select>
- <select id="findList" resultMap="bisZhejiangDcuserRelVillResultMap">
- select <include refid="table_columns" /> from BIS_ZHEJIANG_DCUSER_REL_VILL <include refid="page_where" />
- </select>
- <select id="selectCount" resultType="int" >
- select count(ID) from BIS_ZHEJIANG_DCUSER_REL_VILL <include refid="page_where" />
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisZhejiangDcuserRelVill">
- insert into BIS_ZHEJIANG_DCUSER_REL_VILL( <include refid="table_columns" /> )
- values ( <include refid="entity_properties" /> )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from BIS_ZHEJIANG_DCUSER_REL_VILL where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisZhejiangDcuserRelVill">
- delete from BIS_ZHEJIANG_DCUSER_REL_VILL <include refid="page_where" />
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update BIS_ZHEJIANG_DCUSER_REL_VILL set flag_valid = 0 where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisZhejiangDcuserRelVill">
- update BIS_ZHEJIANG_DCUSER_REL_VILL
- <trim prefix="set" suffixOverrides=",">
- <if test="villCode != null and villCode != ''">VILL_CODE = #{villCode},</if>
- <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
- <if test="villageNm != null and villageNm != ''">VILLAGE_NM = #{villageNm},</if>
- <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
- <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
- <if test="recPers2 != null and recPers2 != ''">REC_PERS2 = #{recPers2},</if>
- <if test="createTime != null">CREATE_TIME = #{createTime},</if>
- <if test="updateTime != null">UPDATE_TIME = #{updateTime},</if>
- <if test="status != null and status != ''">STATUS = #{status},</if>
- <if test="townName != null and townName != ''">TOWN_NAME = #{townName},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisZhejiangDcuserRelVill">
- update BIS_ZHEJIANG_DCUSER_REL_VILL
- <trim prefix="set" suffixOverrides=",">
- <if test="villCode != null and villCode != ''">VILL_CODE = #{villCode},</if>
- <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
- <if test="villageNm != null and villageNm != ''">VILLAGE_NM = #{villageNm},</if>
- <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
- <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
- <if test="recPers2 != null and recPers2 != ''">REC_PERS2 = #{recPers2},</if>
- <if test="createTime != null">CREATE_TIME = #{createTime},</if>
- <if test="updateTime != null">UPDATE_TIME = #{updateTime},</if>
- <if test="status != null and status != ''">STATUS = #{status},</if>
- <if test="townName != null and townName != ''">TOWN_NAME = #{townName},</if>
- </trim>
- <include refid="page_where" />
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|