From cd2839cb76c4487dff1f44db7d357bf8de6ec02d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E7=90=A6=E6=B6=9B?= Date: Wed, 8 Mar 2023 17:52:44 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90fix=20sonar=E3=80=91LoginServiceImpl?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jero/modules/system/service/impl/LoginServiceImpl.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/service/impl/LoginServiceImpl.java b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/service/impl/LoginServiceImpl.java index 9001c816..74b0ddcd 100644 --- a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/service/impl/LoginServiceImpl.java +++ b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/service/impl/LoginServiceImpl.java @@ -9,7 +9,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.jero.common.api.vo.Result; import com.jero.common.constant.CacheConstant; import com.jero.common.constant.CommonConstant; -import com.jero.common.exception.JeroBootException; import com.jero.common.system.api.ISysBaseAPI; import com.jero.common.system.util.JwtUtil; import com.jero.common.system.vo.LoginUser; @@ -20,16 +19,13 @@ import com.jero.modules.system.entity.SysDepart; import com.jero.modules.system.entity.SysTenant; import com.jero.modules.system.entity.SysUser; import com.jero.modules.system.model.SysLoginModel; -import com.jero.modules.system.model.TreeSelectModel; import com.jero.modules.system.service.*; import com.jero.modules.system.util.RandImageUtil; import lombok.extern.slf4j.Slf4j; import org.apache.poi.ss.formula.functions.T; import org.apache.shiro.SecurityUtils; -import org.jeecgframework.poi.excel.imports.base.ImportFileServiceI; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -369,8 +365,8 @@ public class LoginServiceImpl implements ILoginService { res.setSuccess(true); res.setResult(base64); } catch (Exception e) { - res.error("获取验证码出错"+e.getMessage()); e.printStackTrace(); + return Result.error("获取验证码出错"+e.getMessage()); } return res; }