YWLBZCXX_Mapper.xml 4.2 KB

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