From 72ebcc466c0ff2cdf2b94ec1e29424a3f61811a7 Mon Sep 17 00:00:00 2001 From: wxd <123@qq.com> Date: Fri, 13 Oct 2023 11:16:16 +0800 Subject: [PATCH] code --- src/Shentun.WebApi.Service/ReturnValue.cs | 48 +++++++++++------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/src/Shentun.WebApi.Service/ReturnValue.cs b/src/Shentun.WebApi.Service/ReturnValue.cs index 375a82e..dc2267f 100644 --- a/src/Shentun.WebApi.Service/ReturnValue.cs +++ b/src/Shentun.WebApi.Service/ReturnValue.cs @@ -10,9 +10,9 @@ namespace Shentun.WebApi.Service } public class ReturnValue : IReturnValue { - public int Code { get; set; } - public string Message { get; set; } - public object Data { get; set; } + public int code { get; set; } + public string message { get; set; } + public object data { get; set; } private ReturnValue() { @@ -21,45 +21,45 @@ namespace Shentun.WebApi.Service public static ReturnValue CreateInstance(int code, string message, object obj) { ReturnValue returnValue = new ReturnValue(); - returnValue.Code = code; - returnValue.Message = message; - returnValue.Data = obj; + returnValue.code = code; + returnValue.message = message; + returnValue.data = obj; return returnValue; } public static ReturnValue CreateSuccessInstance() { ReturnValue returnValue = new ReturnValue(); - returnValue.Code = 1; - returnValue.Message = "Success"; - returnValue.Data = null; + returnValue.code = 1; + returnValue.message = "Success"; + returnValue.data = null; return returnValue; } public static ReturnValue CreateSuccessInstance(Object obj) { ReturnValue returnValue = new ReturnValue(); - returnValue.Code = 1; - returnValue.Message = "Success"; - returnValue.Data = obj; + returnValue.code = 1; + returnValue.message = "Success"; + returnValue.data = obj; return returnValue; } public static ReturnValue CreateNotFoundInstance() { ReturnValue returnValue = new ReturnValue(); - returnValue.Code = 0; - returnValue.Message = "无数据"; - returnValue.Data = null; + returnValue.code = 0; + returnValue.message = "无数据"; + returnValue.data = null; return returnValue; } public static ReturnValue CreateErrorInstance(string message) { ReturnValue returnValue = new ReturnValue(); - returnValue.Code = -1; - returnValue.Message = message; - returnValue.Data = null; + returnValue.code = -1; + returnValue.message = message; + returnValue.data = null; return returnValue; } @@ -67,18 +67,18 @@ namespace Shentun.WebApi.Service public static ReturnValue CreateErrorInstance(int code, string messsage) { ReturnValue returnValue = new ReturnValue(); - returnValue.Code = code; - returnValue.Message = messsage; - returnValue.Data = null; + returnValue.code = code; + returnValue.message = messsage; + returnValue.data = null; return returnValue; } public static ReturnValue CreateDataBaseErrorInstance(string message) { ReturnValue returnValue = new ReturnValue(); - returnValue.Code = -2; - returnValue.Message = "数据库错误:" + message; - returnValue.Data = null; + returnValue.code = -2; + returnValue.message = "数据库错误:" + message; + returnValue.data = null; return returnValue; } }