All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.gitee.easyopen.ApiResultCreator Maven / Gradle / Ivy

Go to download

easyopen mini版,保留基本签名校验,文档功能。https://gitee.com/durcframework/easyopen

There is a newer version: 1.0.4
Show newest version
package com.gitee.easyopen;

/**
 * 负责对返回结果进行封装
 * 
 * @author tanghc
 *
 */
public class ApiResultCreator implements ResultCreator {

    @Override
    public Result createResult(Object returnObj) {
        return new ApiResult(returnObj);
    }

    @Override
    public Result createErrorResult(Object code, String errorMsg, Object data) {
        Result ret = new ApiResult();
        ret.setCode(code);
        ret.setMsg(errorMsg);
        ret.setData(data);
        return ret;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy