SysCbitLogMapper.xml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  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.ydtech.modules.admin.dao.SysCbitLogMapper">
  4. <resultMap id="BaseResultMap" type="com.ydtech.modules.admin.model.SysCbitLog">
  5. <id column="req_no" jdbcType="VARCHAR" property="reqNo"/>
  6. <result column="usercode" jdbcType="VARCHAR" property="usercode"/>
  7. <result column="req_url" jdbcType="VARCHAR" property="reqUrl"/>
  8. <result column="description" jdbcType="VARCHAR" property="description"/>
  9. <result column="response" jdbcType="VARCHAR" property="response"/>
  10. <result column="createtime" jdbcType="TIMESTAMP" property="createtime"/>
  11. </resultMap>
  12. <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.ydtech.modules.admin.model.SysCbitLog">
  13. <result column="req_param" jdbcType="LONGVARCHAR" property="reqParam"/>
  14. </resultMap>
  15. <sql id="Example_Where_Clause">
  16. <where>
  17. <foreach collection="oredCriteria" item="criteria" separator="or">
  18. <if test="criteria.valid">
  19. <trim prefix="(" prefixOverrides="and" suffix=")">
  20. <foreach collection="criteria.criteria" item="criterion">
  21. <choose>
  22. <when test="criterion.noValue">
  23. and ${criterion.condition}
  24. </when>
  25. <when test="criterion.singleValue">
  26. and ${criterion.condition} #{criterion.value}
  27. </when>
  28. <when test="criterion.betweenValue">
  29. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  30. </when>
  31. <when test="criterion.listValue">
  32. and ${criterion.condition}
  33. <foreach close=")" collection="criterion.value" item="listItem" open="("
  34. separator=",">
  35. #{listItem}
  36. </foreach>
  37. </when>
  38. </choose>
  39. </foreach>
  40. </trim>
  41. </if>
  42. </foreach>
  43. </where>
  44. </sql>
  45. <sql id="Update_By_Example_Where_Clause">
  46. <where>
  47. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  48. <if test="criteria.valid">
  49. <trim prefix="(" prefixOverrides="and" suffix=")">
  50. <foreach collection="criteria.criteria" item="criterion">
  51. <choose>
  52. <when test="criterion.noValue">
  53. and ${criterion.condition}
  54. </when>
  55. <when test="criterion.singleValue">
  56. and ${criterion.condition} #{criterion.value}
  57. </when>
  58. <when test="criterion.betweenValue">
  59. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  60. </when>
  61. <when test="criterion.listValue">
  62. and ${criterion.condition}
  63. <foreach close=")" collection="criterion.value" item="listItem" open="("
  64. separator=",">
  65. #{listItem}
  66. </foreach>
  67. </when>
  68. </choose>
  69. </foreach>
  70. </trim>
  71. </if>
  72. </foreach>
  73. </where>
  74. </sql>
  75. <sql id="Base_Column_List">
  76. req_no, usercode, req_url, description, response, createtime
  77. </sql>
  78. <sql id="Blob_Column_List">
  79. req_param
  80. </sql>
  81. <select id="selectByExampleWithBLOBs" parameterType="com.ydtech.modules.admin.model.SysCbitLogExample"
  82. resultMap="ResultMapWithBLOBs">
  83. select
  84. <if test="distinct">
  85. distinct
  86. </if>
  87. 'true' as QUERYID,
  88. <include refid="Base_Column_List"/>
  89. ,
  90. <include refid="Blob_Column_List"/>
  91. from sys_cbit_log
  92. <if test="_parameter != null">
  93. <include refid="Example_Where_Clause"/>
  94. </if>
  95. <if test="orderByClause != null">
  96. order by ${orderByClause}
  97. </if>
  98. </select>
  99. <select id="selectByExample" parameterType="com.ydtech.modules.admin.model.SysCbitLogExample"
  100. resultMap="BaseResultMap">
  101. select
  102. <if test="distinct">
  103. distinct
  104. </if>
  105. 'true' as QUERYID,
  106. <include refid="Base_Column_List"/>
  107. from sys_cbit_log
  108. <if test="_parameter != null">
  109. <include refid="Example_Where_Clause"/>
  110. </if>
  111. <if test="orderByClause != null">
  112. order by ${orderByClause}
  113. </if>
  114. </select>
  115. <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
  116. select
  117. <include refid="Base_Column_List"/>
  118. ,
  119. <include refid="Blob_Column_List"/>
  120. from sys_cbit_log
  121. where req_no = #{reqNo,jdbcType=VARCHAR}
  122. </select>
  123. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  124. delete
  125. from sys_cbit_log
  126. where req_no = #{reqNo,jdbcType=VARCHAR}
  127. </delete>
  128. <delete id="deleteByExample" parameterType="com.ydtech.modules.admin.model.SysCbitLogExample">
  129. delete from sys_cbit_log
  130. <if test="_parameter != null">
  131. <include refid="Example_Where_Clause"/>
  132. </if>
  133. </delete>
  134. <insert id="insert" parameterType="com.ydtech.modules.admin.model.SysCbitLog">
  135. insert into sys_cbit_log (req_no, usercode, req_url,
  136. description, response, createtime,
  137. req_param)
  138. values (#{reqNo,jdbcType=VARCHAR}, #{usercode,jdbcType=VARCHAR}, #{reqUrl,jdbcType=VARCHAR},
  139. #{description,jdbcType=VARCHAR}, #{response,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP},
  140. #{reqParam,jdbcType=LONGVARCHAR})
  141. </insert>
  142. <insert id="insertSelective" parameterType="com.ydtech.modules.admin.model.SysCbitLog">
  143. insert into sys_cbit_log
  144. <trim prefix="(" suffix=")" suffixOverrides=",">
  145. <if test="reqNo != null">
  146. req_no,
  147. </if>
  148. <if test="usercode != null">
  149. usercode,
  150. </if>
  151. <if test="reqUrl != null">
  152. req_url,
  153. </if>
  154. <if test="description != null">
  155. description,
  156. </if>
  157. <if test="response != null">
  158. response,
  159. </if>
  160. <if test="createtime != null">
  161. createtime,
  162. </if>
  163. <if test="reqParam != null">
  164. req_param,
  165. </if>
  166. </trim>
  167. <trim prefix="values (" suffix=")" suffixOverrides=",">
  168. <if test="reqNo != null">
  169. #{reqNo,jdbcType=VARCHAR},
  170. </if>
  171. <if test="usercode != null">
  172. #{usercode,jdbcType=VARCHAR},
  173. </if>
  174. <if test="reqUrl != null">
  175. #{reqUrl,jdbcType=VARCHAR},
  176. </if>
  177. <if test="description != null">
  178. #{description,jdbcType=VARCHAR},
  179. </if>
  180. <if test="response != null">
  181. #{response,jdbcType=VARCHAR},
  182. </if>
  183. <if test="createtime != null">
  184. #{createtime,jdbcType=TIMESTAMP},
  185. </if>
  186. <if test="reqParam != null">
  187. #{reqParam,jdbcType=LONGVARCHAR},
  188. </if>
  189. </trim>
  190. </insert>
  191. <select id="countByExample" parameterType="com.ydtech.modules.admin.model.SysCbitLogExample"
  192. resultType="java.lang.Long">
  193. select count(*) from sys_cbit_log
  194. <if test="_parameter != null">
  195. <include refid="Example_Where_Clause"/>
  196. </if>
  197. </select>
  198. <update id="updateByExampleSelective" parameterType="map">
  199. update sys_cbit_log
  200. <set>
  201. <if test="record.reqNo != null">
  202. req_no = #{record.reqNo,jdbcType=VARCHAR},
  203. </if>
  204. <if test="record.usercode != null">
  205. usercode = #{record.usercode,jdbcType=VARCHAR},
  206. </if>
  207. <if test="record.reqUrl != null">
  208. req_url = #{record.reqUrl,jdbcType=VARCHAR},
  209. </if>
  210. <if test="record.description != null">
  211. description = #{record.description,jdbcType=VARCHAR},
  212. </if>
  213. <if test="record.response != null">
  214. response = #{record.response,jdbcType=VARCHAR},
  215. </if>
  216. <if test="record.createtime != null">
  217. createtime = #{record.createtime,jdbcType=TIMESTAMP},
  218. </if>
  219. <if test="record.reqParam != null">
  220. req_param = #{record.reqParam,jdbcType=LONGVARCHAR},
  221. </if>
  222. </set>
  223. <if test="_parameter != null">
  224. <include refid="Update_By_Example_Where_Clause"/>
  225. </if>
  226. </update>
  227. <update id="updateByExampleWithBLOBs" parameterType="map">
  228. update sys_cbit_log
  229. set req_no = #{record.reqNo,jdbcType=VARCHAR},
  230. usercode = #{record.usercode,jdbcType=VARCHAR},
  231. req_url = #{record.reqUrl,jdbcType=VARCHAR},
  232. description = #{record.description,jdbcType=VARCHAR},
  233. response = #{record.response,jdbcType=VARCHAR},
  234. createtime = #{record.createtime,jdbcType=TIMESTAMP},
  235. req_param = #{record.reqParam,jdbcType=LONGVARCHAR}
  236. <if test="_parameter != null">
  237. <include refid="Update_By_Example_Where_Clause"/>
  238. </if>
  239. </update>
  240. <update id="updateByExample" parameterType="map">
  241. update sys_cbit_log
  242. set req_no = #{record.reqNo,jdbcType=VARCHAR},
  243. usercode = #{record.usercode,jdbcType=VARCHAR},
  244. req_url = #{record.reqUrl,jdbcType=VARCHAR},
  245. description = #{record.description,jdbcType=VARCHAR},
  246. response = #{record.response,jdbcType=VARCHAR},
  247. createtime = #{record.createtime,jdbcType=TIMESTAMP}
  248. <if test="_parameter != null">
  249. <include refid="Update_By_Example_Where_Clause"/>
  250. </if>
  251. </update>
  252. <update id="updateByPrimaryKeySelective" parameterType="com.ydtech.modules.admin.model.SysCbitLog">
  253. update sys_cbit_log
  254. <set>
  255. <if test="usercode != null">
  256. usercode = #{usercode,jdbcType=VARCHAR},
  257. </if>
  258. <if test="reqUrl != null">
  259. req_url = #{reqUrl,jdbcType=VARCHAR},
  260. </if>
  261. <if test="description != null">
  262. description = #{description,jdbcType=VARCHAR},
  263. </if>
  264. <if test="response != null">
  265. response = #{response,jdbcType=VARCHAR},
  266. </if>
  267. <if test="createtime != null">
  268. createtime = #{createtime,jdbcType=TIMESTAMP},
  269. </if>
  270. <if test="reqParam != null">
  271. req_param = #{reqParam,jdbcType=LONGVARCHAR},
  272. </if>
  273. </set>
  274. where req_no = #{reqNo,jdbcType=VARCHAR}
  275. </update>
  276. <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.ydtech.modules.admin.model.SysCbitLog">
  277. update sys_cbit_log
  278. set usercode = #{usercode,jdbcType=VARCHAR},
  279. req_url = #{reqUrl,jdbcType=VARCHAR},
  280. description = #{description,jdbcType=VARCHAR},
  281. response = #{response,jdbcType=VARCHAR},
  282. createtime = #{createtime,jdbcType=TIMESTAMP},
  283. req_param = #{reqParam,jdbcType=LONGVARCHAR}
  284. where req_no = #{reqNo,jdbcType=VARCHAR}
  285. </update>
  286. <update id="updateByPrimaryKey" parameterType="com.ydtech.modules.admin.model.SysCbitLog">
  287. update sys_cbit_log
  288. set usercode = #{usercode,jdbcType=VARCHAR},
  289. req_url = #{reqUrl,jdbcType=VARCHAR},
  290. description = #{description,jdbcType=VARCHAR},
  291. response = #{response,jdbcType=VARCHAR},
  292. createtime = #{createtime,jdbcType=TIMESTAMP}
  293. where req_no = #{reqNo,jdbcType=VARCHAR}
  294. </update>
  295. </mapper>