yujian
2019-11-26 2d3afb55aed07f9780ab46aefbdc7d520cdff576
fanli/src/main/java/com/yeshi/fanli/mapping/brand/BrandInfoMapper.xml
@@ -123,7 +123,7 @@
     SELECT * FROM yeshi_ec_brand_info d
   WHERE d.`bf_state` = 1 AND d.bf_goods_total <![CDATA[>=]]> 3  AND d.bf_shop_total <![CDATA[>]]> 0
       <if test="cid != null">AND d.`bf_cid` = #{cid} </if>
   ORDER BY d.`bf_weight` DESC,d.bf_id
   ORDER BY d.`bf_weight`
   LIMIT ${start},${count}
  </select>
  
@@ -137,7 +137,7 @@
     SELECT * FROM yeshi_ec_brand_info d
   WHERE d.`bf_state` = 1 AND d.`bf_cid` = #{cid}  AND d.bf_goods_total <![CDATA[>=]]>3
        AND d.bf_shop_total <![CDATA[>]]> 0
   ORDER BY d.`bf_weight` DESC
   ORDER BY d.`bf_weight`
  </select>
  
  <select id="countValidByCid" resultType="Long">
@@ -170,7 +170,7 @@
        <if test="cid != null">
            AND bf_cid = #{cid}
        </if>
     ORDER BY bf_weight DESC
     ORDER BY bf_weight
     LIMIT ${start},${count}
  </select>
  
@@ -187,4 +187,19 @@
            AND bf_cid = #{cid}
        </if>
  </select>
   <select id="getByAdjoinOrder" resultMap="BaseResultMap">
       SELECT * FROM yeshi_ec_brand_info
       WHERE bf_cid = #{cid}
       <if test="type == -1">
          AND bf_weight <![CDATA[<]]> #{order}
          ORDER BY bf_weight desc
       </if>
       <if test="type == 1">
          AND bf_weight <![CDATA[>]]> #{order}
          ORDER BY bf_weight
       </if>
       LIMIT 1
   </select>
</mapper>