Commit eaf63f60 by Neo Turing

优化

parent c07802ba
...@@ -101,14 +101,14 @@ namespace Kivii.Third.Chinaerdos.Entities ...@@ -101,14 +101,14 @@ namespace Kivii.Third.Chinaerdos.Entities
var results = response.data.results.AcceptThirdContractOrder(Guid.Parse(Configs._ownerKvid), Configs._ownerName, conn); var results = response.data.results.AcceptThirdContractOrder(Guid.Parse(Configs._ownerKvid), Configs._ownerName, conn);
try //try
{ //{
foreach (var item in results) // foreach (var item in results)
{ // {
client.AcceptOrderConfirm(Configs._token, Configs._secret, item.SerialNumber); // client.AcceptOrderConfirm(Configs._token, Configs._secret, item.SerialNumber);
} // }
} //}
catch { } //catch { }
rtns.Results.AddRange(results); rtns.Results.AddRange(results);
rtns.Total = rtns.Results.Count; rtns.Total = rtns.Results.Count;
......
...@@ -73,11 +73,11 @@ namespace Kivii.Third.Chinaerdos.Extensions ...@@ -73,11 +73,11 @@ namespace Kivii.Third.Chinaerdos.Extensions
/// <param name="appsecret"></param> /// <param name="appsecret"></param>
/// <param name="orderNo"></param> /// <param name="orderNo"></param>
/// <returns></returns> /// <returns></returns>
public static OrderResponse AcceptOrderConfirm(this JsonHttpClient _client, string apptoken, string appsecret, string orderNo) public static OrderResponse AcceptOrderConfirm(this JsonHttpClient _client, string orderNo, string apptoken = null, string appsecret = null)
{ {
(_client == null).ThrowIfTrue("AcceptOrderConfirm:请传入_client"); (_client == null).ThrowIfTrue("AcceptOrderConfirm:请传入_client");
(apptoken.IsNullOrEmpty()).ThrowIfTrue("AcceptOrderConfirm:请传入apptoken"); if (apptoken.IsNullOrEmpty()) apptoken = Configs._token;//.ThrowIfTrue("AcceptOrderConfirm:请传入apptoken");
(appsecret.IsNullOrEmpty()).ThrowIfTrue("AcceptOrderConfirm:请传入appsecret"); if (appsecret.IsNullOrEmpty()) appsecret = Configs._secret;//.ThrowIfTrue("AcceptOrderConfirm:请传入appsecret");
(orderNo.IsNullOrEmpty()).ThrowIfTrue("AcceptOrderConfirm:请传入orderNo"); (orderNo.IsNullOrEmpty()).ThrowIfTrue("AcceptOrderConfirm:请传入orderNo");
//var client = new JsonServiceClient(baseUrl); //var client = new JsonServiceClient(baseUrl);
...@@ -293,6 +293,7 @@ namespace Kivii.Third.Chinaerdos.Extensions ...@@ -293,6 +293,7 @@ namespace Kivii.Third.Chinaerdos.Extensions
var allReports = conn.Select(queryReports); var allReports = conn.Select(queryReports);
if (allReports.IsNullOrEmpty()) return; if (allReports.IsNullOrEmpty()) return;
var client = new JsonHttpClient(Configs._defaultUrl);
foreach (var third in thirds) foreach (var third in thirds)
{ {
var reports = allReports.Where(o => o.BizId == third.SerialNumber).ToList(); var reports = allReports.Where(o => o.BizId == third.SerialNumber).ToList();
...@@ -351,6 +352,12 @@ namespace Kivii.Third.Chinaerdos.Extensions ...@@ -351,6 +352,12 @@ namespace Kivii.Third.Chinaerdos.Extensions
third.IsAccepted = true; third.IsAccepted = true;
third.AddOnlyProperties(o => o.IsAccepted); third.AddOnlyProperties(o => o.IsAccepted);
conn.UpdateOnly(third); conn.UpdateOnly(third);
try
{
client.AcceptOrderConfirm(third.SerialNumber, Configs._token, Configs._secret);
}
catch { }
} }
} }
......
...@@ -70,14 +70,14 @@ namespace Kivii.Third.Chinaerdos.Jobs ...@@ -70,14 +70,14 @@ namespace Kivii.Third.Chinaerdos.Jobs
var results = response.data.results.AcceptThirdContractOrder(ownerKvid, ownerName, conn); var results = response.data.results.AcceptThirdContractOrder(ownerKvid, ownerName, conn);
TaskContext.Message = $"新增{results.Count}条!"; TaskContext.Message = $"新增{results.Count}条!";
try //try
{ //{
foreach (var item in results) // foreach (var item in results)
{ // {
client.AcceptOrderConfirm(token, secret, item.SerialNumber); // client.AcceptOrderConfirm(token, secret, item.SerialNumber);
} // }
} //}
catch { } //catch { }
return true; return true;
} }
......
...@@ -33,5 +33,5 @@ using System.Runtime.InteropServices; ...@@ -33,5 +33,5 @@ using System.Runtime.InteropServices;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示: //通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("5.4.2024.10220")] [assembly: AssemblyVersion("5.4.2024.10280")]
[assembly: AssemblyFileVersion("5.4.2024.10220")] [assembly: AssemblyFileVersion("5.4.2024.10280")]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment