示例#1
0
 public static DefaultResponseModel SetOK(this DefaultResponseModel model)
 {
     model.IsSuccess = true;
     model.ServiceResponse.Returncode    = 0;
     model.Data.ResultInfo.Reserve       = "预留内容";
     model.Data.ResultInfo.SubReturncode = 0;
     model.Data.ResultInfo.SubReturninfo = "处理成功";
     return(model);
 }
示例#2
0
        public static DefaultResponseModel SetError(this DefaultResponseModel model, string message)
        {
            model.IsSuccess = false;
            model.ServiceResponse.Returncode    = 2;
            model.Data.ResultInfo.Reserve       = message;
            model.Data.ResultInfo.SubReturncode = 2;
            model.Data.ResultInfo.SubReturninfo = "处理不成功";

            return(model);
        }