From 51a4ff5d777028d52a19c314a99f796334cb7b51 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期六, 23 十一月 2019 18:30:01 +0800
Subject: [PATCH] 配置文件修改

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/goods/GoodsSubClassServiceImpl.java |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/GoodsSubClassServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/GoodsSubClassServiceImpl.java
index 0052f7b..adbb3f0 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/GoodsSubClassServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/GoodsSubClassServiceImpl.java
@@ -20,7 +20,7 @@
 import com.yeshi.fanli.entity.bus.clazz.GoodsSubClass;
 import com.yeshi.fanli.entity.bus.clazz.GoodsSubClassLabel;
 import com.yeshi.fanli.entity.bus.clazz.GoodsSubClassLabelMap;
-import com.yeshi.fanli.exception.GoodsSubClassException;
+import com.yeshi.fanli.exception.goods.GoodsSubClassException;
 import com.yeshi.fanli.service.inter.clazz.GoodsSubClassLabelService;
 import com.yeshi.fanli.service.inter.goods.GoodsSubClassService;
 import com.yeshi.fanli.service.inter.goods.TaoBaoClassService;
@@ -73,7 +73,7 @@
 	@Transactional
 	public void deleteByRootId(Long id) throws Exception {
 
-		List<GoodsSubClass> subClassList = goodsSubClassMapper.queryByRootId(id, null);
+		List<GoodsSubClass> subClassList = goodsSubClassMapper.queryByRootId(id, null, null);
 		if (subClassList != null && subClassList.size() > 0) {
 			for (GoodsSubClass goodsSubClass : subClassList) {
 				deleteSub(goodsSubClass.getId());
@@ -136,6 +136,9 @@
 		if (name == null || name.trim().length() == 0) {
 			throw new GoodsSubClassException(1, "鍒嗙被鍚嶇О涓嶈兘涓虹┖");
 		}
+
+		if (StringUtil.isNullOrEmpty(record.getMonth()))
+			record.setMonth(null);
 
 		// 鍥剧墖涓婁紶
 		String picture = null;
@@ -335,7 +338,7 @@
 
 	@Override
 	public List<GoodsSubClass> queryByRootId(Long rootId, Integer state) throws Exception {
-		return goodsSubClassMapper.queryByRootId(rootId, state);
+		return goodsSubClassMapper.queryByRootId(rootId, state, null);
 	}
 
 	@Override
@@ -354,14 +357,14 @@
 	}
 
 	@Override
-	public List<GoodsSubClass> getGoodsSecondClass(Long rootId, Integer state) throws Exception {
-		return goodsSubClassMapper.queryByRootId(rootId, state);
+	public List<GoodsSubClass> getGoodsSecondClass(Long rootId, Integer state, Integer month) throws Exception {
+		return goodsSubClassMapper.queryByRootId(rootId, state, month);
 	}
 
 	@Override
 	@Cacheable(value = "classCache", key = "'getSubClassCache-'+#rootId +'-'+#state")
-	public List<GoodsSubClass> getSubClassCache(Long rootId, Integer state) throws Exception {
-		return getGoodsSecondClass(rootId, state);
+	public List<GoodsSubClass> getSubClassCache(Long rootId, Integer state, Integer month) throws Exception {
+		return getGoodsSecondClass(rootId, state, month);
 	}
 
 	@Override

--
Gitblit v1.8.0