SysUserMapper.xml 17 KB

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