package org.fouram.core.util;

import org.fouram.core.base.model.PageData;

public class ResultUtil {

	public static PageData result(boolean success) {
		PageData result = new PageData();
		result.put("code", "99990000");
		result.put("success", success);
		return result;
	}

	public static PageData success(Object data, String msg) {
		PageData result = result(true);
		result.put("data", data);
		result.put("msg", msg);
		return result;
	}

	public static PageData error(String msg) {
		PageData result = result(false);
		result.put("msg", msg);
		return result;
	}
}
