package com.ann.demo.service;

import com.ann.demo.entity.normalEntity.OutPara;
import com.ann.demo.utils.XMLUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 * 解析逻辑
 *
 * @Author: LeiJiaXin
 * @Date: 2019/8/20 16:29
 */
@Component
public class AnalysisService {

    public static String getReturnResult(boolean resultCode)  throws Exception {
        OutPara outPara = new OutPara();
        if (!resultCode) {
            outPara.setRESULT_CODE(false);
            outPara.setRESULT_CONTENT("失败");
        } else {
            outPara.setRESULT_CODE(true);
            outPara.setRESULT_CONTENT("成功");
        }
        return XMLUtils.generateXmlStr(outPara);
    }


}
