|
@@ -49,6 +49,17 @@ public class ControllerBase : Microsoft.AspNetCore.Mvc.ControllerBase
|
|
|
return new JsonView { Code = StatusCodes.Status400BadRequest, Msg = msg };
|
|
|
}
|
|
|
}
|
|
|
+ protected virtual JsonView JsonView(bool s, string msg, object obj)
|
|
|
+ {
|
|
|
+ if (s)
|
|
|
+ {
|
|
|
+ return new JsonView { Code = StatusCodes.Status200OK, Msg = msg,Data= obj };
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return new JsonView { Code = StatusCodes.Status400BadRequest, Msg = msg };
|
|
|
+ }
|
|
|
+ }
|
|
|
protected virtual JsonView JsonView(int code, string msg, object obj)
|
|
|
{
|
|
|
return new JsonView { Code = code, Msg = msg, Data = obj };
|