|
|
|
@ -6,15 +6,15 @@ import com.java3y.austin.service.api.impl.action.AfterParamCheckAction;
|
|
|
|
|
import com.java3y.austin.service.api.impl.action.AssembleAction;
|
|
|
|
|
import com.java3y.austin.service.api.impl.action.PreParamCheckAction;
|
|
|
|
|
import com.java3y.austin.service.api.impl.action.SendMqAction;
|
|
|
|
|
import com.java3y.austin.service.api.impl.domain.SendTaskModel;
|
|
|
|
|
import com.java3y.austin.support.pipeline.BusinessProcess;
|
|
|
|
|
import com.java3y.austin.support.pipeline.ProcessController;
|
|
|
|
|
import com.java3y.austin.support.pipeline.ProcessTemplate;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* api层的pipeline配置类
|
|
|
|
@ -23,6 +23,14 @@ import java.util.Map;
|
|
|
|
|
@Configuration
|
|
|
|
|
public class PipelineConfig {
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private PreParamCheckAction preParamCheckAction;
|
|
|
|
|
@Autowired
|
|
|
|
|
private AssembleAction assembleAction;
|
|
|
|
|
@Autowired
|
|
|
|
|
private AfterParamCheckAction afterParamCheckAction;
|
|
|
|
|
@Autowired
|
|
|
|
|
private SendMqAction sendMqAction;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 普通发送执行流程
|
|
|
|
@ -35,14 +43,8 @@ public class PipelineConfig {
|
|
|
|
|
@Bean("commonSendTemplate")
|
|
|
|
|
public ProcessTemplate commonSendTemplate() {
|
|
|
|
|
ProcessTemplate processTemplate = new ProcessTemplate();
|
|
|
|
|
ArrayList<BusinessProcess> processList = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
processList.add(preParamCheckAction());
|
|
|
|
|
processList.add(assembleAction());
|
|
|
|
|
processList.add(afterParamCheckAction());
|
|
|
|
|
processList.add(sendMqAction());
|
|
|
|
|
|
|
|
|
|
processTemplate.setProcessList(processList);
|
|
|
|
|
processTemplate.setProcessList(Arrays.asList(preParamCheckAction, assembleAction,
|
|
|
|
|
afterParamCheckAction, sendMqAction));
|
|
|
|
|
return processTemplate;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -62,45 +64,4 @@ public class PipelineConfig {
|
|
|
|
|
return processController;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 组装参数Action
|
|
|
|
|
*
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@Bean
|
|
|
|
|
public AssembleAction assembleAction() {
|
|
|
|
|
return new AssembleAction();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 前置参数校验Action
|
|
|
|
|
*
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@Bean
|
|
|
|
|
public PreParamCheckAction preParamCheckAction() {
|
|
|
|
|
return new PreParamCheckAction();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 后置参数校验Action
|
|
|
|
|
*
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@Bean
|
|
|
|
|
public AfterParamCheckAction afterParamCheckAction() {
|
|
|
|
|
return new AfterParamCheckAction();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 发送消息至MQ的Action
|
|
|
|
|
*
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@Bean
|
|
|
|
|
public SendMqAction sendMqAction() {
|
|
|
|
|
return new SendMqAction();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|