解决登录时候日志记录的bug

This commit is contained in:
季圣华
2022-02-24 22:57:58 +08:00
parent 33fe6e807e
commit 2b30413796
5 changed files with 15 additions and 1 deletions

View File

@@ -77,6 +77,8 @@ public class TenantConfig {
return true;
} else if ("com.jsh.erp.datasource.mappers.RoleMapperEx.getRoleWithoutTenant".equals(ms.getId())) {
return true;
} else if ("com.jsh.erp.datasource.mappers.logMapperEx.insertLogWithUserId".equals(ms.getId())) {
return true;
}
return false;
}

View File

@@ -79,6 +79,7 @@ public class UserController {
User user=null;
BaseResponseInfo res = new BaseResponseInfo();
try {
String loginName = userParam.getLoginName().trim();
String password = userParam.getPassword().trim();
//判断用户是否已经登录过,登录过不再处理

View File

@@ -33,4 +33,6 @@ public interface LogMapperEx {
@Param("moduleName") String moduleName,
@Param("clientIp") String clientIp,
@Param("createTime") String createTime);
int insertLogWithUserId(Log log);
}

View File

@@ -183,7 +183,7 @@ public class LogService {
log.setStatus(status);
log.setContent(content);
log.setTenantId(tenantId);
logMapper.insertSelective(log);
logMapperEx.insertLogWithUserId(log);
}
}catch(Exception e){
JshException.writeFail(logger, e);