package com.ff.weijinxiao.util;

import java.util.HashMap;
import java.util.Map;

public class ResultTool<T> {
    public static Integer SuccessCode = 10000;
    public static Integer ErrorCode_1 = 10001;
    public static Integer ErrorCode_2 = 10002;

    public static Map<String, Object> genFailResult(Integer code, String message) {
        Map<String, Object> result = new HashMap<>();
        //Map<String, Object> data = new HashMap<>();
        //result.put("data", data);
        result.put("code", code);
        result.put("message", message);
        return result;
    }

    public static Map<String, Object> genSuccessResult(String message) {
        Map<String, Object> result = new HashMap<>();
        result.put("code", 10000);
        result.put("message", message);
        return result;
    }
}
