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

cn.fangxinqian.operator.sdk.replace.TemplateService Maven / Gradle / Ivy

package cn.fangxinqian.operator.sdk.replace;

import cn.fangxinqian.operator.sdk.constant.UrlConstant;
import cn.fangxinqian.operator.sdk.replace.dto.TemplateDTO;
import cn.fangxinqian.operator.sdk.replace.vo.TemplateResultVO;
import cn.fangxinqian.operator.sdk.utils.OkHttp;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

import java.io.IOException;

/**
 * @Author NieZhiLiang
 * @Email [email protected]
 * @GitHub https://github.com/niezhiliang
 * @Date 2019-10-09 11:08 上午
 */
public class TemplateService {

    /**
     * pdf关键字替换
     * @param templateDTO
     * @return
     * @throws IOException
     */
    public static TemplateResultVO contentReplace(TemplateDTO templateDTO) throws IOException {
        String result = OkHttp.doPost(UrlConstant.PDF_KEY_REPLACE, JSON.toJSONString(templateDTO));
        return JSONObject.parseObject(result,TemplateResultVO.class);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy