| | |
| | | <!-- 根据用户ID获取收藏记录,按照收藏时间倒叙 -->
|
| | | <select id="selectByUidOrderByCreateTimeDesc" resultMap="BaseResultMap">
|
| | | select t.* from yeshi_ec_collection_goods_v2 t
|
| | | <if test="source != null">
|
| | | LEFT JOIN `yeshi_ec_common_goods` g ON t.`cg_common_goods_id` = g.`cg_id`
|
| | | </if>
|
| | | where t.cg_uid = #{uid} <if test="source != null">AND g.`cg_goods_type` = #{source}</if>
|
| | | LEFT JOIN `yeshi_ec_common_goods` g ON t.`cg_common_goods_id` = g.`cg_id`
|
| | | where t.cg_uid = #{uid} |
| | | <if test="source != null">AND g.`cg_goods_type` = #{source}</if>
|
| | | <if test="notBackSuVip == true"><![CDATA[AND g.`cg_goods_type` <> 4 AND g.`cg_goods_type` <> 5]]></if>
|
| | | order by t.cg_createtime desc
|
| | | limit #{start},#{count}
|
| | | </select>
|
| | |
| | | <!-- 获取收藏的数量 -->
|
| | | <select id="selectCountByUid" resultType="java.lang.Long" parameterType="java.lang.Long">
|
| | | select count(t.cg_id) from yeshi_ec_collection_goods_v2 t
|
| | | <if test="source != null">
|
| | | LEFT JOIN `yeshi_ec_common_goods` g ON t.`cg_common_goods_id` = g.`cg_id`
|
| | | </if>
|
| | | LEFT JOIN `yeshi_ec_common_goods` g ON t.`cg_common_goods_id` = g.`cg_id`
|
| | | where t.cg_uid = #{uid} <if test="source != null">AND g.`cg_goods_type` = #{source}</if>
|
| | | <if test="notBackSuVip == true"><![CDATA[AND g.`cg_goods_type` <> 4 AND g.`cg_goods_type` <> 5]]></if>
|
| | | </select>
|
| | |
|
| | |
|