| | |
| | | <?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.ks.tool.bkz.dao.mybatis.TBGoodsInfoMapper"> |
| | | <resultMap id="BaseResultMap" type="com.ks.tool.bkz.entity.TBGoodsInfo"> |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="goods_id" jdbcType="BIGINT" property="goodsId" /> |
| | | <result column="title" jdbcType="VARCHAR" property="title" /> |
| | | <result column="imgs" jdbcType="VARCHAR" property="imgs" /> |
| | | <result column="zk_price" jdbcType="DECIMAL" property="zkPrice" /> |
| | | <result column="coupon_info" jdbcType="VARCHAR" property="couponInfo" /> |
| | | <result column="coupon_amount" jdbcType="DECIMAL" property="couponAmount" /> |
| | | <result column="coupon_start_price" jdbcType="DECIMAL" property="couponStartPrice" /> |
| | | <result column="coupon_total_count" jdbcType="INTEGER" property="couponTotalCount" /> |
| | | <result column="coupon_left_count" jdbcType="INTEGER" property="couponLeftCount" /> |
| | | <result column="coupon_start_time" jdbcType="VARCHAR" property="couponStartTime" /> |
| | | <result column="coupon_end_time" jdbcType="VARCHAR" property="couponEndTime" /> |
| | | <result column="coupon_price" jdbcType="DECIMAL" property="couponPrice" /> |
| | | <result column="sales_num" jdbcType="INTEGER" property="salesNum" /> |
| | | <result column="commission_rate" jdbcType="DECIMAL" property="commissionRate" /> |
| | | <result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> |
| | | <result column="tmall" jdbcType="INTEGER" property="tmall" /> |
| | | <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> |
| | | <result column="cid" jdbcType="INTEGER" property="cid" /> |
| | | <?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.ks.tool.bkz.dao.mybatis.TBGoodsInfoMapper" > |
| | | <resultMap id="BaseResultMap" type="com.ks.tool.bkz.entity.TBGoodsInfo" > |
| | | <id column="id" property="id" jdbcType="BIGINT" /> |
| | | <result column="goods_id" property="goodsId" jdbcType="BIGINT" /> |
| | | <result column="title" property="title" jdbcType="VARCHAR" /> |
| | | <result column="imgs" property="imgs" jdbcType="VARCHAR" /> |
| | | <result column="zk_price" property="zkPrice" jdbcType="DECIMAL" /> |
| | | <result column="coupon_info" property="couponInfo" jdbcType="VARCHAR" /> |
| | | <result column="coupon_amount" property="couponAmount" jdbcType="DECIMAL" /> |
| | | <result column="coupon_start_price" property="couponStartPrice" jdbcType="DECIMAL" /> |
| | | <result column="coupon_total_count" property="couponTotalCount" jdbcType="INTEGER" /> |
| | | <result column="coupon_left_count" property="couponLeftCount" jdbcType="INTEGER" /> |
| | | <result column="coupon_start_time" property="couponStartTime" jdbcType="VARCHAR" /> |
| | | <result column="coupon_end_time" property="couponEndTime" jdbcType="VARCHAR" /> |
| | | <result column="coupon_price" property="couponPrice" jdbcType="DECIMAL" /> |
| | | <result column="sales_num" property="salesNum" jdbcType="INTEGER" /> |
| | | <result column="commission_rate" property="commissionRate" jdbcType="DECIMAL" /> |
| | | <result column="create_time" property="createTime" jdbcType="TIMESTAMP" /> |
| | | <result column="tmall" property="tmall" jdbcType="INTEGER" /> |
| | | <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" /> |
| | | <result column="cid" property="cid" jdbcType="INTEGER" /> |
| | | <result column="tkl" property="tkl" jdbcType="VARCHAR" /> |
| | | <result column="tkl_update_time" property="tklUpdateTime" jdbcType="TIMESTAMP" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <sql id="Base_Column_List" > |
| | | id, goods_id, title, imgs, zk_price, coupon_info, coupon_amount, coupon_start_price, |
| | | coupon_total_count, coupon_left_count, coupon_start_time, coupon_end_time, coupon_price, |
| | | sales_num, commission_rate, create_time, tmall, update_time, cid |
| | | sales_num, commission_rate, create_time, tmall, update_time, cid, tkl, tkl_update_time |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" > |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from tt_tb_goods_info |
| | |
| | | from tt_tb_goods_info |
| | | where goods_id = #{0} |
| | | </select> |
| | | |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" > |
| | | delete from tt_tb_goods_info |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.ks.tool.bkz.entity.TBGoodsInfo"> |
| | | <insert id="insert" parameterType="com.ks.tool.bkz.entity.TBGoodsInfo" > |
| | | insert into tt_tb_goods_info (id, goods_id, title, |
| | | imgs, zk_price, coupon_info, |
| | | coupon_amount, coupon_start_price, coupon_total_count, |
| | | coupon_left_count, coupon_start_time, coupon_end_time, |
| | | coupon_price, sales_num, commission_rate, |
| | | create_time, tmall, update_time, |
| | | cid) |
| | | cid, tkl, tkl_update_time |
| | | ) |
| | | values (#{id,jdbcType=BIGINT}, #{goodsId,jdbcType=BIGINT}, #{title,jdbcType=VARCHAR}, |
| | | #{imgs,jdbcType=VARCHAR}, #{zkPrice,jdbcType=DECIMAL}, #{couponInfo,jdbcType=VARCHAR}, |
| | | #{couponAmount,jdbcType=DECIMAL}, #{couponStartPrice,jdbcType=DECIMAL}, #{couponTotalCount,jdbcType=INTEGER}, |
| | | #{couponLeftCount,jdbcType=INTEGER}, #{couponStartTime,jdbcType=VARCHAR}, #{couponEndTime,jdbcType=VARCHAR}, |
| | | #{couponPrice,jdbcType=DECIMAL}, #{salesNum,jdbcType=INTEGER}, #{commissionRate,jdbcType=DECIMAL}, |
| | | #{createTime,jdbcType=TIMESTAMP}, #{tmall,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, |
| | | #{cid,jdbcType=INTEGER}) |
| | | #{cid,jdbcType=INTEGER}, #{tkl,jdbcType=VARCHAR}, #{tklUpdateTime,jdbcType=TIMESTAMP} |
| | | ) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.ks.tool.bkz.entity.TBGoodsInfo"> |
| | | <insert id="insertSelective" parameterType="com.ks.tool.bkz.entity.TBGoodsInfo" > |
| | | insert into tt_tb_goods_info |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | <trim prefix="(" suffix=")" suffixOverrides="," > |
| | | <if test="id != null" > |
| | | id, |
| | | </if> |
| | | <if test="goodsId != null"> |
| | | <if test="goodsId != null" > |
| | | goods_id, |
| | | </if> |
| | | <if test="title != null"> |
| | | <if test="title != null" > |
| | | title, |
| | | </if> |
| | | <if test="imgs != null"> |
| | | <if test="imgs != null" > |
| | | imgs, |
| | | </if> |
| | | <if test="zkPrice != null"> |
| | | <if test="zkPrice != null" > |
| | | zk_price, |
| | | </if> |
| | | <if test="couponInfo != null"> |
| | | <if test="couponInfo != null" > |
| | | coupon_info, |
| | | </if> |
| | | <if test="couponAmount != null"> |
| | | <if test="couponAmount != null" > |
| | | coupon_amount, |
| | | </if> |
| | | <if test="couponStartPrice != null"> |
| | | <if test="couponStartPrice != null" > |
| | | coupon_start_price, |
| | | </if> |
| | | <if test="couponTotalCount != null"> |
| | | <if test="couponTotalCount != null" > |
| | | coupon_total_count, |
| | | </if> |
| | | <if test="couponLeftCount != null"> |
| | | <if test="couponLeftCount != null" > |
| | | coupon_left_count, |
| | | </if> |
| | | <if test="couponStartTime != null"> |
| | | <if test="couponStartTime != null" > |
| | | coupon_start_time, |
| | | </if> |
| | | <if test="couponEndTime != null"> |
| | | <if test="couponEndTime != null" > |
| | | coupon_end_time, |
| | | </if> |
| | | <if test="couponPrice != null"> |
| | | <if test="couponPrice != null" > |
| | | coupon_price, |
| | | </if> |
| | | <if test="salesNum != null"> |
| | | <if test="salesNum != null" > |
| | | sales_num, |
| | | </if> |
| | | <if test="commissionRate != null"> |
| | | <if test="commissionRate != null" > |
| | | commission_rate, |
| | | </if> |
| | | <if test="createTime != null"> |
| | | <if test="createTime != null" > |
| | | create_time, |
| | | </if> |
| | | <if test="tmall != null"> |
| | | <if test="tmall != null" > |
| | | tmall, |
| | | </if> |
| | | <if test="updateTime != null"> |
| | | <if test="updateTime != null" > |
| | | update_time, |
| | | </if> |
| | | <if test="cid != null"> |
| | | <if test="cid != null" > |
| | | cid, |
| | | </if> |
| | | <if test="tkl != null" > |
| | | tkl, |
| | | </if> |
| | | <if test="tklUpdateTime != null" > |
| | | tkl_update_time, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | <trim prefix="values (" suffix=")" suffixOverrides="," > |
| | | <if test="id != null" > |
| | | #{id,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="goodsId != null"> |
| | | <if test="goodsId != null" > |
| | | #{goodsId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="title != null"> |
| | | <if test="title != null" > |
| | | #{title,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="imgs != null"> |
| | | <if test="imgs != null" > |
| | | #{imgs,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="zkPrice != null"> |
| | | <if test="zkPrice != null" > |
| | | #{zkPrice,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="couponInfo != null"> |
| | | <if test="couponInfo != null" > |
| | | #{couponInfo,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="couponAmount != null"> |
| | | <if test="couponAmount != null" > |
| | | #{couponAmount,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="couponStartPrice != null"> |
| | | <if test="couponStartPrice != null" > |
| | | #{couponStartPrice,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="couponTotalCount != null"> |
| | | <if test="couponTotalCount != null" > |
| | | #{couponTotalCount,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="couponLeftCount != null"> |
| | | <if test="couponLeftCount != null" > |
| | | #{couponLeftCount,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="couponStartTime != null"> |
| | | <if test="couponStartTime != null" > |
| | | #{couponStartTime,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="couponEndTime != null"> |
| | | <if test="couponEndTime != null" > |
| | | #{couponEndTime,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="couponPrice != null"> |
| | | <if test="couponPrice != null" > |
| | | #{couponPrice,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="salesNum != null"> |
| | | <if test="salesNum != null" > |
| | | #{salesNum,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="commissionRate != null"> |
| | | <if test="commissionRate != null" > |
| | | #{commissionRate,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="createTime != null"> |
| | | <if test="createTime != null" > |
| | | #{createTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="tmall != null"> |
| | | <if test="tmall != null" > |
| | | #{tmall,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="updateTime != null"> |
| | | <if test="updateTime != null" > |
| | | #{updateTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="cid != null"> |
| | | <if test="cid != null" > |
| | | #{cid,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="tkl != null" > |
| | | #{tkl,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="tklUpdateTime != null" > |
| | | #{tklUpdateTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.ks.tool.bkz.entity.TBGoodsInfo"> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.ks.tool.bkz.entity.TBGoodsInfo" > |
| | | update tt_tb_goods_info |
| | | <set> |
| | | <if test="goodsId != null"> |
| | | <set > |
| | | <if test="goodsId != null" > |
| | | goods_id = #{goodsId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="title != null"> |
| | | <if test="title != null" > |
| | | title = #{title,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="imgs != null"> |
| | | <if test="imgs != null" > |
| | | imgs = #{imgs,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="zkPrice != null"> |
| | | <if test="zkPrice != null" > |
| | | zk_price = #{zkPrice,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="couponInfo != null"> |
| | | <if test="couponInfo != null" > |
| | | coupon_info = #{couponInfo,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="couponAmount != null"> |
| | | <if test="couponAmount != null" > |
| | | coupon_amount = #{couponAmount,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="couponStartPrice != null"> |
| | | <if test="couponStartPrice != null" > |
| | | coupon_start_price = #{couponStartPrice,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="couponTotalCount != null"> |
| | | <if test="couponTotalCount != null" > |
| | | coupon_total_count = #{couponTotalCount,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="couponLeftCount != null"> |
| | | <if test="couponLeftCount != null" > |
| | | coupon_left_count = #{couponLeftCount,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="couponStartTime != null"> |
| | | <if test="couponStartTime != null" > |
| | | coupon_start_time = #{couponStartTime,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="couponEndTime != null"> |
| | | <if test="couponEndTime != null" > |
| | | coupon_end_time = #{couponEndTime,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="couponPrice != null"> |
| | | <if test="couponPrice != null" > |
| | | coupon_price = #{couponPrice,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="salesNum != null"> |
| | | <if test="salesNum != null" > |
| | | sales_num = #{salesNum,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="commissionRate != null"> |
| | | <if test="commissionRate != null" > |
| | | commission_rate = #{commissionRate,jdbcType=DECIMAL}, |
| | | </if> |
| | | <if test="createTime != null"> |
| | | <if test="createTime != null" > |
| | | create_time = #{createTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="tmall != null"> |
| | | <if test="tmall != null" > |
| | | tmall = #{tmall,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="updateTime != null"> |
| | | <if test="updateTime != null" > |
| | | update_time = #{updateTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="cid != null"> |
| | | <if test="cid != null" > |
| | | cid = #{cid,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="tkl != null" > |
| | | tkl = #{tkl,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="tklUpdateTime != null" > |
| | | tkl_update_time = #{tklUpdateTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="com.ks.tool.bkz.entity.TBGoodsInfo"> |
| | | <update id="updateByPrimaryKey" parameterType="com.ks.tool.bkz.entity.TBGoodsInfo" > |
| | | update tt_tb_goods_info |
| | | set goods_id = #{goodsId,jdbcType=BIGINT}, |
| | | title = #{title,jdbcType=VARCHAR}, |
| | |
| | | create_time = #{createTime,jdbcType=TIMESTAMP}, |
| | | tmall = #{tmall,jdbcType=INTEGER}, |
| | | update_time = #{updateTime,jdbcType=TIMESTAMP}, |
| | | cid = #{cid,jdbcType=INTEGER} |
| | | cid = #{cid,jdbcType=INTEGER}, |
| | | tkl = #{tkl,jdbcType=VARCHAR}, |
| | | tkl_update_time = #{tklUpdateTime,jdbcType=TIMESTAMP} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |