From 9eeda0d3049b71877c373c04d65533939b5582ef Mon Sep 17 00:00:00 2001 From: yujian <yujian@123.com> Date: 星期一, 02 九月 2019 09:55:55 +0800 Subject: [PATCH] getBoss方法只查询有效上级信息 --- fanli/src/main/java/com/yeshi/fanli/mapping/user/UserGoodsStorageMapper.xml | 11 ++++------- 1 files changed, 4 insertions(+), 7 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/mapping/user/UserGoodsStorageMapper.xml b/fanli/src/main/java/com/yeshi/fanli/mapping/user/UserGoodsStorageMapper.xml index 02e8a9f..cc49cfa 100644 --- a/fanli/src/main/java/com/yeshi/fanli/mapping/user/UserGoodsStorageMapper.xml +++ b/fanli/src/main/java/com/yeshi/fanli/mapping/user/UserGoodsStorageMapper.xml @@ -98,14 +98,15 @@ <select id="listQueryByUid" resultMap="BaseResultMap"> SELECT * FROM yeshi_ec_user_goods_storage tg LEFT JOIN `yeshi_ec_common_goods` cg ON tg.`guc_common_id` = cg.`cg_id` - WHERE tg.`guc_uid` = #{uid} + WHERE tg.`guc_uid` = #{uid} <if test="gooodsType != null">AND cg.cg_goods_type = #{gooodsType}</if> ORDER BY cg.cg_state, tg.guc_state, tg.`guc_updatetime` DESC LIMIT #{start},#{count} </select> <select id="countQueryByUid" resultType="java.lang.Long"> SELECT IFNULL(count(guc_id),0) FROM yeshi_ec_user_goods_storage tg - WHERE tg.`guc_uid` = #{uid} + <if test="gooodsType != null"> LEFT JOIN `yeshi_ec_common_goods` cg ON tg.`guc_common_id` = cg.`cg_id`</if> + WHERE tg.`guc_uid` = #{uid} <if test="gooodsType != null">AND cg.cg_goods_type = #{gooodsType}</if> </select> <select id="getByUidAndCid" resultMap="BaseResultMap"> @@ -130,6 +131,7 @@ SELECT <include refid="Convert_Column_List"/> FROM `yeshi_ec_user_goods_storage` g LEFT JOIN `yeshi_ec_common_goods` c ON g.`guc_common_id` = c.`cg_id` WHERE g.`guc_uid` = #{uid} AND c.`cg_goods_id`= #{auctionId} + <if test="gooodsType != null">AND c.cg_goods_type = #{gooodsType}</if> </select> <select id="listQueryByIds" resultMap="BaseResultMap" parameterType="java.util.List"> @@ -139,9 +141,4 @@ separator=",">#{item}</foreach> </select> - - <update id="updateShareStateByCommonGoodsId" parameterType="java.lang.Long"> - UPDATE `yeshi_ec_user_goods_storage` ts SET ts.`guc_state` = 1 - WHERE ts.`guc_common_id` = #{commonGoodsId} - </update> </mapper> -- Gitblit v1.8.0