| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- <?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.AttUserExtDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.AttUserExt" id="attUserExtResultMap">
- <result property="guid" column="GUID"/>
- <result property="userName" column="USER_NAME"/>
- <result property="password" column="PASSWORD"/>
- <result property="userType" column="USER_TYPE"/>
- <result property="persId" column="PERS_ID"/>
- <result property="status" column="STATUS"/>
- <result property="modifier" column="MODIFIER"/>
- <result property="ts" column="TS"/>
- <result property="note" column="NOTE"/>
- </resultMap>
-
- <sql id="table_columns">
- GUID,
- USER_NAME,
- PASSWORD,
- USER_TYPE,
- PERS_ID,
- STATUS,
- MODIFIER,
- TS,
- NOTE
- </sql>
- <sql id="entity_properties">
- #{guid},
- #{userName},
- #{password},
- #{userType},
- #{persId},
- #{status},
- #{modifier},
- #{ts},
- #{note}
- </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="password != null and password != ''">and PASSWORD = #{password}</if>
- <if test="userType != null and userType != ''">and USER_TYPE = #{userType}</if>
- <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
- <if test="status != null and status != ''">and STATUS = #{status}</if>
- <if test="modifier != null and modifier != ''">and MODIFIER = #{modifier}</if>
- <if test="ts != null">and TS = #{ts}</if>
- <if test="note != null and note != ''">and NOTE = #{note}</if>
- </trim>
- </sql>
- <select id="get" resultMap="attUserExtResultMap" parameterType="String" >
- select <include refid="table_columns" /> from att_user_ext where GUID = #{id}
- </select>
- <select id="getBy" resultMap="attUserExtResultMap">
- select <include refid="table_columns" /> from att_user_ext <include refid="page_where" />
- </select>
- <select id="findAll" resultMap="attUserExtResultMap">
- select <include refid="table_columns" /> from att_user_ext
- </select>
- <select id="findList" resultMap="attUserExtResultMap">
- select <include refid="table_columns" /> from att_user_ext <include refid="page_where" />
- </select>
- <select id="selectCount" resultType="int" >
- select count(GUID) from att_user_ext <include refid="page_where" />
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.AttUserExt">
- insert into att_user_ext( <include refid="table_columns" /> )
- values ( <include refid="entity_properties" /> )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from att_user_ext where GUID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.AttUserExt">
- delete from att_user_ext <include refid="page_where" />
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update att_user_ext set flag_valid = 0 where GUID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.AttUserExt">
- update att_user_ext
- <trim prefix="set" suffixOverrides=",">
- <if test="userName != null and userName != ''">USER_NAME = #{userName},</if>
- <if test="password != null and password != ''">PASSWORD = #{password},</if>
- <if test="userType != null and userType != ''">USER_TYPE = #{userType},</if>
- <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
- <if test="status != null and status != ''">STATUS = #{status},</if>
- <if test="modifier != null and modifier != ''">MODIFIER = #{modifier},</if>
- <if test="ts != null">TS = #{ts},</if>
- <if test="note != null and note != ''">NOTE = #{note},</if>
- </trim>
- <where>GUID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.AttUserExt">
- update att_user_ext
- <trim prefix="set" suffixOverrides=",">
- <if test="userName != null and userName != ''">USER_NAME = #{userName},</if>
- <if test="password != null and password != ''">PASSWORD = #{password},</if>
- <if test="userType != null and userType != ''">USER_TYPE = #{userType},</if>
- <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
- <if test="status != null and status != ''">STATUS = #{status},</if>
- <if test="modifier != null and modifier != ''">MODIFIER = #{modifier},</if>
- <if test="ts != null">TS = #{ts},</if>
- <if test="note != null and note != ''">NOTE = #{note},</if>
- </trim>
- <include refid="page_where" />
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|