From 824eb4bffb0c07e258519d2387ace975595d00e3 Mon Sep 17 00:00:00 2001 From: Administrator Date: Sat, 29 Jan 2022 09:19:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Entities/TaskJobs/JobAppService.cs | 2 +- .../Tasks/TaskDapperRepository.cs | 32 ++++++++++++++++--- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/TaskJobs/JobAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/TaskJobs/JobAppService.cs index 7ba7cdd3..6908b5f7 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/TaskJobs/JobAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/TaskJobs/JobAppService.cs @@ -39,7 +39,7 @@ using Win.Utils; namespace Win.Sfs.SettleAccount.Entities.TaskJobs { - [Authorize(SettleAccountPermissions.Reports.Default)] + //[Authorize(SettleAccountPermissions.Reports.Default)] //[AllowAnonymous] [Route("api/settleaccount/Job")] public class JobAppService: ApplicationService diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Tasks/TaskDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Tasks/TaskDapperRepository.cs index e4d19f6b..05ad1568 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Tasks/TaskDapperRepository.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Tasks/TaskDapperRepository.cs @@ -31,12 +31,34 @@ namespace Win.Sfs.SettleAccount.Repository public virtual async Task> GetTaskJobsAsync(Job p_task) { string str = string.Empty; - str += " SELECT b.Id, a.StateId,b.Type, a.StateName, a.InvocationData, a.Arguments, a.CreatedAt, a.ExpireAt, b.TaskId, b.Name,isnull(b.remark,'') remark, \n "; - str += " b.ActionName, b.Error, b.Creator, b.Email, b.FileName, b.DownFileName, b.ServiceName,b.RealDownFileName,b.RealFileName \n"; - str += " FROM HangFire.Job AS a INNER JOIN \n"; - str += " Set_TaskJob AS b ON a.Id = b.TaskId \n"; + str= "SELECT\n" + + " b.Id,\n" + + " isnull( a.StateId, 0 ) StateId,\n" + + " b.Type,\n" + + " isnull( a.StateName, 'Succeeded' ) StateName,\n" + + " isnull( a.InvocationData, '' ) InvocationData,\n" + + " Isnull( a.Arguments, '' ) Arguments,\n" + + " b.CreationTime CreatedAt,\n" + + " b.CreationTime ExpireAt,\n" + + " b.TaskId,\n" + + " b.NAME,\n" + + " isnull( b.remark, '' ) remark,\n" + + " b.ActionName,\n" + + " b.Error,\n" + + " b.Creator,\n" + + " b.Email,\n" + + " b.FileName,\n" + + " b.DownFileName,\n" + + " b.ServiceName,\n" + + " b.RealDownFileName,\n" + + " b.RealFileName \n" + + "FROM\n" + + " Set_TaskJob AS b\n" + + " LEFT JOIN HangFire.Job AS a ON a.Id = b.TaskId \n" + + "WHERE\n" + + " 1 = 1 \n" + + " AND a.StateName IS NULL"; - str += "where 1=1 "; if (!string.IsNullOrEmpty(p_task.Email)) {