<?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.CommonCampaignInfoMapper">
|
<resultMap id="BaseResultMap"
|
type="com.yeshi.fanli.entity.taobao.CommonCampaignInfo">
|
<id column="tcc_id" property="id" jdbcType="BIGINT" />
|
<result column="tcc_shop_keeper_id" property="shopKeeperID"
|
jdbcType="BIGINT" />
|
<result column="tcc_campaign_id" property="campaignID"
|
jdbcType="BIGINT" />
|
<result column="tcc_seller_id" property="sellerId" jdbcType="BIGINT" />
|
<result column="tcc_createtime" property="createTime" jdbcType="TIMESTAMP" />
|
</resultMap>
|
<sql id="Base_Column_List">tcc_id,tcc_shop_keeper_id,tcc_campaign_id,tcc_seller_id,tcc_createtime
|
</sql>
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap"
|
parameterType="java.lang.Long">
|
select
|
<include refid="Base_Column_List" />
|
from yeshi_ec_taobao_common_campaign where tcc_id =
|
#{id,jdbcType=BIGINT}
|
</select>
|
|
|
<select id="selectBySellerId" resultMap="BaseResultMap"
|
parameterType="java.lang.Long">
|
select
|
<include refid="Base_Column_List" />
|
from yeshi_ec_taobao_common_campaign where tcc_seller_id =
|
#{0}
|
</select>
|
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
|
yeshi_ec_taobao_common_campaign where tcc_id = #{id,jdbcType=BIGINT}
|
</delete>
|
<insert id="insert" parameterType="com.yeshi.fanli.entity.taobao.CommonCampaignInfo"
|
useGeneratedKeys="true" keyProperty="id">insert into
|
yeshi_ec_taobao_common_campaign
|
(tcc_id,tcc_shop_keeper_id,tcc_campaign_id,tcc_seller_id,tcc_createtime)
|
values
|
(#{id,jdbcType=BIGINT},#{shopKeeperID,jdbcType=BIGINT},#{campaignID,jdbcType=BIGINT},#{sellerId,jdbcType=BIGINT},#{createTime,jdbcType=TIMESTAMP})
|
</insert>
|
<insert id="insertSelective" parameterType="com.yeshi.fanli.entity.taobao.CommonCampaignInfo"
|
useGeneratedKeys="true" keyProperty="id">
|
insert into yeshi_ec_taobao_common_campaign
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">tcc_id,</if>
|
<if test="shopKeeperID != null">tcc_shop_keeper_id,</if>
|
<if test="campaignID != null">tcc_campaign_id,</if>
|
<if test="sellerId != null">tcc_seller_id,</if>
|
<if test="createTime != null">tcc_createtime,</if>
|
</trim>
|
values
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">#{id,jdbcType=BIGINT},</if>
|
<if test="shopKeeperID != null">#{shopKeeperID,jdbcType=BIGINT},</if>
|
<if test="campaignID != null">#{campaignID,jdbcType=BIGINT},</if>
|
<if test="sellerId != null">#{sellerId,jdbcType=BIGINT},</if>
|
<if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
|
</trim>
|
</insert>
|
<update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.taobao.CommonCampaignInfo">update
|
yeshi_ec_taobao_common_campaign set tcc_shop_keeper_id =
|
#{shopKeeperID,jdbcType=BIGINT},tcc_campaign_id =
|
#{campaignID,jdbcType=BIGINT},tcc_seller_id =
|
#{sellerId,jdbcType=BIGINT},tcc_createtime =
|
#{createTime,jdbcType=TIMESTAMP} where tcc_id = #{id,jdbcType=BIGINT}
|
</update>
|
<update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.taobao.CommonCampaignInfo">
|
update yeshi_ec_taobao_common_campaign
|
<set>
|
<if test="shopKeeperID != null">tcc_shop_keeper_id=#{shopKeeperID,jdbcType=BIGINT},</if>
|
<if test="campaignID != null">tcc_campaign_id=#{campaignID,jdbcType=BIGINT},</if>
|
<if test="sellerId != null">tcc_seller_id=#{sellerId,jdbcType=BIGINT},</if>
|
<if test="createTime != null">tcc_createtime=#{createTime,jdbcType=TIMESTAMP},</if>
|
</set>
|
where tcc_id = #{id,jdbcType=BIGINT}
|
</update>
|
</mapper>
|