统计订单列表页 增加退款成功按钮
This commit is contained in:
1 parent
1ed9d72815
commit
87a0d34526
7 files changed
+135
-17
No files matched your search
@@ -37,6 +37,12 @@ namespace _29WxOrderWpf.Ctrls.Statistics.Services
|
||||
/// 订单明细列表(有效订单 / 退款订单 / 买手未退回金额的订单),供订单列表弹窗使用。
|
||||
/// </summary>
|
||||
Task<List<ShopOrderDetailResponse>> QueryOrderRowsAsync(ShopRevenueStatisticsQuery query, ShopOrderDetailType detailType);
|
||||
|
||||
/// <summary>
|
||||
/// 把某笔买手订单标记为退款成功(订单列表弹窗“退款成功”按钮,仅买手未退回金额的订单使用)。
|
||||
/// </summary>
|
||||
/// <param name="id">买手退款表ID(<see cref="BuyerOrderInfo.RefundId"/>,即表格当前行的 id)</param>
|
||||
Task<bool> UpdateBuyerRefundStatusAsync(long id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -364,6 +370,9 @@ namespace _29WxOrderWpf.Ctrls.Statistics.Services
|
||||
/// <summary>订单明细接口地址(订单列表弹窗用)</summary>
|
||||
private const string GetShopOrderDetailsApi = "shop_revenue_statistics/GetShopOrderDetails";
|
||||
|
||||
/// <summary>更新买手订单退款状态接口地址(id 通过 URL 参数传递)</summary>
|
||||
private const string UpdateBuyerRefundStatusApi = "buyer/UpdateBuyerRefundStatsu";
|
||||
|
||||
/// <summary>Unix 纪元(本地时区),用于解析以时间戳作为 Key 的返回数据</summary>
|
||||
private static readonly DateTime UnixEpoch = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));
|
||||
|
||||
@@ -626,5 +635,24 @@ namespace _29WxOrderWpf.Ctrls.Statistics.Services
|
||||
EnsureSuccess(ret);
|
||||
return ret.Data ?? new List<ShopOrderDetailResponse>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 请求 buyer/UpdateBuyerRefundStatsu 更新买手订单退款状态:
|
||||
/// id 拼在 URL 查询参数上(Build29WxObjString 生成的地址已带 ?obj=…,这里用 &id= 追加);
|
||||
/// 请求体走 UserLogin.GetSignPostData 常规签名(time/code 等)。
|
||||
/// 返回码非 200 时抛出异常,由调用方提示。
|
||||
/// </summary>
|
||||
public async Task<bool> UpdateBuyerRefundStatusAsync(long id)
|
||||
{
|
||||
if (id == 0)
|
||||
throw new Exception("更新失败:缺少买手订单ID");
|
||||
|
||||
var url = BaseClass.Build29WxObjString(UpdateBuyerRefundStatusApi) + "&id=" + id;
|
||||
var html = await GetHtml.PostJsonAsync(url, UserLogin.GetSignPostData(new { }));
|
||||
|
||||
var ret = Deserialize<Result<bool>>(html);
|
||||
EnsureSuccess(ret);
|
||||
return ret.Data;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user