BBusInfoMapper.xml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  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="bus.mapper.BBusInfoMapper">
  4. <select id="list" parameterType="bus.model.dto.page.BBusInfoPageDto" resultType="bus.model.dto.BBusInfoDto">
  5. select
  6. id,
  7. bus_name,
  8. bus_no,
  9. status,
  10. bus_url,
  11. driver_name,
  12. driver_phone
  13. from
  14. b_bus_info
  15. <where>
  16. is_delete = 0
  17. <if test="busName != null and busName != ''">
  18. and bus_name like concat('%',#{busName},'%')
  19. </if>
  20. <if test="busNo != null and busNo != ''">
  21. and bus_no like concat('%',#{busNo},'%')
  22. </if>
  23. <if test="driverName != null and driverName != ''">
  24. and driver_name like concat('%',#{driverName},'%')
  25. </if>
  26. <if test="driverPhone != null and driverPhone != ''">
  27. and driver_phone like concat('%',#{driverPhone},'%')
  28. </if>
  29. <if test="status != null and status != ''">
  30. and status = #{status}
  31. </if>
  32. </where>
  33. order by create_time desc
  34. </select>
  35. </mapper>