| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- <?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.BisInspAllRlationPersZjDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.BisInspAllRlationPersZj" id="bisInspAllRlationPersZjResultMap">
- <result property="userCode" column="USER_CODE"/>
- <result property="userName" column="USER_NAME"/>
- <result property="trueName" column="TRUE_NAME"/>
- <result property="mobile" column="MOBILE"/>
- <result property="mail" column="MAIL"/>
- <result property="isAdmin" column="IS_ADMIN"/>
- <result property="adcd" column="ADCD"/>
- <result property="adName" column="AD_NAME"/>
- <result property="avatar" column="AVATAR"/>
- <result property="modifyTime" column="MODIFY_TIME"/>
- </resultMap>
-
- <sql id="table_columns">
- USER_CODE,
- USER_NAME,
- TRUE_NAME,
- MOBILE,
- MAIL,
- IS_ADMIN,
- ADCD,
- AD_NAME,
- AVATAR,
- MODIFY_TIME
- </sql>
- <sql id="entity_properties">
- #{userCode},
- #{userName},
- #{trueName},
- #{mobile},
- #{mail},
- #{isAdmin},
- #{adcd},
- #{adName},
- #{avatar},
- #{modifyTime}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="userName != null and userName != ''">and USER_NAME = #{userName}</if>
- <if test="trueName != null and trueName != ''">and TRUE_NAME = #{trueName}</if>
- <if test="mobile != null and mobile != ''">and MOBILE = #{mobile}</if>
- <if test="mail != null and mail != ''">and MAIL = #{mail}</if>
- <if test="isAdmin != null and isAdmin != ''">and IS_ADMIN = #{isAdmin}</if>
- <if test="adcd != null and adcd != ''">and ADCD = #{adcd}</if>
- <if test="adName != null and adName != ''">and AD_NAME = #{adName}</if>
- <if test="avatar != null and avatar != ''">and AVATAR = #{avatar}</if>
- <if test="modifyTime != null">and MODIFY_TIME = #{modifyTime}</if>
- </trim>
- </sql>
- <select id="get" resultMap="bisInspAllRlationPersZjResultMap" parameterType="String" >
- select <include refid="table_columns" /> from BIS_INSP_ALL_RLATION_PERS_ZJ where USER_CODE = #{userCode}
- </select>
- <select id="getBy" resultMap="bisInspAllRlationPersZjResultMap">
- select <include refid="table_columns" /> from BIS_INSP_ALL_RLATION_PERS_ZJ <include refid="page_where" />
- </select>
- <select id="findAll" resultMap="bisInspAllRlationPersZjResultMap">
- select <include refid="table_columns" /> from BIS_INSP_ALL_RLATION_PERS_ZJ
- </select>
- <select id="findList" resultMap="bisInspAllRlationPersZjResultMap">
- select <include refid="table_columns" /> from BIS_INSP_ALL_RLATION_PERS_ZJ <include refid="page_where" />
- </select>
- <select id="selectCount" resultType="int" >
- select count(USER_CODE) from BIS_INSP_ALL_RLATION_PERS_ZJ where USER_CODE = #{userCode}
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspAllRlationPersZj">
- insert into BIS_INSP_ALL_RLATION_PERS_ZJ( <include refid="table_columns" /> )
- values ( <include refid="entity_properties" /> )
- </insert>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspAllRlationPersZj">
- update BIS_INSP_ALL_RLATION_PERS_ZJ
- <trim prefix="set" suffixOverrides=",">
- <if test="userName != null and userName != ''">USER_NAME = #{userName},</if>
- <if test="trueName != null and trueName != ''">TRUE_NAME = #{trueName},</if>
- <if test="mobile != null and mobile != ''">MOBILE = #{mobile},</if>
- <if test="mail != null and mail != ''">MAIL = #{mail},</if>
- <if test="isAdmin != null and isAdmin != ''">IS_ADMIN = #{isAdmin},</if>
- <if test="adcd != null and adcd != ''">ADCD = #{adcd},</if>
- <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
- <if test="avatar != null and avatar != ''">AVATAR = #{avatar},</if>
- <if test="modifyTime != null">MODIFY_TIME = #{modifyTime},</if>
- </trim>
- <where>USER_CODE = #{userCode}</where>
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|