zouxuan пре 4 година
родитељ
комит
b3c9abe09a

+ 13 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/Goods.java

@@ -67,6 +67,10 @@ public class Goods {
 	@ApiModelProperty(value = "团购价",required = false)
 	private BigDecimal groupPurchasePrice;
 
+	/** 协议成本价 */
+	@ApiModelProperty(value = "协议成本价",required = false)
+	private BigDecimal agreeCostPrice;
+
 	/** 页面简介 */
 	@ApiModelProperty(value = "页面简介",required = false)
 	private String brief;
@@ -114,7 +118,15 @@ public class Goods {
 	@ApiModelProperty(value = "商品类型", required = false)
 	private GoodsType type;
 
-    public String getSubjectIds() {
+	public BigDecimal getAgreeCostPrice() {
+		return agreeCostPrice;
+	}
+
+	public void setAgreeCostPrice(BigDecimal agreeCostPrice) {
+		this.agreeCostPrice = agreeCostPrice;
+	}
+
+	public String getSubjectIds() {
         return subjectIds;
     }
 

+ 10 - 4
mec-biz/src/main/resources/config/mybatis/GoodsMapper.xml

@@ -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>