Commit a239cc7d56bb1c9beb7c44b53b338fd0263f8dd3
1 parent
728c9efab5
Exists in
master
and in
8 other branches
platform permission
用户表修改
Showing 4 changed files with 26 additions and 5 deletions
- platform-biz-service/src/main/java/com/lyms/platform/permission/model/Users.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/model/UsersQuery.java
- platform-biz-service/src/main/resources/mainOrm/Users.xml
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/UsersController.java
platform-biz-service/src/main/java/com/lyms/platform/permission/model/Users.java
View file @
a239cc7
... | ... | @@ -22,7 +22,15 @@ |
22 | 22 | private Date created; |
23 | 23 | private String remarks; |
24 | 24 | private Date lastLoginTime; |
25 | + private Integer otherAccount; //第三方帐号, 1医院帐号 | |
25 | 26 | |
27 | + public Integer getOtherAccount() { | |
28 | + return otherAccount; | |
29 | + } | |
30 | + | |
31 | + public void setOtherAccount(Integer otherAccount) { | |
32 | + this.otherAccount = otherAccount; | |
33 | + } | |
26 | 34 | |
27 | 35 | private List<Roles> roles; |
28 | 36 | private Departments departmentses; |
platform-biz-service/src/main/java/com/lyms/platform/permission/model/UsersQuery.java
View file @
a239cc7
... | ... | @@ -29,6 +29,15 @@ |
29 | 29 | private String keyword; |
30 | 30 | private Integer roleId; |
31 | 31 | private String foreignId; |
32 | + private Integer otherAccount; //µÚÈý·½ÕʺÅ, 1Ò½ÔºÕʺŠ| |
33 | + | |
34 | + public Integer getOtherAccount() { | |
35 | + return otherAccount; | |
36 | + } | |
37 | + | |
38 | + public void setOtherAccount(Integer otherAccount) { | |
39 | + this.otherAccount = otherAccount; | |
40 | + } | |
32 | 41 | |
33 | 42 | public String getForeignId() { |
34 | 43 | return foreignId; |
platform-biz-service/src/main/resources/mainOrm/Users.xml
View file @
a239cc7
... | ... | @@ -22,6 +22,7 @@ |
22 | 22 | <result column="remarks" property="remarks" jdbcType="VARCHAR"/> |
23 | 23 | <result column="last_login_time" property="lastLoginTime" jdbcType="TIMESTAMP"/> |
24 | 24 | <result column="foreign_id" property="foreignId" jdbcType="VARCHAR"/> |
25 | + <result column="other_account" property="otherAccount" jdbcType="INTEGER"/> | |
25 | 26 | </resultMap> |
26 | 27 | |
27 | 28 | |
28 | 29 | |
... | ... | @@ -100,12 +101,12 @@ |
100 | 101 | |
101 | 102 | |
102 | 103 | <select id="getUsers" resultMap="UsersResultMap" parameterType="java.lang.Integer"> |
103 | -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 | |
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 | |
104 | 105 | from users where id = #{id,jdbcType=INTEGER} |
105 | 106 | </select> |
106 | 107 | |
107 | 108 | <select id="getUsersByLoginCenterId" resultMap="UsersResultMap" parameterType="java.lang.Integer"> |
108 | - 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 | |
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 | |
109 | 110 | from users where logincenter_id = #{id,jdbcType=INTEGER} and enable =1 order by last_login_time desc |
110 | 111 | </select> |
111 | 112 | |
... | ... | @@ -180,6 +181,9 @@ |
180 | 181 | <if test="lastLoginTime != null"> |
181 | 182 | and last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP} |
182 | 183 | </if> |
184 | + <if test="other_account != null and other_account >= 0"> | |
185 | + and other_account = #{otherAccount,jdbcType=INTEGER} | |
186 | + </if> | |
183 | 187 | </where> |
184 | 188 | </sql> |
185 | 189 | |
... | ... | @@ -187,7 +191,7 @@ |
187 | 191 | <select id="queryUsers" resultMap="UsersResultMap" parameterType="com.lyms.platform.permission.model.UsersQuery"> |
188 | 192 | select |
189 | 193 | id,logincenter_id,type,org_id,dept_id,name,account,pwd,phone,publish_id,publish_name,yn,enable,modified,created,remarks,last_login_time, |
190 | - ks_id,foreign_id | |
194 | + ks_id,foreign_id,otherAccount | |
191 | 195 | from users |
192 | 196 | <include refid="UsersCondition"/> |
193 | 197 | <include refid="orderAndLimit"/> |
... | ... | @@ -197,7 +201,7 @@ |
197 | 201 | <select id="queryUsers2" resultMap="UsersResultMap" parameterType="com.lyms.platform.permission.model.UsersQuery"> |
198 | 202 | select DISTINCT u.id |
199 | 203 | 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, |
200 | - ks_id,foreign_id | |
204 | + ks_id,foreign_id,other_account | |
201 | 205 | from users u LEFT JOIN user_role_maps ur |
202 | 206 | on u.id = ur.user_id |
203 | 207 | where 1=1 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/UsersController.java
View file @
a239cc7
... | ... | @@ -742,7 +742,7 @@ |
742 | 742 | |
743 | 743 | |
744 | 744 | //修改了手机号,不能修改已存在的手机号 |
745 | - if(!phone.equals(users.getPhone())) { | |
745 | + if(!users.getOtherAccount().equals(1) && !phone.equals(users.getPhone())) { | |
746 | 746 | //检查账户是否存在 |
747 | 747 | UsersQuery usersQuery = new UsersQuery(); |
748 | 748 | usersQuery.setPhone(phone); |