BUserLoginMapper.xml 12 KB

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