<?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.taobao.TaoBaoTokenMapper">
|
<resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.taobao.TaoBaoToken">
|
<id column="tt_id" property="id" jdbcType="BIGINT" />
|
<result column="tt_pid" property="pid" jdbcType="VARCHAR" />
|
<result column="tt_token" property="token" jdbcType="VARCHAR" />
|
<result column="tt_auction_id" property="auctionId" jdbcType="BIGINT" />
|
<result column="tt_create_time" property="createTime" jdbcType="TIMESTAMP" />
|
<result column="tt_expire_time" property="expireTime" jdbcType="TIMESTAMP" />
|
</resultMap>
|
<sql id="Base_Column_List">tt_id,tt_pid,tt_token,tt_auction_id,tt_create_time,tt_expire_time
|
</sql>
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap"
|
parameterType="java.lang.Long">
|
select
|
<include refid="Base_Column_List" />
|
from yeshi_ec_taobao_token where tt_id = #{id,jdbcType=BIGINT}
|
</select>
|
|
<select id="selectByAuctionId" resultMap="BaseResultMap">
|
select
|
<include refid="Base_Column_List" />
|
from yeshi_ec_taobao_token where tt_auction_id = #{auctionId} and
|
tt_pid=#{pid}
|
</select>
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
|
yeshi_ec_taobao_token where tt_id = #{id,jdbcType=BIGINT}
|
</delete>
|
<insert id="insert" parameterType="com.yeshi.fanli.entity.taobao.TaoBaoToken"
|
useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_taobao_token
|
(tt_id,tt_pid,tt_token,tt_auction_id,tt_create_time,tt_expire_time)
|
values
|
(#{id,jdbcType=BIGINT},#{pid,jdbcType=VARCHAR},#{token,jdbcType=VARCHAR},#{auctionId,jdbcType=BIGINT},#{createTime,jdbcType=TIMESTAMP},#{expireTime,jdbcType=TIMESTAMP})
|
</insert>
|
<insert id="insertSelective" parameterType="com.yeshi.fanli.entity.taobao.TaoBaoToken"
|
useGeneratedKeys="true" keyProperty="id">
|
insert into yeshi_ec_taobao_token
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">tt_id,</if>
|
<if test="pid != null">tt_pid,</if>
|
<if test="token != null">tt_token,</if>
|
<if test="auctionId != null">tt_auction_id,</if>
|
<if test="createTime != null">tt_create_time,</if>
|
<if test="expireTime != null">tt_expire_time,</if>
|
</trim>
|
values
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">#{id,jdbcType=BIGINT},</if>
|
<if test="pid != null">#{pid,jdbcType=VARCHAR},</if>
|
<if test="token != null">#{token,jdbcType=VARCHAR},</if>
|
<if test="auctionId != null">#{auctionId,jdbcType=BIGINT},</if>
|
<if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
|
<if test="expireTime != null">#{expireTime,jdbcType=TIMESTAMP},</if>
|
</trim>
|
</insert>
|
<update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.taobao.TaoBaoToken">update
|
yeshi_ec_taobao_token set tt_pid = #{pid,jdbcType=VARCHAR},tt_token =
|
#{token,jdbcType=VARCHAR},tt_auction_id =
|
#{auctionId,jdbcType=BIGINT},tt_create_time =
|
#{createTime,jdbcType=TIMESTAMP},tt_expire_time =
|
#{expireTime,jdbcType=TIMESTAMP} where tt_id = #{id,jdbcType=BIGINT}
|
</update>
|
<update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.taobao.TaoBaoToken">
|
update yeshi_ec_taobao_token
|
<set>
|
<if test="pid != null">tt_pid=#{pid,jdbcType=VARCHAR},</if>
|
<if test="token != null">tt_token=#{token,jdbcType=VARCHAR},</if>
|
<if test="auctionId != null">tt_auction_id=#{auctionId,jdbcType=BIGINT},</if>
|
<if test="createTime != null">tt_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
|
<if test="expireTime != null">tt_expire_time=#{expireTime,jdbcType=TIMESTAMP},</if>
|
</set>
|
where tt_id = #{id,jdbcType=BIGINT}
|
</update>
|
</mapper>
|