| | |
| | | <result column="cg_sales" property="sales" jdbcType="INTEGER" /> |
| | | <result column="cg_rate" property="rate" jdbcType="DECIMAL" /> |
| | | <result column="cg_picture" property="picture" jdbcType="VARCHAR" /> |
| | | <result column="cg_picture_white" property="pictureWhite" jdbcType="VARCHAR" /> |
| | | <result column="cg_picture_white" property="pictureWhite" |
| | | jdbcType="VARCHAR" /> |
| | | <result column="cg_state" property="state" jdbcType="INTEGER" /> |
| | | <result column="cg_price" property="price" jdbcType="DECIMAL" /> |
| | | <result column="cg_coupon_info" property="couponInfo" jdbcType="VARCHAR" /> |
| | |
| | | <result column="cg_video_url" property="videoUrl" 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 |
| | | <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> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_common_goods where cg_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | <select id="selectByGoodsIdAndGoodsType" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_common_goods where cg_goods_id = #{goodsId} and |
| | | cg_goods_type=#{goodsType} |
| | | </select> |
| | | |
| | | |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from |
| | | yeshi_ec_common_goods where cg_id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | 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_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) |
| | | 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}) |
| | | (#{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}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.goods.CommonGoods" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | |
| | | <if test="videoUrl != null">cg_video_url,</if> |
| | | <if test="createTime != null">cg_createtime,</if> |
| | | <if test="updateTime != null">cg_updatetime,</if> |
| | | <if test="materialLibType != null">cg_material_lib_type,</if> |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | |
| | | <if test="videoUrl != null">#{videoUrl,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> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.goods.CommonGoods">update |
| | |
| | | #{videoCover,jdbcType=VARCHAR},cg_video_url = |
| | | #{videoUrl,jdbcType=VARCHAR},cg_createtime = |
| | | #{createTime,jdbcType=TIMESTAMP},cg_updatetime = |
| | | #{updateTime,jdbcType=TIMESTAMP} where cg_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | #{updateTime,jdbcType=TIMESTAMP} ,cg_material_lib_type |
| | | =#{materialLibType,jdbcType=INTEGER} where cg_id = |
| | | #{id,jdbcType=BIGINT}</update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.goods.CommonGoods"> |
| | | update yeshi_ec_common_goods |
| | | <set> |
| | |
| | | <if test="videoUrl != null">cg_video_url=#{videoUrl,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> |
| | | <if test="materialLibType !=null">cg_material_lib_type |
| | | =#{materialLibType,jdbcType=INTEGER},</if> |
| | | </set> |
| | | where cg_id = #{id,jdbcType=BIGINT} |
| | | </update> |