Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
my6521 committed Apr 30, 2024
1 parent 350cae6 commit 3b2637a
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ public async Task<IActionResult> Query()
};

var result = await _client.ExecuteAsync(request, _optionsAccessor.Value);

return Ok();
}

Expand Down
26 changes: 0 additions & 26 deletions src/WWB.Paylink.BaoFooTransfer/BaseResponse.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Newtonsoft.Json;
using WWB.Paylink.BaoFooTransfer.Domain;

namespace WWB.Paylink.BaoFooTransfer
{
Expand All @@ -15,29 +14,4 @@ internal virtual void Execute()
{
}
}

public abstract class BaseUnionGWResponse<T> : BaseResponse
{
/// <summary>
///
/// </summary>
[JsonIgnore]
public T ResultData { get; set; }

/// <summary>
///
/// </summary>
[JsonIgnore]
public UnionGWResultHeader Header { get; set; }

/// <summary>
/// 处理器
/// </summary>
internal override void Execute()
{
var result = JsonConvert.DeserializeObject<UnionGWResultWraper<T>>(Raw);
ResultData = result.Body;
Header = result.Header;
}
}
}
59 changes: 59 additions & 0 deletions src/WWB.Paylink.BaoFooTransfer/Response/BaseUnionGWResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
using Newtonsoft.Json;
using WWB.Paylink.BaoFooTransfer.Domain;

namespace WWB.Paylink.BaoFooTransfer.Response
{
public abstract class BaseUnionGWResponse<T> : BaseResponse
{
/// <summary>
/// 宝付提供给商户的唯一编号
/// </summary>
[JsonIgnore]
public string MemberId { get; set; }

/// <summary>
/// 服务编号
/// </summary>
[JsonIgnore]
public string ServiceTp { get; set; }

/// <summary>
/// 终端号
/// </summary>
[JsonIgnore]
public string TerminalId { get; set; }

/// <summary>
/// 系统返回码
/// </summary>
[JsonIgnore]
public string SysRespCode { get; set; }

/// <summary>
/// 系统返回信息
/// </summary>
[JsonIgnore]
public string SysRespDesc { get; set; }

/// <summary>
///
/// </summary>
[JsonIgnore]
public T Body { get; set; }

/// <summary>
/// 处理器
/// </summary>
internal override void Execute()
{
var result = JsonConvert.DeserializeObject<UnionGWResultWraper<T>>(Raw);

MemberId = result.Header.MemberId;
ServiceTp = result.Header.ServiceTp;
TerminalId = result.Header.TerminalId;
SysRespCode = result.Header.SysRespCode;
SysRespDesc = result.Header.SysRespDesc;
Body = result.Body;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>disable</Nullable>
<PackageId>WWB.Paylink.BaoFooTransfer</PackageId>
<Version>1.0.8</Version>
<Version>1.0.9</Version>
<Authors>my6521</Authors>
<Description>宝付代付SDK。</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down

0 comments on commit 3b2637a

Please sign in to comment.