yujian
2019-07-25 0cc3b905e5945d1b4b02ee5f91a615bcfd8f08d6
fanli/src/main/java/com/yeshi/fanli/mapping/goods/CommonGoodsMapper.xml
@@ -28,12 +28,13 @@
         jdbcType="INTEGER" />
      <result column="cg_video_cover" property="videoCover" jdbcType="VARCHAR" />
      <result column="cg_video_url" property="videoUrl" jdbcType="VARCHAR" />
      <result column="cg_other_info" property="otherInfo" jdbcType="VARCHAR" />
      <result column="cg_createtime" property="createTime" jdbcType="TIMESTAMP" />
      <result column="cg_updatetime" property="updateTime" jdbcType="TIMESTAMP" />
      <result column="cg_material_lib_type" property="materialLibType"
         jdbcType="INTEGER" />
   </resultMap>
   <sql id="Base_Column_List">cg_id,cg_title,cg_goods_id,cg_goods_type,cg_shop_type,cg_seller_id,cg_seller_name,cg_sales,cg_rate,cg_picture,cg_picture_white,cg_state,cg_price,cg_coupon_info,cg_coupon_startprice,cg_coupon_amount,cg_coupon_left_count,cg_coupon_total_count,cg_video_cover,cg_video_url,cg_createtime,cg_updatetime,cg_material_lib_type
   <sql id="Base_Column_List">cg_id,cg_title,cg_goods_id,cg_goods_type,cg_shop_type,cg_seller_id,cg_seller_name,cg_sales,cg_rate,cg_picture,cg_picture_white,cg_state,cg_price,cg_coupon_info,cg_coupon_startprice,cg_coupon_amount,cg_coupon_left_count,cg_coupon_total_count,cg_video_cover,cg_video_url,cg_other_info,cg_createtime,cg_updatetime,cg_material_lib_type
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap"
      parameterType="java.lang.Long">
@@ -45,9 +46,9 @@
      yeshi_ec_common_goods where cg_id = #{id,jdbcType=BIGINT}</delete>
   <insert id="insert" parameterType="com.yeshi.fanli.entity.goods.CommonGoods"
      useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_common_goods
      (cg_id,cg_title,cg_goods_id,cg_goods_type,cg_shop_type,cg_seller_id,cg_seller_name,cg_sales,cg_rate,cg_picture,cg_picture_white,cg_state,cg_price,cg_coupon_info,cg_coupon_startprice,cg_coupon_amount,cg_coupon_left_count,cg_coupon_total_count,cg_video_cover,cg_video_url,cg_createtime,cg_updatetime,cg_material_lib_type)
      (cg_id,cg_title,cg_goods_id,cg_goods_type,cg_shop_type,cg_seller_id,cg_seller_name,cg_sales,cg_rate,cg_picture,cg_picture_white,cg_state,cg_price,cg_coupon_info,cg_coupon_startprice,cg_coupon_amount,cg_coupon_left_count,cg_coupon_total_count,cg_video_cover,cg_video_url,cg_other_info,cg_createtime,cg_updatetime,cg_material_lib_type)
      values
      (#{id,jdbcType=BIGINT},#{title,jdbcType=VARCHAR},#{goodsId,jdbcType=BIGINT},#{goodsType,jdbcType=INTEGER},#{shopType,jdbcType=INTEGER},#{sellerId,jdbcType=BIGINT},#{sellerName,jdbcType=VARCHAR},#{sales,jdbcType=INTEGER},#{rate,jdbcType=DECIMAL},#{picture,jdbcType=VARCHAR},#{state,jdbcType=INTEGER},#{price,jdbcType=DECIMAL},#{couponInfo,jdbcType=VARCHAR},#{couponStartPrice,jdbcType=DECIMAL},#{couponAmount,jdbcType=DECIMAL},#{couponLeftCount,jdbcType=INTEGER},#{couponTotalCount,jdbcType=INTEGER},#{videoCover,jdbcType=VARCHAR},#{videoUrl,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{materialLibType,jdbcType=INTEGER})
      (#{id,jdbcType=BIGINT},#{title,jdbcType=VARCHAR},#{goodsId,jdbcType=BIGINT},#{goodsType,jdbcType=INTEGER},#{shopType,jdbcType=INTEGER},#{sellerId,jdbcType=BIGINT},#{sellerName,jdbcType=VARCHAR},#{sales,jdbcType=INTEGER},#{rate,jdbcType=DECIMAL},#{picture,jdbcType=VARCHAR},#{state,jdbcType=INTEGER},#{price,jdbcType=DECIMAL},#{couponInfo,jdbcType=VARCHAR},#{couponStartPrice,jdbcType=DECIMAL},#{couponAmount,jdbcType=DECIMAL},#{couponLeftCount,jdbcType=INTEGER},#{couponTotalCount,jdbcType=INTEGER},#{videoCover,jdbcType=VARCHAR},#{videoUrl,jdbcType=VARCHAR},#{otherInfo,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{materialLibType,jdbcType=INTEGER})
   </insert>
   <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.goods.CommonGoods"
      useGeneratedKeys="true" keyProperty="id">
@@ -73,6 +74,7 @@
         <if test="couponTotalCount != null">cg_coupon_total_count,</if>
         <if test="videoCover != null">cg_video_cover,</if>
         <if test="videoUrl != null">cg_video_url,</if>
         <if test="otherInfo != null">cg_other_info,</if>
         <if test="createTime != null">cg_createtime,</if>
         <if test="updateTime != null">cg_updatetime,</if>
         <if test="materialLibType != null">cg_material_lib_type,</if>
@@ -99,6 +101,7 @@
         <if test="couponTotalCount != null">#{couponTotalCount,jdbcType=INTEGER},</if>
         <if test="videoCover != null">#{videoCover,jdbcType=VARCHAR},</if>
         <if test="videoUrl != null">#{videoUrl,jdbcType=VARCHAR},</if>
         <if test="otherInfo != null">#{otherInfo,jdbcType=VARCHAR},</if>
         <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
         <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
         <if test="materialLibType != null">#{materialLibType,jdbcType=INTEGER}</if>
@@ -124,7 +127,8 @@
      #{couponLeftCount,jdbcType=INTEGER},cg_coupon_total_count =
      #{couponTotalCount,jdbcType=INTEGER},cg_video_cover =
      #{videoCover,jdbcType=VARCHAR},cg_video_url =
      #{videoUrl,jdbcType=VARCHAR},cg_createtime =
      #{videoUrl,jdbcType=VARCHAR},cg_other_info =
      #{otherInfo,jdbcType=VARCHAR},cg_createtime =
      #{createTime,jdbcType=TIMESTAMP},cg_updatetime =
      #{updateTime,jdbcType=TIMESTAMP} ,cg_material_lib_type
      =#{materialLibType,jdbcType=INTEGER} where cg_id =
@@ -154,6 +158,7 @@
         </if>
         <if test="videoCover != null">cg_video_cover=#{videoCover,jdbcType=VARCHAR},</if>
         <if test="videoUrl != null">cg_video_url=#{videoUrl,jdbcType=VARCHAR},</if>
         <if test="otherInfo != null">cg_other_info=#{otherInfo,jdbcType=VARCHAR},</if>
         <if test="createTime != null">cg_createtime=#{createTime,jdbcType=TIMESTAMP},</if>
         <if test="updateTime != null">cg_updatetime=#{updateTime,jdbcType=TIMESTAMP},</if>
         <if test="id !=null">cg_id =#{id,jdbcType=BIGINT},</if>