@@ -3,6 +3,7 @@ package cn.com.taiji.ias.dict; | |||
import cn.com.taiji.core.model.comm.protocol.SignServiceCommand; | |||
import cn.com.taiji.core.model.comm.protocol.SignServiceType; | |||
import cn.com.taiji.core.model.comm.protocol.ias.IasServiceType; | |||
import cn.com.taiji.core.model.comm.protocol.ias.issue.IssueServiceCmd; | |||
import cn.com.taiji.core.model.comm.protocol.ias.order.OrderServiceCmd; | |||
public enum DataType { | |||
@@ -19,13 +20,15 @@ public enum DataType { | |||
SIGN_CHECK("signCheck", IasServiceType.ORDER, OrderServiceCmd.SIGNCHECK), | |||
SIGN_CALLBACK("signCallback", IasServiceType.ORDER, OrderServiceCmd.SIGNCALLBACK), | |||
TRANSACTION("transaction", IasServiceType.ORDER, OrderServiceCmd.TRANSACTION), | |||
GET_H5_URL("getH5Url", IasServiceType.ORDER, OrderServiceCmd.GETH5URL), | |||
CHANGE_GOODS("changeGoods", IasServiceType.ORDER, OrderServiceCmd.CHANGEGOODS), | |||
RETURN_GOODS("returnGoods", IasServiceType.ORDER, OrderServiceCmd.RETURNGOODS), | |||
RETURN_EXAMINE("returnExamine", IasServiceType.ORDER, OrderServiceCmd.RETURNEXAMINE), | |||
ORDER_AUDIT("orderAudit", IasServiceType.ORDER, OrderServiceCmd.ORDERAUDIT), | |||
PUSH_AGREEMENT("pushAgreement", IasServiceType.ORDER, OrderServiceCmd.PUSHAGREEMENT), | |||
GET_H5_URL("getH5Url", IasServiceType.ISSUE, IssueServiceCmd.GETH5URL), | |||
; | |||
private final String value; |
@@ -32,6 +32,8 @@ public class MyCommHandleManager extends AbstractCommHandleManager { | |||
private ValidServiceHandler validServiceHandler; | |||
@Autowired | |||
private OcrServiceHandler ocrServiceHandler; | |||
@Autowired | |||
private IssueServiceHandler issueServiceHandler; | |||
public MyCommHandleManager() { | |||
super(IasServiceSystem.ISSUES); | |||
@@ -47,6 +49,7 @@ public class MyCommHandleManager extends AbstractCommHandleManager { | |||
registerJsonService(deviceServiceHandler); | |||
registerJsonService(validServiceHandler); | |||
registerJsonService(ocrServiceHandler); | |||
registerJsonService(issueServiceHandler); | |||
} | |||
@Override |
@@ -0,0 +1,36 @@ | |||
package cn.com.taiji.ias.manager.handler; | |||
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.ias.IasServiceType; | |||
import cn.com.taiji.core.model.comm.protocol.ias.issue.IssueServiceCmd; | |||
import cn.com.taiji.core.model.comm.protocol.ias.order.*; | |||
import cn.com.taiji.ias.manager.issue.GetH5UrlManager; | |||
import com.zgglyun.common.model.AbstractHttpRequestInfo; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
@Service | |||
public class IssueServiceHandler extends AbstractIasServiceHandler<IssueServiceCmd> { | |||
public IssueServiceHandler() { | |||
super(IasServiceType.ISSUE); | |||
} | |||
@Autowired | |||
private GetH5UrlManager getH5UrlManager; | |||
@Override | |||
protected <T extends AbstractSignTypeRequest<?>> AbstractSignTypeResponse handleInternal(T request, SignJsonRequest jsonReq, AbstractHttpRequestInfo reqInfo) throws ServiceHandleException { | |||
IssueServiceCmd cmd = IssueServiceCmd.fromIfCode(jsonReq.getIfCode()); | |||
switch (cmd) { | |||
case GETH5URL: | |||
return getH5UrlManager.serviceHandle((GetH5UrlRequest) request, jsonReq.getIfCode(), jsonReq.getReqId(), reqInfo); | |||
default: | |||
throw FileProtocolSystemError.NOT_SUPPORT.toHandleException(jsonReq.getIfCode()); | |||
} | |||
} | |||
} |
@@ -8,8 +8,6 @@ import cn.com.taiji.core.model.comm.protocol.SignJsonRequest; | |||
import cn.com.taiji.core.model.comm.protocol.ias.IasServiceType; | |||
import cn.com.taiji.core.model.comm.protocol.ias.order.*; | |||
import cn.com.taiji.ias.manager.order.*; | |||
import cn.com.taiji.ias.manager.ygz.YgzCardUploadManager; | |||
import cn.com.taiji.ias.manager.ygz.YgzObuUploadManager; | |||
import com.zgglyun.common.model.AbstractHttpRequestInfo; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
@@ -42,8 +40,8 @@ public class OrderServiceHandler extends AbstractIasServiceHandler<OrderServiceC | |||
private OrderCancelManager orderCancelManager; | |||
@Autowired | |||
private OrderTransactionManager orderTransactionManager; | |||
@Autowired | |||
private GetH5UrlManager getH5UrlManager; | |||
// @Autowired | |||
// private GetH5UrlManager getH5UrlManager; | |||
@Autowired | |||
private ChangeGoodsManager chageGoodsManager; | |||
@Autowired | |||
@@ -77,8 +75,8 @@ public class OrderServiceHandler extends AbstractIasServiceHandler<OrderServiceC | |||
return orderCancelManager.serviceHandle((OrderCancelRequest)request, jsonReq.getIfCode(), jsonReq.getReqId(), reqInfo); | |||
case TRANSACTION: | |||
return orderTransactionManager.serviceHandle((OrderTransactionRequest)request, jsonReq.getIfCode(), jsonReq.getReqId(), reqInfo); | |||
case GETH5URL: | |||
return getH5UrlManager.serviceHandle((GetH5UrlRequest)request,jsonReq.getIfCode(),jsonReq.getReqId(),reqInfo); | |||
// case GETH5URL: | |||
// return getH5UrlManager.serviceHandle((GetH5UrlRequest)request,jsonReq.getIfCode(),jsonReq.getReqId(),reqInfo); | |||
case CHANGEGOODS: | |||
return chageGoodsManager.serviceHandle((ChangeGoodsRequest)request, jsonReq.getIfCode(), jsonReq.getReqId(), reqInfo); | |||
case RETURNGOODS: |
@@ -1,4 +1,4 @@ | |||
package cn.com.taiji.ias.manager.order; | |||
package cn.com.taiji.ias.manager.issue; | |||
import cn.com.taiji.common.manager.net.http.ServiceHandleException; | |||
import cn.com.taiji.common.pub.TimeTools; | |||
@@ -10,6 +10,8 @@ import cn.com.taiji.core.model.comm.protocol.ias.order.OrderInitRequest; | |||
import cn.com.taiji.core.model.comm.protocol.ias.order.OrderInitResponse; | |||
import cn.com.taiji.core.model.comm.protocol.valid.ErrorMsgBuilder; | |||
import cn.com.taiji.ias.dict.DataType; | |||
import cn.com.taiji.ias.manager.order.AbstractOrderManager; | |||
import cn.com.taiji.ias.manager.order.OrderInitManager; | |||
import cn.com.taiji.ias.model.ServiceLogEvent; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.beans.factory.annotation.Value; | |||
@@ -25,7 +27,7 @@ import java.util.Map; | |||
* @description: 渠道专用创建订单返回H5链接 | |||
*/ | |||
@Service | |||
public class GetH5UrlManager extends AbstractOrderManager<GetH5UrlRequest>{ | |||
public class GetH5UrlManager extends AbstractOrderManager<GetH5UrlRequest> { | |||
public static final String INIT_ORDER_RES = "initOrderRes"; | |||
public GetH5UrlManager() { |
@@ -13,7 +13,7 @@ import cn.com.taiji.common.manager.net.http.ServiceHandleException; | |||
import cn.com.taiji.common.pub.json.JsonTools; | |||
import cn.com.taiji.core.model.comm.protocol.AbstractSignTypeRequest; | |||
import cn.com.taiji.core.model.comm.protocol.AbstractSignTypeResponse; | |||
import cn.com.taiji.ias.manager.order.GetH5UrlManager; | |||
import cn.com.taiji.ias.manager.issue.GetH5UrlManager; | |||
import cn.hutool.json.JSONUtil; | |||
import org.apache.skywalking.apm.toolkit.trace.Tag; | |||
import org.apache.skywalking.apm.toolkit.trace.Trace; |