Modules/WoChat/Gardener.WoChat.Client/Services/WoChatImService.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
// -----------------------------------------------------------------------------
// 园丁,是个很简单的管理系统
// gitee:https://gitee.com/hgflydream/Gardener
// issues:https://gitee.com/hgflydream/Gardener/issues
// -----------------------------------------------------------------------------
using AntDesign;
using Gardener.Authentication.Dtos;
using Gardener.Client.Base;
using Gardener.UserCenter.Dtos;
using Gardener.WoChat.Dtos;
using Gardener.WoChat.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Gardener.WoChat.Client.Services
{
/// <summary>
/// im 服务
/// </summary>
[ScopedService]
public class WoChatImService : IWoChatImService
{
private readonly string controller = "wo-chat-im";
private readonly IApiCaller apiCaller;
public WoChatImService(IApiCaller apiCaller)
{
this.apiCaller = apiCaller;
}
public Task<Guid?> AddMyImSession(ImSessionAddInput input)
{
return apiCaller.PostAsync<ImSessionAddInput, Guid?>($"{controller}/my-im-session", input);
}
public Task<bool> DisableSessionSendMessage(Guid imSessionId)
{
return apiCaller.PostAsync<Guid, bool>($"{controller}/disable-session-send-message", imSessionId);
}
public Task<bool> EnableSessionSendMessage(Guid imSessionId)
{
return apiCaller.PostAsync<Guid, bool>($"{controller}/enable-session-send-message", imSessionId);
}
public Task<IEnumerable<ImSessionDto>> GetImGroupSessions()
{
return apiCaller.GetAsync<IEnumerable<ImSessionDto>>($"{controller}/im-group-sessions");
}
public Task<ImSessionDto?> GetImSession(Guid imSessionId)
{
return apiCaller.GetAsync<ImSessionDto?>($"{controller}/im-session/{imSessionId}");
}
后面还有 32 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
