yujian
2020-05-23 28cf328a098334b51a3e9d2d56f983fb8c862211
fanli/src/main/java/com/yeshi/fanli/mapping/goods/CollectionGoodsV2Mapper.xml
@@ -39,10 +39,10 @@
   <!-- 根据用户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>
@@ -51,10 +51,9 @@
   <!-- 获取收藏的数量 -->
   <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>