package com.heyu.api.baidu.handle.convert;


import com.heyu.api.data.utils.StringUtils;
import com.heyu.api.baidu.BaiduBaseHandle;
import com.heyu.api.baidu.request.convert.BTextreviewQueryRequest;
import com.heyu.api.baidu.response.convert.BTextreviewQueryResp;
import org.springframework.stereotype.Component;

/**
 * https://console.bce.baidu.com/support/?_=1740703582749&timestamp=1740703685163#/api?product=AI&project=%E6%96%87%E5%AD%97%E8%AF%86%E5%88%AB&parent=%E6%99%BA%E8%83%BD%E6%96%87%E6%A1%A3%E5%88%86%E6%9E%90&api=file%2F2.0%2Fbrain%2Fonline%2Fv1%2Ftextreview%2Ftask%2Fquery&method=post
 * <p>
 * <p>
 * <p>
 * 合同审查-获取结果
 */
@Component
public class BTextreviewQueryHandle extends BaiduBaseHandle<BTextreviewQueryRequest, BTextreviewQueryResp> {
    @Override
    public String getUri() {
        return "/file/2.0/brain/online/v1/textreview/task/query";
    }

    @Override
    public String check(BTextreviewQueryRequest bTextreviewQueryRequest) {
        if (StringUtils.isBlank(bTextreviewQueryRequest.getTaskId())) {
            return "taskId 不能为空";
        }
        return null;
    }

    @Override
    public String getContent(BTextreviewQueryRequest bTextreviewQueryRequest) {
        StringBuffer sb = new StringBuffer();
        sb.append("task_id=" + bTextreviewQueryRequest.getTaskId());

        return sb.toString();

    }
}
