| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 | 
							- package com.miniframe.generate.comm.httpclientapater;
 
- import com.miniframe.spring.httpclient.MFHttpRespInfo;
 
- import org.slf4j.Logger;
 
- import org.slf4j.LoggerFactory;
 
- import java.util.LinkedHashMap;
 
- import java.util.Map;
 
- import com.miniframe.core.Transmitter;
 
- import com.miniframe.core.ext.UtilTools;
 
- import com.miniframe.generate.comm.system.D_D000015;
 
- import com.miniframe.generate.comm.system.D_SYSTEMHEAD;
 
- import com.miniframe.generate.business.system.model.D000015BaseModel;
 
- public class D000015Client {
 
- 	private static final Logger logger = LoggerFactory.getLogger(D000015Client.class);
 
- 	private MFHttpRespInfo respInfo;
 
- 	public MFHttpRespInfo getRespInfo(){
 
- 		return respInfo;
 
- 	}
 
- 	/**
 
- 	 * 调用 [系统服务->日志文件获取((D000015)]的通讯接口
 
- 	 * @param model 接口模型
 
- 	 * @param extMap 扩展输入
 
- 	 * @param url 请求地址
 
- 	 * @return model 接口模型
 
- 	 * @throws Exception
 
- 	 */
 
- 	@SuppressWarnings({ "rawtypes", "unchecked" })
 
- 	public D000015BaseModel execute(D000015BaseModel model,final Map extMap,final String url) throws Exception {
 
- 		this.executeToRespInfo(model,extMap,url);
 
- 		return model;
 
- 	}
 
- 	@SuppressWarnings({ "rawtypes", "unchecked" })
 
- 	public D000015BaseModel execute(D000015BaseModel model,final Map extMap) throws Exception {
 
- 		this.executeToRespInfo(model,extMap,null);
 
- 		return model;
 
- 	}
 
- 	@SuppressWarnings({ "rawtypes", "unchecked" })
 
- 	public MFHttpRespInfo executeToRespInfo(D000015BaseModel model,final Map extMap,final String url) throws Exception {
 
- 		if (logger.isDebugEnabled()) {
 
- 			logger.debug("execute(D000015BaseModel) - start");
 
- 		}
 
- 		if(UtilTools.isNullOrBlank(model.getA_systemhead().getTransCode())){
 
- 			model.getA_systemhead().setTransCode("D000015");
 
- 		}
 
- 		Map inMap = new LinkedHashMap();
 
- 		inMap.putAll(UtilTools.obj2Map(model.getA_systemhead()));
 
- 		inMap.putAll(UtilTools.obj2Map(model.getA_d000015()));
 
- 		if(extMap!=null && extMap.size()>0){
 
- 			inMap.putAll(extMap);
 
- 		}
 
- 		Transmitter httpclientApater = (Transmitter) UtilTools.getBean("httpclientApater");
 
- 		MFHttpRespInfo respInfo;
 
- 		if(UtilTools.isNotNullAndBlank(url)){
 
- 			respInfo = httpclientApater.doPostDataToRespInfo(inMap,url);
 
- 		}else{
 
- 			respInfo = httpclientApater.doPostDataToRespInfo(inMap);
 
- 		}
 
- 		if(respInfo!=null) {
 
- 			Map outMap=respInfo.getParamMap();
 
- 			D_SYSTEMHEAD d_systemhead =  UtilTools.map2Obj(outMap, D_SYSTEMHEAD.class);
 
- 			D_D000015 d_d000015 =  UtilTools.map2Obj(outMap, D_D000015.class);
 
- 			model.setD_systemhead(d_systemhead);
 
- 			model.setD_d000015(d_d000015);
 
- 		}
 
- 		if (logger.isDebugEnabled()) {
 
- 			logger.debug("execute(D000015BaseModel) - end");
 
- 		}
 
-         this.respInfo=respInfo;
 
- 		return respInfo;
 
- 	}
 
- 	@SuppressWarnings({ "rawtypes", "unchecked" })
 
- 	public D000015BaseModel execute(D000015BaseModel model) throws Exception {
 
- 		return this.execute(model,null,null);
 
- 	}
 
- }
 
 
  |