TaPersonMapper.xml 837B

123456789101112131415161718192021222324
  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.yunzhi.nanyang.mapper.TaPersonMapper">
  4. <select id="getPageBy" resultType="com.yunzhi.nanyang.entity.TaPerson">
  5. SELECT
  6. *
  7. FROM
  8. ta_person t
  9. WHERE
  10. t.`status` &gt; -1
  11. <if test="identity != null and identity != ''">
  12. AND t.identity = #{identity}
  13. </if>
  14. <if test="nickName != null and nickName != ''">
  15. AND t.nick_name LIKE CONCAT( '%', #{nickName}, '%' )
  16. </if>
  17. <if test="phone != null and phone != ''">
  18. AND t.phone LIKE CONCAT( '%', #{phone}, '%' )
  19. </if>
  20. ORDER BY
  21. t.create_date DESC
  22. </select>
  23. </mapper>