|
|
|
|
|
|
|
|
|
|
|
package cn.com.taiji.ats.manager.handler; |
|
|
|
|
|
|
|
|
|
|
|
import cn.com.taiji.ats.config.AliConfig; |
|
|
|
|
|
import cn.com.taiji.ats.manager.ali.OrderApplyManager; |
|
|
|
|
|
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.ats.AtsServiceType; |
|
|
|
|
|
import cn.com.taiji.core.model.comm.protocol.ats.ali.AliServiceCmd; |
|
|
|
|
|
import cn.com.taiji.core.model.comm.protocol.ats.ali.AtsAliOrderApplyRequest; |
|
|
|
|
|
import cn.com.taiji.core.model.comm.protocol.ats.weiXin.*; |
|
|
|
|
|
import com.zgglyun.common.model.AbstractHttpRequestInfo; |
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* |
|
|
|
|
|
* @author Peream <br> |
|
|
|
|
|
* Create Time:2019年7月28日 下午4:45:09<br> |
|
|
|
|
|
* @since 1.0 |
|
|
|
|
|
* @version 1.0 |
|
|
|
|
|
*/ |
|
|
|
|
|
@Service |
|
|
|
|
|
public class AliServiceHandler extends AbstractAtsServiceHandler<WeiXinServiceCmd> { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public AliServiceHandler() { |
|
|
|
|
|
super(AtsServiceType.ALI); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
private OrderApplyManager orderApplyManager; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
protected <T extends AbstractSignTypeRequest<?>> AbstractSignTypeResponse handleInternal(T request, |
|
|
|
|
|
SignJsonRequest jsonReq, AbstractHttpRequestInfo reqInfo) throws ServiceHandleException { |
|
|
|
|
|
AliServiceCmd cmd = AliServiceCmd.fromIfCode(jsonReq.getIfCode()); |
|
|
|
|
|
switch (cmd) { |
|
|
|
|
|
case ORDERAPPLY: |
|
|
|
|
|
return orderApplyManager.serviceHandle((AtsAliOrderApplyRequest) request); |
|
|
|
|
|
|
|
|
|
|
|
default: |
|
|
|
|
|
throw FileProtocolSystemError.NOT_SUPPORT.toHandleException(jsonReq.getIfCode()); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |