Browse Source

add:商品中新增“是否在教务端展示”、“是否在乐团展示”

yonge 4 years ago
parent
commit
f649568b45

+ 22 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/Goods.java

@@ -130,6 +130,12 @@ public class Goods {
 
 	@ApiModelProperty(value = "客户端是否展示")
 	private YesOrNoEnum clientShow;
+	
+	@ApiModelProperty(value = "教务端是否展示")
+	private YesOrNoEnum educationalShow;
+	
+	@ApiModelProperty(value = "乐团是否展示")
+	private YesOrNoEnum musicGroupShow;
 
 	@ApiModelProperty(value = "库存类型")
 	private StockType stockType;
@@ -153,6 +159,22 @@ public class Goods {
 		this.clientShow = clientShow;
 	}
 
+	public YesOrNoEnum getEducationalShow() {
+		return educationalShow;
+	}
+
+	public void setEducationalShow(YesOrNoEnum educationalShow) {
+		this.educationalShow = educationalShow;
+	}
+
+	public YesOrNoEnum getMusicGroupShow() {
+		return musicGroupShow;
+	}
+
+	public void setMusicGroupShow(YesOrNoEnum musicGroupShow) {
+		this.musicGroupShow = musicGroupShow;
+	}
+
 	public StockType getStockType() {
 		return stockType;
 	}

+ 22 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/GoodsQueryInfo.java

@@ -31,6 +31,12 @@ public class GoodsQueryInfo extends QueryInfo {
     @ApiModelProperty(value = "客户端是否展示:0否,1是")
     private Integer clientShow;
 
+    @ApiModelProperty(value = "教务端是否展示:0否,1是")
+    private Integer educationalShow;
+
+    @ApiModelProperty(value = "乐团端是否展示:0否,1是")
+    private Integer musicGroupShow;
+
     public Integer getGroupGoods() {
         return groupGoods;
     }
@@ -86,4 +92,20 @@ public class GoodsQueryInfo extends QueryInfo {
     public void setClientShow(Integer clientShow) {
         this.clientShow = clientShow;
     }
+
+	public Integer getEducationalShow() {
+		return educationalShow;
+	}
+
+	public void setEducationalShow(Integer educationalShow) {
+		this.educationalShow = educationalShow;
+	}
+
+	public Integer getMusicGroupShow() {
+		return musicGroupShow;
+	}
+
+	public void setMusicGroupShow(Integer musicGroupShow) {
+		this.musicGroupShow = musicGroupShow;
+	}
 }

+ 18 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/GoodsServiceImpl.java

@@ -215,6 +215,24 @@ public class GoodsServiceImpl extends BaseServiceImpl<Integer, Goods>  implement
 						}
 						continue;
 					}
