<?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.TaoBaoCouponMapper">
|
<resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.taobao.TaoBaoCoupon">
|
<id column="id" property="id" jdbcType="BIGINT"/>
|
<result column="auctionId" property="auctionId" jdbcType="VARCHAR"/>
|
<result column="title" property="title" jdbcType="VARCHAR"/>
|
<result column="pictUrl" property="pictUrl" jdbcType="VARCHAR"/>
|
<result column="auctionUrl" property="auctionUrl" jdbcType="VARCHAR"/>
|
<result column="classNames" property="classNames" jdbcType="VARCHAR"/>
|
<result column="taobaokeUrl" property="taobaokeUrl" jdbcType="VARCHAR"/>
|
<result column="zkPrice" property="zkPrice" jdbcType="DECIMAL"/>
|
<result column="biz30day" property="biz30day" jdbcType="INTEGER"/>
|
<result column="tkRate" property="tkRate" jdbcType="VARCHAR"/>
|
<result column="brokerage" property="brokerage" jdbcType="DECIMAL"/>
|
<result column="shopWangWang" property="shopWangWang" jdbcType="VARCHAR"/>
|
<result column="sellerId" property="sellerId" jdbcType="BIGINT"/>
|
<result column="shopTitle" property="shopTitle" jdbcType="VARCHAR"/>
|
<result column="shopType" property="shopType" jdbcType="INTEGER"/>
|
<result column="couponId" property="couponId" jdbcType="VARCHAR"/>
|
<result column="couponSum" property="couponSum" jdbcType="INTEGER"/>
|
<result column="couponCount" property="couponCount" jdbcType="INTEGER"/>
|
<result column="couponinfo" property="couponinfo" jdbcType="VARCHAR"/>
|
<result column="couponStartFee" property="couponStartFee" jdbcType="DECIMAL"/>
|
<result column="couponAmount" property="couponAmount" jdbcType="DECIMAL"/>
|
<result column="quanPrice" property="quanPrice" jdbcType="DECIMAL"/>
|
<result column="couponBegin" property="couponBegin" jdbcType="VARCHAR"/>
|
<result column="couponEnd" property="couponEnd" jdbcType="VARCHAR"/>
|
<result column="couponLink" property="couponLink" jdbcType="VARCHAR"/>
|
<result column="generalizeUrl" property="generalizeUrl" jdbcType="VARCHAR"/>
|
<result column="orderby" property="orderby" jdbcType="INTEGER"/>
|
<result column="createtime" property="createtime" jdbcType="BIGINT"/>
|
<result column="showType" property="showType" jdbcType="INTEGER"/>
|
</resultMap>
|
<sql id="Base_Column_List">id,auctionId,title,pictUrl,auctionUrl,classNames,taobaokeUrl,zkPrice,biz30day,tkRate,brokerage,shopWangWang,sellerId,shopTitle,shopType,couponId,couponSum,couponCount,couponinfo,couponStartFee,couponAmount,quanPrice,couponBegin,couponEnd,couponLink,generalizeUrl,orderby,createtime,showType</sql>
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
|
<include refid="Base_Column_List"/>from yeshi_ec_taobao_coupon where id = #{id,jdbcType=BIGINT}
|
</select>
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_taobao_coupon where id = #{id,jdbcType=BIGINT}</delete>
|
<insert id="insert" parameterType="com.yeshi.fanli.entity.taobao.TaoBaoCoupon" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_taobao_coupon (id,auctionId,title,pictUrl,auctionUrl,classNames,taobaokeUrl,zkPrice,biz30day,tkRate,brokerage,shopWangWang,sellerId,shopTitle,shopType,couponId,couponSum,couponCount,couponinfo,couponStartFee,couponAmount,quanPrice,couponBegin,couponEnd,couponLink,generalizeUrl,orderby,createtime,showType) values (#{id,jdbcType=BIGINT},#{auctionId,jdbcType=VARCHAR},#{title,jdbcType=VARCHAR},#{pictUrl,jdbcType=VARCHAR},#{auctionUrl,jdbcType=VARCHAR},#{classNames,jdbcType=VARCHAR},#{taobaokeUrl,jdbcType=VARCHAR},#{zkPrice,jdbcType=DECIMAL},#{biz30day,jdbcType=INTEGER},#{tkRate,jdbcType=VARCHAR},#{brokerage,jdbcType=DECIMAL},#{shopWangWang,jdbcType=VARCHAR},#{sellerId,jdbcType=BIGINT},#{shopTitle,jdbcType=VARCHAR},#{shopType,jdbcType=INTEGER},#{couponId,jdbcType=VARCHAR},#{couponSum,jdbcType=INTEGER},#{couponCount,jdbcType=INTEGER},#{couponinfo,jdbcType=VARCHAR},#{couponStartFee,jdbcType=DECIMAL},#{couponAmount,jdbcType=DECIMAL},#{quanPrice,jdbcType=DECIMAL},#{couponBegin,jdbcType=VARCHAR},#{couponEnd,jdbcType=VARCHAR},#{couponLink,jdbcType=VARCHAR},#{generalizeUrl,jdbcType=VARCHAR},#{orderby,jdbcType=INTEGER},#{createtime,jdbcType=BIGINT},#{showType,jdbcType=INTEGER})</insert>
|
<insert id="insertSelective" parameterType="com.yeshi.fanli.entity.taobao.TaoBaoCoupon" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_taobao_coupon
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">id,</if>
|
<if test="auctionId != null">auctionId,</if>
|
<if test="title != null">title,</if>
|
<if test="pictUrl != null">pictUrl,</if>
|
<if test="auctionUrl != null">auctionUrl,</if>
|
<if test="classNames != null">classNames,</if>
|
<if test="taobaokeUrl != null">taobaokeUrl,</if>
|
<if test="zkPrice != null">zkPrice,</if>
|
<if test="biz30day != null">biz30day,</if>
|
<if test="tkRate != null">tkRate,</if>
|
<if test="brokerage != null">brokerage,</if>
|
<if test="shopWangWang != null">shopWangWang,</if>
|
<if test="sellerId != null">sellerId,</if>
|
<if test="shopTitle != null">shopTitle,</if>
|
<if test="shopType != null">shopType,</if>
|
<if test="couponId != null">couponId,</if>
|
<if test="couponSum != null">couponSum,</if>
|
<if test="couponCount != null">couponCount,</if>
|
<if test="couponinfo != null">couponinfo,</if>
|
<if test="couponStartFee != null">couponStartFee,</if>
|
<if test="couponAmount != null">couponAmount,</if>
|
<if test="quanPrice != null">quanPrice,</if>
|
<if test="couponBegin != null">couponBegin,</if>
|
<if test="couponEnd != null">couponEnd,</if>
|
<if test="couponLink != null">couponLink,</if>
|
<if test="generalizeUrl != null">generalizeUrl,</if>
|
<if test="orderby != null">orderby,</if>
|
<if test="createtime != null">createtime,</if>
|
<if test="showType != null">showType,</if>
|
</trim>values
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">#{id,jdbcType=BIGINT},</if>
|
<if test="auctionId != null">#{auctionId,jdbcType=VARCHAR},</if>
|
<if test="title != null">#{title,jdbcType=VARCHAR},</if>
|
<if test="pictUrl != null">#{pictUrl,jdbcType=VARCHAR},</if>
|
<if test="auctionUrl != null">#{auctionUrl,jdbcType=VARCHAR},</if>
|
<if test="classNames != null">#{classNames,jdbcType=VARCHAR},</if>
|
<if test="taobaokeUrl != null">#{taobaokeUrl,jdbcType=VARCHAR},</if>
|
<if test="zkPrice != null">#{zkPrice,jdbcType=DECIMAL},</if>
|
<if test="biz30day != null">#{biz30day,jdbcType=INTEGER},</if>
|
<if test="tkRate != null">#{tkRate,jdbcType=VARCHAR},</if>
|
<if test="brokerage != null">#{brokerage,jdbcType=DECIMAL},</if>
|
<if test="shopWangWang != null">#{shopWangWang,jdbcType=VARCHAR},</if>
|
<if test="sellerId != null">#{sellerId,jdbcType=BIGINT},</if>
|
<if test="shopTitle != null">#{shopTitle,jdbcType=VARCHAR},</if>
|
<if test="shopType != null">#{shopType,jdbcType=INTEGER},</if>
|
<if test="couponId != null">#{couponId,jdbcType=VARCHAR},</if>
|
<if test="couponSum != null">#{couponSum,jdbcType=INTEGER},</if>
|
<if test="couponCount != null">#{couponCount,jdbcType=INTEGER},</if>
|
<if test="couponinfo != null">#{couponinfo,jdbcType=VARCHAR},</if>
|
<if test="couponStartFee != null">#{couponStartFee,jdbcType=DECIMAL},</if>
|
<if test="couponAmount != null">#{couponAmount,jdbcType=DECIMAL},</if>
|
<if test="quanPrice != null">#{quanPrice,jdbcType=DECIMAL},</if>
|
<if test="couponBegin != null">#{couponBegin,jdbcType=VARCHAR},</if>
|
<if test="couponEnd != null">#{couponEnd,jdbcType=VARCHAR},</if>
|
<if test="couponLink != null">#{couponLink,jdbcType=VARCHAR},</if>
|
<if test="generalizeUrl != null">#{generalizeUrl,jdbcType=VARCHAR},</if>
|
<if test="orderby != null">#{orderby,jdbcType=INTEGER},</if>
|
<if test="createtime != null">#{createtime,jdbcType=BIGINT},</if>
|
<if test="showType != null">#{showType,jdbcType=INTEGER},</if>
|
</trim>
|
</insert>
|
<update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.taobao.TaoBaoCoupon">update yeshi_ec_taobao_coupon set auctionId = #{auctionId,jdbcType=VARCHAR},title = #{title,jdbcType=VARCHAR},pictUrl = #{pictUrl,jdbcType=VARCHAR},auctionUrl = #{auctionUrl,jdbcType=VARCHAR},classNames = #{classNames,jdbcType=VARCHAR},taobaokeUrl = #{taobaokeUrl,jdbcType=VARCHAR},zkPrice = #{zkPrice,jdbcType=DECIMAL},biz30day = #{biz30day,jdbcType=INTEGER},tkRate = #{tkRate,jdbcType=VARCHAR},brokerage = #{brokerage,jdbcType=DECIMAL},shopWangWang = #{shopWangWang,jdbcType=VARCHAR},sellerId = #{sellerId,jdbcType=BIGINT},shopTitle = #{shopTitle,jdbcType=VARCHAR},shopType = #{shopType,jdbcType=INTEGER},couponId = #{couponId,jdbcType=VARCHAR},couponSum = #{couponSum,jdbcType=INTEGER},couponCount = #{couponCount,jdbcType=INTEGER},couponinfo = #{couponinfo,jdbcType=VARCHAR},couponStartFee = #{couponStartFee,jdbcType=DECIMAL},couponAmount = #{couponAmount,jdbcType=DECIMAL},quanPrice = #{quanPrice,jdbcType=DECIMAL},couponBegin = #{couponBegin,jdbcType=VARCHAR},couponEnd = #{couponEnd,jdbcType=VARCHAR},couponLink = #{couponLink,jdbcType=VARCHAR},generalizeUrl = #{generalizeUrl,jdbcType=VARCHAR},orderby = #{orderby,jdbcType=INTEGER},createtime = #{createtime,jdbcType=BIGINT},showType = #{showType,jdbcType=INTEGER} where id = #{id,jdbcType=BIGINT}</update>
|
<update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.taobao.TaoBaoCoupon">update yeshi_ec_taobao_coupon
|
<set>
|
<if test="auctionId != null">auctionId=#{auctionId,jdbcType=VARCHAR},</if>
|
<if test="title != null">title=#{title,jdbcType=VARCHAR},</if>
|
<if test="pictUrl != null">pictUrl=#{pictUrl,jdbcType=VARCHAR},</if>
|
<if test="auctionUrl != null">auctionUrl=#{auctionUrl,jdbcType=VARCHAR},</if>
|
<if test="classNames != null">classNames=#{classNames,jdbcType=VARCHAR},</if>
|
<if test="taobaokeUrl != null">taobaokeUrl=#{taobaokeUrl,jdbcType=VARCHAR},</if>
|
<if test="zkPrice != null">zkPrice=#{zkPrice,jdbcType=DECIMAL},</if>
|
<if test="biz30day != null">biz30day=#{biz30day,jdbcType=INTEGER},</if>
|
<if test="tkRate != null">tkRate=#{tkRate,jdbcType=VARCHAR},</if>
|
<if test="brokerage != null">brokerage=#{brokerage,jdbcType=DECIMAL},</if>
|
<if test="shopWangWang != null">shopWangWang=#{shopWangWang,jdbcType=VARCHAR},</if>
|
<if test="sellerId != null">sellerId=#{sellerId,jdbcType=BIGINT},</if>
|
<if test="shopTitle != null">shopTitle=#{shopTitle,jdbcType=VARCHAR},</if>
|
<if test="shopType != null">shopType=#{shopType,jdbcType=INTEGER},</if>
|
<if test="couponId != null">couponId=#{couponId,jdbcType=VARCHAR},</if>
|
<if test="couponSum != null">couponSum=#{couponSum,jdbcType=INTEGER},</if>
|
<if test="couponCount != null">couponCount=#{couponCount,jdbcType=INTEGER},</if>
|
<if test="couponinfo != null">couponinfo=#{couponinfo,jdbcType=VARCHAR},</if>
|
<if test="couponStartFee != null">couponStartFee=#{couponStartFee,jdbcType=DECIMAL},</if>
|
<if test="couponAmount != null">couponAmount=#{couponAmount,jdbcType=DECIMAL},</if>
|
<if test="quanPrice != null">quanPrice=#{quanPrice,jdbcType=DECIMAL},</if>
|
<if test="couponBegin != null">couponBegin=#{couponBegin,jdbcType=VARCHAR},</if>
|
<if test="couponEnd != null">couponEnd=#{couponEnd,jdbcType=VARCHAR},</if>
|
<if test="couponLink != null">couponLink=#{couponLink,jdbcType=VARCHAR},</if>
|
<if test="generalizeUrl != null">generalizeUrl=#{generalizeUrl,jdbcType=VARCHAR},</if>
|
<if test="orderby != null">orderby=#{orderby,jdbcType=INTEGER},</if>
|
<if test="createtime != null">createtime=#{createtime,jdbcType=BIGINT},</if>
|
<if test="showType != null">showType=#{showType,jdbcType=INTEGER},</if>
|
</set> where id = #{id,jdbcType=BIGINT}
|
</update>
|
|
<delete id="deleteBeforeCouponInfo">
|
delete from yeshi_ec_taobao_coupon where id <![CDATA[<]]> #{id,jdbcType=BIGINT}
|
</delete>
|
|
<select id="getTaoBaoCouponList" resultMap="BaseResultMap">
|
select * from yeshi_ec_taobao_coupon tbc
|
where tbc.title like '%#{key}%'
|
order by tbc.orderby,tbc.id
|
LIMIT ${start},${count}
|
</select>
|
|
<select id="getCount" resultType="java.lang.Integer">
|
select count(*) from yeshi_ec_taobao_coupon tbc
|
<if test="key != null and key !='' ">
|
where tbc.title like '%#{key}%'
|
</if>
|
</select>
|
|
<select id="getTaoBaoCouponListBykeys" resultMap="BaseResultMap">
|
select * from yeshi_ec_taobao_coupon tbc
|
where tbc.showType = 3
|
<if test="list != null">
|
AND
|
<foreach collection="list" index="index" item="item" open="("
|
separator="or" close=")">
|
tbc.title LIKE '%${item}%'
|
</foreach>
|
</if>
|
LIMIT ${start},${count}
|
</select>
|
|
<select id="countTaoBaoCouponListBykeys" resultType="java.lang.Integer">
|
select count(tbc.id) from yeshi_ec_taobao_coupon tbc
|
where tbc.showType = 3
|
<if test="list != null">
|
AND
|
<foreach collection="list" index="index" item="item" open="("
|
separator="or" close=")">
|
tbc.title LIKE '%${item}%'
|
</foreach>
|
</if>
|
</select>
|
|
<select id="getTaoBaoCouponByActionId" resultMap="BaseResultMap">
|
select * from yeshi_ec_taobao_coupon tbc
|
where tbc.auctionId = #{auctionId}
|
LIMIT 1
|
</select>
|
</mapper>
|