package com.palmnest.application.dto.output.lingling;

import com.palmnest.application.core.util.LingLingUtil;

import java.util.List;

/**
 * @Author hxt
 * @Description TODO
 * @Date 2019/3/12 10:43
 **/
public class LingLingResultUtil {

    public static LingLingResultDto createSuccesDto() {
        return new LingLingResultDto(LingLingUtil.SUCCESS, "", null);
    }

    public static LingLingResultDto createSuccesDto(List responseResult) {
        return new LingLingResultDto(LingLingUtil.SUCCESS, "", responseResult);
    }

    public static LingLingResultDto createSuccesDto(String methodName, Object responseResult) {
        return new LingLingResultDto(LingLingUtil.SUCCESS, methodName, responseResult);
    }

    public static LingLingResultDto createErrorDto(String statusCode, String methodName, Object responseResult) {
        return new LingLingResultDto(statusCode, methodName, responseResult);
    }

    public static LingLingResultDto createErrorDto(String methodName,Object responseResult) {
        return new LingLingResultDto(LingLingUtil.FAILURE, methodName, responseResult);
    }

    public static LingLingResultDto createErrorDto() {
        return new LingLingResultDto(LingLingUtil.FAILURE, "", null);
    }
}
