|
|
@@ -1,61 +0,0 @@ |
|
|
|
//package cn.com.taiji.ias.manager.handler; |
|
|
|
// |
|
|
|
//import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
//import org.springframework.stereotype.Service; |
|
|
|
// |
|
|
|
//import com.zgglyun.common.model.AbstractHttpRequestInfo; |
|
|
|
// |
|
|
|
//import cn.com.taiji.common.manager.net.http.ServiceHandleException; |
|
|
|
//import cn.com.taiji.common.model.file.FileProtocolSystemError; |
|
|
|
//import cn.com.taiji.core.model.comm.protocol.AbstractSignTypeRequest; |
|
|
|
//import cn.com.taiji.core.model.comm.protocol.AbstractSignTypeResponse; |
|
|
|
//import cn.com.taiji.core.model.comm.protocol.SignJsonRequest; |
|
|
|
//import cn.com.taiji.core.model.comm.protocol.sample.DemoServiceCmd; |
|
|
|
//import cn.com.taiji.core.model.comm.protocol.sample.SampleServiceType; |
|
|
|
//import cn.com.taiji.core.model.comm.protocol.sample.TypeSampleRequest; |
|
|
|
//import cn.com.taiji.core.model.comm.protocol.sample.TypeSampleResponse; |
|
|
|
//import cn.com.taiji.core.model.comm.protocol.sample.valid.demo.CommonResponse; |
|
|
|
//import cn.com.taiji.core.model.comm.protocol.valid.GlyServiceError; |
|
|
|
// |
|
|
|
///** |
|
|
|
// * |
|
|
|
// * @author Peream <br> |
|
|
|
// * Create Time:2019年7月28日 下午4:45:09<br> |
|
|
|
// * @since 1.0 |
|
|
|
// * @version 1.0 |
|
|
|
// */ |
|
|
|
//@Service |
|
|
|
//public class SampleServiceHandler extends cn.com.taiji.core.manager.comm.AbstractCommServiceHandler<SampleServiceType> { |
|
|
|
// |
|
|
|
// @Autowired |
|
|
|
// public SampleServiceHandler() { |
|
|
|
// super(SampleServiceType.SAMPLE); |
|
|
|
// } |
|
|
|
// |
|
|
|
// @Override |
|
|
|
// protected <T extends AbstractSignTypeRequest<?>> AbstractSignTypeResponse handleInternal(T request, |
|
|
|
// SignJsonRequest jsonReq, AbstractHttpRequestInfo reqInfo) throws ServiceHandleException { |
|
|
|
// DemoServiceCmd cmd = DemoServiceCmd.fromIfCode(jsonReq.getIfCode()); |
|
|
|
// switch (cmd) { |
|
|
|
// case TYPESAMMPLE: |
|
|
|
// return typeSample((TypeSampleRequest)request, jsonReq, reqInfo); |
|
|
|
// case ETCTRANS: |
|
|
|
// return new CommonResponse(); |
|
|
|
// default: |
|
|
|
// throw FileProtocolSystemError.NOT_SUPPORT.toHandleException(jsonReq.getIfCode()); |
|
|
|
// } |
|
|
|
// } |
|
|
|
// |
|
|
|
// private TypeSampleResponse typeSample(TypeSampleRequest req, SignJsonRequest jsonReq, |
|
|
|
// AbstractHttpRequestInfo reqInfo) throws ServiceHandleException { |
|
|
|
// logger.info("jsonReq:{}", jsonReq); |
|
|
|
// // 注意,业务逻辑应该写在manager,handler类似controller |
|
|
|
// if (req.isValid()) { |
|
|
|
// throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("valid为true会抛出异常"); |
|
|
|
// } |
|
|
|
// TypeSampleResponse res = new TypeSampleResponse(); |
|
|
|
// res.setMsg(req.getCardId() + " success!"); |
|
|
|
// return res; |
|
|
|
// } |
|
|
|
// |
|
|
|
//} |