remove 无用代码
This commit is contained in:
@@ -1,25 +0,0 @@
|
|||||||
// using Dlhis.Basic.Api.Request;
|
|
||||||
// using Dlhis.ScheduledTask.Common.Request;
|
|
||||||
// using Dlhis.ScheduledTask.TaskAssignment.Request;
|
|
||||||
//
|
|
||||||
// namespace Dlhis.ScheduledTask.Common.Services;
|
|
||||||
//
|
|
||||||
// /// <summary>
|
|
||||||
// /// hangfire调度服务
|
|
||||||
// /// </summary>
|
|
||||||
// public interface IHangfireService : IScopeDependency
|
|
||||||
// {
|
|
||||||
// /// <summary>
|
|
||||||
// /// 创建sap人员同步后台任务
|
|
||||||
// /// </summary>
|
|
||||||
// /// <param name="request"></param>
|
|
||||||
// /// <returns></returns>
|
|
||||||
// Task CreateSapPersonSyncBackgroundJobAsync(SapNoRequest request);
|
|
||||||
//
|
|
||||||
// /// <summary>
|
|
||||||
// /// 创建sap人事范围同步后台任务
|
|
||||||
// /// </summary>
|
|
||||||
// /// <param name="request"></param>
|
|
||||||
// /// <returns></returns>
|
|
||||||
// Task CreateSapWerkSyncBackgroundJobAsync(SapNoRequest request);
|
|
||||||
// }
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
// using Dlhis.Entity.Basic.Entity;
|
|
||||||
// using Dlhis.ScheduledTask.Common.Request;
|
|
||||||
// using Dlhis.ScheduledTask.TaskAssignment.Request;
|
|
||||||
// using Hangfire;
|
|
||||||
// using Kurisu.AspNetCore.DataAccess.SqlSugar.Services;
|
|
||||||
// using Kurisu.AspNetCore.Utils;
|
|
||||||
// using Kurisu.AspNetCore.Utils.Extensions;
|
|
||||||
//
|
|
||||||
// namespace Dlhis.ScheduledTask.Common.Services.Implements;
|
|
||||||
//
|
|
||||||
// public class HangfireService : IHangfireService
|
|
||||||
// {
|
|
||||||
// private readonly RedisCache _redisCache;
|
|
||||||
// private readonly IDbContext _dbContext;
|
|
||||||
// private readonly IJinkoJipService _jinkoJipService;
|
|
||||||
//
|
|
||||||
// public HangfireService(RedisCache redisCache, IDbContext dbContext, IJinkoJipService jinkoJipService)
|
|
||||||
// {
|
|
||||||
// _redisCache = redisCache;
|
|
||||||
// _dbContext = dbContext;
|
|
||||||
// _jinkoJipService = jinkoJipService;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public async Task CreateSapPersonSyncBackgroundJobAsync(SapNoRequest request)
|
|
||||||
// {
|
|
||||||
// // var jobKey = $"hangfire:background:person:{request.Code}";
|
|
||||||
// //
|
|
||||||
// // using var handler = await _redisCache.LockAsync(jobKey);
|
|
||||||
// // if (handler.Acquired)
|
|
||||||
// // {
|
|
||||||
// // BackgroundJob.Enqueue<IGainfoUpdateService>(x => x.TodoByCodeAsync(request.Code));
|
|
||||||
// // }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public async Task CreateSapWerkSyncBackgroundJobAsync(SapNoRequest request)
|
|
||||||
// {
|
|
||||||
// // var jobKey = $"hangfire:background:werk:{request.Code}";
|
|
||||||
// //
|
|
||||||
// // await using var handler = await _redisCache.LockAsync(jobKey);
|
|
||||||
// // if (handler.Acquired)
|
|
||||||
// // {
|
|
||||||
// // var werkInfo = await _dbContext.Queryable<WerkEntity>().Where(x => x.Werk == request.Code).SingleAsync();
|
|
||||||
// // werkInfo.ThrowIfNull("人事范围不存在");
|
|
||||||
// //
|
|
||||||
// // werkInfo.BackgroundJobKey.IsPresent().ThrowIfTrue("任务进行中,无法再次发起同步");
|
|
||||||
// //
|
|
||||||
// // BackgroundJob.Enqueue<IGainfoUpdateService>(x => x.TodoByWerkAsync(request.Code));
|
|
||||||
// // }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
Reference in New Issue
Block a user