FirmSupplierMapper.xml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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.platform.dao.mapper.firm.FirmSupplierMapper">
  4. <sql id="Base_Column_List">
  5. supplier.id,
  6. supplier.type,
  7. supplier.no,
  8. supplier.name,
  9. supplier.level,
  10. supplier.person,
  11. supplier.mobile,
  12. supplier.address,
  13. supplier.sort,
  14. supplier.del_flag,
  15. supplier.remark,
  16. supplier.created_user_id,
  17. supplier.created_user_name,
  18. supplier.update_user_id,
  19. supplier.update_user_name,
  20. supplier.created_time,
  21. supplier.update_time
  22. </sql>
  23. <sql id="Ref_Column_List">
  24. supplier.type,
  25. supplier.no,
  26. supplier.name,
  27. supplier.level,
  28. supplier.person,
  29. supplier.mobile,
  30. supplier.address,
  31. supplier.sort,
  32. supplier.del_flag,
  33. supplier.remark
  34. </sql>
  35. <sql id="List_Condition">
  36. <if test="id != null and id != ''">
  37. and supplier.id = #{id}
  38. </if>
  39. <if test="type != null">
  40. and supplier.type = #{type}
  41. </if>
  42. <if test="no != null and no != ''">
  43. and supplier.no = #{no}
  44. </if>
  45. <if test="name != null and name != ''">
  46. and supplier.name = #{name}
  47. </if>
  48. <if test="level != null">
  49. and supplier.level = #{level}
  50. </if>
  51. <if test="person != null and person != ''">
  52. and supplier.person = #{person}
  53. </if>
  54. <if test="mobile != null and mobile != ''">
  55. and supplier.mobile = #{mobile}
  56. </if>
  57. <if test="address != null and address != ''">
  58. and supplier.address = #{address}
  59. </if>
  60. <if test="sort != null">
  61. and supplier.sort = #{sort}
  62. </if>
  63. <if test="delFlag != null">
  64. and supplier.del_flag = #{delFlag}
  65. </if>
  66. <if test="remark != null and remark != ''">
  67. and supplier.remark = #{remark}
  68. </if>
  69. <if test="createdUserId != null and createdUserId != ''">
  70. and supplier.created_user_id = #{createdUserId}
  71. </if>
  72. <if test="createdUserName != null and createdUserName != ''">
  73. and supplier.created_user_name = #{createdUserName}
  74. </if>
  75. <if test="updateUserId != null and updateUserId != ''">
  76. and supplier.update_user_id = #{updateUserId}
  77. </if>
  78. <if test="updateUserName != null and updateUserName != ''">
  79. and supplier.update_user_name = #{updateUserName}
  80. </if>
  81. <if test="createdTimeStart != null">
  82. and supplier.created_time <![CDATA[>=]]>; #{createdTimeStart}
  83. </if>
  84. <if test="createdTimeEnd != null">
  85. and supplier.created_time <![CDATA[<=]]> #{createdTimeEnd}
  86. </if>
  87. <if test="createdTime != null">
  88. and supplier.created_time = #{createdTime}
  89. </if>
  90. <if test="updateTimeStart != null">
  91. and supplier.update_time <![CDATA[>=]]>; #{updateTimeStart}
  92. </if>
  93. <if test="updateTimeEnd != null">
  94. and supplier.update_time <![CDATA[<=]]> #{updateTimeEnd}
  95. </if>
  96. <if test="updateTime != null">
  97. and supplier.update_time = #{updateTime}
  98. </if>
  99. <if test="keyword != null and keyword != ''">
  100. and supplier.id like concat('%',#{keyword},'%')
  101. </if>
  102. </sql>
  103. <select id="selectList" parameterType="com.platform.dao.dto.firm.FirmSupplierDTO"
  104. resultType="com.platform.dao.vo.query.firm.FirmSupplierVO">
  105. select supplier.*
  106. from t_firm_supplier as supplier
  107. <where>
  108. <include refid="List_Condition"/>
  109. and supplier.del_flag = false
  110. </where>
  111. </select>
  112. <select id="selectNameById" parameterType="Object" resultType="java.lang.String">
  113. select name
  114. from t_firm_supplier
  115. where id = #{value}
  116. </select>
  117. </mapper>