|
|
|
|
@ -62,6 +62,7 @@
|
|
|
|
|
<result column="enable_label" jdbcType="TINYINT" property="enableLabel" />
|
|
|
|
|
<result column="tax_config_id" jdbcType="VARCHAR" property="taxConfigId" />
|
|
|
|
|
<result column="spec_table_headers" jdbcType="VARCHAR" property="specTableHeaders" />
|
|
|
|
|
<result column="stock_number" jdbcType="INTEGER" property="stockNumber" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.system.cashierservice.entity.TbProductWithBLOBs">
|
|
|
|
|
<result column="images" jdbcType="LONGVARCHAR" property="images" />
|
|
|
|
|
@ -72,21 +73,21 @@
|
|
|
|
|
<result column="select_spec" jdbcType="LONGVARCHAR" property="selectSpec" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
|
id, category_id, spec_id, source_path, brand_id, merchant_id, shop_id, name, short_title,
|
|
|
|
|
type, pack_fee, low_price, low_member_price, unit_id, unit_snap, cover_img, share_img,
|
|
|
|
|
video_cover_img, sort, limit_number, product_score, status, fail_msg, is_recommend,
|
|
|
|
|
is_hot, is_new, is_on_sale, is_show, type_enum, is_distribute, is_del, is_stock,
|
|
|
|
|
is_pause_sale, is_free_freight, freight_id, strategy_type, strategy_id, is_vip, is_delete,
|
|
|
|
|
created_at, updated_at, base_sales_number, real_sales_number, sales_number, thumb_count,
|
|
|
|
|
store_count, furnish_meal, furnish_express, furnish_draw, furnish_vir, is_combo,
|
|
|
|
|
is_show_cash, is_show_mall, is_need_examine, show_on_mall_status, show_on_mall_time,
|
|
|
|
|
show_on_mall_error_msg, enable_label, tax_config_id, spec_table_headers
|
|
|
|
|
id, category_id, spec_id, source_path, brand_id, merchant_id, shop_id, name, short_title,
|
|
|
|
|
type, pack_fee, low_price, low_member_price, unit_id, unit_snap, cover_img, share_img,
|
|
|
|
|
video_cover_img, sort, limit_number, product_score, status, fail_msg, is_recommend,
|
|
|
|
|
is_hot, is_new, is_on_sale, is_show, type_enum, is_distribute, is_del, is_stock,
|
|
|
|
|
is_pause_sale, is_free_freight, freight_id, strategy_type, strategy_id, is_vip, is_delete,
|
|
|
|
|
created_at, updated_at, base_sales_number, real_sales_number, sales_number, thumb_count,
|
|
|
|
|
store_count, furnish_meal, furnish_express, furnish_draw, furnish_vir, is_combo,
|
|
|
|
|
is_show_cash, is_show_mall, is_need_examine, show_on_mall_status, show_on_mall_time,
|
|
|
|
|
show_on_mall_error_msg, enable_label, tax_config_id, spec_table_headers, stock_number
|
|
|
|
|
</sql>
|
|
|
|
|
<sql id="Blob_Column_List">
|
|
|
|
|
images, video, notice, group_snap, spec_info, select_spec
|
|
|
|
|
</sql>
|
|
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
|
|
|
|
|
select
|
|
|
|
|
select
|
|
|
|
|
<include refid="Base_Column_List" />
|
|
|
|
|
,
|
|
|
|
|
<include refid="Blob_Column_List" />
|
|
|
|
|
@ -98,51 +99,52 @@
|
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
|
</delete>
|
|
|
|
|
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductWithBLOBs">
|
|
|
|
|
insert into tb_product (id, category_id, spec_id,
|
|
|
|
|
source_path, brand_id, merchant_id,
|
|
|
|
|
shop_id, name, short_title,
|
|
|
|
|
type, pack_fee, low_price,
|
|
|
|
|
low_member_price, unit_id, unit_snap,
|
|
|
|
|
cover_img, share_img, video_cover_img,
|
|
|
|
|
sort, limit_number, product_score,
|
|
|
|
|
status, fail_msg, is_recommend,
|
|
|
|
|
is_hot, is_new, is_on_sale,
|
|
|
|
|
is_show, type_enum, is_distribute,
|
|
|
|
|
is_del, is_stock, is_pause_sale,
|
|
|
|
|
is_free_freight, freight_id, strategy_type,
|
|
|
|
|
strategy_id, is_vip, is_delete,
|
|
|
|
|
created_at, updated_at, base_sales_number,
|
|
|
|
|
real_sales_number, sales_number, thumb_count,
|
|
|
|
|
store_count, furnish_meal, furnish_express,
|
|
|
|
|
furnish_draw, furnish_vir, is_combo,
|
|
|
|
|
is_show_cash, is_show_mall, is_need_examine,
|
|
|
|
|
show_on_mall_status, show_on_mall_time, show_on_mall_error_msg,
|
|
|
|
|
enable_label, tax_config_id, spec_table_headers,
|
|
|
|
|
images, video, notice,
|
|
|
|
|
group_snap, spec_info, select_spec
|
|
|
|
|
insert into tb_product (id, category_id, spec_id,
|
|
|
|
|
source_path, brand_id, merchant_id,
|
|
|
|
|
shop_id, name, short_title,
|
|
|
|
|
type, pack_fee, low_price,
|
|
|
|
|
low_member_price, unit_id, unit_snap,
|
|
|
|
|
cover_img, share_img, video_cover_img,
|
|
|
|
|
sort, limit_number, product_score,
|
|
|
|
|
status, fail_msg, is_recommend,
|
|
|
|
|
is_hot, is_new, is_on_sale,
|
|
|
|
|
is_show, type_enum, is_distribute,
|
|
|
|
|
is_del, is_stock, is_pause_sale,
|
|
|
|
|
is_free_freight, freight_id, strategy_type,
|
|
|
|
|
strategy_id, is_vip, is_delete,
|
|
|
|
|
created_at, updated_at, base_sales_number,
|
|
|
|
|
real_sales_number, sales_number, thumb_count,
|
|
|
|
|
store_count, furnish_meal, furnish_express,
|
|
|
|
|
furnish_draw, furnish_vir, is_combo,
|
|
|
|
|
is_show_cash, is_show_mall, is_need_examine,
|
|
|
|
|
show_on_mall_status, show_on_mall_time, show_on_mall_error_msg,
|
|
|
|
|
enable_label, tax_config_id, spec_table_headers,
|
|
|
|
|
images, video, notice,
|
|
|
|
|
group_snap, spec_info, select_spec, stock_number
|
|
|
|
|
)
|
|
|
|
|
values (#{id,jdbcType=INTEGER}, #{categoryId,jdbcType=VARCHAR}, #{specId,jdbcType=INTEGER},
|
|
|
|
|
#{sourcePath,jdbcType=VARCHAR}, #{brandId,jdbcType=INTEGER}, #{merchantId,jdbcType=VARCHAR},
|
|
|
|
|
#{shopId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{shortTitle,jdbcType=VARCHAR},
|
|
|
|
|
#{type,jdbcType=VARCHAR}, #{packFee,jdbcType=DECIMAL}, #{lowPrice,jdbcType=DECIMAL},
|
|
|
|
|
#{lowMemberPrice,jdbcType=DECIMAL}, #{unitId,jdbcType=VARCHAR}, #{unitSnap,jdbcType=VARCHAR},
|
|
|
|
|
#{coverImg,jdbcType=VARCHAR}, #{shareImg,jdbcType=VARCHAR}, #{videoCoverImg,jdbcType=VARCHAR},
|
|
|
|
|
#{sort,jdbcType=INTEGER}, #{limitNumber,jdbcType=INTEGER}, #{productScore,jdbcType=INTEGER},
|
|
|
|
|
#{status,jdbcType=TINYINT}, #{failMsg,jdbcType=VARCHAR}, #{isRecommend,jdbcType=TINYINT},
|
|
|
|
|
#{isHot,jdbcType=TINYINT}, #{isNew,jdbcType=TINYINT}, #{isOnSale,jdbcType=TINYINT},
|
|
|
|
|
#{isShow,jdbcType=TINYINT}, #{typeEnum,jdbcType=VARCHAR}, #{isDistribute,jdbcType=TINYINT},
|
|
|
|
|
#{isDel,jdbcType=TINYINT}, #{isStock,jdbcType=TINYINT}, #{isPauseSale,jdbcType=TINYINT},
|
|
|
|
|
#{isFreeFreight,jdbcType=TINYINT}, #{freightId,jdbcType=BIGINT}, #{strategyType,jdbcType=VARCHAR},
|
|
|
|
|
#{strategyId,jdbcType=INTEGER}, #{isVip,jdbcType=TINYINT}, #{isDelete,jdbcType=TINYINT},
|
|
|
|
|
#{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, #{baseSalesNumber,jdbcType=DOUBLE},
|
|
|
|
|
#{realSalesNumber,jdbcType=INTEGER}, #{salesNumber,jdbcType=INTEGER}, #{thumbCount,jdbcType=INTEGER},
|
|
|
|
|
#{storeCount,jdbcType=INTEGER}, #{furnishMeal,jdbcType=INTEGER}, #{furnishExpress,jdbcType=INTEGER},
|
|
|
|
|
#{furnishDraw,jdbcType=INTEGER}, #{furnishVir,jdbcType=INTEGER}, #{isCombo,jdbcType=TINYINT},
|
|
|
|
|
#{isShowCash,jdbcType=TINYINT}, #{isShowMall,jdbcType=TINYINT}, #{isNeedExamine,jdbcType=TINYINT},
|
|
|
|
|
#{showOnMallStatus,jdbcType=TINYINT}, #{showOnMallTime,jdbcType=BIGINT}, #{showOnMallErrorMsg,jdbcType=VARCHAR},
|
|
|
|
|
#{enableLabel,jdbcType=TINYINT}, #{taxConfigId,jdbcType=VARCHAR}, #{specTableHeaders,jdbcType=VARCHAR},
|
|
|
|
|
#{images,jdbcType=LONGVARCHAR}, #{video,jdbcType=LONGVARCHAR}, #{notice,jdbcType=LONGVARCHAR},
|
|
|
|
|
#{groupSnap,jdbcType=LONGVARCHAR}, #{specInfo,jdbcType=LONGVARCHAR}, #{selectSpec,jdbcType=LONGVARCHAR}
|
|
|
|
|
values (#{id,jdbcType=INTEGER}, #{categoryId,jdbcType=VARCHAR}, #{specId,jdbcType=INTEGER},
|
|
|
|
|
#{sourcePath,jdbcType=VARCHAR}, #{brandId,jdbcType=INTEGER}, #{merchantId,jdbcType=VARCHAR},
|
|
|
|
|
#{shopId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{shortTitle,jdbcType=VARCHAR},
|
|
|
|
|
#{type,jdbcType=VARCHAR}, #{packFee,jdbcType=DECIMAL}, #{lowPrice,jdbcType=DECIMAL},
|
|
|
|
|
#{lowMemberPrice,jdbcType=DECIMAL}, #{unitId,jdbcType=VARCHAR}, #{unitSnap,jdbcType=VARCHAR},
|
|
|
|
|
#{coverImg,jdbcType=VARCHAR}, #{shareImg,jdbcType=VARCHAR}, #{videoCoverImg,jdbcType=VARCHAR},
|
|
|
|
|
#{sort,jdbcType=INTEGER}, #{limitNumber,jdbcType=INTEGER}, #{productScore,jdbcType=INTEGER},
|
|
|
|
|
#{status,jdbcType=TINYINT}, #{failMsg,jdbcType=VARCHAR}, #{isRecommend,jdbcType=TINYINT},
|
|
|
|
|
#{isHot,jdbcType=TINYINT}, #{isNew,jdbcType=TINYINT}, #{isOnSale,jdbcType=TINYINT},
|
|
|
|
|
#{isShow,jdbcType=TINYINT}, #{typeEnum,jdbcType=VARCHAR}, #{isDistribute,jdbcType=TINYINT},
|
|
|
|
|
#{isDel,jdbcType=TINYINT}, #{isStock,jdbcType=TINYINT}, #{isPauseSale,jdbcType=TINYINT},
|
|
|
|
|
#{isFreeFreight,jdbcType=TINYINT}, #{freightId,jdbcType=BIGINT}, #{strategyType,jdbcType=VARCHAR},
|
|
|
|
|
#{strategyId,jdbcType=INTEGER}, #{isVip,jdbcType=TINYINT}, #{isDelete,jdbcType=TINYINT},
|
|
|
|
|
#{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, #{baseSalesNumber,jdbcType=DOUBLE},
|
|
|
|
|
#{realSalesNumber,jdbcType=INTEGER}, #{salesNumber,jdbcType=INTEGER}, #{thumbCount,jdbcType=INTEGER},
|
|
|
|
|
#{storeCount,jdbcType=INTEGER}, #{furnishMeal,jdbcType=INTEGER}, #{furnishExpress,jdbcType=INTEGER},
|
|
|
|
|
#{furnishDraw,jdbcType=INTEGER}, #{furnishVir,jdbcType=INTEGER}, #{isCombo,jdbcType=TINYINT},
|
|
|
|
|
#{isShowCash,jdbcType=TINYINT}, #{isShowMall,jdbcType=TINYINT}, #{isNeedExamine,jdbcType=TINYINT},
|
|
|
|
|
#{showOnMallStatus,jdbcType=TINYINT}, #{showOnMallTime,jdbcType=BIGINT}, #{showOnMallErrorMsg,jdbcType=VARCHAR},
|
|
|
|
|
#{enableLabel,jdbcType=TINYINT}, #{taxConfigId,jdbcType=VARCHAR}, #{specTableHeaders,jdbcType=VARCHAR},
|
|
|
|
|
#{images,jdbcType=LONGVARCHAR}, #{video,jdbcType=LONGVARCHAR}, #{notice,jdbcType=LONGVARCHAR},
|
|
|
|
|
#{groupSnap,jdbcType=LONGVARCHAR}, #{specInfo,jdbcType=LONGVARCHAR}, #{selectSpec,jdbcType=LONGVARCHAR},
|
|
|
|
|
#{stockNumber,jdbcType=INTEGER}
|
|
|
|
|
)
|
|
|
|
|
</insert>
|
|
|
|
|
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductWithBLOBs">
|
|
|
|
|
@ -346,6 +348,9 @@
|
|
|
|
|
<if test="selectSpec != null">
|
|
|
|
|
select_spec,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="stockNumber != null">
|
|
|
|
|
stock_number,
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="id != null">
|
|
|
|
|
@ -546,6 +551,9 @@
|
|
|
|
|
<if test="selectSpec != null">
|
|
|
|
|
#{selectSpec,jdbcType=LONGVARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="stockNumber != null">
|
|
|
|
|
#{stockNumber,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProductWithBLOBs">
|
|
|
|
|
@ -746,6 +754,9 @@
|
|
|
|
|
<if test="selectSpec != null">
|
|
|
|
|
select_spec = #{selectSpec,jdbcType=LONGVARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="stockNumber != null">
|
|
|
|
|
stock_number = #{stockNumber,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
</set>
|
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
|
</update>
|
|
|
|
|
@ -815,7 +826,8 @@
|
|
|
|
|
notice = #{notice,jdbcType=LONGVARCHAR},
|
|
|
|
|
group_snap = #{groupSnap,jdbcType=LONGVARCHAR},
|
|
|
|
|
spec_info = #{specInfo,jdbcType=LONGVARCHAR},
|
|
|
|
|
select_spec = #{selectSpec,jdbcType=LONGVARCHAR}
|
|
|
|
|
select_spec = #{selectSpec,jdbcType=LONGVARCHAR},
|
|
|
|
|
stock_number = #{stockNumber,jdbcType=INTEGER}
|
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
|
</update>
|
|
|
|
|
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbProduct">
|
|
|
|
|
@ -878,7 +890,8 @@
|
|
|
|
|
show_on_mall_error_msg = #{showOnMallErrorMsg,jdbcType=VARCHAR},
|
|
|
|
|
enable_label = #{enableLabel,jdbcType=TINYINT},
|
|
|
|
|
tax_config_id = #{taxConfigId,jdbcType=VARCHAR},
|
|
|
|
|
spec_table_headers = #{specTableHeaders,jdbcType=VARCHAR}
|
|
|
|
|
spec_table_headers = #{specTableHeaders,jdbcType=VARCHAR},
|
|
|
|
|
stock_number = #{stockNumber,jdbcType=INTEGER}
|
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
@ -916,4 +929,10 @@
|
|
|
|
|
and trade_day = #{day}
|
|
|
|
|
group by shop_id,product_id
|
|
|
|
|
</select>
|
|
|
|
|
</mapper>
|
|
|
|
|
|
|
|
|
|
<update id="updateStockById">
|
|
|
|
|
update tb_product
|
|
|
|
|
set stock_number = stock_number - #{number,jdbcType=INTEGER}
|
|
|
|
|
where id = #{productId}
|
|
|
|
|
</update>
|
|
|
|
|
</mapper>
|
|
|
|
|
|