123456789101112131415161718192021222324252627282930313233343536 |
- using Dapper;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using XYY.Core.Standard.Data.Infrastructure;
- namespace XYY.Service.JobManage
- {
- public class JobDbService : IJobDbService
- {
- IUnitOfWork unitOfWork;
- public JobDbService(IUnitOfWork unitOfWork)
- {
- this.unitOfWork = unitOfWork;
- }
- public void AddResultLog(ExecuteJobReturn executeJobReturn)
- {
- string sql = @"INSERT INTO [dbo].[ExecuteJobReturn]([Key1],[Key2],[StartTime],[JobModelId],[JobType],[Data],[ExecuteJobTime],[ResultId],[IsSuccess],[ErrorMsg],[Result])
- values (@Key1 ,@Key2 ,@StartTime ,@JobModelId ,@JobType ,@Data ,@ExecuteJobTime ,@ResultId ,@IsSuccess ,@ErrorMsg ,@Result)";
- this.unitOfWork.Connection.Execute(sql, executeJobReturn);
- }
- public void AddWaitLog(BaseJobModelWaitLog model)
- {
- string sql = @"INSERT INTO [dbo].[BaseJobModelWaitLog]([Key1],[Key2],[StartTime],[JobModelId],[JobType],[Data])
- values (@Key1,@Key2,@StartTime,@JobModelId,@JobType,@Data)";
- this.unitOfWork.Connection.Execute(sql, model);
- }
- }
- }
|