|
|
@ -10,10 +10,12 @@
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
|
|
|
|
public int Status { get; set; } = 200;
|
|
|
|
public int Status { get; set; } = 200;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// 操作是否成功
|
|
|
|
/// 操作是否成功
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
public bool IsSuccess { get; set; } = false;
|
|
|
|
public bool IsSuccess { get; set; } = false;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// 返回信息
|
|
|
|
/// 返回信息
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
@ -29,13 +31,11 @@
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="msg">消息</param>
|
|
|
|
/// <param name="msg">消息</param>
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <returns></returns>
|
|
|
|
public static Result<T> Success(string msg = "成功")
|
|
|
|
public static Result<T> Success(T t = default)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return Message(true, msg, default);
|
|
|
|
return Message(true, "成功", t);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// 返回成功
|
|
|
|
/// 返回成功
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
@ -48,7 +48,6 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// 返回失败
|
|
|
|
/// 返回失败
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
@ -90,15 +89,9 @@
|
|
|
|
/// <param name="msg">消息</param>
|
|
|
|
/// <param name="msg">消息</param>
|
|
|
|
/// <param name="data">数据</param>
|
|
|
|
/// <param name="data">数据</param>
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <returns></returns>
|
|
|
|
public static Result<T> Message(bool success, T data)
|
|
|
|
public static Result<T> Message(bool success, T data)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return new Result<T>() { Msg="查询成功", Data = data, IsSuccess = success };
|
|
|
|
return new Result<T>() { Msg = "查询成功", Data = data, IsSuccess = success };
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|