fix: 修复用户登录后提示修改密码导致登录时间很长

Closes #15509
This commit is contained in:
CaptainB 2022-07-06 11:23:39 +08:00 committed by f2c-ci-robot[bot]
parent e3390ce9cd
commit 6f431de67b
3 changed files with 1 additions and 10 deletions

View File

@ -15,6 +15,4 @@ public interface ExtOperatingLogMapper {
List<OperatingLogDTO> findBySourceIdEnv(@Param("request") OperatingLogRequest request);
List<OperatingLogDTO> findSourceIdByLogIds(@Param("ids") List<String> ids);
boolean isNewInstallation();
}

View File

@ -110,9 +110,6 @@
order by tt.oper_time desc
</select>
<select id="isNewInstallation" resultType="boolean">
SELECT count(1) = 0 from operating_log limit 1
</select>
<select id="findSourceIdByLogIds" resultType="io.metersphere.log.vo.OperatingLogDTO">
select * from operating_log_resource where operating_log_id in
<foreach collection="ids" item="id" index="index"

View File

@ -1424,11 +1424,7 @@ public class UserService {
}
public boolean checkWhetherChangePasswordOrNot(LoginRequest request) {
// 首次登录需要提示
if (extOperatingLogMapper.isNewInstallation()) {
return true;
}
// 只验证admin
// 升级之后 admin 还使用弱密码也提示修改
if (StringUtils.equals("admin", request.getUsername())) {
UserExample example = new UserExample();