|
@@ -6,7 +6,6 @@ using Hotline.Share.Dtos.TrCallCenter;
|
|
|
using Hotline.Share.Dtos.Users;
|
|
|
using MapsterMapper;
|
|
|
using System.Security.Cryptography;
|
|
|
-using Tr.Sdk;
|
|
|
using XF.Domain.Authentications;
|
|
|
using XF.Domain.Cache;
|
|
|
using XF.Domain.Constants;
|
|
@@ -26,7 +25,6 @@ namespace Hotline.Users
|
|
|
private readonly ITypedCache<Work> _cacheWork;
|
|
|
private readonly IMapper _mapper;
|
|
|
private readonly ISystemSettingCacheManager _systemSettingCacheManager;
|
|
|
- private readonly ITrClient _trClient;
|
|
|
private readonly ISessionContext _sessionContext;
|
|
|
|
|
|
public UserDomainService(
|
|
@@ -38,7 +36,6 @@ namespace Hotline.Users
|
|
|
IMapper mapper,
|
|
|
ITelCacheManager telCacheManager,
|
|
|
ISystemSettingCacheManager systemSettingCacheManager,
|
|
|
- ITrClient trClient,
|
|
|
ISessionContext sessionContext
|
|
|
)
|
|
|
{
|
|
@@ -50,7 +47,6 @@ namespace Hotline.Users
|
|
|
_mapper = mapper;
|
|
|
_telCacheManager = telCacheManager;
|
|
|
_systemSettingCacheManager = systemSettingCacheManager;
|
|
|
- _trClient = trClient;
|
|
|
_sessionContext = sessionContext;
|
|
|
}
|
|
|
|
|
@@ -153,20 +149,20 @@ namespace Hotline.Users
|
|
|
|
|
|
bool IsTelNeedVerify = bool.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.IsTelNeedVerify).SettingValue[0]);
|
|
|
|
|
|
- var telModel = await _trClient.QueryTelsAsync(new Tr.Sdk.Tels.QueryTelRequest() { TelNo = telNo }, cancellationToken);
|
|
|
- if (telModel!=null && telModel.Count>0)
|
|
|
- {
|
|
|
- work = new Work(userId, _sessionContext.UserName, telModel[0].Id, telNo, telModel[0].Password, telModel[0].Description);
|
|
|
- await _workRepository.AddAsync(work, cancellationToken);
|
|
|
- if (IsTelNeedVerify)
|
|
|
- {
|
|
|
- return new TrOnDutyResponseDto() { TelNo = telNo, TelPwd = "", Description = telModel[0].Description };
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- return new TrOnDutyResponseDto() { TelNo = telNo, TelPwd = telModel[0].Password, Description = telModel[0].Description };
|
|
|
- }
|
|
|
- }
|
|
|
+ //var telModel = await _trClient.QueryTelsAsync(new Tr.Sdk.Tels.QueryTelRequest() { TelNo = telNo }, cancellationToken);
|
|
|
+ //if (telModel!=null && telModel.Count>0)
|
|
|
+ //{
|
|
|
+ // work = new Work(userId, _sessionContext.UserName, telModel[0].Id, telNo, telModel[0].Password, telModel[0].Description);
|
|
|
+ // await _workRepository.AddAsync(work, cancellationToken);
|
|
|
+ // if (IsTelNeedVerify)
|
|
|
+ // {
|
|
|
+ // return new TrOnDutyResponseDto() { TelNo = telNo, TelPwd = "", Description = telModel[0].Description };
|
|
|
+ // }
|
|
|
+ // else
|
|
|
+ // {
|
|
|
+ // return new TrOnDutyResponseDto() { TelNo = telNo, TelPwd = telModel[0].Password, Description = telModel[0].Description };
|
|
|
+ // }
|
|
|
+ //}
|
|
|
throw UserFriendlyException.SameMessage("签入异常,未查询到对应分机信息");
|
|
|
/*
|
|
|
*var work = 缓存.get(userId);
|