|
@@ -20,6 +20,7 @@
|
|
|
<result column="market_price_" property="marketPrice"/>
|
|
|
<result column="discount_price_" property="discountPrice"/>
|
|
|
<result column="group_purchase_price_" property="groupPurchasePrice"/>
|
|
|
+ <result column="agree_cost_price_" property="agreeCostPrice"/>
|
|
|
<result column="brief_" property="brief"/>
|
|
|
<result column="desc_" property="desc"/>
|
|
|
<result column="is_new_" property="isNew" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
|
|
@@ -47,16 +48,21 @@
|
|
|
<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.Goods" useGeneratedKeys="true" keyColumn="id"
|
|
|
keyProperty="id">
|
|
|
INSERT INTO goods
|
|
|
- (goods_category_id_,sn_,name_,brand_,specification_,image_,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_)
|
|
|
- VALUES(#{goodsCategoryId},#{sn},#{name},#{brand},#{specification},#{image},#{stockCount},#{sellCount},#{marketPrice},#{discountPrice},#{groupPurchasePrice},#{brief},#{desc},
|
|
|
+ (goods_category_id_,sn_,name_,brand_,specification_,image_,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_)
|
|
|
+ VALUES(#{goodsCategoryId},#{sn},#{name},#{brand},#{specification},#{image},#{stockCount},#{sellCount},#{marketPrice},
|
|
|
+ #{discountPrice},#{groupPurchasePrice},#{brief},#{desc},
|
|
|
#{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})
|
|
|
+ #{memo},#{publishTime},#{complementGoodsIdList},now(),now(),#{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{agreeCostPrice})
|
|
|
</insert>
|
|
|
-
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
|
<update id="update" parameterType="com.ym.mec.biz.dal.entity.Goods">
|
|
|
UPDATE goods
|
|
|
<set>
|
|
|
+ <if test="agreeCostPrice != null">
|
|
|
+ agree_cost_price_ = #{agreeCostPrice},
|
|
|
+ </if>
|
|
|
<if test="specification != null">
|
|
|
specification_ = #{specification},
|
|
|
</if>
|