Commit ca38960a73c2e90599044587b39b620b9db4f37e
Exists in
master
and in
1 other branch
Merge remote-tracking branch 'origin/master'
Showing 2 changed files
platform-biz-service/src/main/resources/mainOrm/Users.xml
View file @
ca38960
... | ... | @@ -23,19 +23,22 @@ |
23 | 23 | <result column="last_login_time" property="lastLoginTime" jdbcType="TIMESTAMP"/> |
24 | 24 | <result column="foreign_id" property="foreignId" jdbcType="VARCHAR"/> |
25 | 25 | <result column="other_account" property="otherAccount" jdbcType="INTEGER"/> |
26 | + <result column="zhiChenId" property="zhiChenId" jdbcType="INTEGER"/> | |
26 | 27 | </resultMap> |
27 | 28 | |
28 | - | |
29 | 29 | <insert id="addUsers" parameterType="com.lyms.platform.permission.model.Users"> |
30 | 30 | <selectKey order="AFTER" keyProperty="id" resultType="java.lang.Integer"> SELECT LAST_INSERT_ID() </selectKey> |
31 | -insert into users (foreign_id,logincenter_id,type,org_id,dept_id,name,account,pwd,phone,publish_id,publish_name,yn,enable,modified,created,remarks,last_login_time,ks_id) | |
32 | -values (#{foreignId},#{logincenterId},#{type},#{orgId},#{deptId},#{name},#{account},#{pwd},#{phone},#{publishId},#{publishName},#{yn},#{enable},#{modified},#{created},#{remarks},#{lastLoginTime},#{ksId}) | |
31 | +insert into users (foreign_id,logincenter_id,type,org_id,dept_id,name,account,pwd,phone,publish_id,publish_name,yn,enable,modified,created,remarks,last_login_time,ks_id,zhiChenId) | |
32 | +values (#{foreignId},#{logincenterId},#{type},#{orgId},#{deptId},#{name},#{account},#{pwd},#{phone},#{publishId},#{publishName},#{yn},#{enable},#{modified},#{created},#{remarks},#{lastLoginTime},#{ksId},#{zhiChenId}) | |
33 | 33 | </insert> |
34 | 34 | |
35 | 35 | |
36 | 36 | <update id="updateUsers" parameterType="com.lyms.platform.permission.model.Users"> |
37 | 37 | update users |
38 | 38 | <set> |
39 | + <if test="zhiChenId != null and zhiChenId >= 0"> | |
40 | + zhiChenId = #{zhiChenId,jdbcType=INTEGER}, | |
41 | + </if> | |
39 | 42 | <if test="logincenterId != null and logincenterId >= 0"> |
40 | 43 | logincenter_id = #{logincenterId,jdbcType=INTEGER}, |
41 | 44 | </if> |
... | ... | @@ -90,6 +93,9 @@ |
90 | 93 | <if test="lastLoginTime != null"> |
91 | 94 | last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP}, |
92 | 95 | </if> |
96 | + <if test="zhiChenId !=null"> | |
97 | + zhiChenId =#{zhiChenId,jdbcType=VARCHAR}, | |
98 | + </if> | |
93 | 99 | </set> |
94 | 100 | where id = #{id,jdbcType=INTEGER} |
95 | 101 | </update> |
96 | 102 | |
... | ... | @@ -101,12 +107,12 @@ |
101 | 107 | |
102 | 108 | |
103 | 109 | <select id="getUsers" resultMap="UsersResultMap" parameterType="java.lang.Integer"> |
104 | -select id,logincenter_id,type,org_id,dept_id,name,account,pwd,phone,publish_id,publish_name,yn,enable,modified,created,remarks,last_login_time, ks_id,foreign_id,other_account | |
110 | +select id,logincenter_id,type,org_id,dept_id,name,account,pwd,phone,publish_id,publish_name,yn,enable,modified,created,remarks,last_login_time, ks_id,foreign_id,other_account,zhiChenId | |
105 | 111 | from users where id = #{id,jdbcType=INTEGER} |
106 | 112 | </select> |
107 | 113 | |
108 | 114 | <select id="getUsersByLoginCenterId" resultMap="UsersResultMap" parameterType="java.lang.Integer"> |
109 | - select id,logincenter_id,type,org_id,dept_id,name,account,pwd,phone,publish_id,publish_name,yn,enable,modified,created,remarks,last_login_time, ks_id,foreign_id,other_account | |
115 | + select id,logincenter_id,type,org_id,dept_id,name,account,pwd,phone,publish_id,publish_name,yn,enable,modified,created,remarks,last_login_time, ks_id,foreign_id,other_account,zhiChenId | |
110 | 116 | from users where logincenter_id = #{id,jdbcType=INTEGER} and enable =1 order by last_login_time desc |
111 | 117 | </select> |
112 | 118 | |
... | ... | @@ -191,7 +197,7 @@ |
191 | 197 | <select id="queryUsers" resultMap="UsersResultMap" parameterType="com.lyms.platform.permission.model.UsersQuery"> |
192 | 198 | select |
193 | 199 | id,logincenter_id,type,org_id,dept_id,name,account,pwd,phone,publish_id,publish_name,yn,enable,modified,created,remarks,last_login_time, |
194 | - ks_id,foreign_id,other_account | |
200 | + ks_id,foreign_id,other_account,zhiChenId | |
195 | 201 | from users |
196 | 202 | <include refid="UsersCondition"/> |
197 | 203 | <include refid="orderAndLimit"/> |
... | ... | @@ -201,7 +207,7 @@ |
201 | 207 | <select id="queryUsers2" resultMap="UsersResultMap" parameterType="com.lyms.platform.permission.model.UsersQuery"> |
202 | 208 | select DISTINCT u.id |
203 | 209 | id,logincenter_id,type,org_id,dept_id,name,account,pwd,phone,publish_id,publish_name,u.yn,enable,modified,created,remarks,last_login_time, |
204 | - ks_id,foreign_id,other_account | |
210 | + ks_id,foreign_id,other_account,zhiChenId | |
205 | 211 | from users u LEFT JOIN user_role_maps ur |
206 | 212 | on u.id = ur.user_id |
207 | 213 | where 1=1 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/UsersController.java
View file @
ca38960
... | ... | @@ -788,7 +788,8 @@ |
788 | 788 | @RequestParam(value = "remarks",required = false) String remarks, |
789 | 789 | @RequestParam(value = "roleIds",required = false) String roleIds, |
790 | 790 | @RequestParam(value = "orgId",required = false) Integer orgId, |
791 | - @RequestParam(value = "deptId",required = false) Integer deptId) { | |
791 | + @RequestParam(value = "deptId",required = false) Integer deptId, | |
792 | + @RequestParam(value = "zhiCId")Integer zhiCId) { | |
792 | 793 | |
793 | 794 | if(StringUtils.isBlank(phone) && StringUtils.isBlank(account)) { |
794 | 795 | ResultUtils.buildParameterErrorResultAndWrite(response, "帐号和手机号不能同时为空"); |
... | ... | @@ -894,6 +895,7 @@ |
894 | 895 | users.setModified(new Date()); |
895 | 896 | users.setDeptId(deptId); |
896 | 897 | users.setOrgId(orgId); |
898 | + users.setZhiChenId(zhiCId); | |
897 | 899 | // users.setPwd(LoginUtil.md5(NumberUtils.getRandomString(6))); |
898 | 900 | usersService.updateUsers(users); |
899 | 901 |