+					if (columnValue.equals("educationalShow")) {
+						for (YesOrNoEnum yesOrNoEnum : YesOrNoEnum.values()) {
+							if (yesOrNoEnum.getMsg().equals(row.get(s).toString())) {
+								objectMap.put(columnValue, yesOrNoEnum);
+								break;
+							}
+						}
+						continue;
+					}
+					if (columnValue.equals("musicGroupShow")) {
+						for (YesOrNoEnum yesOrNoEnum : YesOrNoEnum.values()) {
+							if (yesOrNoEnum.getMsg().equals(row.get(s).toString())) {
+								objectMap.put(columnValue, yesOrNoEnum);
+								break;
+							}
+						}
+						continue;
+					}
 					if (columnValue.equals("clientShow")) {
 						for (YesOrNoEnum yesOrNoEnum : YesOrNoEnum.values()) {
 							if (yesOrNoEnum.getMsg().equals(row.get(s).toString())) {

+ 26 - 3
mec-biz/src/main/resources/config/mybatis/GoodsMapper.xml

@@ -36,6 +36,8 @@
         <result column="supply_channel_" property="supplyChannel" />
         <result column="stock_type_" property="stockType" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
         <result column="client_show_" property="clientShow" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
+        <result column="educational_show_" property="educationalShow" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
+        <result column="music_group_show_" property="musicGroupShow" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
         <result column="stock_warning_" property="stockWarning" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
     </resultMap>
 
@@ -55,25 +57,28 @@
         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_,client_show_,stock_warning_,stock_type_)
+        complement_goods_id_list_,update_time_,create_time_,type_,agree_cost_price_,client_show_,educational_show_,music_group_show_,stock_warning_,stock_type_)
         VALUES(#{goodsCategoryId},#{sn},#{name},#{brand},#{specification},#{image},#{stockCount},#{taxStockCount},#{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},#{agreeCostPrice},
-        #{clientShow,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{stockWarning,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
+        #{clientShow,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{educationalShow,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
+        #{musicGroupShow,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{stockWarning,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
         #{stockType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler})
     </insert>
     <insert id="batchInsert" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
         INSERT INTO goods
         (goods_category_id_,name_,brand_,specification_,image_,market_price_,
         discount_price_,group_purchase_price_,brief_,desc_,update_time_,create_time_,type_,agree_cost_price_,sn_,
-        stock_count_,tax_stock_count_,client_show_,stock_warning_,stock_type_)
+        stock_count_,tax_stock_count_,client_show_,educational_show_,music_group_show_,stock_warning_,stock_type_)
         VALUES
         <foreach collection="list" separator="," item="goods">
             (#{goods.goodsCategoryId},#{goods.name},#{goods.brand},#{goods.specification},#{goods.image},#{goods.marketPrice},
             #{goods.discountPrice},#{goods.groupPurchasePrice},#{goods.brief},#{goods.desc},now(),now(),
             #{goods.type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{goods.agreeCostPrice},#{goods.sn},
             #{goods.stockCount},#{goods.taxStockCount},#{goods.clientShow,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
+            #{goods.educationalShow,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
+        	#{goods.musicGroupShow,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
             #{goods.stockWarning,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
             #{goods.stockType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler})
         </foreach>
@@ -151,6 +156,12 @@
             <if test="clientShow != null">
                 client_show_ = #{clientShow,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
             </if>
+            <if test="educationalShow != null">
+                educational_show_ = #{educationalShow,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
+            </if>
+            <if test="musicGroupShow != null">
+                music_group_show_ = #{musicGroupShow,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
+            </if>
             <if test="stockWarning != null">
                 stock_warning_ = #{stockWarning,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
             </if>
@@ -235,6 +246,12 @@
                 <if test="goods.clientShow != null">
                     client_show_ = #{goods.clientShow,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
                 </if>
+	            <if test="goods.educationalShow != null">
+	                educational_show_ = #{goods.educationalShow,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
+	            </if>
+	            <if test="goods.musicGroupShow != null">
+	                music_group_show_ = #{goods.musicGroupShow,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
+	            </if>
                 <if test="goods.stockWarning != null">
                     stock_warning_ = #{goods.stockWarning,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
                 </if>
@@ -292,6 +309,12 @@
             <if test="clientShow!=null">
                 AND g.client_show_=#{clientShow}
             </if>
+            <if test="educationalShow!=null">
+                AND g.educational_show_=#{educationalShow}
+            </if>
+            <if test="musicGroupShow!=null">
+                AND g.music_group_show_=#{musicGroupShow}
+            </if>
             <if test="search!=null and search!=''">
                 AND (g.sn_=#{search} OR g.id_=#{search} OR g.name_ LIKE CONCAT('%', #{search}, '%'))
             </if>

+ 3 - 1
mec-web/src/main/resources/columnMapper.ini

@@ -1,4 +1,4 @@
-[商品导入模板]
+[商品导入模板]
 品牌 = brand
 货号 = sn
 商品名称 = name
@@ -16,6 +16,8 @@
 税务库存 = taxStockCount
 备查货号 = supplyChannel
 是否App展示 = clientShow
+是否教务端展示 = educationalShow
+是否乐团展示 = musicGroupShow
 库存类型 = stockType
 商品详情 = desc
 库存预警 = stockWarning