|
@@ -1,4 +1,6 @@
|
|
-using Ant.Core.WebApi.Model;
|
|
|
|
|
|
+using Ant.Core.Utils;
|
|
|
|
+using Ant.Core.WebApi.Enum;
|
|
|
|
+using Ant.Core.WebApi.Model;
|
|
using Central.Control.WebApi.Config;
|
|
using Central.Control.WebApi.Config;
|
|
using Central.Control.WebApi.Log4net;
|
|
using Central.Control.WebApi.Log4net;
|
|
using Central.Control.WebApi.Models.Request;
|
|
using Central.Control.WebApi.Models.Request;
|
|
@@ -142,10 +144,22 @@ namespace Central.Control.WebApi.Controllers
|
|
/// 申请退款
|
|
/// 申请退款
|
|
/// </summary>
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
|
|
+ [AllowAnonymous]
|
|
[HttpPut]
|
|
[HttpPut]
|
|
[Route("orderrefund/{orderId}")]
|
|
[Route("orderrefund/{orderId}")]
|
|
- public ApiResult OrderRefund(string orderId)
|
|
|
|
|
|
+ public ApiResult OrderRefund(string orderId, string token)
|
|
{
|
|
{
|
|
|
|
+ #region 验证token
|
|
|
|
+
|
|
|
|
+ string stringForHash = $"{orderId}|{WebSystemAccessConfig.Sign}";
|
|
|
|
+ string hash = MD5Helper.MD5Hash(stringForHash);
|
|
|
|
+ if (string.Compare(token, hash, true) != 0)
|
|
|
|
+ {
|
|
|
|
+ return new ApiResult(ApiStatusCode.Forbidden, "认证不通过");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ #endregion
|
|
|
|
+
|
|
return _orderService.OrderRefund(orderId);
|
|
return _orderService.OrderRefund(orderId);
|
|
}
|
|
}
|
|
|
|
|