|
|
@ -19,7 +19,7 @@ import org.springframework.beans.factory.annotation.Value;
|
|
|
|
* 将消息发送到MQ
|
|
|
|
* 将消息发送到MQ
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Slf4j
|
|
|
|
@Slf4j
|
|
|
|
public class SendMqAction implements BusinessProcess {
|
|
|
|
public class SendMqAction implements BusinessProcess<SendTaskModel> {
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private KafkaUtils kafkaUtils;
|
|
|
|
private KafkaUtils kafkaUtils;
|
|
|
@ -28,8 +28,8 @@ public class SendMqAction implements BusinessProcess {
|
|
|
|
private String topicName;
|
|
|
|
private String topicName;
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void process(ProcessContext context) {
|
|
|
|
public void process(ProcessContext<SendTaskModel> context) {
|
|
|
|
SendTaskModel sendTaskModel = (SendTaskModel) context.getProcessModel();
|
|
|
|
SendTaskModel sendTaskModel = context.getProcessModel();
|
|
|
|
String message = JSON.toJSONString(sendTaskModel.getTaskInfo(), new SerializerFeature[]{SerializerFeature.WriteClassName});
|
|
|
|
String message = JSON.toJSONString(sendTaskModel.getTaskInfo(), new SerializerFeature[]{SerializerFeature.WriteClassName});
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|