CustomerManagementExtendMapper.xml 1.1 KB

12345678910111213141516171819202122232425262728
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.idea.customerManagement.mapper.CustomerManagementExtendMapper">
  4. <select id="listByModel" resultType="com.idea.customerManagement.dto.CustomerManagementDto">
  5. select customer_management.*,
  6. concat(park_info.group_name,park_floor_disc.name) groupDiscName
  7. from customer_management
  8. left join park_info on park_info.id = customer_management.group_id
  9. left join park_floor_disc on park_floor_disc.id = customer_management.disc_id
  10. <where>
  11. <if test="buyerName != null and buyerName != ''">
  12. and buyer_name like concat ('%',#{buyerName},'%')
  13. </if>
  14. <if test="status != null and status != ''">
  15. and status = #{status}
  16. </if>
  17. <if test="groupId != null and groupId != ''">
  18. and group_id = #{groupId}
  19. </if>
  20. <if test="discId != null and discId != ''">
  21. and disc_id = #{discId}
  22. </if>
  23. </where>
  24. order by batch_number desc,room_selection_number asc
  25. </select>
  26. </mapper>