jiangping
2023-09-19 62f53cc6c69c02bbe91a5010ee98f293ae3746bb
server/service/src/main/java/com/doumee/service/system/impl/SystemLoginServiceImpl.java
@@ -1,5 +1,6 @@
package com.doumee.service.system.impl;
import com.baomidou.mybatisplus.extension.api.R;
import com.doumee.core.constants.ResponseStatus;
import com.doumee.core.exception.BusinessException;
import com.doumee.core.model.LoginUserInfo;
@@ -21,6 +22,7 @@
import javax.servlet.http.HttpServletRequest;
import java.util.Date;
import java.util.Objects;
@Slf4j
@Service
@@ -77,7 +79,7 @@
            loginLog.setReason(e.getMessage().length() > 200 ? (e.getMessage().substring(0, 190) + "...") : e.getMessage());
            loginLog.setSuccess(Boolean.FALSE);
            systemLoginLogService.create(loginLog);
            throw new BusinessException(ResponseStatus.ACCOUNT_INCORRECT);
            throw new BusinessException(ResponseStatus.ACCOUNT_INCORRECT.getCode(), Objects.isNull(e.getCause())?ResponseStatus.ACCOUNT_INCORRECT.getMessage():e.getCause().getMessage());
        }
    }
}