diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtOperatingLogMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtOperatingLogMapper.java index 1a766b059b..74453ca396 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtOperatingLogMapper.java +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtOperatingLogMapper.java @@ -14,5 +14,5 @@ public interface ExtOperatingLogMapper { List findBySourceIdEnv(@Param("request") OperatingLogRequest request); - + boolean isNewInstallation(); } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtOperatingLogMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtOperatingLogMapper.xml index ef078d05fb..bf75792c39 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtOperatingLogMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtOperatingLogMapper.xml @@ -128,4 +128,8 @@ LEFT JOIN project t2 ON tt.project_id = t2.id order by tt.oper_time desc + + diff --git a/backend/src/main/java/io/metersphere/service/UserService.java b/backend/src/main/java/io/metersphere/service/UserService.java index 925718e6bd..a9a5388180 100644 --- a/backend/src/main/java/io/metersphere/service/UserService.java +++ b/backend/src/main/java/io/metersphere/service/UserService.java @@ -5,10 +5,7 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import io.metersphere.base.domain.*; import io.metersphere.base.mapper.*; -import io.metersphere.base.mapper.ext.ExtProjectMapper; -import io.metersphere.base.mapper.ext.ExtUserGroupMapper; -import io.metersphere.base.mapper.ext.ExtUserMapper; -import io.metersphere.base.mapper.ext.ExtWorkspaceMapper; +import io.metersphere.base.mapper.ext.*; import io.metersphere.commons.constants.*; import io.metersphere.commons.exception.MSException; import io.metersphere.commons.user.SessionUser; @@ -94,7 +91,7 @@ public class UserService { @Resource private ExtWorkspaceMapper extWorkspaceMapper; @Resource - private OperatingLogMapper operatingLogMapper; + private ExtOperatingLogMapper extOperatingLogMapper; public List queryTypeByIds(List userIds) { return extUserMapper.queryTypeByIds(userIds); @@ -1356,7 +1353,7 @@ public class UserService { public boolean checkWhetherChangePasswordOrNot(LoginRequest request) { // 首次登录需要提示 - if (operatingLogMapper.countByExample(new OperatingLogExample()) == 0) { + if (extOperatingLogMapper.isNewInstallation()) { return true; }