Browse Source

Merge branch 'dev/20200426_2nd' into test

gaodm 5 years atrás
parent
commit
ff281e8932

+ 7 - 1
src/main/java/com/diagbot/facade/SysUserFacade.java

@@ -459,7 +459,7 @@ public class SysUserFacade extends SysUserServiceImpl {
         checkUser(sysUserBaseVO.getUserId());
         Date now = DateUtil.now();
         String userId = SysUserUtils.getCurrentPrincipleID();
-        return this.update(new UpdateWrapper<SysUser>()
+        Boolean res = this.update(new UpdateWrapper<SysUser>()
                 .eq("is_deleted", IsDeleteEnum.N.getKey())
                 .eq("id", sysUserBaseVO.getUserId())
                 .eq("status", StatusEnum.Enable.getKey())
@@ -467,6 +467,12 @@ public class SysUserFacade extends SysUserServiceImpl {
                 .set("gmt_modified", now)
                 .set("status", StatusEnum.Disable.getKey())
         );
+        //删除Token
+        if (res) {
+            tokenFacade.deleteToken(sysUserBaseVO.getUserId().toString());
+        }
+
+        return res;
     }
 
     /**

+ 2 - 2
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -362,9 +362,9 @@
             and CONCAT( IFNULL(t.doctor_name,''),IFNULL(t.beh_doctor_name,''),IFNULL(t.director_doctor_name,'')) like CONCAT('%',#{doctorName},'%')
         </if>
         <if test="doctorCode != null and doctorCode != ''">
-            and t.doctor_id = #{doctorCode}
+            and (t.doctor_id = #{doctorCode}
             or t.beh_doctor_id = #{doctorCode}
-            or t.director_doctor_id = #{doctorCode}
+            or t.director_doctor_id = #{doctorCode})
         </if>
         <if test="name != null and name != ''">
             and t.name like CONCAT('%',#{name},'%')