优化数据返回

This commit is contained in:
不做码农
2023-06-02 18:33:07 +08:00
parent 65543e651c
commit c9d18f12cf
12 changed files with 66 additions and 63 deletions

View File

@@ -7,7 +7,7 @@ namespace Infrastructure
[Description("success")]
SUCCESS = 200,
[Description("no data")]
[Description("没有更多数据")]
NO_DATA = 210,
[Description("参数错误")]

View File

@@ -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
{

View File

@@ -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()
{