SFwglServerinfoMapper.xml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  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="SFwglServerinfoMapper" >
  4. <!-- 通用查询映射结果 -->
  5. <select id="selectSFwglServerinfoList" parameterType="pd" resultType="pd">
  6. select * from s_fwgl_serverinfo where 1=1
  7. <if test="productName !=null and productName !='' ">
  8. and productName = #{productName}
  9. </if>
  10. <if test="productId !=null and productId !='' ">
  11. and productId = #{productId}
  12. </if>
  13. <if test="mdmProductCode !=null and mdmProductCode !='' ">
  14. and mdmProductCode = #{mdmProductCode}
  15. </if>
  16. <if test="price !=null and price !='' ">
  17. and price = #{price}
  18. </if>
  19. <if test="productType !=null and productType !='' ">
  20. and productType = #{productType}
  21. </if>
  22. <if test="stock !=null and stock !='' ">
  23. and stock = #{stock}
  24. </if>
  25. <if test="productCategory !=null and productCategory !='' ">
  26. and productCategory = #{productCategory}
  27. </if>
  28. <if test="auditStatus !=null and auditStatus !='' ">
  29. and auditStatus = #{auditStatus}
  30. </if>
  31. <if test="status !=null and status !='' ">
  32. and status = #{status}
  33. </if>
  34. <if test="creationTime !=null and creationTime !='' ">
  35. and creationTime = #{creationTime}
  36. </if>
  37. <if test="id !=null and id !='' ">
  38. and id = #{id}
  39. </if>
  40. </select>
  41. <update id="updateSFwglServerinfo" parameterType="pd" >
  42. update s_fwgl_serverinfo
  43. <trim prefix=" SET " suffix="" prefixOverrides="," suffixOverrides=",">
  44. <if test="productName !=null and productName !='' ">
  45. productName = #{productName},
  46. </if>
  47. <if test="productId !=null and productId !='' ">
  48. productId = #{productId},
  49. </if>
  50. <if test="mdmProductCode !=null and mdmProductCode !='' ">
  51. mdmProductCode = #{mdmProductCode},
  52. </if>
  53. <if test="price !=null and price !='' ">
  54. price = #{price},
  55. </if>
  56. <if test="productType !=null and productType !='' ">
  57. productType = #{productType},
  58. </if>
  59. <if test="stock !=null and stock !='' ">
  60. stock = #{stock},
  61. </if>
  62. <if test="productCategory !=null and productCategory !='' ">
  63. productCategory = #{productCategory},
  64. </if>
  65. <if test="auditStatus !=null and auditStatus !='' ">
  66. auditStatus = #{auditStatus},
  67. </if>
  68. <if test="status !=null and status !='' ">
  69. status = #{status},
  70. </if>
  71. <if test="creationTime !=null and creationTime !='' ">
  72. creationTime = #{creationTime},
  73. </if>
  74. </trim>
  75. <if test="up != null and up!=''">
  76. <if test="id != null and id!=''">
  77. where id=#{id}
  78. </if>
  79. </if>
  80. </update>
  81. <delete id="SFwglServerinfoRemove" parameterType="pd">
  82. <if test="ids != null">
  83. delete from s_fwgl_serverinfo where
  84. <if test="ids != null">
  85. id in(${ids})
  86. </if>
  87. </if>
  88. </delete>
  89. <insert id="addSFwglServerinfo" parameterType="pd" >
  90. insert into s_fwgl_serverinfo
  91. <trim prefix="(" suffix=")" prefixOverrides="," suffixOverrides=",">
  92. <if test="productName !=null and productName !='' ">
  93. productName,
  94. </if>
  95. <if test="productId !=null and productId !='' ">
  96. productId,
  97. </if>
  98. <if test="mdmProductCode !=null and mdmProductCode !='' ">
  99. mdmProductCode,
  100. </if>
  101. <if test="price !=null and price !='' ">
  102. price,
  103. </if>
  104. <if test="productType !=null and productType !='' ">
  105. productType,
  106. </if>
  107. <if test="stock !=null and stock !='' ">
  108. stock,
  109. </if>
  110. <if test="productCategory !=null and productCategory !='' ">
  111. productCategory,
  112. </if>
  113. <if test="auditStatus !=null and auditStatus !='' ">
  114. auditStatus,
  115. </if>
  116. <if test="status !=null and status !='' ">
  117. status,
  118. </if>
  119. <if test="creationTime !=null and creationTime !='' ">
  120. creationTime,
  121. </if>
  122. </trim>
  123. <trim prefix=" VALUES (" suffix=")" prefixOverrides="," suffixOverrides=",">
  124. <if test="productName !=null and productName !='' ">
  125. #{productName},
  126. </if>
  127. <if test="productId !=null and productId !='' ">
  128. #{productId},
  129. </if>
  130. <if test="mdmProductCode !=null and mdmProductCode !='' ">
  131. #{mdmProductCode},
  132. </if>
  133. <if test="price !=null and price !='' ">
  134. #{price},
  135. </if>
  136. <if test="productType !=null and productType !='' ">
  137. #{productType},
  138. </if>
  139. <if test="stock !=null and stock !='' ">
  140. #{stock},
  141. </if>
  142. <if test="productCategory !=null and productCategory !='' ">
  143. #{productCategory},
  144. </if>
  145. <if test="auditStatus !=null and auditStatus !='' ">
  146. #{auditStatus},
  147. </if>
  148. <if test="status !=null and status !='' ">
  149. #{status},
  150. </if>
  151. <if test="creationTime !=null and creationTime !='' ">
  152. #{creationTime},
  153. </if>
  154. </trim>
  155. </insert>
  156. </mapper>