O
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
2.1 KiB

2 years ago
  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.xujie.sys.modules.customer.mapper.CustomerMapper">
  4. <select id="queryCustomerList" resultType="com.xujie.sys.modules.customer.entity.Customer">
  5. select site,
  6. customer_no,
  7. customer_desc,
  8. active,
  9. create_date,
  10. create_by,
  11. update_date,
  12. update_by
  13. from plm_customer_information
  14. <where>
  15. <if test="createBy != null and createBy != ''">
  16. and site in (select site from eam_access_site where username = #{createBy})
  17. </if>
  18. <if test="customerNo != null and customerNo != ''">
  19. and customer_no = #{customerNo}
  20. </if>
  21. <if test="customerDesc != null and customerDesc != ''">
  22. and customer_desc like #{customerDesc}
  23. </if>
  24. <if test="active != null and active != ''">
  25. and active = #{active}
  26. </if>
  27. </where>
  28. </select>
  29. <select id="queryCustomerListByPage" resultType="com.xujie.sys.modules.customer.entity.Customer">
  30. select site,
  31. customer_no,
  32. customer_desc,
  33. active,
  34. create_date,
  35. create_by,
  36. update_date,
  37. update_by
  38. from plm_customer_information
  39. <where>
  40. <if test="params.createBy != null and params.createBy != ''">
  41. and site in (select site from eam_access_site where username = #{params.createBy})
  42. </if>
  43. <if test="params.customerNo != null and params.customerNo != ''">
  44. and customer_no = #{params.customerNo}
  45. </if>
  46. <if test="params.customerDesc != null and params.customerDesc != ''">
  47. and customer_desc like #{params.customerDesc}
  48. </if>
  49. <if test="params.active != null and params.active != ''">
  50. and active = #{params.active}
  51. </if>
  52. </where>
  53. </select>
  54. </mapper>