xt_xzqh_SqlMap.xml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358
  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="xt_xzqh" >
  4. <resultMap id="ibatorgenerated_BaseResultMap" class="com.huimv.xt.dataobject.XtXzqh" >
  5. <!--
  6. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  7. This element was generated on Wed May 21 10:29:31 CST 2014.
  8. -->
  9. <result column="ID" property="id" jdbcType="INTEGER" />
  10. <result column="QHBM" property="qhbm" jdbcType="VARCHAR" />
  11. <result column="QHMC" property="qhmc" jdbcType="VARCHAR" />
  12. <result column="QHLX" property="qhlx" jdbcType="VARCHAR" />
  13. <result column="SJQH" property="sjqh" jdbcType="VARCHAR" />
  14. <result column="PYM" property="pym" jdbcType="VARCHAR" />
  15. <result column="WBM" property="wbm" jdbcType="VARCHAR" />
  16. <result column="COORDS" property="coords" jdbcType="VARCHAR" />
  17. <result column="XGR" property="xgr" jdbcType="VARCHAR" />
  18. <result column="XGSJ" property="xgsj" jdbcType="TIMESTAMP" />
  19. <result column="ZFBZ" property="zfbz" jdbcType="INTEGER" />
  20. <result column="CITYCODE" property="citycode" jdbcType="INTEGER" />
  21. </resultMap>
  22. <sql id="ibatorgenerated_Example_Where_Clause" >
  23. <!--
  24. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  25. This element was generated on Wed May 21 10:29:31 CST 2014.
  26. -->
  27. <iterate property="oredCriteria" conjunction="or" prepend="where" removeFirstPrepend="iterate" >
  28. <isEqual property="oredCriteria[].valid" compareValue="true" >
  29. (
  30. <iterate prepend="and" property="oredCriteria[].criteriaWithoutValue" conjunction="and" >
  31. $oredCriteria[].criteriaWithoutValue[]$
  32. </iterate>
  33. <iterate prepend="and" property="oredCriteria[].criteriaWithSingleValue" conjunction="and" >
  34. $oredCriteria[].criteriaWithSingleValue[].condition$
  35. #oredCriteria[].criteriaWithSingleValue[].value#
  36. </iterate>
  37. <iterate prepend="and" property="oredCriteria[].criteriaWithListValue" conjunction="and" >
  38. $oredCriteria[].criteriaWithListValue[].condition$
  39. <iterate property="oredCriteria[].criteriaWithListValue[].values" open="(" close=")" conjunction="," >
  40. #oredCriteria[].criteriaWithListValue[].values[]#
  41. </iterate>
  42. </iterate>
  43. <iterate prepend="and" property="oredCriteria[].criteriaWithBetweenValue" conjunction="and" >
  44. $oredCriteria[].criteriaWithBetweenValue[].condition$
  45. #oredCriteria[].criteriaWithBetweenValue[].values[0]# and
  46. #oredCriteria[].criteriaWithBetweenValue[].values[1]#
  47. </iterate>
  48. )
  49. </isEqual>
  50. </iterate>
  51. </sql>
  52. <select id="ibatorgenerated_selectByExample" resultMap="ibatorgenerated_BaseResultMap" parameterClass="com.huimv.xt.dataobject.XtXzqhExample" >
  53. <!--
  54. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  55. This element was generated on Wed May 21 10:29:31 CST 2014.
  56. -->
  57. select ID, QHBM, QHMC, QHLX, SJQH, PYM, WBM, COORDS, XGR, XGSJ, ZFBZ, CITYCODE
  58. from xt_xzqh
  59. <isParameterPresent >
  60. <include refid="xt_xzqh.ibatorgenerated_Example_Where_Clause" />
  61. <isNotNull property="orderByClause" >
  62. order by $orderByClause$
  63. </isNotNull>
  64. <isGreaterEqual property="start" compareValue="0" >
  65. limit $start$ , $limit$
  66. </isGreaterEqual>
  67. </isParameterPresent>
  68. </select>
  69. <select id="ibatorgenerated_selectByPrimaryKey" resultMap="ibatorgenerated_BaseResultMap" parameterClass="com.huimv.xt.dataobject.XtXzqh" >
  70. <!--
  71. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  72. This element was generated on Wed May 21 10:29:31 CST 2014.
  73. -->
  74. select ID, QHBM, QHMC, QHLX, SJQH, PYM, WBM, COORDS, XGR, XGSJ, ZFBZ, CITYCODE
  75. from xt_xzqh
  76. where ID = #id:INTEGER#
  77. </select>
  78. <select id="select.xzqh.by.qhbm" resultClass="com.huimv.xt.dataobject.XtXzqh" parameterClass="com.huimv.xt.dataobject.XtXzqh" >
  79. select t1.ID, t1.QHBM, t1.QHMC, t1.QHLX, t1.SJQH, t1.PYM, t1.WBM, t1.XGR, t1.XGSJ, t1.ZFBZ, t1.CITYCODE, t2.QHMC SJQHMC
  80. from xt_xzqh t1
  81. left join xt_xzqh t2 on t1.sjqh = t2.qhbm
  82. where t1.QHBM = #qhbm:VARCHAR#
  83. </select>
  84. <delete id="ibatorgenerated_deleteByPrimaryKey" parameterClass="com.huimv.xt.dataobject.XtXzqh" >
  85. <!--
  86. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  87. This element was generated on Wed May 21 10:29:31 CST 2014.
  88. -->
  89. delete from xt_xzqh
  90. where ID = #id:INTEGER#
  91. </delete>
  92. <delete id="ibatorgenerated_deleteByExample" parameterClass="com.huimv.xt.dataobject.XtXzqhExample" >
  93. <!--
  94. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  95. This element was generated on Wed May 21 10:29:31 CST 2014.
  96. -->
  97. delete from xt_xzqh
  98. <include refid="xt_xzqh.ibatorgenerated_Example_Where_Clause" />
  99. </delete>
  100. <insert id="ibatorgenerated_insert" parameterClass="com.huimv.xt.dataobject.XtXzqh" >
  101. <!--
  102. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  103. This element was generated on Wed May 21 10:29:31 CST 2014.
  104. -->
  105. insert into xt_xzqh (ID, QHBM, QHMC, QHLX, SJQH, PYM, WBM, COORDS, XGR, XGSJ, ZFBZ, CITYCODE)
  106. values (#id:INTEGER#, #qhbm:VARCHAR#, #qhmc:VARCHAR#, #qhlx:VARCHAR#, #sjqh:VARCHAR#,
  107. #pym:VARCHAR#, #wbm:VARCHAR#, #coords:VARCHAR#, #xgr:VARCHAR#, #xgsj:TIMESTAMP#,
  108. #zfbz:INTEGER#, #citycode:INTEGER#)
  109. </insert>
  110. <insert id="ibatorgenerated_insertSelective" parameterClass="com.huimv.xt.dataobject.XtXzqh" >
  111. <!--
  112. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  113. This element was generated on Wed May 21 10:29:31 CST 2014.
  114. -->
  115. insert into xt_xzqh
  116. <dynamic prepend="(" >
  117. <isNotNull prepend="," property="id" >
  118. ID
  119. </isNotNull>
  120. <isNotNull prepend="," property="qhbm" >
  121. QHBM
  122. </isNotNull>
  123. <isNotNull prepend="," property="qhmc" >
  124. QHMC
  125. </isNotNull>
  126. <isNotNull prepend="," property="qhlx" >
  127. QHLX
  128. </isNotNull>
  129. <isNotNull prepend="," property="sjqh" >
  130. SJQH
  131. </isNotNull>
  132. <isNotNull prepend="," property="pym" >
  133. PYM
  134. </isNotNull>
  135. <isNotNull prepend="," property="wbm" >
  136. WBM
  137. </isNotNull>
  138. <isNotNull prepend="," property="coords" >
  139. COORDS
  140. </isNotNull>
  141. <isNotNull prepend="," property="xgr" >
  142. XGR
  143. </isNotNull>
  144. <isNotNull prepend="," property="xgsj" >
  145. XGSJ
  146. </isNotNull>
  147. <isNotNull prepend="," property="zfbz" >
  148. ZFBZ
  149. </isNotNull>
  150. <isNotNull prepend="," property="citycode" >
  151. CITYCODE
  152. </isNotNull>
  153. )
  154. </dynamic>
  155. values
  156. <dynamic prepend="(" >
  157. <isNotNull prepend="," property="id" >
  158. #id:INTEGER#
  159. </isNotNull>
  160. <isNotNull prepend="," property="qhbm" >
  161. #qhbm:VARCHAR#
  162. </isNotNull>
  163. <isNotNull prepend="," property="qhmc" >
  164. #qhmc:VARCHAR#
  165. </isNotNull>
  166. <isNotNull prepend="," property="qhlx" >
  167. #qhlx:VARCHAR#
  168. </isNotNull>
  169. <isNotNull prepend="," property="sjqh" >
  170. #sjqh:VARCHAR#
  171. </isNotNull>
  172. <isNotNull prepend="," property="pym" >
  173. #pym:VARCHAR#
  174. </isNotNull>
  175. <isNotNull prepend="," property="wbm" >
  176. #wbm:VARCHAR#
  177. </isNotNull>
  178. <isNotNull prepend="," property="coords" >
  179. #coords:VARCHAR#
  180. </isNotNull>
  181. <isNotNull prepend="," property="xgr" >
  182. #xgr:VARCHAR#
  183. </isNotNull>
  184. <isNotNull prepend="," property="xgsj" >
  185. #xgsj:TIMESTAMP#
  186. </isNotNull>
  187. <isNotNull prepend="," property="zfbz" >
  188. #zfbz:INTEGER#
  189. </isNotNull>
  190. <isNotNull prepend="," property="citycode" >
  191. #citycode:INTEGER#
  192. </isNotNull>
  193. )
  194. </dynamic>
  195. </insert>
  196. <select id="ibatorgenerated_countByExample" parameterClass="com.huimv.xt.dataobject.XtXzqhExample" resultClass="java.lang.Integer" >
  197. <!--
  198. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  199. This element was generated on Wed May 21 10:29:31 CST 2014.
  200. -->
  201. select count(*) from xt_xzqh
  202. <include refid="xt_xzqh.ibatorgenerated_Example_Where_Clause" />
  203. </select>
  204. <update id="ibatorgenerated_updateByExampleSelective" >
  205. <!--
  206. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  207. This element was generated on Wed May 21 10:29:31 CST 2014.
  208. -->
  209. update xt_xzqh
  210. <dynamic prepend="set" >
  211. <isNotNull prepend="," property="record.id" >
  212. ID = #record.id:INTEGER#
  213. </isNotNull>
  214. <isNotNull prepend="," property="record.qhbm" >
  215. QHBM = #record.qhbm:VARCHAR#
  216. </isNotNull>
  217. <isNotNull prepend="," property="record.qhmc" >
  218. QHMC = #record.qhmc:VARCHAR#
  219. </isNotNull>
  220. <isNotNull prepend="," property="record.qhlx" >
  221. QHLX = #record.qhlx:VARCHAR#
  222. </isNotNull>
  223. <isNotNull prepend="," property="record.sjqh" >
  224. SJQH = #record.sjqh:VARCHAR#
  225. </isNotNull>
  226. <isNotNull prepend="," property="record.pym" >
  227. PYM = #record.pym:VARCHAR#
  228. </isNotNull>
  229. <isNotNull prepend="," property="record.wbm" >
  230. WBM = #record.wbm:VARCHAR#
  231. </isNotNull>
  232. <isNotNull prepend="," property="record.coords" >
  233. COORDS = #record.coords:VARCHAR#
  234. </isNotNull>
  235. <isNotNull prepend="," property="record.xgr" >
  236. XGR = #record.xgr:VARCHAR#
  237. </isNotNull>
  238. <isNotNull prepend="," property="record.xgsj" >
  239. XGSJ = #record.xgsj:TIMESTAMP#
  240. </isNotNull>
  241. <isNotNull prepend="," property="record.zfbz" >
  242. ZFBZ = #record.zfbz:INTEGER#
  243. </isNotNull>
  244. <isNotNull prepend="," property="record.citycode" >
  245. CITYCODE = #record.citycode:INTEGER#
  246. </isNotNull>
  247. </dynamic>
  248. <isParameterPresent >
  249. <include refid="xt_xzqh.ibatorgenerated_Example_Where_Clause" />
  250. </isParameterPresent>
  251. </update>
  252. <update id="ibatorgenerated_updateByExample" >
  253. <!--
  254. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  255. This element was generated on Wed May 21 10:29:31 CST 2014.
  256. -->
  257. update xt_xzqh
  258. set ID = #record.id:INTEGER#,
  259. QHBM = #record.qhbm:VARCHAR#,
  260. QHMC = #record.qhmc:VARCHAR#,
  261. QHLX = #record.qhlx:VARCHAR#,
  262. SJQH = #record.sjqh:VARCHAR#,
  263. PYM = #record.pym:VARCHAR#,
  264. WBM = #record.wbm:VARCHAR#,
  265. COORDS = #record.coords:VARCHAR#,
  266. XGR = #record.xgr:VARCHAR#,
  267. XGSJ = #record.xgsj:TIMESTAMP#,
  268. ZFBZ = #record.zfbz:INTEGER#,
  269. CITYCODE = #record.citycode:INTEGER#
  270. <isParameterPresent >
  271. <include refid="xt_xzqh.ibatorgenerated_Example_Where_Clause" />
  272. </isParameterPresent>
  273. </update>
  274. <update id="ibatorgenerated_updateByPrimaryKeySelective" parameterClass="com.huimv.xt.dataobject.XtXzqh" >
  275. <!--
  276. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  277. This element was generated on Wed May 21 10:29:31 CST 2014.
  278. -->
  279. update xt_xzqh
  280. <dynamic prepend="set" >
  281. <isNotNull prepend="," property="qhbm" >
  282. QHBM = #qhbm:VARCHAR#
  283. </isNotNull>
  284. <isNotNull prepend="," property="qhmc" >
  285. QHMC = #qhmc:VARCHAR#
  286. </isNotNull>
  287. <isNotNull prepend="," property="qhlx" >
  288. QHLX = #qhlx:VARCHAR#
  289. </isNotNull>
  290. <isNotNull prepend="," property="sjqh" >
  291. SJQH = #sjqh:VARCHAR#
  292. </isNotNull>
  293. <isNotNull prepend="," property="pym" >
  294. PYM = #pym:VARCHAR#
  295. </isNotNull>
  296. <isNotNull prepend="," property="wbm" >
  297. WBM = #wbm:VARCHAR#
  298. </isNotNull>
  299. <isNotNull prepend="," property="coords" >
  300. COORDS = #coords:VARCHAR#
  301. </isNotNull>
  302. <isNotNull prepend="," property="xgr" >
  303. XGR = #xgr:VARCHAR#
  304. </isNotNull>
  305. <isNotNull prepend="," property="xgsj" >
  306. XGSJ = #xgsj:TIMESTAMP#
  307. </isNotNull>
  308. <isNotNull prepend="," property="zfbz" >
  309. ZFBZ = #zfbz:INTEGER#
  310. </isNotNull>
  311. <isNotNull prepend="," property="citycode" >
  312. CITYCODE = #citycode:INTEGER#
  313. </isNotNull>
  314. </dynamic>
  315. where ID = #id:INTEGER#
  316. </update>
  317. <update id="ibatorgenerated_updateByPrimaryKey" parameterClass="com.huimv.xt.dataobject.XtXzqh" >
  318. <!--
  319. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  320. This element was generated on Wed May 21 10:29:31 CST 2014.
  321. -->
  322. update xt_xzqh
  323. set QHBM = #qhbm:VARCHAR#,
  324. QHMC = #qhmc:VARCHAR#,
  325. QHLX = #qhlx:VARCHAR#,
  326. SJQH = #sjqh:VARCHAR#,
  327. PYM = #pym:VARCHAR#,
  328. WBM = #wbm:VARCHAR#,
  329. COORDS = #coords:VARCHAR#,
  330. XGR = #xgr:VARCHAR#,
  331. XGSJ = #xgsj:TIMESTAMP#,
  332. ZFBZ = #zfbz:INTEGER#,
  333. CITYCODE = #citycode:INTEGER#
  334. where ID = #id:INTEGER#
  335. </update>
  336. <!-- 行政区划输入器 -->
  337. <select id="srq.select.xzqh.by.param" parameterClass="java.util.Map" resultClass="com.huimv.xt.dataobject.XtXzqh">
  338. select t1.*, t2.qhmc sjqhmc from xt_xzqh t1
  339. left join xt_xzqh t2 on t1.sjqh = t2.qhbm and t2.zfbz = 0
  340. where t1.zfbz = 0
  341. <isNotEmpty prepend="and" property="searchValue">
  342. ($srfsName$ like concat(#searchValue#, '%') or t1.qhmc like concat('%', #searchValue#, '%'))
  343. </isNotEmpty>
  344. <isNotEmpty prepend="and" property="qhbmsql">
  345. $qhbmsql$
  346. </isNotEmpty>
  347. order by t1.qhmc asc
  348. </select>
  349. <select id="xzqh.get.max.qhbm" parameterClass="java.util.Map" resultClass="java.lang.Long">
  350. select ifnull(max(qhbm), 0) as maxqhbm
  351. from xt_xzqh
  352. where zfbz = 0
  353. and qhlx = #qhlx#
  354. and sjqh = #sjqh#
  355. </select>
  356. </sqlMap>