管道基础大数据平台系统开发-【CS】-ExportMap
13693261870
2023-09-07 093df84b78ebbf020fcb4f752b900925aac07565
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
 
namespace MoonExp.Models
{
    public class ResponseMsg<T>
    {
        public ResponseMsg()
        {
            time = DateTime.Now.Ticks;
        }
 
        public ResponseMsg(int code)
            : this()
        {
            this.code = code;
        }
 
        public int code { set; get; }
 
        public String msg { set; get; }
 
        public long count { set; get; }
 
        public T result { set; get; }
 
        public long time { set; get; }
 
        public static ResponseMsg<T> success(String msg, T result, long count = 0)
        {
            ResponseMsg<T> rm = new ResponseMsg<T>(200);
            rm.msg = msg;
            rm.result = result;
            rm.count = count;
 
            return rm;
        }
 
        public static ResponseMsg<T> fail(String msg)
        {
            ResponseMsg<T> rm = new ResponseMsg<T>(500);
            rm.msg = msg;
 
            return rm;
        }
    }
}