32 lines
1.1 KiB
C#
32 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Crm.Core.Domain
|
|
{
|
|
public class UserInfoDomain : IUserInfoDomain
|
|
{
|
|
private readonly IHttpClient _httpClient;
|
|
private readonly IConfiguration _configuration;
|
|
private readonly SystemConfig _systemConfig;
|
|
|
|
public UserInfoDomain(IHttpClient httpClient, IConfiguration configuration)
|
|
{
|
|
_configuration = configuration;
|
|
_systemConfig = _configuration.GetSection("SystemConfig").Get<SystemConfig>();
|
|
_httpClient = httpClient;
|
|
}
|
|
|
|
public async Task<List<UserInfoReq>> GetUserInfoByApi(string? appid, string? userid)
|
|
{
|
|
var res = new List<UserInfoReq>();
|
|
var url = _systemConfig.ZxdUrl.Trim('/'); // _basParameterService.GetParameterValue("Zxd_CoreApiUrl");
|
|
url = $"{url}/Api/UserInfo/list";
|
|
var resModel = await _httpClient.GetAsync<ApiResult<List<UserInfoReq>>>($"{url}?appid={appid}&appuserid={userid}");
|
|
res = resModel.Data;
|
|
return res;
|
|
}
|
|
}
|
|
} |