admin
2020-05-20 98b1a0affd69bbe63223c21fdd2c404e8bedfccb
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?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.dao.mybatis.StrategyPictureMapper">
    <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.xcx.StrategyPicture">
        <id column="id" property="id" jdbcType="BIGINT" />
        <result column="strategyPicture" property="strategyPicture"
            jdbcType="VARCHAR" />
        <result column="post_picture" property="postPicture" jdbcType="VARCHAR" />
        <result column="title" property="title" jdbcType="VARCHAR" />
        <result column="orderBy" property="orderBy" jdbcType="INTEGER" />
        <result column="type" property="type" jdbcType="INTEGER" />
        <result column="video_url" property="videoUrl" jdbcType="VARCHAR" />
    </resultMap>
    <sql id="Base_Column_List">id,strategyPicture,post_picture,title,orderBy,type,video_url
    </sql>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap"
        parameterType="java.lang.Long">
        select
        <include refid="Base_Column_List" />
        from ye_yeshi_strategy_picture where id = #{id,jdbcType=BIGINT}
    </select>
    <select id="selectStrategyPictureList" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from ye_yeshi_strategy_picture order by orderBy desc
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
        ye_yeshi_strategy_picture where id = #{id,jdbcType=BIGINT}</delete>
    <insert id="insert" parameterType="com.yeshi.fanli.entity.xcx.StrategyPicture"
        useGeneratedKeys="true" keyProperty="id">insert into
        ye_yeshi_strategy_picture
        (id,strategyPicture,post_picture,title,orderBy,type,video_url) values
        (#{id,jdbcType=BIGINT},#{strategyPicture,jdbcType=VARCHAR},#{postPicture,jdbcType=VARCHAR},#{title,jdbcType=VARCHAR},#{orderBy,jdbcType=INTEGER},#{type,jdbcType=INTEGER},#{videoUrl,jdbcType=VARCHAR})
    </insert>
    <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.xcx.StrategyPicture"
        useGeneratedKeys="true" keyProperty="id">
        insert into ye_yeshi_strategy_picture
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">id,</if>
            <if test="strategyPicture != null">strategyPicture,</if>
            <if test="postPicture != null">post_picture,</if>
            <if test="title != null">title,</if>
            <if test="orderBy != null">orderBy,</if>
            <if test="type != null">type,</if>
            <if test="videoUrl != null">video_url,</if>
        </trim>
        values
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id,jdbcType=BIGINT},</if>
            <if test="strategyPicture != null">#{strategyPicture,jdbcType=VARCHAR},</if>
            <if test="postPicture != null">#{postPicture,jdbcType=VARCHAR},</if>
            <if test="title != null">#{title,jdbcType=VARCHAR},</if>
            <if test="orderBy != null">#{orderBy,jdbcType=INTEGER},</if>
            <if test="type != null">#{type,jdbcType=INTEGER},</if>
            <if test="videoUrl != null">#{videoUrl,jdbcType=VARCHAR}</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.xcx.StrategyPicture">update
        ye_yeshi_strategy_picture set strategyPicture =
        #{strategyPicture,jdbcType=VARCHAR},post_picture =
        #{postPicture,jdbcType=VARCHAR},title =
        #{title,jdbcType=VARCHAR},orderBy = #{orderBy,jdbcType=INTEGER} ,type
        =#{type,jdbcType=INTEGER} ,video_url =#{videoUrl,jdbcType=VARCHAR}
        where id = #{id,jdbcType=BIGINT}</update>
    <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.xcx.StrategyPicture">
        update ye_yeshi_strategy_picture
        <set>
            <if test="strategyPicture != null">strategyPicture=#{strategyPicture,jdbcType=VARCHAR},</if>
            <if test="postPicture != null">post_picture=#{postPicture,jdbcType=VARCHAR},</if>
            <if test="title != null">title=#{title,jdbcType=VARCHAR},</if>
            <if test="orderBy != null">orderBy=#{orderBy,jdbcType=INTEGER},</if>
            <if test="type !=null">type =#{type,jdbcType=INTEGER},</if>
            <if test="videoUrl !=null">video_url =#{videoUrl,jdbcType=VARCHAR},</if>
        </set>
        where id = #{id,jdbcType=BIGINT}
    </update>
</mapper>