SysUserinfoMapper.xml 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649
  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.xinxin.topro.sysservice.dao.mysqlmapper.SysUserinfoMapper" >
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.sysservice.dao.mysqlmodel.SysUserinfo" >
  5. <id column="UI_ID" property="uiId" jdbcType="INTEGER" />
  6. <result column="HI_ID" property="hiId" jdbcType="INTEGER" />
  7. <result column="UI_Code" property="uiCode" jdbcType="VARCHAR" />
  8. <result column="SS_Password" property="ssPassword" jdbcType="VARCHAR" />
  9. <result column="UI_Name" property="uiName" jdbcType="VARCHAR" />
  10. <result column="UI_Phone" property="uiPhone" jdbcType="VARCHAR" />
  11. <result column="UI_IDNumber" property="uiIdnumber" jdbcType="VARCHAR" />
  12. <result column="UI_Sex" property="uiSex" jdbcType="INTEGER" />
  13. <result column="UI_Birthday" property="uiBirthday" jdbcType="DATE" />
  14. <result column="UI_Email" property="uiEmail" jdbcType="VARCHAR" />
  15. <result column="UI_EntryData" property="uiEntrydata" jdbcType="DATE" />
  16. <result column="SS_DepartmentID" property="ssDepartmentid" jdbcType="INTEGER" />
  17. <result column="SS_WardID" property="ssWardid" jdbcType="INTEGER" />
  18. <result column="SS_Type" property="ssType" jdbcType="INTEGER" />
  19. <result column="SS_Nature" property="ssNature" jdbcType="INTEGER" />
  20. <result column="SS_PessoalDate" property="ssPessoaldate" jdbcType="DATE" />
  21. <result column="SS_Nativeplace" property="ssNativeplace" jdbcType="VARCHAR" />
  22. <result column="SS_Politics" property="ssPolitics" jdbcType="VARCHAR" />
  23. <result column="SS_WorkDate" property="ssWorkdate" jdbcType="DATE" />
  24. <result column="SS_Degree" property="ssDegree" jdbcType="VARCHAR" />
  25. <result column="SS_MaritalStatus" property="ssMaritalstatus" jdbcType="INTEGER" />
  26. <result column="SS_Nation" property="ssNation" jdbcType="VARCHAR" />
  27. <result column="SS_Level" property="ssLevel" jdbcType="VARCHAR" />
  28. <result column="SS_PinyinCode" property="ssPinyincode" jdbcType="VARCHAR" />
  29. <result column="SS_WubiCode" property="ssWubicode" jdbcType="VARCHAR" />
  30. <result column="SS_OtherCode" property="ssOthercode" jdbcType="VARCHAR" />
  31. <result column="SS_ISDel" property="ssIsdel" jdbcType="INTEGER" />
  32. <result column="SU_Address" property="suAddress" jdbcType="VARCHAR" />
  33. <result column="SU_Title_Code" property="suTitleCode" jdbcType="VARCHAR" />
  34. <result column="SU_Chief_Code" property="suChiefCode" jdbcType="VARCHAR" />
  35. <result column="SU_Personnel_Dep" property="suPersonnelDep" jdbcType="VARCHAR" />
  36. <result column="SU_Status" property="suStatus" jdbcType="INTEGER" />
  37. <result column="SU_Short_Tel" property="suShortTel" jdbcType="VARCHAR" />
  38. <result column="SU_Credential" property="suCredential" jdbcType="VARCHAR" />
  39. <result column="SU_Professional_Certificate" property="suProfessionalCertificate" jdbcType="VARCHAR" />
  40. <result column="SU_Leave_Time" property="suLeaveTime" jdbcType="TIMESTAMP" />
  41. <result column="SU_Remark" property="suRemark" jdbcType="VARCHAR" />
  42. <result column="SU_Sign_Img" property="suSignImg" jdbcType="VARCHAR" />
  43. <result column="SU_Head_Img" property="suHeadImg" jdbcType="VARCHAR" />
  44. </resultMap>
  45. <resultMap id="HashMap" type="com.xinxin.topro.sysservice.vo.SysUserinfoDepartmentVO" extends="BaseResultMap">
  46. <result column="DD_ID" property="ddId" jdbcType="INTEGER" />
  47. <result column="DD_DepDm" property="ddDepdm" jdbcType="VARCHAR" />
  48. <result column="DD_DepName" property="ddDepname" jdbcType="VARCHAR" />
  49. <result column="DW_ID" property="dwId" jdbcType="INTEGER" />
  50. <result column="DW_WardDm" property="dwWarddm" jdbcType="VARCHAR" />
  51. <result column="DW_WardName" property="dwWardname" jdbcType="VARCHAR" />
  52. <result column="titleName" property="titleName" jdbcType="VARCHAR" />
  53. <result column="chiefName" property="chiefName" jdbcType="VARCHAR" />
  54. </resultMap>
  55. <sql id="Base_Column_List" >
  56. UI_ID, HI_ID, UI_Code, SS_Password, UI_Name, UI_Phone, UI_IDNumber, UI_Sex, UI_Birthday,
  57. UI_Email, UI_EntryData, SS_DepartmentID, SS_WardID, SS_Type, SS_Nature, SS_PessoalDate,
  58. SS_Nativeplace, SS_Politics, SS_WorkDate, SS_Degree, SS_MaritalStatus, SS_Nation,
  59. SS_Level, SS_PinyinCode, SS_WubiCode, SS_OtherCode, SS_ISDel, SU_Address, SU_Title_Code,
  60. SU_Chief_Code, SU_Personnel_Dep, SU_Status, SU_Short_Tel, SU_Credential, SU_Professional_Certificate,
  61. SU_Leave_Time, SU_Remark, SU_Sign_Img, SU_Head_Img
  62. </sql>
  63. <sql id="Base_Column_List1" >
  64. su.UI_ID, su.HI_ID, su.UI_Code, su.SS_Password, su.UI_Name, su.UI_Phone, su.UI_IDNumber, su.UI_Sex, su.UI_Birthday,
  65. su.UI_Email, su.UI_EntryData, su.SS_DepartmentID, su.SS_WardID, su.SS_Type, su.SS_Nature, su.SS_PessoalDate,
  66. su.SS_Nativeplace, su.SS_Politics, su.SS_WorkDate, su.SS_Degree, su.SS_MaritalStatus, su.SS_Nation,
  67. su.SS_Level, su.SS_PinyinCode, su.SS_WubiCode, su.SS_OtherCode, su.SS_ISDel, su.SU_Address, su.SU_Title_Code,
  68. su.SU_Chief_Code, su.SU_Personnel_Dep, su.SU_Status, su.SU_Short_Tel, su.SU_Credential, su.SU_Professional_Certificate,
  69. su.SU_Leave_Time, su.SU_Remark, su.SU_Sign_Img, su.SU_Head_Img
  70. </sql>
  71. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  72. select
  73. <include refid="Base_Column_List" />
  74. from sys_userinfo
  75. where SS_ISDel = 0 and UI_ID = #{uiId,jdbcType=INTEGER}
  76. </select>
  77. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  78. delete from sys_userinfo
  79. where UI_ID = #{uiId,jdbcType=INTEGER}
  80. </delete>
  81. <insert id="insert" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.SysUserinfo" keyProperty="uiId" keyColumn="UI_ID" useGeneratedKeys="true">
  82. insert into sys_userinfo (UI_ID, HI_ID, UI_Code,
  83. SS_Password, UI_Name, UI_Phone,
  84. UI_IDNumber, UI_Sex, UI_Birthday,
  85. UI_Email, UI_EntryData, SS_DepartmentID,
  86. SS_WardID, SS_Type, SS_Nature,
  87. SS_PessoalDate, SS_Nativeplace, SS_Politics,
  88. SS_WorkDate, SS_Degree, SS_MaritalStatus,
  89. SS_Nation, SS_Level, SS_PinyinCode,
  90. SS_WubiCode, SS_OtherCode, SS_ISDel,
  91. SU_Address, SU_Title_Code, SU_Chief_Code,
  92. SU_Personnel_Dep, SU_Status, SU_Short_Tel,
  93. SU_Credential, SU_Professional_Certificate,
  94. SU_Leave_Time, SU_Remark, SU_Sign_Img,
  95. SU_Head_Img)
  96. values (#{uiId,jdbcType=INTEGER}, #{hiId,jdbcType=INTEGER}, #{uiCode,jdbcType=VARCHAR},
  97. #{ssPassword,jdbcType=VARCHAR}, #{uiName,jdbcType=VARCHAR}, #{uiPhone,jdbcType=VARCHAR},
  98. #{uiIdnumber,jdbcType=VARCHAR}, #{uiSex,jdbcType=INTEGER}, #{uiBirthday,jdbcType=DATE},
  99. #{uiEmail,jdbcType=VARCHAR}, #{uiEntrydata,jdbcType=DATE}, #{ssDepartmentid,jdbcType=INTEGER},
  100. #{ssWardid,jdbcType=INTEGER}, #{ssType,jdbcType=INTEGER}, #{ssNature,jdbcType=INTEGER},
  101. #{ssPessoaldate,jdbcType=DATE}, #{ssNativeplace,jdbcType=VARCHAR}, #{ssPolitics,jdbcType=VARCHAR},
  102. #{ssWorkdate,jdbcType=DATE}, #{ssDegree,jdbcType=VARCHAR}, #{ssMaritalstatus,jdbcType=INTEGER},
  103. #{ssNation,jdbcType=VARCHAR}, #{ssLevel,jdbcType=VARCHAR}, #{ssPinyincode,jdbcType=VARCHAR},
  104. #{ssWubicode,jdbcType=VARCHAR}, #{ssOthercode,jdbcType=VARCHAR}, #{ssIsdel,jdbcType=INTEGER},
  105. #{suAddress,jdbcType=VARCHAR}, #{suTitleCode,jdbcType=VARCHAR}, #{suChiefCode,jdbcType=VARCHAR},
  106. #{suPersonnelDep,jdbcType=VARCHAR}, #{suStatus,jdbcType=INTEGER}, #{suShortTel,jdbcType=VARCHAR},
  107. #{suCredential,jdbcType=VARCHAR}, #{suProfessionalCertificate,jdbcType=VARCHAR},
  108. now(), #{suRemark,jdbcType=VARCHAR}, #{suSignImg,jdbcType=VARCHAR},
  109. #{suHeadImg,jdbcType=VARCHAR})
  110. </insert>
  111. <insert id="insertUsers" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.SysUserinfo" keyProperty="uiId" keyColumn="UI_ID" useGeneratedKeys="true">
  112. insert into sys_userinfo ( HI_ID, UI_Code,
  113. SS_Password, UI_Name, UI_Phone,
  114. UI_IDNumber, UI_Sex, UI_Birthday,
  115. UI_Email, UI_EntryData, SS_DepartmentID,
  116. SS_WardID, SS_Type, SS_Nature,
  117. SS_PessoalDate, SS_Nativeplace, SS_Politics,
  118. SS_WorkDate, SS_Degree, SS_MaritalStatus,
  119. SS_Nation, SS_Level, SS_PinyinCode,
  120. SS_WubiCode, SS_OtherCode, SS_ISDel,
  121. SU_Address, SU_Title_Code, SU_Chief_Code,
  122. SU_Personnel_Dep, SU_Status, SU_Short_Tel,
  123. SU_Credential, SU_Professional_Certificate,
  124. SU_Leave_Time, SU_Remark, SU_Sign_Img,
  125. SU_Head_Img)
  126. values ( #{hiId,jdbcType=INTEGER}, #{uiCode,jdbcType=VARCHAR},
  127. #{ssPassword,jdbcType=VARCHAR}, #{uiName,jdbcType=VARCHAR}, #{uiPhone,jdbcType=VARCHAR},
  128. #{uiIdnumber,jdbcType=VARCHAR}, #{uiSex,jdbcType=INTEGER}, #{uiBirthday,jdbcType=DATE},
  129. #{uiEmail,jdbcType=VARCHAR}, #{uiEntrydata,jdbcType=DATE}, #{ssDepartmentid,jdbcType=INTEGER},
  130. #{ssWardid,jdbcType=INTEGER}, #{ssType,jdbcType=INTEGER}, #{ssNature,jdbcType=INTEGER},
  131. #{ssPessoaldate,jdbcType=DATE}, #{ssNativeplace,jdbcType=VARCHAR}, #{ssPolitics,jdbcType=VARCHAR},
  132. #{ssWorkdate,jdbcType=DATE}, #{ssDegree,jdbcType=VARCHAR}, #{ssMaritalstatus,jdbcType=INTEGER},
  133. #{ssNation,jdbcType=VARCHAR}, #{ssLevel,jdbcType=VARCHAR}, #{ssPinyincode,jdbcType=VARCHAR},
  134. #{ssWubicode,jdbcType=VARCHAR}, #{ssOthercode,jdbcType=VARCHAR}, #{ssIsdel,jdbcType=INTEGER},
  135. #{suAddress,jdbcType=VARCHAR}, #{suTitleCode,jdbcType=VARCHAR}, #{suChiefCode,jdbcType=VARCHAR},
  136. #{suPersonnelDep,jdbcType=VARCHAR}, #{suStatus,jdbcType=INTEGER}, #{suShortTel,jdbcType=VARCHAR},
  137. #{suCredential,jdbcType=VARCHAR}, #{suProfessionalCertificate,jdbcType=VARCHAR},
  138. now(), #{suRemark,jdbcType=VARCHAR}, #{suSignImg,jdbcType=VARCHAR},
  139. #{suHeadImg,jdbcType=VARCHAR})
  140. </insert>
  141. <insert id="insertSelective" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.SysUserinfo" >
  142. insert into sys_userinfo
  143. <trim prefix="(" suffix=")" suffixOverrides="," >
  144. <if test="uiId != null" >
  145. UI_ID,
  146. </if>
  147. <if test="hiId != null" >
  148. HI_ID,
  149. </if>
  150. <if test="uiCode != null" >
  151. UI_Code,
  152. </if>
  153. <if test="ssPassword != null" >
  154. SS_Password,
  155. </if>
  156. <if test="uiName != null" >
  157. UI_Name,
  158. </if>
  159. <if test="uiPhone != null" >
  160. UI_Phone,
  161. </if>
  162. <if test="uiIdnumber != null" >
  163. UI_IDNumber,
  164. </if>
  165. <if test="uiSex != null" >
  166. UI_Sex,
  167. </if>
  168. <if test="uiBirthday != null" >
  169. UI_Birthday,
  170. </if>
  171. <if test="uiEmail != null" >
  172. UI_Email,
  173. </if>
  174. <if test="uiEntrydata != null" >
  175. UI_EntryData,
  176. </if>
  177. <if test="ssDepartmentid != null" >
  178. SS_DepartmentID,
  179. </if>
  180. <if test="ssWardid != null" >
  181. SS_WardID,
  182. </if>
  183. <if test="ssType != null" >
  184. SS_Type,
  185. </if>
  186. <if test="ssNature != null" >
  187. SS_Nature,
  188. </if>
  189. <if test="ssPessoaldate != null" >
  190. SS_PessoalDate,
  191. </if>
  192. <if test="ssNativeplace != null" >
  193. SS_Nativeplace,
  194. </if>
  195. <if test="ssPolitics != null" >
  196. SS_Politics,
  197. </if>
  198. <if test="ssWorkdate != null" >
  199. SS_WorkDate,
  200. </if>
  201. <if test="ssDegree != null" >
  202. SS_Degree,
  203. </if>
  204. <if test="ssMaritalstatus != null" >
  205. SS_MaritalStatus,
  206. </if>
  207. <if test="ssNation != null" >
  208. SS_Nation,
  209. </if>
  210. <if test="ssLevel != null" >
  211. SS_Level,
  212. </if>
  213. <if test="ssPinyincode != null" >
  214. SS_PinyinCode,
  215. </if>
  216. <if test="ssWubicode != null" >
  217. SS_WubiCode,
  218. </if>
  219. <if test="ssOthercode != null" >
  220. SS_OtherCode,
  221. </if>
  222. <if test="ssIsdel != null" >
  223. SS_ISDel,
  224. </if>
  225. <if test="suAddress != null" >
  226. SU_Address,
  227. </if>
  228. <if test="suTitleCode != null" >
  229. SU_Title_Code,
  230. </if>
  231. <if test="suChiefCode != null" >
  232. SU_Chief_Code,
  233. </if>
  234. <if test="suPersonnelDep != null" >
  235. SU_Personnel_Dep,
  236. </if>
  237. <if test="suStatus != null" >
  238. SU_Status,
  239. </if>
  240. <if test="suShortTel != null" >
  241. SU_Short_Tel,
  242. </if>
  243. <if test="suCredential != null" >
  244. SU_Credential,
  245. </if>
  246. <if test="suProfessionalCertificate != null" >
  247. SU_Professional_Certificate,
  248. </if>
  249. <if test="suLeaveTime != null" >
  250. SU_Leave_Time,
  251. </if>
  252. <if test="suRemark != null" >
  253. SU_Remark,
  254. </if>
  255. <if test="suSignImg != null" >
  256. SU_Sign_Img,
  257. </if>
  258. <if test="suHeadImg != null" >
  259. SU_Head_Img,
  260. </if>
  261. </trim>
  262. <trim prefix="values (" suffix=")" suffixOverrides="," >
  263. <if test="uiId != null" >
  264. #{uiId,jdbcType=INTEGER},
  265. </if>
  266. <if test="hiId != null" >
  267. #{hiId,jdbcType=INTEGER},
  268. </if>
  269. <if test="uiCode != null" >
  270. #{uiCode,jdbcType=VARCHAR},
  271. </if>
  272. <if test="ssPassword != null" >
  273. #{ssPassword,jdbcType=VARCHAR},
  274. </if>
  275. <if test="uiName != null" >
  276. #{uiName,jdbcType=VARCHAR},
  277. </if>
  278. <if test="uiPhone != null" >
  279. #{uiPhone,jdbcType=VARCHAR},
  280. </if>
  281. <if test="uiIdnumber != null" >
  282. #{uiIdnumber,jdbcType=VARCHAR},
  283. </if>
  284. <if test="uiSex != null" >
  285. #{uiSex,jdbcType=INTEGER},
  286. </if>
  287. <if test="uiBirthday != null" >
  288. #{uiBirthday,jdbcType=DATE},
  289. </if>
  290. <if test="uiEmail != null" >
  291. #{uiEmail,jdbcType=VARCHAR},
  292. </if>
  293. <if test="uiEntrydata != null" >
  294. #{uiEntrydata,jdbcType=DATE},
  295. </if>
  296. <if test="ssDepartmentid != null" >
  297. #{ssDepartmentid,jdbcType=INTEGER},
  298. </if>
  299. <if test="ssWardid != null" >
  300. #{ssWardid,jdbcType=INTEGER},
  301. </if>
  302. <if test="ssType != null" >
  303. #{ssType,jdbcType=INTEGER},
  304. </if>
  305. <if test="ssNature != null" >
  306. #{ssNature,jdbcType=INTEGER},
  307. </if>
  308. <if test="ssPessoaldate != null" >
  309. #{ssPessoaldate,jdbcType=DATE},
  310. </if>
  311. <if test="ssNativeplace != null" >
  312. #{ssNativeplace,jdbcType=VARCHAR},
  313. </if>
  314. <if test="ssPolitics != null" >
  315. #{ssPolitics,jdbcType=VARCHAR},
  316. </if>
  317. <if test="ssWorkdate != null" >
  318. #{ssWorkdate,jdbcType=DATE},
  319. </if>
  320. <if test="ssDegree != null" >
  321. #{ssDegree,jdbcType=VARCHAR},
  322. </if>
  323. <if test="ssMaritalstatus != null" >
  324. #{ssMaritalstatus,jdbcType=INTEGER},
  325. </if>
  326. <if test="ssNation != null" >
  327. #{ssNation,jdbcType=VARCHAR},
  328. </if>
  329. <if test="ssLevel != null" >
  330. #{ssLevel,jdbcType=VARCHAR},
  331. </if>
  332. <if test="ssPinyincode != null" >
  333. #{ssPinyincode,jdbcType=VARCHAR},
  334. </if>
  335. <if test="ssWubicode != null" >
  336. #{ssWubicode,jdbcType=VARCHAR},
  337. </if>
  338. <if test="ssOthercode != null" >
  339. #{ssOthercode,jdbcType=VARCHAR},
  340. </if>
  341. <if test="ssIsdel != null" >
  342. #{ssIsdel,jdbcType=INTEGER},
  343. </if>
  344. <if test="suAddress != null" >
  345. #{suAddress,jdbcType=VARCHAR},
  346. </if>
  347. <if test="suTitleCode != null" >
  348. #{suTitleCode,jdbcType=VARCHAR},
  349. </if>
  350. <if test="suChiefCode != null" >
  351. #{suChiefCode,jdbcType=VARCHAR},
  352. </if>
  353. <if test="suPersonnelDep != null" >
  354. #{suPersonnelDep,jdbcType=VARCHAR},
  355. </if>
  356. <if test="suStatus != null" >
  357. #{suStatus,jdbcType=INTEGER},
  358. </if>
  359. <if test="suShortTel != null" >
  360. #{suShortTel,jdbcType=VARCHAR},
  361. </if>
  362. <if test="suCredential != null" >
  363. #{suCredential,jdbcType=VARCHAR},
  364. </if>
  365. <if test="suProfessionalCertificate != null" >
  366. #{suProfessionalCertificate,jdbcType=VARCHAR},
  367. </if>
  368. <if test="suLeaveTime != null" >
  369. #{suLeaveTime,jdbcType=TIMESTAMP},
  370. </if>
  371. <if test="suRemark != null" >
  372. #{suRemark,jdbcType=VARCHAR},
  373. </if>
  374. <if test="suSignImg != null" >
  375. #{suSignImg,jdbcType=VARCHAR},
  376. </if>
  377. <if test="suHeadImg != null" >
  378. #{suHeadImg,jdbcType=VARCHAR},
  379. </if>
  380. </trim>
  381. </insert>
  382. <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.SysUserinfo" >
  383. update sys_userinfo
  384. <set >
  385. <if test="hiId != null" >
  386. HI_ID = #{hiId,jdbcType=INTEGER},
  387. </if>
  388. <if test="uiCode != null" >
  389. UI_Code = #{uiCode,jdbcType=VARCHAR},
  390. </if>
  391. <if test="ssPassword != null" >
  392. SS_Password = #{ssPassword,jdbcType=VARCHAR},
  393. </if>
  394. <if test="uiName != null" >
  395. UI_Name = #{uiName,jdbcType=VARCHAR},
  396. </if>
  397. <if test="uiPhone != null" >
  398. UI_Phone = #{uiPhone,jdbcType=VARCHAR},
  399. </if>
  400. <if test="uiIdnumber != null" >
  401. UI_IDNumber = #{uiIdnumber,jdbcType=VARCHAR},
  402. </if>
  403. <if test="uiSex != null" >
  404. UI_Sex = #{uiSex,jdbcType=INTEGER},
  405. </if>
  406. <if test="uiBirthday != null" >
  407. UI_Birthday = #{uiBirthday,jdbcType=DATE},
  408. </if>
  409. <if test="uiEmail != null" >
  410. UI_Email = #{uiEmail,jdbcType=VARCHAR},
  411. </if>
  412. <if test="uiEntrydata != null" >
  413. UI_EntryData = #{uiEntrydata,jdbcType=DATE},
  414. </if>
  415. <if test="ssDepartmentid != null" >
  416. SS_DepartmentID = #{ssDepartmentid,jdbcType=INTEGER},
  417. </if>
  418. <if test="ssWardid != null" >
  419. SS_WardID = #{ssWardid,jdbcType=INTEGER},
  420. </if>
  421. <if test="ssType != null" >
  422. SS_Type = #{ssType,jdbcType=INTEGER},
  423. </if>
  424. <if test="ssNature != null" >
  425. SS_Nature = #{ssNature,jdbcType=INTEGER},
  426. </if>
  427. <if test="ssPessoaldate != null" >
  428. SS_PessoalDate = #{ssPessoaldate,jdbcType=DATE},
  429. </if>
  430. <if test="ssNativeplace != null" >
  431. SS_Nativeplace = #{ssNativeplace,jdbcType=VARCHAR},
  432. </if>
  433. <if test="ssPolitics != null" >
  434. SS_Politics = #{ssPolitics,jdbcType=VARCHAR},
  435. </if>
  436. <if test="ssWorkdate != null" >
  437. SS_WorkDate = #{ssWorkdate,jdbcType=DATE},
  438. </if>
  439. <if test="ssDegree != null" >
  440. SS_Degree = #{ssDegree,jdbcType=VARCHAR},
  441. </if>
  442. <if test="ssMaritalstatus != null" >
  443. SS_MaritalStatus = #{ssMaritalstatus,jdbcType=INTEGER},
  444. </if>
  445. <if test="ssNation != null" >
  446. SS_Nation = #{ssNation,jdbcType=VARCHAR},
  447. </if>
  448. <if test="ssLevel != null" >
  449. SS_Level = #{ssLevel,jdbcType=VARCHAR},
  450. </if>
  451. <if test="ssPinyincode != null" >
  452. SS_PinyinCode = #{ssPinyincode,jdbcType=VARCHAR},
  453. </if>
  454. <if test="ssWubicode != null" >
  455. SS_WubiCode = #{ssWubicode,jdbcType=VARCHAR},
  456. </if>
  457. <if test="ssOthercode != null" >
  458. SS_OtherCode = #{ssOthercode,jdbcType=VARCHAR},
  459. </if>
  460. <if test="ssIsdel != null" >
  461. SS_ISDel = #{ssIsdel,jdbcType=INTEGER},
  462. </if>
  463. <if test="suAddress != null" >
  464. SU_Address = #{suAddress,jdbcType=VARCHAR},
  465. </if>
  466. <if test="suTitleCode != null" >
  467. SU_Title_Code = #{suTitleCode,jdbcType=VARCHAR},
  468. </if>
  469. <if test="suChiefCode != null" >
  470. SU_Chief_Code = #{suChiefCode,jdbcType=VARCHAR},
  471. </if>
  472. <if test="suPersonnelDep != null" >
  473. SU_Personnel_Dep = #{suPersonnelDep,jdbcType=VARCHAR},
  474. </if>
  475. <if test="suStatus != null" >
  476. SU_Status = #{suStatus,jdbcType=INTEGER},
  477. </if>
  478. <if test="suShortTel != null" >
  479. SU_Short_Tel = #{suShortTel,jdbcType=VARCHAR},
  480. </if>
  481. <if test="suCredential != null" >
  482. SU_Credential = #{suCredential,jdbcType=VARCHAR},
  483. </if>
  484. <if test="suProfessionalCertificate != null" >
  485. SU_Professional_Certificate = #{suProfessionalCertificate,jdbcType=VARCHAR},
  486. </if>
  487. <if test="suLeaveTime != null" >
  488. SU_Leave_Time = #{suLeaveTime,jdbcType=TIMESTAMP},
  489. </if>
  490. <if test="suRemark != null" >
  491. SU_Remark = #{suRemark,jdbcType=VARCHAR},
  492. </if>
  493. <if test="suSignImg != null" >
  494. SU_Sign_Img = #{suSignImg,jdbcType=VARCHAR},
  495. </if>
  496. <if test="suHeadImg != null" >
  497. SU_Head_Img = #{suHeadImg,jdbcType=VARCHAR},
  498. </if>
  499. </set>
  500. where UI_ID = #{uiId,jdbcType=INTEGER}
  501. </update>
  502. <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.SysUserinfo" >
  503. update sys_userinfo
  504. set HI_ID = #{hiId,jdbcType=INTEGER},
  505. UI_Code = #{uiCode,jdbcType=VARCHAR},
  506. SS_Password = #{ssPassword,jdbcType=VARCHAR},
  507. UI_Name = #{uiName,jdbcType=VARCHAR},
  508. UI_Phone = #{uiPhone,jdbcType=VARCHAR},
  509. UI_IDNumber = #{uiIdnumber,jdbcType=VARCHAR},
  510. UI_Sex = #{uiSex,jdbcType=INTEGER},
  511. UI_Birthday = #{uiBirthday,jdbcType=DATE},
  512. UI_Email = #{uiEmail,jdbcType=VARCHAR},
  513. UI_EntryData = #{uiEntrydata,jdbcType=DATE},
  514. SS_DepartmentID = #{ssDepartmentid,jdbcType=INTEGER},
  515. SS_WardID = #{ssWardid,jdbcType=INTEGER},
  516. SS_Type = #{ssType,jdbcType=INTEGER},
  517. SS_Nature = #{ssNature,jdbcType=INTEGER},
  518. SS_PessoalDate = #{ssPessoaldate,jdbcType=DATE},
  519. SS_Nativeplace = #{ssNativeplace,jdbcType=VARCHAR},
  520. SS_Politics = #{ssPolitics,jdbcType=VARCHAR},
  521. SS_WorkDate = #{ssWorkdate,jdbcType=DATE},
  522. SS_Degree = #{ssDegree,jdbcType=VARCHAR},
  523. SS_MaritalStatus = #{ssMaritalstatus,jdbcType=INTEGER},
  524. SS_Nation = #{ssNation,jdbcType=VARCHAR},
  525. SS_Level = #{ssLevel,jdbcType=VARCHAR},
  526. SS_PinyinCode = #{ssPinyincode,jdbcType=VARCHAR},
  527. SS_WubiCode = #{ssWubicode,jdbcType=VARCHAR},
  528. SS_OtherCode = #{ssOthercode,jdbcType=VARCHAR},
  529. SS_ISDel = #{ssIsdel,jdbcType=INTEGER},
  530. SU_Address = #{suAddress,jdbcType=VARCHAR},
  531. SU_Title_Code = #{suTitleCode,jdbcType=VARCHAR},
  532. SU_Chief_Code = #{suChiefCode,jdbcType=VARCHAR},
  533. SU_Personnel_Dep = #{suPersonnelDep,jdbcType=VARCHAR},
  534. SU_Status = #{suStatus,jdbcType=INTEGER},
  535. SU_Short_Tel = #{suShortTel,jdbcType=VARCHAR},
  536. SU_Credential = #{suCredential,jdbcType=VARCHAR},
  537. SU_Professional_Certificate = #{suProfessionalCertificate,jdbcType=VARCHAR},
  538. SU_Leave_Time = #{suLeaveTime,jdbcType=TIMESTAMP},
  539. SU_Remark = #{suRemark,jdbcType=VARCHAR},
  540. SU_Sign_Img = #{suSignImg,jdbcType=VARCHAR},
  541. SU_Head_Img = #{suHeadImg,jdbcType=VARCHAR}
  542. where UI_ID = #{uiId,jdbcType=INTEGER}
  543. </update>
  544. <update id="restUserPwd" parameterType="java.lang.String">
  545. update sys_userinfo
  546. set SS_Password = '123456'
  547. where UI_Code = #{uiCode,jdbcType=VARCHAR}
  548. </update>
  549. <select id="selectUserList" resultMap="HashMap">
  550. select
  551. su.UI_ID, su.HI_ID, su.UI_Code, su.UI_Name, su.UI_Phone, su.UI_IDNumber, su.UI_Sex, su.UI_Birthday,
  552. su.UI_Email, su.UI_EntryData, su.SS_DepartmentID, su.SS_WardID, su.SS_Type, su.SS_Nature, su.SS_PessoalDate,
  553. su.SS_Nativeplace, su.SS_Politics, su.SS_WorkDate, su.SS_Degree, su.SS_MaritalStatus, su.SS_Nation,
  554. su.SS_Level, su.SS_PinyinCode, su.SS_WubiCode, su.SS_OtherCode, su.SS_ISDel, su.SU_Address, su.SU_Title_Code,
  555. su.SU_Chief_Code, su.SU_Personnel_Dep, su.SU_Status, su.SU_Short_Tel, su.SU_Credential, su.SU_Professional_Certificate,
  556. su.SU_Leave_Time, su.SU_Remark, su.SU_Sign_Img, su.SU_Head_Img, dd.DD_ID, dd.DD_DepDm, dd.DD_DepName,
  557. (select SDD_Detail_Name from sys_dictionary_detail sdd1 where sdd1.SDD_Detail_Code = su.SU_Title_Code and sdd1.SD_ID=(select SD_ID from sys_dictionary where SD_DicDM = 'sys_user_title')) titleName,
  558. (select SDD_Detail_Name from sys_dictionary_detail sdd2 where sdd2.SDD_Detail_Code = su.SU_Chief_Code and sdd2.SD_ID=(select SD_ID from sys_dictionary where SD_DicDM = 'sys_user_chief')) chiefName
  559. from
  560. sys_userinfo su left join dic_department dd on su.SS_DepartmentID = dd.DD_ID
  561. where su.HI_ID = #{hiId,jdbcType=INTEGER}
  562. <if test="ssIsdel != null" >
  563. and su.SS_ISDel = #{ssIsdel,jdbcType=INTEGER}
  564. </if>
  565. </select>
  566. <select id="selectUserByName" resultMap="HashMap">
  567. select
  568. su.UI_ID, su.HI_ID, su.UI_Code, su.UI_Name, su.UI_Phone, su.UI_IDNumber, su.UI_Sex, su.UI_Birthday,
  569. su.UI_Email, su.UI_EntryData, su.SS_DepartmentID, su.SS_WardID, su.SS_Type, su.SS_Nature, su.SS_PessoalDate,
  570. su.SS_Nativeplace, su.SS_Politics, su.SS_WorkDate, su.SS_Degree, su.SS_MaritalStatus, su.SS_Nation,
  571. su.SS_Level, su.SS_PinyinCode, su.SS_WubiCode, su.SS_OtherCode, su.SS_ISDel, su.SU_Address, su.SU_Title_Code,
  572. su.SU_Chief_Code, su.SU_Personnel_Dep, su.SU_Status, su.SU_Short_Tel, su.SU_Credential, su.SU_Professional_Certificate,
  573. su.SU_Leave_Time, su.SU_Remark, su.SU_Sign_Img, su.SU_Head_Img, dd.DD_ID, dd.DD_DepDm, dd.DD_DepName,
  574. (select SDD_Detail_Name from sys_dictionary_detail sdd1 where sdd1.SDD_Detail_Code = su.SU_Title_Code and sdd1.SD_ID=(select SD_ID from sys_dictionary where SD_DicDM = 'sys_user_title')) titleName,
  575. (select SDD_Detail_Name from sys_dictionary_detail sdd2 where sdd2.SDD_Detail_Code = su.SU_Chief_Code and sdd2.SD_ID=(select SD_ID from sys_dictionary where SD_DicDM = 'sys_user_chief')) chiefName
  576. from
  577. sys_userinfo su left join dic_department dd on su.SS_DepartmentID = dd.DD_ID
  578. where
  579. su.HI_ID = #{hiId,jdbcType=INTEGER}
  580. and (
  581. su.UI_Name like concat('%',#{uiName,jdbcType=VARCHAR},'%')
  582. or su.UI_Code like concat('%',#{uiName,jdbcType=VARCHAR},'%')
  583. or su.SS_PinyinCode like concat('%',#{uiName,jdbcType=VARCHAR},'%')
  584. or su.SS_WubiCode like concat('%',#{uiName,jdbcType=VARCHAR},'%'))
  585. <if test="ssIsdel != null" >
  586. and su.SS_ISDel = #{ssIsdel,jdbcType=INTEGER}
  587. </if>
  588. </select>
  589. <select id="selectByCode" resultMap="BaseResultMap" parameterType="java.lang.String" >
  590. select
  591. <include refid="Base_Column_List" />
  592. from sys_userinfo
  593. where SS_ISDel = 0 and UI_Code = #{uiCode,jdbcType=VARCHAR}
  594. </select>
  595. <update id="updateFile" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.SysUserinfo" >
  596. update sys_userinfo
  597. <set>
  598. <if test="suSignImg != null" >
  599. SU_Sign_Img = #{suSignImg,jdbcType=VARCHAR},
  600. </if>
  601. <if test="suHeadImg != null" >
  602. SU_Head_Img = #{suHeadImg,jdbcType=VARCHAR},
  603. </if>
  604. </set>
  605. where UI_ID = #{uiId,jdbcType=INTEGER}
  606. </update>
  607. <!--<update id="updatePassword" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.SysUserinfo" >
  608. update sys_userinfo
  609. set
  610. SS_Password = 123456
  611. where UI_ID = #{uiId,jdbcType=INTEGER}
  612. </update>-->
  613. <select id="getAll" resultMap="BaseResultMap">
  614. select UI_ID,UI_Name,UI_Code
  615. from sys_userinfo
  616. where HI_ID = #{hiId,jdbcType=INTEGER}
  617. </select>
  618. <select id="getAllUser" resultMap="BaseResultMap">
  619. select UI_ID,UI_Name,UI_Code
  620. from sys_userinfo
  621. where SS_ISDel = 0
  622. </select>
  623. <select id="selectByCodeNum" resultType="java.lang.Integer" parameterType="java.lang.String">
  624. select
  625. count(1)
  626. from sys_userinfo
  627. where SS_ISDel = 0 and UI_Code = #{uiId,jdbcType=VARCHAR}
  628. </select>
  629. <select id="userList" resultType="com.xinxin.topro.sysservice.response.UserInfoResponse">
  630. SELECT
  631. su.UI_Code AS uiCode,
  632. su.UI_Name AS uiName,
  633. dd.DD_DepName AS depName
  634. FROM
  635. sys_userinfo su
  636. LEFT JOIN dic_department dd ON su.SS_DepartmentID = dd.DD_ID
  637. WHERE
  638. su.SS_ISDel = 0
  639. AND (su.UI_Code like concat(#{searchKey,jdbcType=VARCHAR},'%')
  640. OR su.UI_Name like concat(#{searchKey,jdbcType=VARCHAR}, '%'))
  641. </select>
  642. </mapper>