BUserMapper.xml 17 KB

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