增加老版本 KJDWebService
This commit is contained in:
1 parent
58abbb5b4f
commit
f84c4c1949
115 files changed
+36598
-18
No files matched your search
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace StoreHub.KJDWebService.Models
|
||||
{
|
||||
public class Result
|
||||
{
|
||||
public Result()
|
||||
{
|
||||
|
||||
}
|
||||
public Result(int code, string msg)
|
||||
{
|
||||
Code = code;
|
||||
Msg = msg;
|
||||
}
|
||||
|
||||
public int Code { get; set; }
|
||||
public string Msg { get; set; }
|
||||
public object Data { get; set; }
|
||||
|
||||
public static Result Success(string msg)
|
||||
{
|
||||
return new Result
|
||||
{
|
||||
Code = 200,
|
||||
Msg = msg
|
||||
};
|
||||
}
|
||||
public static Result Failure(string msg)
|
||||
{
|
||||
return new Result
|
||||
{
|
||||
Code = 500,
|
||||
Msg = msg
|
||||
};
|
||||
}
|
||||
//参数不合法
|
||||
public static Result ArgumentNull()
|
||||
{
|
||||
return new Result { Code = 19999, Msg = "输入为空" };
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user