Commit ca2a030894be529e954c3930f3bbeca7a12c5fd1
1 parent
42fc45e03b
Exists in
master
and in
8 other branches
bug fix
用户名和手机号不能同事为空
Showing 2 changed files with 7 additions and 2 deletions
platform-biz-service/src/main/resources/mainOrm/Users.xml
View file @
ca2a030
| ... | ... | @@ -57,13 +57,13 @@ | 
| 57 | 57 | <if test="foreignId != null and foreignId != ''"> | 
| 58 | 58 | foreign_id = #{foreignId,jdbcType=VARCHAR}, | 
| 59 | 59 | </if> | 
| 60 | - <if test="account != null and account != ''"> | |
| 60 | + <if test="account != null"> | |
| 61 | 61 | account = #{account,jdbcType=VARCHAR}, | 
| 62 | 62 | </if> | 
| 63 | 63 | <if test="pwd != null and pwd != ''"> | 
| 64 | 64 | pwd = #{pwd,jdbcType=VARCHAR}, | 
| 65 | 65 | </if> | 
| 66 | - <if test="phone != null and phone != ''"> | |
| 66 | + <if test="phone != null "> | |
| 67 | 67 | phone = #{phone,jdbcType=VARCHAR}, | 
| 68 | 68 | </if> | 
| 69 | 69 | <if test="publishId != null and publishId >= 0"> | 
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/UsersController.java
View file @
ca2a030
| ... | ... | @@ -778,6 +778,11 @@ | 
| 778 | 778 | @RequestParam(value = "orgId",required = false) Integer orgId, | 
| 779 | 779 | @RequestParam(value = "deptId",required = false) Integer deptId) { | 
| 780 | 780 | |
| 781 | + if(StringUtils.isBlank(phone) && StringUtils.isBlank(account)) { | |
| 782 | + ResultUtils.buildParameterErrorResultAndWrite(response, "帐号和手机号不能同时为空"); | |
| 783 | + return; | |
| 784 | + } | |
| 785 | + | |
| 781 | 786 | if(null == roleIds) { | 
| 782 | 787 | ResultUtils.buildParameterErrorResultAndWrite(response, "roleIds不能为空"); | 
| 783 | 788 | return; |