public static string SuccessResult <T>(T model)
        {
            APISingleModelResult <T> textRes = new APISingleModelResult <T>();

            textRes.code = OperateResCodeEnum.成功.GetHashCode();
            textRes.msg  = OperateResCodeEnum.成功.ToString();
            textRes.data = model;
            return(SerializeToJson(textRes));
        }
Example #2
0
        public static APISingleModelResult <T> PackageSuccess <T>(T data)
        {
            APISingleModelResult <T> result = new APISingleModelResult <T>();

            result.code = OperateResCodeEnum.成功.GetHashCode();
            result.msg  = OperateResCodeEnum.成功.ToString();
            result.data = data;
            return(result);
        }