| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- <?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.GwSmsLogDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.GwSmsLog" id="gwSmsLogResultMap">
- <result property="id" column="ID"/>
- <result property="type" column="TYPE"/>
- <result property="phone" column="PHONE"/>
- <result property="content" column="CONTENT"/>
- <result property="returnCode" column="RETURN_CODE"/>
- <result property="code" column="CODE"/>
- <result property="func" column="FUNC"/>
- <result property="ip" column="IP"/>
- <result property="userId" column="USER_ID"/>
- <result property="intm" column="INTM"/>
- <result property="relUserId" column="REL_USER_ID"/>
- </resultMap>
- <sql id="table_columns">
- ID,
- TYPE,
- PHONE,
- CONTENT,
- RETURN_CODE,
- CODE,
- FUNC,
- IP,
- USER_ID,
- INTM,
- REL_USER_ID
- </sql>
- <sql id="entity_properties">
- #{id},
- #{type},
- #{phone},
- #{content},
- #{returnCode},
- #{code},
- #{func},
- #{ip},
- #{userId},
- #{intm},
- #{relUserId}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="type != null and type != ''">and TYPE = #{type}</if>
- <if test="phone != null and phone != ''">and PHONE = #{phone}</if>
- <if test="content != null and content != ''">and CONTENT = #{content}</if>
- <if test="returnCode != null and returnCode != ''">and RETURN_CODE = #{returnCode}</if>
- <if test="code != null and code != ''">and CODE = #{code}</if>
- <if test="func != null and func != ''">and FUNC = #{func}</if>
- <if test="ip != null and ip != ''">and IP = #{ip}</if>
- <if test="userId != null and userId != ''">and USER_ID = #{userId}</if>
- <if test="intm != null">and INTM = #{intm}</if>
- <if test="relUserId != null and relUserId != ''">and REL_USER_ID = #{relUserId}</if>
- </trim>
- </sql>
- <select id="get" resultMap="gwSmsLogResultMap" parameterType="String">
- select
- <include refid="table_columns"/>
- from GW_SMS_LOG where ID = #{id}
- </select>
- <select id="getBy" resultMap="gwSmsLogResultMap">
- select
- <include refid="table_columns"/>
- from GW_SMS_LOG
- <include refid="page_where"/>
- </select>
- <select id="findAll" resultMap="gwSmsLogResultMap">
- select
- <include refid="table_columns"/>
- from GW_SMS_LOG
- </select>
- <select id="findList" resultMap="gwSmsLogResultMap">
- select
- <include refid="table_columns"/>
- from GW_SMS_LOG
- <include refid="page_where"/>
- </select>
- <select id="selectCount" resultType="int">
- select count(ID) from GW_SMS_LOG
- <include refid="page_where"/>
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.GwSmsLog">
- insert into GW_SMS_LOG(
- <include refid="table_columns"/>
- )
- values (
- <include refid="entity_properties"/>
- )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- update GW_SMS_LOG set DATA_STAT='9' where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.GwSmsLog">
- update GW_SMS_LOG set DATA_STAT='9'
- <include refid="page_where"/>
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update GW_SMS_LOG set DATA_STAT = '9' where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.GwSmsLog">
- update GW_SMS_LOG
- <trim prefix="set" suffixOverrides=",">
- <if test="type != null and type != ''">TYPE = #{type},</if>
- <if test="phone != null and phone != ''">PHONE = #{phone},</if>
- <if test="content != null and content != ''">CONTENT = #{content},</if>
- <if test="returnCode != null and returnCode != ''">RETURN_CODE = #{returnCode},</if>
- <if test="code != null and code != ''">CODE = #{code},</if>
- <if test="func != null and func != ''">FUNC = #{func},</if>
- <if test="ip != null and ip != ''">IP = #{ip},</if>
- <if test="userId != null and userId != ''">USER_ID = #{userId},</if>
- <if test="intm != null">INTM = #{intm},</if>
- <if test="relUserId != null and relUserId != ''">REL_USER_ID = #{relUserId},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- </mapper>
|