PLATFORM_SqlMap.xml 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd" >
  3. <sqlMap namespace="platform" >
  4. <!-- 警告 - 以下的SQLMap配置文件由系统自动生成,请勿修改,否则系统重新生成后将会覆盖。-->
  5. <cacheModel id="platform_CACHE" type="EHCACHE" >
  6. <property name="reference-type" value="WEAK" />
  7. <flushInterval hours="1" />
  8. <flushOnExecute statement="platform.insertSelective" />
  9. <flushOnExecute statement="platform.insert" />
  10. <flushOnExecute statement="platform.updateByExampleSelective" />
  11. <flushOnExecute statement="platform.updateByExample" />
  12. <flushOnExecute statement="platform.updateByPrimaryKeySelective" />
  13. <flushOnExecute statement="platform.updateByPrimaryKey" />
  14. <flushOnExecute statement="platform.deleteByExample" />
  15. <flushOnExecute statement="platform.deleteByPrimaryKey" />
  16. </cacheModel>
  17. <sql id="platform.oracle_Pagination_Head" >
  18. <dynamic >
  19. <isNotEmpty property="startOffSet" >
  20. <isNotEmpty property="pageSize" >
  21. <![CDATA[]]>
  22. </isNotEmpty>
  23. </isNotEmpty>
  24. </dynamic>
  25. </sql>
  26. <sql id="platform.oracle_Pagination_Tail" >
  27. <dynamic >
  28. <isNotEmpty property="startOffSet" >
  29. <isNotEmpty property="pageSize" >
  30. <![CDATA[ limit #pageSize# offset #startOffSet# ]]>
  31. </isNotEmpty>
  32. </isNotEmpty>
  33. </dynamic>
  34. </sql>
  35. <resultMap id="BaseResultMap" class="com.miniframe.system.model.Platform" >
  36. <result column="id" property="id" jdbcType="VARCHAR" />
  37. <result column="name" property="name" jdbcType="VARCHAR" />
  38. <result column="platformid" property="platformid" jdbcType="VARCHAR" />
  39. <result column="remarks" property="remarks" jdbcType="VARCHAR" />
  40. <result column="account" property="account" jdbcType="VARCHAR" />
  41. <result column="total" property="total" jdbcType="BIGINT" />
  42. <result column="used" property="used" jdbcType="BIGINT" />
  43. </resultMap>
  44. <sql id="platform.Example_Where_Clause" >
  45. <iterate property="oredCriteria" conjunction="or" prepend="where" removeFirstPrepend="iterate" >
  46. <isEqual property="oredCriteria[].valid" compareValue="true" >
  47. (
  48. <iterate prepend="and" property="oredCriteria[].criteriaWithoutValue" conjunction="and" >
  49. $oredCriteria[].criteriaWithoutValue[]$
  50. </iterate>
  51. <iterate prepend="and" property="oredCriteria[].criteriaWithSingleValue" conjunction="and" >
  52. $oredCriteria[].criteriaWithSingleValue[].condition$ #oredCriteria[].criteriaWithSingleValue[].value#
  53. </iterate>
  54. <iterate prepend="and" property="oredCriteria[].criteriaWithListValue" conjunction="and" >
  55. $oredCriteria[].criteriaWithListValue[].condition$
  56. <iterate property="oredCriteria[].criteriaWithListValue[].values" open="(" close=")" conjunction="," >
  57. #oredCriteria[].criteriaWithListValue[].values[]#
  58. </iterate>
  59. </iterate>
  60. <iterate prepend="and" property="oredCriteria[].criteriaWithBetweenValue" conjunction="and" >
  61. $oredCriteria[].criteriaWithBetweenValue[].condition$
  62. #oredCriteria[].criteriaWithBetweenValue[].values[0]# and
  63. #oredCriteria[].criteriaWithBetweenValue[].values[1]#
  64. </iterate>
  65. )
  66. </isEqual>
  67. </iterate>
  68. </sql>
  69. <sql id="platform.Base_Column_List" >
  70. id, name, platformid, remarks, account, total, used
  71. </sql>
  72. <select id="platform.selectByExample" resultMap="BaseResultMap" parameterClass="com.miniframe.system.model.PlatformSQLBuilder" cacheModel="platform_CACHE" >
  73. <include refid="platform.oracle_Pagination_Head" />
  74. select
  75. <isParameterPresent >
  76. <isEqual property="distinct" compareValue="true" >
  77. distinct
  78. </isEqual>
  79. </isParameterPresent>
  80. <include refid="platform.Base_Column_List" />
  81. from platform
  82. <isParameterPresent >
  83. <include refid="platform.Example_Where_Clause" />
  84. <isNotNull property="orderByClause" >
  85. order by $orderByClause$
  86. </isNotNull>
  87. </isParameterPresent>
  88. <isParameterPresent >
  89. <isEqual property="forUpdate" compareValue="true" >
  90. for update
  91. </isEqual>
  92. </isParameterPresent>
  93. <isParameterPresent >
  94. <isEqual property="NoWait" compareValue="true" >
  95. nowait
  96. </isEqual>
  97. </isParameterPresent>
  98. <include refid="platform.oracle_Pagination_Tail" />
  99. </select>
  100. <select id="platform.selectByPrimaryKey" resultMap="BaseResultMap" parameterClass="com.miniframe.system.model.Platform" cacheModel="platform_CACHE" >
  101. select
  102. <include refid="platform.Base_Column_List" />
  103. from platform
  104. where id = #id#
  105. </select>
  106. <delete id="platform.deleteByPrimaryKey" parameterClass="com.miniframe.system.model.Platform" >
  107. delete from platform
  108. where id = #id#
  109. </delete>
  110. <delete id="platform.deleteByExample" parameterClass="com.miniframe.system.model.PlatformSQLBuilder" >
  111. delete from platform
  112. <include refid="platform.Example_Where_Clause" />
  113. </delete>
  114. <insert id="platform.insert" parameterClass="com.miniframe.system.model.Platform" >
  115. insert into platform (id, name, platformid, remarks, account, total, used)
  116. values (#id#, #name#, #platformid#, #remarks#, #account#, #total#, #used#)
  117. </insert>
  118. <insert id="platform.insertSelective" parameterClass="com.miniframe.system.model.Platform" >
  119. insert into platform
  120. <dynamic prepend="(" >
  121. <isNotNull prepend="," property="id" >
  122. id
  123. </isNotNull>
  124. <isNotNull prepend="," property="name" >
  125. name
  126. </isNotNull>
  127. <isNotNull prepend="," property="platformid" >
  128. platformid
  129. </isNotNull>
  130. <isNotNull prepend="," property="remarks" >
  131. remarks
  132. </isNotNull>
  133. <isNotNull prepend="," property="account" >
  134. account
  135. </isNotNull>
  136. <isNotNull prepend="," property="total" >
  137. total
  138. </isNotNull>
  139. <isNotNull prepend="," property="used" >
  140. used
  141. </isNotNull>
  142. )
  143. </dynamic>
  144. values
  145. <dynamic prepend="(" >
  146. <isNotNull prepend="," property="id" >
  147. #id#
  148. </isNotNull>
  149. <isNotNull prepend="," property="name" >
  150. #name#
  151. </isNotNull>
  152. <isNotNull prepend="," property="platformid" >
  153. #platformid#
  154. </isNotNull>
  155. <isNotNull prepend="," property="remarks" >
  156. #remarks#
  157. </isNotNull>
  158. <isNotNull prepend="," property="account" >
  159. #account#
  160. </isNotNull>
  161. <isNotNull prepend="," property="total" >
  162. #total#
  163. </isNotNull>
  164. <isNotNull prepend="," property="used" >
  165. #used#
  166. </isNotNull>
  167. )
  168. </dynamic>
  169. </insert>
  170. <select id="platform.countByExample" parameterClass="com.miniframe.system.model.PlatformSQLBuilder" resultClass="java.lang.Integer" cacheModel="platform_CACHE" >
  171. select count(*) from platform
  172. <include refid="platform.Example_Where_Clause" />
  173. </select>
  174. <update id="platform.updateByExampleSelective" >
  175. update platform
  176. <dynamic prepend="set" >
  177. <isNotNull prepend="," property="record.id" >
  178. id = #record.id#
  179. </isNotNull>
  180. <isNotNull prepend="," property="record.name" >
  181. name = #record.name#
  182. </isNotNull>
  183. <isNotNull prepend="," property="record.platformid" >
  184. platformid = #record.platformid#
  185. </isNotNull>
  186. <isNotNull prepend="," property="record.remarks" >
  187. remarks = #record.remarks#
  188. </isNotNull>
  189. <isNotNull prepend="," property="record.account" >
  190. account = #record.account#
  191. </isNotNull>
  192. <isNotNull prepend="," property="record.total" >
  193. total = #record.total#
  194. </isNotNull>
  195. <isNotNull prepend="," property="record.used" >
  196. used = #record.used#
  197. </isNotNull>
  198. </dynamic>
  199. <isParameterPresent >
  200. <include refid="platform.Example_Where_Clause" />
  201. </isParameterPresent>
  202. </update>
  203. <update id="platform.updateByExample" >
  204. update platform
  205. set id = #record.id#,
  206. name = #record.name#,
  207. platformid = #record.platformid#,
  208. remarks = #record.remarks#,
  209. account = #record.account#,
  210. total = #record.total#,
  211. used = #record.used#
  212. <isParameterPresent >
  213. <include refid="platform.Example_Where_Clause" />
  214. </isParameterPresent>
  215. </update>
  216. <update id="platform.updateByPrimaryKeySelective" parameterClass="com.miniframe.system.model.Platform" >
  217. update platform
  218. <dynamic prepend="set" >
  219. <isNotNull prepend="," property="name" >
  220. name = #name#
  221. </isNotNull>
  222. <isNotNull prepend="," property="platformid" >
  223. platformid = #platformid#
  224. </isNotNull>
  225. <isNotNull prepend="," property="remarks" >
  226. remarks = #remarks#
  227. </isNotNull>
  228. <isNotNull prepend="," property="account" >
  229. account = #account#
  230. </isNotNull>
  231. <isNotNull prepend="," property="total" >
  232. total = #total#
  233. </isNotNull>
  234. <isNotNull prepend="," property="used" >
  235. used = #used#
  236. </isNotNull>
  237. </dynamic>
  238. where id = #id#
  239. </update>
  240. <update id="platform.updateByPrimaryKey" parameterClass="com.miniframe.system.model.Platform" >
  241. update platform
  242. set name = #name#,
  243. platformid = #platformid#,
  244. remarks = #remarks#,
  245. account = #account#,
  246. total = #total#,
  247. used = #used#
  248. where id = #id#
  249. </update>
  250. </sqlMap>