From b7b8f2a4fe9059ef7b5470a68bb1b34787bc92b2 Mon Sep 17 00:00:00 2001
From: yujian <yujian@123.com>
Date: 星期二, 25 六月 2019 09:14:46 +0800
Subject: [PATCH] 淘礼金相关

---
 fanli/src/main/java/com/yeshi/fanli/mapping/GoodsClassMapper.xml |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/mapping/GoodsClassMapper.xml b/fanli/src/main/java/com/yeshi/fanli/mapping/GoodsClassMapper.xml
index 8a2a34e..37da2bc 100644
--- a/fanli/src/main/java/com/yeshi/fanli/mapping/GoodsClassMapper.xml
+++ b/fanli/src/main/java/com/yeshi/fanli/mapping/GoodsClassMapper.xml
@@ -117,8 +117,22 @@
 		</if>
 		LIMIT 1
 	</select>
-	<select id="getGoodsClassAll" resultMap="BaseResultMap">SELECT * FROM
-		yeshi_ec_class rs ORDER BY rs.`orderby`
+	<select id="getGoodsClassAll" resultMap="BaseResultMap">
+		SELECT * FROM yeshi_ec_class c
+		where 1=1
+		 <!-- 閫氱敤鐗� -->
+		<if test="sex == 0">
+			AND (c.`sex`= 120 OR c.`sex` = 0 OR c.`sex` = 10 OR c.`sex` = 20) 
+		</if>
+		<!-- 濂崇増 -->
+		<if test="sex == 1">
+			AND (c.`sex`= 120 OR c.`sex` = 1 OR c.`sex` = 10 OR c.`sex` = 12)
+		</if>
+		<!-- 鐢风増 -->
+		<if test="sex == 2">
+			AND (c.`sex`= 120 OR c.`sex` = 2 OR c.`sex` = 20 OR c.`sex` = 12)
+		</if>
+		ORDER BY c.orderby 
 	</select>
 	<select id="listByName" resultMap="BaseResultMap">SELECT * from yeshi_ec_class
 		rs WHERE rs.name like '%#{name}%' LIMIT ${start},${count}</select>

--
Gitblit v1.8.0