SDZLSX_Mapper.xml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- 核三框架升级自动生成mapper文件 -->
  3. <!-- SDZLSX表牵涉到的sql文件 -->
  4. <!DOCTYPE mapper
  5. PUBLIC "-//ibatis.apache.org//DTD Mapper 3.0//EN"
  6. "http://ibatis.apache.org/dtd/ibatis-3-mapper.dtd">
  7. <mapper namespace="SDZLSX">
  8. <!-- SDZLSX 全字段 -->
  9. <sql id="SDZLSX_COL">
  10. ZLLBID,ZLLBDM,ZLMC,ZLYSSX
  11. </sql>
  12. <!-- SDZLSX 选择字段 -->
  13. <sql id="SDZLSX_COLSEL">
  14. <trim suffixOverrides=",">
  15. <if test="ZLLBID != null">
  16. ZLLBID,
  17. </if>
  18. <if test="ZLLBDM != null">
  19. ZLLBDM,
  20. </if>
  21. <if test="ZLMC != null">
  22. ZLMC,
  23. </if>
  24. <if test="ZLYSSX != null">
  25. ZLYSSX
  26. </if>
  27. </trim>
  28. </sql>
  29. <!-- SDZLSX 记录数 -->
  30. <select id="SDZLSX_CNT" parameterType="hashmap" resultType="long">
  31. select count(1)
  32. from SDZLSX
  33. <where>
  34. <if test="ZLLBID != null">
  35. and ZLLBID=#{ZLLBID}
  36. </if>
  37. <if test="ZLLBDM != null">
  38. and ZLLBDM=#{ZLLBDM}
  39. </if>
  40. <if test="ZLMC != null">
  41. and ZLMC=#{ZLMC}
  42. </if>
  43. <if test="ZLYSSX != null">
  44. and ZLYSSX=#{ZLYSSX}
  45. </if>
  46. </where>
  47. </select>
  48. <!-- SDZLSX 全字段查询 -->
  49. <select id="SDZLSX_Q" parameterType="hashmap" resultType="hashmap">
  50. select
  51. <include refid="SDZLSX_COL" /> <!--引用前边定义的所有字段 -->
  52. from SDZLSX
  53. <where>
  54. <if test="ZLLBID != null">
  55. and ZLLBID=#{ZLLBID}
  56. </if>
  57. <if test="ZLLBDM != null">
  58. and ZLLBDM=#{ZLLBDM}
  59. </if>
  60. <if test="ZLMC != null">
  61. and ZLMC=#{ZLMC}
  62. </if>
  63. <if test="ZLYSSX != null">
  64. and ZLYSSX=#{ZLYSSX}
  65. </if>
  66. </where>
  67. </select>
  68. <!-- SDZLSX 选择查询 -->
  69. <select id="SDZLSX_QS" parameterType="hashmap" resultType="hashmap">
  70. select
  71. <include refid="SDZLSX_COLSEL" /> <!--引用前边定义的所有字段 -->
  72. from SDZLSX
  73. <where>
  74. <if test="ZLLBID != null">
  75. and ZLLBID=#{ZLLBID}
  76. </if>
  77. <if test="ZLLBDM != null">
  78. and ZLLBDM=#{ZLLBDM}
  79. </if>
  80. <if test="ZLMC != null">
  81. and ZLMC=#{ZLMC}
  82. </if>
  83. <if test="ZLYSSX != null">
  84. and ZLYSSX=#{ZLYSSX}
  85. </if>
  86. </where>
  87. </select>
  88. <!-- SDZLSX 插入 -->
  89. <insert id="SDZLSX_I" parameterType="hashmap">
  90. insert into SDZLSX (
  91. ZLLBID,ZLLBDM,ZLMC,ZLYSSX
  92. ) values (
  93. #{ZLLBID},#{ZLLBDM},#{ZLMC},#{ZLYSSX}
  94. )
  95. </insert>
  96. <!-- SDZLSX 插入-类型映射 -->
  97. <insert id="SDZLSX_IT" parameterType="hashmap">
  98. insert into SDZLSX (
  99. ZLLBID,ZLLBDM,ZLMC,ZLYSSX
  100. ) values (
  101. #{ZLLBID ,javaType=long,jdbcType=NUMERIC},#{ZLLBDM ,javaType=string,jdbcType=VARCHAR},
  102. #{ZLMC ,javaType=string,jdbcType=VARCHAR},#{ZLYSSX ,javaType=string,jdbcType=VARCHAR}
  103. )
  104. </insert>
  105. <!-- SDZLSX 选择字段插入 -->
  106. <insert id="SDZLSX_IS" parameterType="hashmap">
  107. insert into SDZLSX (
  108. <trim suffixOverrides=",">
  109. <if test="ZLLBID != null">ZLLBID,</if>
  110. <if test="ZLLBDM != null">ZLLBDM,</if>
  111. <if test="ZLMC != null">ZLMC,</if>
  112. <if test="ZLYSSX != null">ZLYSSX,</if>
  113. </trim>
  114. ) values (
  115. <trim suffixOverrides=",">
  116. <if test="ZLLBID != null">#{ZLLBID},</if>
  117. <if test="ZLLBDM != null">#{ZLLBDM},</if>
  118. <if test="ZLMC != null">#{ZLMC},</if>
  119. <if test="ZLYSSX != null">#{ZLYSSX},</if>
  120. </trim>
  121. )
  122. </insert>
  123. <!-- SDZLSX 修改 -->
  124. <update id="SDZLSX_U" parameterType="hashmap">
  125. update SDZLSX
  126. set
  127. ZLLBID= #{ZLLBID},ZLLBDM= #{ZLLBDM},ZLMC= #{ZLMC},
  128. ZLYSSX= #{ZLYSSX}
  129. where
  130. ZLLBID = #{ZLLBID}
  131. </update>
  132. <!-- SDZLSX 选择修改 -->
  133. <update id="SDZLSX_US" parameterType="hashmap">
  134. update SDZLSX
  135. set
  136. <trim suffixOverrides=",">
  137. <if test="ZLLBID != null">ZLLBID=#{ZLLBID},</if>
  138. <if test="ZLLBDM != null">ZLLBDM=#{ZLLBDM},</if>
  139. <if test="ZLMC != null">ZLMC=#{ZLMC},</if>
  140. <if test="ZLYSSX != null">ZLYSSX=#{ZLYSSX},</if>
  141. </trim>
  142. where
  143. ZLLBID = #{ZLLBID}
  144. </update>
  145. <!-- SDZLSX 删除 -->
  146. <delete id="SDZLSX_D" parameterType="hashmap">
  147. delete from SDZLSX
  148. <where>
  149. ZLLBID = #{ZLLBID}
  150. </where>
  151. </delete>
  152. </mapper>