增加心跳接口
This commit is contained in:
@@ -8,6 +8,7 @@ using JNPF.Extras.Thirdparty.JSEngine;
|
||||
using JNPF.JsonSerialization;
|
||||
using JNPF.Logging.Attributes;
|
||||
using JNPF.Systems.Entitys.Permission;
|
||||
using JNPF.Systems.Entitys.System;
|
||||
using JNPF.TaskScheduler;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Cors;
|
||||
@@ -24,14 +25,14 @@ namespace JNPF.Systems.Common;
|
||||
public class TestService : IDynamicApiController, ITransient
|
||||
{
|
||||
private readonly ISqlSugarRepository<UserEntity> _repository;
|
||||
private readonly SqlSugarScope _sugar;
|
||||
private readonly IDataBaseManager _databaseService;
|
||||
private readonly IDataBaseManager _dbService;
|
||||
private SqlSugarScope _sugar;
|
||||
|
||||
public TestService(ISqlSugarRepository<UserEntity> repository, IDataBaseManager databaseService)
|
||||
{
|
||||
_repository = repository;
|
||||
_sugar = (SqlSugarScope)repository.AsSugarClient();
|
||||
_databaseService = databaseService;
|
||||
_dbService = databaseService;
|
||||
}
|
||||
|
||||
[HttpGet("test")]
|
||||
@@ -56,10 +57,16 @@ public class TestService : IDynamicApiController, ITransient
|
||||
}
|
||||
}
|
||||
|
||||
public void xx(UserEntity user)
|
||||
[HttpGet]
|
||||
[AllowAnonymous]
|
||||
public async Task<dynamic> TestSql()
|
||||
{
|
||||
user.Account = "2312321";
|
||||
var dbLinks = await _repository.AsSugarClient().Queryable<DbLinkEntity>().OrderBy(a=>a.SortCode).ToListAsync();
|
||||
_sugar = _dbService.ChangeDataBase(dbLinks[0]);
|
||||
var prd = await _sugar.Ado.SqlQueryAsync<dynamic>("select * from bas_item");
|
||||
var userName = await _repository.AsSugarClient().Queryable<UserEntity>().Where(x => x.Id == "24755317657621").Select(x => SqlFunc.MergeString(x.RealName, " / ", x.Account)).FirstAsync();
|
||||
|
||||
return prd;
|
||||
}
|
||||
|
||||
public void xx1(UserEntity user)
|
||||
|
||||
Reference in New Issue
Block a user