| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- <?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.AttZhejiangJgBaseDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.AttZhejiangJgBase" id="attZhejiangJgBaseResultMap">
- <result property="id" column="ID"/>
- <result property="departNm" column="DEPART_NM"/>
- <result property="adCode" column="AD_CODE"/>
- <result property="note" column="NOTE"/>
- <result property="dataStat" column="DATA_STAT"/>
- <result property="adFullName" column="AD_FULL_NAME"/>
- <result property="telphone" column="TELPHONE"/>
- <result property="lgtd" column="LGTD"/>
- <result property="lttd" column="LTTD"/>
- <result property="lgtdpc" column="LGTDPC"/>
- <result property="lttdpc" column="LTTDPC"/>
- <result property="createTime" column="CREATE_TIME"/>
- <result property="departNo" column="DEPART_NO"/>
- </resultMap>
-
- <sql id="table_columns">
- ID,
- DEPART_NM,
- AD_CODE,
- NOTE,
- DATA_STAT,
- AD_FULL_NAME,
- TELPHONE,
- LGTD,
- LTTD,
- LGTDPC,
- LTTDPC,
- CREATE_TIME,
- DEPART_NO
- </sql>
- <sql id="entity_properties">
- #{id},
- #{departNm},
- #{adCode},
- #{note},
- #{dataStat},
- #{adFullName},
- #{telphone},
- #{lgtd},
- #{lttd},
- #{lgtdpc},
- #{lttdpc},
- #{createTime},
- #{departNo}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="departNm != null and departNm != ''">and DEPART_NM = #{departNm}</if>
- <if test="adCode != null and adCode != ''">and AD_CODE = #{adCode}</if>
- <if test="note != null and note != ''">and NOTE = #{note}</if>
- <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
- <if test="adFullName != null and adFullName != ''">and AD_FULL_NAME = #{adFullName}</if>
- <if test="telphone != null and telphone != ''">and TELPHONE = #{telphone}</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="createTime != null and createTime != ''">and CREATE_TIME = #{createTime}</if>
- <if test="departNo != null and departNo != ''">and DEPART_NO = #{departNo}</if>
- </trim>
- </sql>
- <select id="get" resultMap="attZhejiangJgBaseResultMap" parameterType="String" >
- select <include refid="table_columns" /> from Att_ZHEJIANG_JG_base where ID = #{id}
- </select>
- <select id="getBy" resultMap="attZhejiangJgBaseResultMap">
- select <include refid="table_columns" /> from Att_ZHEJIANG_JG_base <include refid="page_where" />
- </select>
- <select id="findAll" resultMap="attZhejiangJgBaseResultMap">
- select <include refid="table_columns" /> from Att_ZHEJIANG_JG_base
- </select>
- <select id="findList" resultMap="attZhejiangJgBaseResultMap">
- select <include refid="table_columns" /> from Att_ZHEJIANG_JG_base <include refid="page_where" />
- </select>
- <select id="selectCount" resultType="int" >
- select count(ID) from Att_ZHEJIANG_JG_base <include refid="page_where" />
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.AttZhejiangJgBase">
- insert into Att_ZHEJIANG_JG_base( <include refid="table_columns" /> )
- values ( <include refid="entity_properties" /> )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from Att_ZHEJIANG_JG_base where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.AttZhejiangJgBase">
- delete from Att_ZHEJIANG_JG_base <include refid="page_where" />
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update Att_ZHEJIANG_JG_base set flag_valid = 0 where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.AttZhejiangJgBase">
- update Att_ZHEJIANG_JG_base
- <trim prefix="set" suffixOverrides=",">
- <if test="departNm != null and departNm != ''">DEPART_NM = #{departNm},</if>
- <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
- <if test="note != null and note != ''">NOTE = #{note},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- <if test="adFullName != null and adFullName != ''">AD_FULL_NAME = #{adFullName},</if>
- <if test="telphone != null and telphone != ''">TELPHONE = #{telphone},</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="createTime != null and createTime != ''">CREATE_TIME = #{createTime},</if>
- <if test="departNo != null and departNo != ''">DEPART_NO = #{departNo},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.AttZhejiangJgBase">
- update Att_ZHEJIANG_JG_base
- <trim prefix="set" suffixOverrides=",">
- <if test="departNm != null and departNm != ''">DEPART_NM = #{departNm},</if>
- <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
- <if test="note != null and note != ''">NOTE = #{note},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- <if test="adFullName != null and adFullName != ''">AD_FULL_NAME = #{adFullName},</if>
- <if test="telphone != null and telphone != ''">TELPHONE = #{telphone},</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="createTime != null and createTime != ''">CREATE_TIME = #{createTime},</if>
- <if test="departNo != null and departNo != ''">DEPART_NO = #{departNo},</if>
- </trim>
- <include refid="page_where" />
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|