123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168 |
- <?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.juxiao.xchat.module.xbd.mapper.activity.WeekStarItemRewardMapper">
- <resultMap id="BaseResultMap" type="com.juxiao.xchat.module.xbd.domain.activity.WeekStarItemReward" >
- <id column="id" property="id" jdbcType="BIGINT" />
- <result column="status" property="status" jdbcType="INTEGER" />
- <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
- <result column="gift_id" property="giftId" jdbcType="INTEGER" />
- <result column="item_id" property="itemId" jdbcType="INTEGER" />
- <result column="admin_id" property="adminId" jdbcType="INTEGER" />
- <result column="type" property="type" jdbcType="INTEGER" />
- <result column="days" property="days" jdbcType="INTEGER" />
- <result column="content" property="content" jdbcType="VARCHAR" />
- <result column="seq" property="seq" jdbcType="INTEGER" />
- </resultMap>
- <sql id="Base_Column_List" >
- id, status, create_time, gift_id, item_id, admin_id, type, days, content, seq
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
- select
- <include refid="Base_Column_List" />
- from week_star_item_reward
- where id = #{id,jdbcType=BIGINT}
- </select>
- <insert id="insert" parameterType="com.juxiao.xchat.module.xbd.domain.activity.WeekStarItemReward" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
- insert into week_star_item_reward (id, status, create_time,
- gift_id, item_id, admin_id,
- type, days, content,
- seq)
- values (#{id,jdbcType=BIGINT}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
- #{giftId,jdbcType=INTEGER}, #{itemId,jdbcType=INTEGER}, #{adminId,jdbcType=INTEGER},
- #{type,jdbcType=INTEGER}, #{days,jdbcType=INTEGER}, #{content,jdbcType=VARCHAR},
- #{seq,jdbcType=INTEGER})
- </insert>
- <insert id="insertSelective" parameterType="com.juxiao.xchat.module.xbd.domain.activity.WeekStarItemReward" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
- insert into week_star_item_reward
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="id != null" >
- id,
- </if>
- <if test="status != null" >
- status,
- </if>
- <if test="createTime != null" >
- create_time,
- </if>
- <if test="giftId != null" >
- gift_id,
- </if>
- <if test="itemId != null" >
- item_id,
- </if>
- <if test="adminId != null" >
- admin_id,
- </if>
- <if test="type != null" >
- type,
- </if>
- <if test="days != null" >
- days,
- </if>
- <if test="content != null" >
- content,
- </if>
- <if test="seq != null" >
- seq,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="id != null" >
- #{id,jdbcType=BIGINT},
- </if>
- <if test="status != null" >
- #{status,jdbcType=INTEGER},
- </if>
- <if test="createTime != null" >
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="giftId != null" >
- #{giftId,jdbcType=INTEGER},
- </if>
- <if test="itemId != null" >
- #{itemId,jdbcType=INTEGER},
- </if>
- <if test="adminId != null" >
- #{adminId,jdbcType=INTEGER},
- </if>
- <if test="type != null" >
- #{type,jdbcType=INTEGER},
- </if>
- <if test="days != null" >
- #{days,jdbcType=INTEGER},
- </if>
- <if test="content != null" >
- #{content,jdbcType=VARCHAR},
- </if>
- <if test="seq != null" >
- #{seq,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.juxiao.xchat.module.xbd.domain.activity.WeekStarItemReward" >
- update week_star_item_reward
- <set >
- <if test="status != null" >
- status = #{status,jdbcType=INTEGER},
- </if>
- <if test="createTime != null" >
- create_time = #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="giftId != null" >
- gift_id = #{giftId,jdbcType=INTEGER},
- </if>
- <if test="itemId != null" >
- item_id = #{itemId,jdbcType=INTEGER},
- </if>
- <if test="adminId != null" >
- admin_id = #{adminId,jdbcType=INTEGER},
- </if>
- <if test="type != null" >
- type = #{type,jdbcType=INTEGER},
- </if>
- <if test="days != null" >
- days = #{days,jdbcType=INTEGER},
- </if>
- <if test="content != null" >
- content = #{content,jdbcType=VARCHAR},
- </if>
- <if test="seq != null" >
- seq = #{seq,jdbcType=INTEGER},
- </if>
- </set>
- where id = #{id,jdbcType=BIGINT}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.juxiao.xchat.module.xbd.domain.activity.WeekStarItemReward" >
- update week_star_item_reward
- set status = #{status,jdbcType=INTEGER},
- create_time = #{createTime,jdbcType=TIMESTAMP},
- gift_id = #{giftId,jdbcType=INTEGER},
- item_id = #{itemId,jdbcType=INTEGER},
- admin_id = #{adminId,jdbcType=INTEGER},
- type = #{type,jdbcType=INTEGER},
- days = #{days,jdbcType=INTEGER},
- content = #{content,jdbcType=VARCHAR},
- seq = #{seq,jdbcType=INTEGER}
- where id = #{id,jdbcType=BIGINT}
- </update>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
- delete from week_star_item_reward
- where id = #{id,jdbcType=BIGINT}
- </delete>
- <select id="selectWeekStarItemRewardByQuery" resultType="com.juxiao.xchat.module.xbd.vo.WeekStarItemRewardVO">
- select id,status,create_time as createTime,gift_id as giftId,item_id as itemId,admin_id as adminId,type,days,content,seq
- from week_star_item_reward
- where 1 = 1
- <if test="type != null">
- and type = #{type}
- </if>
- order by create_time desc
- </select>
- </mapper>
|