From d8359ddb48dab5cc797a9d552e11fde571f4920c Mon Sep 17 00:00:00 2001 From: yujian <yujian@123.com> Date: 星期二, 27 八月 2019 12:32:46 +0800 Subject: [PATCH] Merge branch 'div' of ssh://193.112.35.168:29418/fanli-server into div --- fanli/src/main/java/com/yeshi/fanli/service/impl/goods/GoodsClassServiceImpl.java | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/GoodsClassServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/GoodsClassServiceImpl.java index 3584055..57f4527 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/GoodsClassServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/GoodsClassServiceImpl.java @@ -81,9 +81,9 @@ } @Override - public List<GoodsClass> listquery() throws Exception { + public List<GoodsClass> listquery(Integer sex) throws Exception { - List<GoodsClass> list = goodsClassMapper.getGoodsClassAll(); + List<GoodsClass> list = goodsClassMapper.getGoodsClassAll(sex); if (list != null && list.size() == 0) { return list; @@ -135,7 +135,7 @@ } public List<GoodsClass> getGoodsClassAll() { - return goodsClassMapper.getGoodsClassAll(); + return goodsClassMapper.getGoodsClassAll(null); } @Override @@ -146,7 +146,12 @@ if (name == null || name.trim().length() == 0) { throw new GoodsClassException(1, "鍒嗙被鍚嶇О涓嶈兘涓虹┖"); } - + + Integer sex = record.getSex(); + if (sex == null) { + throw new GoodsClassException(1, "鎬у埆璁剧疆涓嶈兘涓虹┖"); + } + // 鍥剧墖涓婁紶 String picture = null; if (file != null) { @@ -309,7 +314,7 @@ @Override @Cacheable(value = "classCache", key = "'getEffectiveClassCache'") - public List<GoodsClass> getEffectiveClassCache() throws Exception { + public List<GoodsClass> getEffectiveClassCache() { return goodsClassMapper.getEffectiveClass(); } -- Gitblit v1.8.0