fix 逻辑if处理
This commit is contained in:
@@ -30,7 +30,7 @@ public abstract class BaseJob : IJob
|
||||
sqlSugarOptionsService.IgnoreTenant = true;
|
||||
|
||||
var name = this.GetType().GetCustomAttribute<RecurringJobAttribute>()!.Name;
|
||||
Logger.LogDebug("[{name}]开始执行...", name);
|
||||
Logger.LogInformation("[{name}]开始执行...", name);
|
||||
|
||||
try
|
||||
{
|
||||
@@ -42,7 +42,7 @@ public abstract class BaseJob : IJob
|
||||
}
|
||||
finally
|
||||
{
|
||||
Logger.LogDebug("[{name}]执行结束...", name);
|
||||
Logger.LogInformation("[{name}]执行结束...", name);
|
||||
DbContext.Client.QueryFilter.Restore();
|
||||
sqlSugarOptionsService.IgnoreTenant = false;
|
||||
}
|
||||
|
||||
@@ -48,12 +48,9 @@ public class MealSupplementHandlerJob : BaseJob
|
||||
if (gainfo == null)
|
||||
{
|
||||
gainfo = await DbContext.Queryable<GainfoEntity>().AS("GainfoLeave").Where(x => x.Code == item.Code).SingleAsync();
|
||||
if (gainfo != null)
|
||||
if (gainfo != null && gainfo.ResignationDate < item.Date)
|
||||
{
|
||||
try
|
||||
{
|
||||
//离职数据
|
||||
if (gainfo.ResignationDate < item.Date)
|
||||
{
|
||||
var r = await _jinkoJIPService.SyncMealSupplementRecordsAsync(new List<SyncMealSupplementRecordRequest>
|
||||
{
|
||||
@@ -72,7 +69,7 @@ public class MealSupplementHandlerJob : BaseJob
|
||||
.SetColumns(x => x.ModifiedTime == DateTime.Now)
|
||||
.Where(x => x.UniqueId == item.UniqueId)
|
||||
.ExecuteCommandAsync();
|
||||
}
|
||||
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user