xx_gttsjl_SqlMap.xml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  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="xx_gttsjl" >
  4. <resultMap id="ibatorgenerated_BaseResultMap" class="com.huimv.xx.dataobject.XxGttsjl" >
  5. <!--
  6. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  7. This element was generated on Fri Mar 18 11:07:01 CST 2016.
  8. -->
  9. <result column="id" property="id" jdbcType="INTEGER" />
  10. <result column="xxid" property="xxid" jdbcType="INTEGER" />
  11. <result column="taskid" property="taskid" jdbcType="VARCHAR" />
  12. <result column="tsfs" property="tsfs" jdbcType="INTEGER" />
  13. <result column="fsxxmc" property="fsxxmc" jdbcType="VARCHAR" />
  14. <result column="zxyhtotal" property="zxyhtotal" jdbcType="INTEGER" />
  15. <result column="lxyhtotal" property="lxyhtotal" jdbcType="INTEGER" />
  16. <result column="msgtotal" property="msgtotal" jdbcType="INTEGER" />
  17. <result column="msgprocess" property="msgprocess" jdbcType="INTEGER" />
  18. <result column="clicknum" property="clicknum" jdbcType="INTEGER" />
  19. <result column="content" property="content" jdbcType="VARCHAR" />
  20. <result column="fssj" property="fssj" jdbcType="TIMESTAMP" />
  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 Fri Mar 18 11:07:01 CST 2016.
  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.xx.dataobject.XxGttsjlExample" >
  53. <!--
  54. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  55. This element was generated on Fri Mar 18 11:07:01 CST 2016.
  56. -->
  57. select id, xxid, taskid, tsfs, fsxxmc, zxyhtotal, lxyhtotal, msgtotal, msgprocess, clicknum,
  58. content, fssj
  59. from xx_gttsjl
  60. <isParameterPresent >
  61. <include refid="xx_gttsjl.ibatorgenerated_Example_Where_Clause" />
  62. <isNotNull property="orderByClause" >
  63. order by $orderByClause$
  64. </isNotNull>
  65. <isGreaterEqual property="start" compareValue="0" >
  66. limit $start$ , $limit$
  67. </isGreaterEqual>
  68. </isParameterPresent>
  69. </select>
  70. <select id="ibatorgenerated_selectByPrimaryKey" resultMap="ibatorgenerated_BaseResultMap" parameterClass="com.huimv.xx.dataobject.XxGttsjl" >
  71. <!--
  72. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  73. This element was generated on Fri Mar 18 11:07:01 CST 2016.
  74. -->
  75. select id, xxid, taskid, tsfs, fsxxmc, zxyhtotal, lxyhtotal, msgtotal, msgprocess, clicknum,
  76. content, fssj
  77. from xx_gttsjl
  78. where id = #id:INTEGER#
  79. </select>
  80. <delete id="ibatorgenerated_deleteByPrimaryKey" parameterClass="com.huimv.xx.dataobject.XxGttsjl" >
  81. <!--
  82. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  83. This element was generated on Fri Mar 18 11:07:01 CST 2016.
  84. -->
  85. delete from xx_gttsjl
  86. where id = #id:INTEGER#
  87. </delete>
  88. <delete id="ibatorgenerated_deleteByExample" parameterClass="com.huimv.xx.dataobject.XxGttsjlExample" >
  89. <!--
  90. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  91. This element was generated on Fri Mar 18 11:07:01 CST 2016.
  92. -->
  93. delete from xx_gttsjl
  94. <include refid="xx_gttsjl.ibatorgenerated_Example_Where_Clause" />
  95. </delete>
  96. <insert id="ibatorgenerated_insert" parameterClass="com.huimv.xx.dataobject.XxGttsjl" >
  97. <!--
  98. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  99. This element was generated on Fri Mar 18 11:07:01 CST 2016.
  100. -->
  101. insert into xx_gttsjl (id, xxid, taskid, tsfs, fsxxmc, zxyhtotal, lxyhtotal, msgtotal,
  102. msgprocess, clicknum, content, fssj)
  103. values (#id:INTEGER#, #xxid:INTEGER#, #taskid:VARCHAR#, #tsfs:INTEGER#, #fsxxmc:VARCHAR#,
  104. #zxyhtotal:INTEGER#, #lxyhtotal:INTEGER#, #msgtotal:INTEGER#, #msgprocess:INTEGER#,
  105. #clicknum:INTEGER#, #content:VARCHAR#, #fssj:TIMESTAMP#)
  106. </insert>
  107. <insert id="ibatorgenerated_insertSelective" parameterClass="com.huimv.xx.dataobject.XxGttsjl" >
  108. <!--
  109. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  110. This element was generated on Fri Mar 18 11:07:01 CST 2016.
  111. -->
  112. insert into xx_gttsjl
  113. <dynamic prepend="(" >
  114. <isNotNull prepend="," property="id" >
  115. id
  116. </isNotNull>
  117. <isNotNull prepend="," property="xxid" >
  118. xxid
  119. </isNotNull>
  120. <isNotNull prepend="," property="taskid" >
  121. taskid
  122. </isNotNull>
  123. <isNotNull prepend="," property="tsfs" >
  124. tsfs
  125. </isNotNull>
  126. <isNotNull prepend="," property="fsxxmc" >
  127. fsxxmc
  128. </isNotNull>
  129. <isNotNull prepend="," property="zxyhtotal" >
  130. zxyhtotal
  131. </isNotNull>
  132. <isNotNull prepend="," property="lxyhtotal" >
  133. lxyhtotal
  134. </isNotNull>
  135. <isNotNull prepend="," property="msgtotal" >
  136. msgtotal
  137. </isNotNull>
  138. <isNotNull prepend="," property="msgprocess" >
  139. msgprocess
  140. </isNotNull>
  141. <isNotNull prepend="," property="clicknum" >
  142. clicknum
  143. </isNotNull>
  144. <isNotNull prepend="," property="content" >
  145. content
  146. </isNotNull>
  147. <isNotNull prepend="," property="fssj" >
  148. fssj
  149. </isNotNull>
  150. )
  151. </dynamic>
  152. values
  153. <dynamic prepend="(" >
  154. <isNotNull prepend="," property="id" >
  155. #id:INTEGER#
  156. </isNotNull>
  157. <isNotNull prepend="," property="xxid" >
  158. #xxid:INTEGER#
  159. </isNotNull>
  160. <isNotNull prepend="," property="taskid" >
  161. #taskid:VARCHAR#
  162. </isNotNull>
  163. <isNotNull prepend="," property="tsfs" >
  164. #tsfs:INTEGER#
  165. </isNotNull>
  166. <isNotNull prepend="," property="fsxxmc" >
  167. #fsxxmc:VARCHAR#
  168. </isNotNull>
  169. <isNotNull prepend="," property="zxyhtotal" >
  170. #zxyhtotal:INTEGER#
  171. </isNotNull>
  172. <isNotNull prepend="," property="lxyhtotal" >
  173. #lxyhtotal:INTEGER#
  174. </isNotNull>
  175. <isNotNull prepend="," property="msgtotal" >
  176. #msgtotal:INTEGER#
  177. </isNotNull>
  178. <isNotNull prepend="," property="msgprocess" >
  179. #msgprocess:INTEGER#
  180. </isNotNull>
  181. <isNotNull prepend="," property="clicknum" >
  182. #clicknum:INTEGER#
  183. </isNotNull>
  184. <isNotNull prepend="," property="content" >
  185. #content:VARCHAR#
  186. </isNotNull>
  187. <isNotNull prepend="," property="fssj" >
  188. #fssj:TIMESTAMP#
  189. </isNotNull>
  190. )
  191. </dynamic>
  192. </insert>
  193. <select id="ibatorgenerated_countByExample" parameterClass="com.huimv.xx.dataobject.XxGttsjlExample" resultClass="java.lang.Integer" >
  194. <!--
  195. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  196. This element was generated on Fri Mar 18 11:07:01 CST 2016.
  197. -->
  198. select count(*) from xx_gttsjl
  199. <include refid="xx_gttsjl.ibatorgenerated_Example_Where_Clause" />
  200. </select>
  201. <update id="ibatorgenerated_updateByExampleSelective" >
  202. <!--
  203. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  204. This element was generated on Fri Mar 18 11:07:01 CST 2016.
  205. -->
  206. update xx_gttsjl
  207. <dynamic prepend="set" >
  208. <isNotNull prepend="," property="record.id" >
  209. id = #record.id:INTEGER#
  210. </isNotNull>
  211. <isNotNull prepend="," property="record.xxid" >
  212. xxid = #record.xxid:INTEGER#
  213. </isNotNull>
  214. <isNotNull prepend="," property="record.taskid" >
  215. taskid = #record.taskid:VARCHAR#
  216. </isNotNull>
  217. <isNotNull prepend="," property="record.tsfs" >
  218. tsfs = #record.tsfs:INTEGER#
  219. </isNotNull>
  220. <isNotNull prepend="," property="record.fsxxmc" >
  221. fsxxmc = #record.fsxxmc:VARCHAR#
  222. </isNotNull>
  223. <isNotNull prepend="," property="record.zxyhtotal" >
  224. zxyhtotal = #record.zxyhtotal:INTEGER#
  225. </isNotNull>
  226. <isNotNull prepend="," property="record.lxyhtotal" >
  227. lxyhtotal = #record.lxyhtotal:INTEGER#
  228. </isNotNull>
  229. <isNotNull prepend="," property="record.msgtotal" >
  230. msgtotal = #record.msgtotal:INTEGER#
  231. </isNotNull>
  232. <isNotNull prepend="," property="record.msgprocess" >
  233. msgprocess = #record.msgprocess:INTEGER#
  234. </isNotNull>
  235. <isNotNull prepend="," property="record.clicknum" >
  236. clicknum = #record.clicknum:INTEGER#
  237. </isNotNull>
  238. <isNotNull prepend="," property="record.content" >
  239. content = #record.content:VARCHAR#
  240. </isNotNull>
  241. <isNotNull prepend="," property="record.fssj" >
  242. fssj = #record.fssj:TIMESTAMP#
  243. </isNotNull>
  244. </dynamic>
  245. <isParameterPresent >
  246. <include refid="xx_gttsjl.ibatorgenerated_Example_Where_Clause" />
  247. </isParameterPresent>
  248. </update>
  249. <update id="ibatorgenerated_updateByExample" >
  250. <!--
  251. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  252. This element was generated on Fri Mar 18 11:07:01 CST 2016.
  253. -->
  254. update xx_gttsjl
  255. set id = #record.id:INTEGER#,
  256. xxid = #record.xxid:INTEGER#,
  257. taskid = #record.taskid:VARCHAR#,
  258. tsfs = #record.tsfs:INTEGER#,
  259. fsxxmc = #record.fsxxmc:VARCHAR#,
  260. zxyhtotal = #record.zxyhtotal:INTEGER#,
  261. lxyhtotal = #record.lxyhtotal:INTEGER#,
  262. msgtotal = #record.msgtotal:INTEGER#,
  263. msgprocess = #record.msgprocess:INTEGER#,
  264. clicknum = #record.clicknum:INTEGER#,
  265. content = #record.content:VARCHAR#,
  266. fssj = #record.fssj:TIMESTAMP#
  267. <isParameterPresent >
  268. <include refid="xx_gttsjl.ibatorgenerated_Example_Where_Clause" />
  269. </isParameterPresent>
  270. </update>
  271. <update id="ibatorgenerated_updateByPrimaryKeySelective" parameterClass="com.huimv.xx.dataobject.XxGttsjl" >
  272. <!--
  273. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  274. This element was generated on Fri Mar 18 11:07:01 CST 2016.
  275. -->
  276. update xx_gttsjl
  277. <dynamic prepend="set" >
  278. <isNotNull prepend="," property="xxid" >
  279. xxid = #xxid:INTEGER#
  280. </isNotNull>
  281. <isNotNull prepend="," property="taskid" >
  282. taskid = #taskid:VARCHAR#
  283. </isNotNull>
  284. <isNotNull prepend="," property="tsfs" >
  285. tsfs = #tsfs:INTEGER#
  286. </isNotNull>
  287. <isNotNull prepend="," property="fsxxmc" >
  288. fsxxmc = #fsxxmc:VARCHAR#
  289. </isNotNull>
  290. <isNotNull prepend="," property="zxyhtotal" >
  291. zxyhtotal = #zxyhtotal:INTEGER#
  292. </isNotNull>
  293. <isNotNull prepend="," property="lxyhtotal" >
  294. lxyhtotal = #lxyhtotal:INTEGER#
  295. </isNotNull>
  296. <isNotNull prepend="," property="msgtotal" >
  297. msgtotal = #msgtotal:INTEGER#
  298. </isNotNull>
  299. <isNotNull prepend="," property="msgprocess" >
  300. msgprocess = #msgprocess:INTEGER#
  301. </isNotNull>
  302. <isNotNull prepend="," property="clicknum" >
  303. clicknum = #clicknum:INTEGER#
  304. </isNotNull>
  305. <isNotNull prepend="," property="content" >
  306. content = #content:VARCHAR#
  307. </isNotNull>
  308. <isNotNull prepend="," property="fssj" >
  309. fssj = #fssj:TIMESTAMP#
  310. </isNotNull>
  311. </dynamic>
  312. where id = #id:INTEGER#
  313. </update>
  314. <update id="ibatorgenerated_updateByPrimaryKey" parameterClass="com.huimv.xx.dataobject.XxGttsjl" >
  315. <!--
  316. WARNING - This element is automatically generated by Apache iBATIS ibator, do not modify.
  317. This element was generated on Fri Mar 18 11:07:01 CST 2016.
  318. -->
  319. update xx_gttsjl
  320. set xxid = #xxid:INTEGER#,
  321. taskid = #taskid:VARCHAR#,
  322. tsfs = #tsfs:INTEGER#,
  323. fsxxmc = #fsxxmc:VARCHAR#,
  324. zxyhtotal = #zxyhtotal:INTEGER#,
  325. lxyhtotal = #lxyhtotal:INTEGER#,
  326. msgtotal = #msgtotal:INTEGER#,
  327. msgprocess = #msgprocess:INTEGER#,
  328. clicknum = #clicknum:INTEGER#,
  329. content = #content:VARCHAR#,
  330. fssj = #fssj:TIMESTAMP#
  331. where id = #id:INTEGER#
  332. </update>
  333. <select id="count.gtts.by.param" parameterClass="java.util.HashMap" resultClass="java.lang.Integer">
  334. select count(1) from xx_gttsjl gt where
  335. (gt.clicknum <![CDATA[<]]> 1 or gt.clicknum is null) and EXISTS
  336. (select 1 from xx_xxts ts where ts.id = gt.xxid and exists
  337. (select 1 from da_mcda mc where ts.mcid = mc.id
  338. <isNotNull prepend="and" property="mcid">
  339. mc.id = #mcid#
  340. </isNotNull>
  341. <isNotNull prepend="and" property="qyid">
  342. mc.qyid = #qyid#
  343. </isNotNull>
  344. )
  345. and ts.fbsj > date_add(now(), INTERVAL -3 day)
  346. <isNotNull prepend="and" property="xxfl">
  347. $xxfl$
  348. </isNotNull>
  349. )
  350. </select>
  351. <update id="update.clicknum.by.xxid" parameterClass="java.lang.Integer">
  352. update xx_gttsjl set clicknum = case when clicknum is null then 0 else clicknum end + 1 where xxid = #xxid#
  353. </update>
  354. </sqlMap>