| 12345678910111213141516171819202122232425262728293031323334 |
- using Business.SyncDataManagement;
- using Quartz;
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Business.Quartz
- {
- public class SyncMySQLDataJob : IJob
- {
- /// <summary>
- /// 同步数据到mongodb服务
- /// </summary>
- public readonly SyncMySQLDataAppService _syncDataAppservice;
- /// <summary>
- /// 构造函数
- /// </summary>
- public SyncMySQLDataJob(SyncMySQLDataAppService syncDataAppservice)
- {
- _syncDataAppservice = syncDataAppservice;
- }
- public Task Execute(IJobExecutionContext context)
- {
- _syncDataAppservice.SyncBaseDataToMongoDB();
- return Task.CompletedTask;
- }
- }
- }
|