Security/Yuebon.Security.Services/APPService.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
namespace Yuebon.Security.Services;
/// <summary>
///
/// </summary>
public class APPService: BaseService<APP,AppOutputDto>, IAPPService
{
public APPService(IRepository<APP> appRepository)
{
repository = appRepository;
}
/// <summary>
/// 同步新增实体。
/// </summary>
/// <param name="entity">实体</param>
/// <param name="trans">事务对象</param>
/// <returns></returns>
public override int Insert(APP entity)
{
int result = repository.Insert(entity);
this.UpdateCacheAllowApp();
return result;
}
/// <summary>
/// 异步更新实体。
/// </summary>
/// <param name="entity">实体</param>
/// <param name="where">条件</param>
/// <returns></returns>
public override async Task<bool> UpdateAsync(APP entity, string where)
{
bool result=await repository.UpdateAsync(entity, where);
this.UpdateCacheAllowApp();
return result;
}
/// <summary>
/// 异步步新增实体。
/// </summary>
/// <param name="entity">实体</param>
/// <param name="trans">事务对象</param>
/// <returns></returns>
public override async Task<int> InsertAsync(APP entity)
{
int result = await repository.InsertAsync(entity);
this.UpdateCacheAllowApp();
return result;
}
/// <summary>
/// 获取app对象
/// </summary>
/// <param name="appid">应用ID</param>
/// <param name="secret">应用密钥AppSecret</param>
/// <returns></returns>
public async Task<APP> GetAPP(string appid, string secret)
{
return await repository.Db.Queryable<APP>().Where(o=>o.AppId==appid &&o.AppSecret==secret).FirstAsync();
}
/// <summary>
后面还有 46 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。