| | |
| | | <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"> |
| | |
| | | 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"> |