41 lines
1.3 KiB
C#
41 lines
1.3 KiB
C#
using YLErp.Modules.IntegrationModule.XiaMenXiangYu;
|
|
using YLErp;
|
|
using YLErp.Jobs.Configs;
|
|
|
|
namespace YLErp.Jobs.Imp
|
|
{
|
|
/// <summary>
|
|
/// 金仕达场内交易同步
|
|
/// </summary>
|
|
public class JinshidaExchangeTradeSyncJob : BaseJob
|
|
{
|
|
private IHttpClientFactory _httpClientFactory;
|
|
private JinshidaExchangeTradeSyncJobConfig _jinshidaExchangeTradeSyncJobConfig;
|
|
public JinshidaExchangeTradeSyncJob(JinshidaExchangeTradeSyncJobConfig jinshidaExchangeTradeSyncJobConfig, IHttpClientFactory httpClientFactory)
|
|
{
|
|
_jinshidaExchangeTradeSyncJobConfig= jinshidaExchangeTradeSyncJobConfig;
|
|
_httpClientFactory = httpClientFactory;
|
|
}
|
|
public override Task JobImp()
|
|
{
|
|
var url = _jinshidaExchangeTradeSyncJobConfig.url; //context.MergedJobDataMap.GetString("url").TrimToNull();
|
|
|
|
return new JinshidaEodTradeSyncService(OptUserInfo.SystemUser, _httpClientFactory).Execute(url);
|
|
}
|
|
|
|
#region JobStatus Manager
|
|
static JobStatus jobStatus = JobStatus.Init;
|
|
|
|
public override JobStatus GetJobStatus()
|
|
{
|
|
return jobStatus;
|
|
}
|
|
|
|
public override void SetJobStatus(JobStatus status)
|
|
{
|
|
jobStatus = status;
|
|
}
|
|
#endregion
|
|
}
|
|
}
|