package com.zhangmeng.model.base.baseController;

import com.zhangmeng.model.vo.Result;
import com.zhangmeng.model.vo.StatusCode;

public class BaseController extends ResponseController {

    protected Result success(){
       return new Result(true, StatusCode.OK,"成功");
    }

    protected Result success(String message){
        return new Result(true,StatusCode.OK,message);
    }

    protected Result success(String message,Object data){
        return new Result(true,StatusCode.OK,message,data);
    }

    protected Result failure() {
        return new Result(false,StatusCode.ERROR,"失败");
    }

    protected Result failure(String message) {
        return new Result(false,StatusCode.ERROR,message);
    }

    protected Result failure(String message,Object data) {
        return new Result(false,StatusCode.ERROR,message,data);
    }
}
