package com.bailuntec.util;

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

/**
 * 返回结果工具类
 */
public class ResponseUtil {
    /**
     * 返回成功
     * @return
     */
    public static Map<String, Object> success() {
        Map<String, Object> result = new HashMap<>();
        result.put("success", true);
        result.put("message", "成功");
        return result;
    }

    /**
     * 返回失败
     * @return
     */
    public static Map<String, Object> failed(String message) {
        Map<String, Object> result = new HashMap<>();
        result.put("success", false);
        result.put("message", message);
        return result;
    }

}
