package com.huatek.frame.base.util;


import com.huatek.torch.util.tools.HuatekTools;
import java.util.HashMap;
import java.util.Map;

public class ReplyUtil {
    public ReplyUtil() {
    }

    public static Map<String, Object> put(int code) {
        Map<String, Object> resultMap = new HashMap();
        resultMap.put("code", code);
        resultMap.put("msg", "");
        resultMap.put("data", null);
        resultMap.put("token", "");
        return resultMap;
    }

    public static Map<String, Object> put(int code, String msg) {
        Map<String, Object> resultMap = new HashMap();
        resultMap.put("code", code);
        resultMap.put("msg", msg);
        resultMap.put("data", null);
        resultMap.put("token", "");
        return resultMap;
    }

    public static Map<String, Object> put(int code, String msg, Object data) {
        Map<String, Object> resultMap = new HashMap();
        resultMap.put("code", code);
        resultMap.put("msg", msg);
        resultMap.put("data", data);
        resultMap.put("token", "");
        return resultMap;
    }

    public static Map<String, Object> put(int code, String msg, Object data, String token) {
        Map<String, Object> resultMap = new HashMap(4);
        resultMap.put("code", code);
        resultMap.put("msg", HuatekTools.message(msg));
        resultMap.put("token", token);
        resultMap.put("data", data);
        return resultMap;
    }

    public static Map<String, Object> put(int code, long count, String msg, Object data) {
        Map<String, Object> resultMap = new HashMap(5);
        resultMap.put("code", code);
        resultMap.put("count", count);
        resultMap.put("msg", HuatekTools.message(msg));
        resultMap.put("token", "");
        resultMap.put("data", data);
        return resultMap;
    }
}

