⚡ 优化数据返回
This commit is contained in:
@@ -7,7 +7,7 @@ namespace Infrastructure
|
||||
[Description("success")]
|
||||
SUCCESS = 200,
|
||||
|
||||
[Description("no data")]
|
||||
[Description("没有更多数据")]
|
||||
NO_DATA = 210,
|
||||
|
||||
[Description("参数错误")]
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
//using Newtonsoft.Json;
|
||||
|
||||
namespace Infrastructure.Extensions
|
||||
{
|
||||
|
||||
@@ -57,12 +57,12 @@ namespace Infrastructure.Model
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 返回成功消息
|
||||
/// </summary>
|
||||
/// <param name="data">数据对象</param>
|
||||
/// <returns>成功消息</returns>
|
||||
public static ApiResult Success(object data) { return new ApiResult(HttpStatus.SUCCESS, "success", data); }
|
||||
///// <summary>
|
||||
///// 返回成功消息
|
||||
///// </summary>
|
||||
///// <param name = "data" > 数据对象 </ param >
|
||||
///// < returns > 成功消息 </ returns >
|
||||
//public static ApiResult Success(object data) { return new ApiResult(HttpStatus.SUCCESS, "success", data); }
|
||||
|
||||
/// <summary>
|
||||
/// 返回成功消息
|
||||
@@ -82,7 +82,6 @@ namespace Infrastructure.Model
|
||||
/// <summary>
|
||||
/// 访问被拒
|
||||
/// </summary>
|
||||
/// <param name="apiResult"></param>
|
||||
/// <returns></returns>
|
||||
public ApiResult On401()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user