admin
2019-02-22 e358583d644fa39fc1e93b14b3cafff3644980e4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?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="com.yeshi.fanli.system.dao.common.SMSHistoryMapper">
    <resultMap id="BaseResultMap" type="org.fanli.facade.system.entity.common.SMSHistory">
        <id column="sh_id" property="id" jdbcType="BIGINT" />
        <result column="sh_type" property="type" jdbcType="INTEGER" />
        <result column="sh_phone" property="phone" jdbcType="VARCHAR" />
        <result column="sh_content" property="content" jdbcType="VARCHAR" />
        <result column="sh_createtime" property="createTime" jdbcType="TIMESTAMP" />
    </resultMap>
    <sql id="Base_Column_List">sh_id,sh_type,sh_phone,sh_content,sh_createtime</sql>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap"
        parameterType="java.lang.Long">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_sms_history where sh_id = #{id,jdbcType=BIGINT}
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
        yeshi_ec_sms_history where sh_id = #{id,jdbcType=BIGINT}
    </delete>
    <insert id="insert" parameterType="org.fanli.facade.system.entity.common.SMSHistory"
        useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_sms_history
        (sh_id,sh_type,sh_phone,sh_content,sh_createtime) values
        (#{id,jdbcType=BIGINT},#{type,jdbcType=INTEGER},#{phone,jdbcType=VARCHAR},#{content,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP})
    </insert>
    <insert id="insertSelective" parameterType="org.fanli.facade.system.entity.common.SMSHistory"
        useGeneratedKeys="true" keyProperty="id">
        insert into yeshi_ec_sms_history
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">sh_id,</if>
            <if test="type != null">sh_type,</if>
            <if test="phone != null">sh_phone,</if>
            <if test="content != null">sh_content,</if>
            <if test="createTime != null">sh_createtime,</if>
        </trim>
        values
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id,jdbcType=BIGINT},</if>
            <if test="type != null">#{type,jdbcType=INTEGER},</if>
            <if test="phone != null">#{phone,jdbcType=VARCHAR},</if>
            <if test="content != null">#{content,jdbcType=VARCHAR},</if>
            <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKey" parameterType="org.fanli.facade.system.entity.common.SMSHistory">update
        yeshi_ec_sms_history set sh_type = #{type,jdbcType=INTEGER},sh_phone =
        #{phone,jdbcType=VARCHAR},sh_content =
        #{content,jdbcType=VARCHAR},sh_createtime =
        #{createTime,jdbcType=TIMESTAMP} where sh_id = #{id,jdbcType=BIGINT}
    </update>
    <update id="updateByPrimaryKeySelective" parameterType="org.fanli.facade.system.entity.common.SMSHistory">
        update yeshi_ec_sms_history
        <set>
            <if test="type != null">sh_type=#{type,jdbcType=INTEGER},</if>
            <if test="phone != null">sh_phone=#{phone,jdbcType=VARCHAR},</if>
            <if test="content != null">sh_content=#{content,jdbcType=VARCHAR},</if>
            <if test="createTime != null">sh_createtime=#{createTime,jdbcType=TIMESTAMP},</if>
        </set>
        where sh_id = #{id,jdbcType=BIGINT}
    </update>
</mapper>