|
@@ -34,6 +34,8 @@
|
|
|
<result column="complement_goods_id_list_" property="complementGoodsIdList"/>
|
|
|
<result column="type_" property="type" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
|
|
|
<result column="supply_channel_" property="supplyChannel" />
|
|
|
+ <result column="client_show_" property="clientShow" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
|
|
|
+ <result column="stock_warning_" property="stockWarning" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
@@ -52,23 +54,24 @@
|
|
|
INSERT INTO goods
|
|
|
(goods_category_id_,sn_,name_,brand_,specification_,image_,stock_count_,tax_stock_count_,sell_count_,market_price_,
|
|
|
discount_price_,group_purchase_price_,brief_,desc_,is_new_,is_top_,status_,memo_,publish_time_,
|
|
|
- complement_goods_id_list_,update_time_,create_time_,type_,agree_cost_price_)
|
|
|
+ complement_goods_id_list_,update_time_,create_time_,type_,agree_cost_price_,client_show_,stock_warning_)
|
|
|
VALUES(#{goodsCategoryId},#{sn},#{name},#{brand},#{specification},#{image},#{stockCount},#{taxStockCount},#{sellCount},#{marketPrice},
|
|
|
- #{discountPrice},#{groupPurchasePrice},#{brief},#{desc},
|
|
|
+ #{discountPrice},#{groupPurchasePrice},#{brief},
|
|
|
#{isNew,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{isTop,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
|
|
|
- #{memo},#{publishTime},#{complementGoodsIdList},now(),now(),#{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{agreeCostPrice})
|
|
|
+ #{memo},#{publishTime},#{complementGoodsIdList},now(),now(),#{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{agreeCostPrice},
|
|
|
+ #{clientShow,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{stockWarning,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler})
|
|
|
</insert>
|
|
|
<insert id="batchInsert">
|
|
|
INSERT INTO goods
|
|
|
(goods_category_id_,name_,brand_,specification_,image_,market_price_,
|
|
|
discount_price_,group_purchase_price_,desc_,update_time_,create_time_,type_,agree_cost_price_,sn_,
|
|
|
- stock_count_,tax_stock_count_)
|
|
|
+ stock_count_,tax_stock_count_,client_show_,stock_warning_)
|
|
|
VALUES
|
|
|
<foreach collection="goodsList" separator="," item="goods">
|
|
|
(#{goods.goodsCategoryId},#{goods.name},#{goods.brand},#{goods.specification},#{goods.image},#{goods.marketPrice},
|
|
|
#{goods.discountPrice},#{goods.groupPurchasePrice},#{goods.desc},now(),now(),
|
|
|
#{goods.type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{goods.agreeCostPrice},#{goods.sn},
|
|
|
- #{goods.stockCount},#{goods.taxStockCount},)
|
|
|
+ #{goods.stockCount},#{goods.taxStockCount},#{goods.clientShow,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{goods.stockWarning,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler})
|
|
|
</foreach>
|
|
|
</insert>
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
@@ -120,9 +123,6 @@
|
|
|
<if test="brief != null">
|
|
|
brief_ = #{brief},
|
|
|
</if>
|
|
|
- <if test="updateTime != null">
|
|
|
- update_time_ = NOW(),
|
|
|
- </if>
|
|
|
<if test="discountPrice != null">
|
|
|
discount_price_ = #{discountPrice},
|
|
|
</if>
|
|
@@ -144,6 +144,13 @@
|
|
|
<if test="taxStockCount != null">
|
|
|
tax_stock_count_ = #{taxStockCount},
|
|
|
</if>
|
|
|
+ <if test="clientShow != null">
|
|
|
+ client_show_ = #{clientShow,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
|
|
|
+ </if>
|
|
|
+ <if test="stockWarning != null">
|
|
|
+ stock_warning_ = #{stockWarning,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
|
|
|
+ </if>
|
|
|
+ update_time_ = NOW()
|
|
|
</set>
|
|
|
WHERE id_ = #{id}
|
|
|
</update>
|
|
@@ -218,6 +225,12 @@
|
|
|
<if test="goods.taxStockCount != null">
|
|
|
tax_stock_count_ = #{goods.taxStockCount},
|
|
|
</if>
|
|
|
+ <if test="goods.clientShow != null">
|
|
|
+ client_show_ = #{goods.clientShow,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
|
|
|
+ </if>
|
|
|
+ <if test="stockWarning != null">
|
|
|
+ stock_warning_ = #{goods.stockWarning,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
|
|
|
+ </if>
|
|
|
update_time_ = NOW()
|
|
|
</set>
|
|
|
WHERE id_ = #{goods.id}
|