package com.jttech.pfcs.services.impl; import com.jttech.pfcs.services.ITradeService; import com.jttech.pfcs.services.wsdl.ESBServerPortType; import com.jttech.pfcs.services.wsdl.S080030795; import com.jttech.pfcs.vo.req.trade.ReqEPCSnglTranType; import com.jttech.pfcs.vo.req.trade.ReqTranQryType; import com.jttech.pfcs.vo.resp.RspEPCSnglTranType; import com.jttech.pfcs.vo.resp.RspTranQryType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.InitializingBean; import org.springframework.stereotype.Service; /** * @author wanghc * @version 1.0.0 * @date 2023-03-07 */ @Service public class TradeServiceImpl implements ITradeService, InitializingBean { private Logger mLogger = LoggerFactory.getLogger(getClass()); private ESBServerPortType mESBServerPortType; @Override public void afterPropertiesSet() throws Exception { mESBServerPortType = new S080030795().getESBServerSoapEndpoint(); } /** * 单笔交易 * * @param reqVo * @return */ @Override public RspEPCSnglTranType epcSnglTran(ReqEPCSnglTranType reqVo) { mLogger.info("TradeServiceImpl.epcSnglTran req={}", reqVo); RspEPCSnglTranType result = mESBServerPortType.epcSnglTran(reqVo); mLogger.info("TradeServiceImpl.epcSnglTran resp={}", result); return result; } /** * 交易查询 * * @param req * @return */ @Override public RspTranQryType tranQry(ReqTranQryType req) { mLogger.info("TradeServiceImpl.tranQry req={}", req); RspTranQryType result = mESBServerPortType.tranQry(req); mLogger.info("TradeServiceImpl.tranQry resp={}", result); return result; } }