SystemLogMapper.xml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  3. <mapper namespace="com.chinaitop.depot.systemLog.mapper.SystemLogMapper" >
  4. <resultMap id="BaseResultMap" type="com.chinaitop.depot.systemLog.model.SystemLog" >
  5. <id column="id" property="id" jdbcType="VARCHAR" />
  6. <result column="org_id" property="orgId" jdbcType="INTEGER" />
  7. <result column="user_id" property="userId" jdbcType="INTEGER" />
  8. <result column="user_zh" property="userZh" jdbcType="VARCHAR" />
  9. <result column="user_name" property="userName" jdbcType="VARCHAR" />
  10. <result column="user_role" property="userRole" jdbcType="VARCHAR" />
  11. <result column="user_address" property="userAddress" jdbcType="VARCHAR" />
  12. <result column="dl_time" property="dlTime" jdbcType="TIMESTAMP" />
  13. <result column="zx_time" property="zxTime" jdbcType="TIMESTAMP" />
  14. <result column="func_id" property="funcId" jdbcType="INTEGER" />
  15. <result column="func_name" property="funcName" jdbcType="VARCHAR" />
  16. <result column="btn_id" property="btnId" jdbcType="INTEGER" />
  17. <result column="method_name" property="methodName" jdbcType="VARCHAR" />
  18. <result column="oper_result" property="operResult" jdbcType="VARCHAR" />
  19. <result column="parameter" property="parameter" jdbcType="VARCHAR" />
  20. <result column="rtn_param" property="rtnParam" jdbcType="VARCHAR" />
  21. <result column="describes" property="describes" jdbcType="VARCHAR" />
  22. <result column="type" property="type" jdbcType="VARCHAR" />
  23. <result column="device_ip" property="deviceIp" jdbcType="VARCHAR" />
  24. <result column="system_identify" property="systemIdentify" jdbcType="VARCHAR" />
  25. <result column="operation_time" property="operationTime" jdbcType="TIMESTAMP" />
  26. </resultMap>
  27. <sql id="Example_Where_Clause" >
  28. <where >
  29. <foreach collection="oredCriteria" item="criteria" separator="or" >
  30. <if test="criteria.valid" >
  31. <trim prefix="(" suffix=")" prefixOverrides="and" >
  32. <foreach collection="criteria.criteria" item="criterion" >
  33. <choose >
  34. <when test="criterion.noValue" >
  35. and ${criterion.condition}
  36. </when>
  37. <when test="criterion.singleValue" >
  38. and ${criterion.condition} #{criterion.value}
  39. </when>
  40. <when test="criterion.betweenValue" >
  41. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  42. </when>
  43. <when test="criterion.listValue" >
  44. and ${criterion.condition}
  45. <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
  46. #{listItem}
  47. </foreach>
  48. </when>
  49. </choose>
  50. </foreach>
  51. </trim>
  52. </if>
  53. </foreach>
  54. </where>
  55. </sql>
  56. <sql id="Update_By_Example_Where_Clause" >
  57. <where >
  58. <foreach collection="example.oredCriteria" item="criteria" separator="or" >
  59. <if test="criteria.valid" >
  60. <trim prefix="(" suffix=")" prefixOverrides="and" >
  61. <foreach collection="criteria.criteria" item="criterion" >
  62. <choose >
  63. <when test="criterion.noValue" >
  64. and ${criterion.condition}
  65. </when>
  66. <when test="criterion.singleValue" >
  67. and ${criterion.condition} #{criterion.value}
  68. </when>
  69. <when test="criterion.betweenValue" >
  70. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  71. </when>
  72. <when test="criterion.listValue" >
  73. and ${criterion.condition}
  74. <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
  75. #{listItem}
  76. </foreach>
  77. </when>
  78. </choose>
  79. </foreach>
  80. </trim>
  81. </if>
  82. </foreach>
  83. </where>
  84. </sql>
  85. <sql id="Base_Column_List" >
  86. id, org_id, user_id, user_zh, user_name, user_role, user_address, dl_time, zx_time,
  87. func_id, func_name, btn_id, method_name, oper_result, parameter, rtn_param, describes,
  88. type, device_ip, system_identify, operation_time
  89. </sql>
  90. <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.systemLog.model.SystemLogExample" >
  91. select
  92. <if test="distinct" >
  93. distinct
  94. </if>
  95. <include refid="Base_Column_List" />
  96. from system_log
  97. <if test="_parameter != null" >
  98. <include refid="Example_Where_Clause" />
  99. </if>
  100. <if test="orderByClause != null" >
  101. order by ${orderByClause}
  102. </if>
  103. </select>
  104. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
  105. select
  106. <include refid="Base_Column_List" />
  107. from system_log
  108. where id = #{id,jdbcType=VARCHAR}
  109. </select>
  110. <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
  111. delete from system_log
  112. where id = #{id,jdbcType=VARCHAR}
  113. </delete>
  114. <delete id="deleteByExample" parameterType="com.chinaitop.depot.systemLog.model.SystemLogExample" >
  115. delete from system_log
  116. <if test="_parameter != null" >
  117. <include refid="Example_Where_Clause" />
  118. </if>
  119. </delete>
  120. <insert id="insert" parameterType="com.chinaitop.depot.systemLog.model.SystemLog" >
  121. insert into system_log (id, org_id, user_id,
  122. user_zh, user_name, user_role,
  123. user_address, dl_time, zx_time,
  124. func_id, func_name, btn_id,
  125. method_name, oper_result, parameter,
  126. rtn_param, describes, type,
  127. device_ip, system_identify, operation_time
  128. )
  129. values (#{id,jdbcType=VARCHAR}, #{orgId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER},
  130. #{userZh,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR}, #{userRole,jdbcType=VARCHAR},
  131. #{userAddress,jdbcType=VARCHAR}, #{dlTime,jdbcType=TIMESTAMP}, #{zxTime,jdbcType=TIMESTAMP},
  132. #{funcId,jdbcType=INTEGER}, #{funcName,jdbcType=VARCHAR}, #{btnId,jdbcType=INTEGER},
  133. #{methodName,jdbcType=VARCHAR}, #{operResult,jdbcType=VARCHAR}, #{parameter,jdbcType=VARCHAR},
  134. #{rtnParam,jdbcType=VARCHAR}, #{describes,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
  135. #{deviceIp,jdbcType=VARCHAR}, #{systemIdentify,jdbcType=VARCHAR}, #{operationTime,jdbcType=TIMESTAMP}
  136. )
  137. </insert>
  138. <insert id="insertSelective" parameterType="com.chinaitop.depot.systemLog.model.SystemLog" >
  139. insert into system_log
  140. <trim prefix="(" suffix=")" suffixOverrides="," >
  141. <if test="id != null" >
  142. id,
  143. </if>
  144. <if test="orgId != null" >
  145. org_id,
  146. </if>
  147. <if test="userId != null" >
  148. user_id,
  149. </if>
  150. <if test="userZh != null" >
  151. user_zh,
  152. </if>
  153. <if test="userName != null" >
  154. user_name,
  155. </if>
  156. <if test="userRole != null" >
  157. user_role,
  158. </if>
  159. <if test="userAddress != null" >
  160. user_address,
  161. </if>
  162. <if test="dlTime != null" >
  163. dl_time,
  164. </if>
  165. <if test="zxTime != null" >
  166. zx_time,
  167. </if>
  168. <if test="funcId != null" >
  169. func_id,
  170. </if>
  171. <if test="funcName != null" >
  172. func_name,
  173. </if>
  174. <if test="btnId != null" >
  175. btn_id,
  176. </if>
  177. <if test="methodName != null" >
  178. method_name,
  179. </if>
  180. <if test="operResult != null" >
  181. oper_result,
  182. </if>
  183. <if test="parameter != null" >
  184. parameter,
  185. </if>
  186. <if test="rtnParam != null" >
  187. rtn_param,
  188. </if>
  189. <if test="describes != null" >
  190. describes,
  191. </if>
  192. <if test="type != null" >
  193. type,
  194. </if>
  195. <if test="deviceIp != null" >
  196. device_ip,
  197. </if>
  198. <if test="systemIdentify != null" >
  199. system_identify,
  200. </if>
  201. <if test="operationTime != null" >
  202. operation_time,
  203. </if>
  204. </trim>
  205. <trim prefix="values (" suffix=")" suffixOverrides="," >
  206. <if test="id != null" >
  207. #{id,jdbcType=VARCHAR},
  208. </if>
  209. <if test="orgId != null" >
  210. #{orgId,jdbcType=INTEGER},
  211. </if>
  212. <if test="userId != null" >
  213. #{userId,jdbcType=INTEGER},
  214. </if>
  215. <if test="userZh != null" >
  216. #{userZh,jdbcType=VARCHAR},
  217. </if>
  218. <if test="userName != null" >
  219. #{userName,jdbcType=VARCHAR},
  220. </if>
  221. <if test="userRole != null" >
  222. #{userRole,jdbcType=VARCHAR},
  223. </if>
  224. <if test="userAddress != null" >
  225. #{userAddress,jdbcType=VARCHAR},
  226. </if>
  227. <if test="dlTime != null" >
  228. #{dlTime,jdbcType=TIMESTAMP},
  229. </if>
  230. <if test="zxTime != null" >
  231. #{zxTime,jdbcType=TIMESTAMP},
  232. </if>
  233. <if test="funcId != null" >
  234. #{funcId,jdbcType=INTEGER},
  235. </if>
  236. <if test="funcName != null" >
  237. #{funcName,jdbcType=VARCHAR},
  238. </if>
  239. <if test="btnId != null" >
  240. #{btnId,jdbcType=INTEGER},
  241. </if>
  242. <if test="methodName != null" >
  243. #{methodName,jdbcType=VARCHAR},
  244. </if>
  245. <if test="operResult != null" >
  246. #{operResult,jdbcType=VARCHAR},
  247. </if>
  248. <if test="parameter != null" >
  249. #{parameter,jdbcType=VARCHAR},
  250. </if>
  251. <if test="rtnParam != null" >
  252. #{rtnParam,jdbcType=VARCHAR},
  253. </if>
  254. <if test="describes != null" >
  255. #{describes,jdbcType=VARCHAR},
  256. </if>
  257. <if test="type != null" >
  258. #{type,jdbcType=VARCHAR},
  259. </if>
  260. <if test="deviceIp != null" >
  261. #{deviceIp,jdbcType=VARCHAR},
  262. </if>
  263. <if test="systemIdentify != null" >
  264. #{systemIdentify,jdbcType=VARCHAR},
  265. </if>
  266. <if test="operationTime != null" >
  267. #{operationTime,jdbcType=TIMESTAMP},
  268. </if>
  269. </trim>
  270. </insert>
  271. <select id="countByExample" parameterType="com.chinaitop.depot.systemLog.model.SystemLogExample" resultType="java.lang.Integer" >
  272. select count(*) from system_log
  273. <if test="_parameter != null" >
  274. <include refid="Example_Where_Clause" />
  275. </if>
  276. </select>
  277. <update id="updateByExampleSelective" parameterType="map" >
  278. update system_log
  279. <set >
  280. <if test="record.id != null" >
  281. id = #{record.id,jdbcType=VARCHAR},
  282. </if>
  283. <if test="record.orgId != null" >
  284. org_id = #{record.orgId,jdbcType=INTEGER},
  285. </if>
  286. <if test="record.userId != null" >
  287. user_id = #{record.userId,jdbcType=INTEGER},
  288. </if>
  289. <if test="record.userZh != null" >
  290. user_zh = #{record.userZh,jdbcType=VARCHAR},
  291. </if>
  292. <if test="record.userName != null" >
  293. user_name = #{record.userName,jdbcType=VARCHAR},
  294. </if>
  295. <if test="record.userRole != null" >
  296. user_role = #{record.userRole,jdbcType=VARCHAR},
  297. </if>
  298. <if test="record.userAddress != null" >
  299. user_address = #{record.userAddress,jdbcType=VARCHAR},
  300. </if>
  301. <if test="record.dlTime != null" >
  302. dl_time = #{record.dlTime,jdbcType=TIMESTAMP},
  303. </if>
  304. <if test="record.zxTime != null" >
  305. zx_time = #{record.zxTime,jdbcType=TIMESTAMP},
  306. </if>
  307. <if test="record.funcId != null" >
  308. func_id = #{record.funcId,jdbcType=INTEGER},
  309. </if>
  310. <if test="record.funcName != null" >
  311. func_name = #{record.funcName,jdbcType=VARCHAR},
  312. </if>
  313. <if test="record.btnId != null" >
  314. btn_id = #{record.btnId,jdbcType=INTEGER},
  315. </if>
  316. <if test="record.methodName != null" >
  317. method_name = #{record.methodName,jdbcType=VARCHAR},
  318. </if>
  319. <if test="record.operResult != null" >
  320. oper_result = #{record.operResult,jdbcType=VARCHAR},
  321. </if>
  322. <if test="record.parameter != null" >
  323. parameter = #{record.parameter,jdbcType=VARCHAR},
  324. </if>
  325. <if test="record.rtnParam != null" >
  326. rtn_param = #{record.rtnParam,jdbcType=VARCHAR},
  327. </if>
  328. <if test="record.describes != null" >
  329. describes = #{record.describes,jdbcType=VARCHAR},
  330. </if>
  331. <if test="record.type != null" >
  332. type = #{record.type,jdbcType=VARCHAR},
  333. </if>
  334. <if test="record.deviceIp != null" >
  335. device_ip = #{record.deviceIp,jdbcType=VARCHAR},
  336. </if>
  337. <if test="record.systemIdentify != null" >
  338. system_identify = #{record.systemIdentify,jdbcType=VARCHAR},
  339. </if>
  340. <if test="record.operationTime != null" >
  341. operation_time = #{record.operationTime,jdbcType=TIMESTAMP},
  342. </if>
  343. </set>
  344. <if test="_parameter != null" >
  345. <include refid="Update_By_Example_Where_Clause" />
  346. </if>
  347. </update>
  348. <update id="updateByExample" parameterType="map" >
  349. update system_log
  350. set id = #{record.id,jdbcType=VARCHAR},
  351. org_id = #{record.orgId,jdbcType=INTEGER},
  352. user_id = #{record.userId,jdbcType=INTEGER},
  353. user_zh = #{record.userZh,jdbcType=VARCHAR},
  354. user_name = #{record.userName,jdbcType=VARCHAR},
  355. user_role = #{record.userRole,jdbcType=VARCHAR},
  356. user_address = #{record.userAddress,jdbcType=VARCHAR},
  357. dl_time = #{record.dlTime,jdbcType=TIMESTAMP},
  358. zx_time = #{record.zxTime,jdbcType=TIMESTAMP},
  359. func_id = #{record.funcId,jdbcType=INTEGER},
  360. func_name = #{record.funcName,jdbcType=VARCHAR},
  361. btn_id = #{record.btnId,jdbcType=INTEGER},
  362. method_name = #{record.methodName,jdbcType=VARCHAR},
  363. oper_result = #{record.operResult,jdbcType=VARCHAR},
  364. parameter = #{record.parameter,jdbcType=VARCHAR},
  365. rtn_param = #{record.rtnParam,jdbcType=VARCHAR},
  366. describes = #{record.describes,jdbcType=VARCHAR},
  367. type = #{record.type,jdbcType=VARCHAR},
  368. device_ip = #{record.deviceIp,jdbcType=VARCHAR},
  369. system_identify = #{record.systemIdentify,jdbcType=VARCHAR},
  370. operation_time = #{record.operationTime,jdbcType=TIMESTAMP}
  371. <if test="_parameter != null" >
  372. <include refid="Update_By_Example_Where_Clause" />
  373. </if>
  374. </update>
  375. <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.systemLog.model.SystemLog" >
  376. update system_log
  377. <set >
  378. <if test="orgId != null" >
  379. org_id = #{orgId,jdbcType=INTEGER},
  380. </if>
  381. <if test="userId != null" >
  382. user_id = #{userId,jdbcType=INTEGER},
  383. </if>
  384. <if test="userZh != null" >
  385. user_zh = #{userZh,jdbcType=VARCHAR},
  386. </if>
  387. <if test="userName != null" >
  388. user_name = #{userName,jdbcType=VARCHAR},
  389. </if>
  390. <if test="userRole != null" >
  391. user_role = #{userRole,jdbcType=VARCHAR},
  392. </if>
  393. <if test="userAddress != null" >
  394. user_address = #{userAddress,jdbcType=VARCHAR},
  395. </if>
  396. <if test="dlTime != null" >
  397. dl_time = #{dlTime,jdbcType=TIMESTAMP},
  398. </if>
  399. <if test="zxTime != null" >
  400. zx_time = #{zxTime,jdbcType=TIMESTAMP},
  401. </if>
  402. <if test="funcId != null" >
  403. func_id = #{funcId,jdbcType=INTEGER},
  404. </if>
  405. <if test="funcName != null" >
  406. func_name = #{funcName,jdbcType=VARCHAR},
  407. </if>
  408. <if test="btnId != null" >
  409. btn_id = #{btnId,jdbcType=INTEGER},
  410. </if>
  411. <if test="methodName != null" >
  412. method_name = #{methodName,jdbcType=VARCHAR},
  413. </if>
  414. <if test="operResult != null" >
  415. oper_result = #{operResult,jdbcType=VARCHAR},
  416. </if>
  417. <if test="parameter != null" >
  418. parameter = #{parameter,jdbcType=VARCHAR},
  419. </if>
  420. <if test="rtnParam != null" >
  421. rtn_param = #{rtnParam,jdbcType=VARCHAR},
  422. </if>
  423. <if test="describes != null" >
  424. describes = #{describes,jdbcType=VARCHAR},
  425. </if>
  426. <if test="type != null" >
  427. type = #{type,jdbcType=VARCHAR},
  428. </if>
  429. <if test="deviceIp != null" >
  430. device_ip = #{deviceIp,jdbcType=VARCHAR},
  431. </if>
  432. <if test="systemIdentify != null" >
  433. system_identify = #{systemIdentify,jdbcType=VARCHAR},
  434. </if>
  435. <if test="operationTime != null" >
  436. operation_time = #{operationTime,jdbcType=TIMESTAMP},
  437. </if>
  438. </set>
  439. where id = #{id,jdbcType=VARCHAR}
  440. </update>
  441. <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.systemLog.model.SystemLog" >
  442. update system_log
  443. set org_id = #{orgId,jdbcType=INTEGER},
  444. user_id = #{userId,jdbcType=INTEGER},
  445. user_zh = #{userZh,jdbcType=VARCHAR},
  446. user_name = #{userName,jdbcType=VARCHAR},
  447. user_role = #{userRole,jdbcType=VARCHAR},
  448. user_address = #{userAddress,jdbcType=VARCHAR},
  449. dl_time = #{dlTime,jdbcType=TIMESTAMP},
  450. zx_time = #{zxTime,jdbcType=TIMESTAMP},
  451. func_id = #{funcId,jdbcType=INTEGER},
  452. func_name = #{funcName,jdbcType=VARCHAR},
  453. btn_id = #{btnId,jdbcType=INTEGER},
  454. method_name = #{methodName,jdbcType=VARCHAR},
  455. oper_result = #{operResult,jdbcType=VARCHAR},
  456. parameter = #{parameter,jdbcType=VARCHAR},
  457. rtn_param = #{rtnParam,jdbcType=VARCHAR},
  458. describes = #{describes,jdbcType=VARCHAR},
  459. type = #{type,jdbcType=VARCHAR},
  460. device_ip = #{deviceIp,jdbcType=VARCHAR},
  461. system_identify = #{systemIdentify,jdbcType=VARCHAR},
  462. operation_time = #{operationTime,jdbcType=TIMESTAMP}
  463. where id = #{id,jdbcType=VARCHAR}
  464. </update>
  465. </mapper>