BrandCityTierMapper.xml 880 B

1234567891011121314151617181920212223242526272829
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ruoyi.demo.mapper.BrandCityTierMapper">
  6. <delete id="deleteAllById">
  7. DELETE
  8. FROM
  9. `bl_brand_city_tier`
  10. <foreach collection="ids" item="id" open="WHERE brand_id IN (" separator="," close=")">
  11. #{id,jdbcType=VARCHAR}
  12. </foreach>
  13. </delete>
  14. <select id="selectAllId" resultType="java.lang.String">
  15. SELECT DISTINCT
  16. brand_id
  17. FROM
  18. `bl_brand_city_tier`;
  19. </select>
  20. <select id="selectNoUse" resultType="java.lang.String">
  21. SELECT
  22. brand_id
  23. FROM
  24. `bl_brand_city_tier`
  25. GROUP BY
  26. brand_id
  27. HAVING COUNT(*) <![CDATA[<]]> #{num};
  28. </select>
  29. </mapper>