This commit is contained in:
2024-09-25 11:40:49 +08:00
parent 3feb48169b
commit 9d0cecc1f6
6 changed files with 60 additions and 33 deletions

View File

@@ -11,6 +11,6 @@ namespace Tnb.BasicData.Interfaces
/// <param name="id"></param>
/// <param name="send_type">手动 自动</param>
/// <returns></returns>
Task<string> Send(List<ThirdWebapiRecord> records, string send_type,ISqlSugarClient db=null);
Task<ThirdResult> Send(List<ThirdWebapiRecord> records, string send_type,ISqlSugarClient db=null);
}
}

View File

@@ -44,7 +44,8 @@ namespace Tnb.BasicData
public async Task<string> Send(string id)
{
ThirdWebapiRecord record = await _repository.GetSingleAsync(x=>x.id==id);
return await Send(Arrays.AsList(record), "手动");
ThirdResult thirdResult = await Send(Arrays.AsList(record), "手动");
return thirdResult.msgResult;
}
[HttpGet]
@@ -88,14 +89,14 @@ namespace Tnb.BasicData
return "失败";
}
public async Task<string> Send(List<ThirdWebapiRecord> records, string send_type,ISqlSugarClient db=null)
public async Task<ThirdResult> Send(List<ThirdWebapiRecord> records, string send_type,ISqlSugarClient db=null)
{
ThirdResult thirdResult = null;
bool tranFlag = true;
try
{
if (records == null || records.IsEmpty())
return "";
return new ThirdResult();
if (db == null)
{
@@ -272,9 +273,9 @@ namespace Tnb.BasicData
Log.Error(e.Message,e);
if(tranFlag) await db.Ado.RollbackTranAsync();
}
return thirdResult.Code == 200 ? "成功" : "失败";
return thirdResult;
}
}