yuanliang 1 year ago
parent
commit
08cb95e11c

+ 5 - 4
cooleshow-auth/auth-server/src/main/java/com/yonge/cooleshow/auth/service/impl/SysUserServiceImpl.java

@@ -434,13 +434,14 @@ public class SysUserServiceImpl extends BaseServiceImpl<Long, SysUser> implement
     @Transactional(rollbackFor = Exception.class)
     public HttpResponseResult<List<String>> logoffByPhone(String phone) {
 
-        HttpResponseResult<List<String>> check = adminFeignService.accountLogoffCheck(phone);
-        if (check.getCode() != 200) {
+        try {
+            HttpResponseResult<List<String>> check = adminFeignService.accountLogoffCheck(phone);
             List<String> errMsg = check.getData();
-            if (org.apache.commons.collections.CollectionUtils.isNotEmpty(errMsg)) {
+            if (!CollectionUtils.isEmpty(errMsg)) {
                 return HttpResponseResult.failed(500, errMsg, "注销失败");
             }
-            return HttpResponseResult.failed("");
+        } catch (Exception e) {
+            throw new BizException("数据检查失败");
         }
 
         int num = sysUserDao.countByPhone(phone);