清单修改 使用mq

This commit is contained in:
yuezhihang
2022-04-21 16:32:44 +08:00
parent 51010172f0
commit fb7040d53b
12 changed files with 294 additions and 9 deletions
@@ -0,0 +1,35 @@
package com.adc.da.mq;
import com.adc.da.slrs.otConvertMq.entity.OtConvertMq;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.List;
import java.util.Map;
@Component
public class CreateUpdateMQService {
@Autowired
private AmqpTemplate rabbitTemplate;
/**
* @Author yuezhihang
* @Description 创建消息队列
* Date 2018/8/24 13:59
* @Param [convert, convertType]
* @return int
**/
public void sendMQ(Hashtable<String,String> hashtable , List<String> remove , List<String> add){
Map<String,Object> map=new HashMap<>();
map.put("table",hashtable);
map.put("remove",remove);
map.put("add",add);
//发送消息队列
this.rabbitTemplate.convertAndSend("qd-update-exchange_SQ_GSAR_RELEASE", "qd-update-key_SQ_GSAR_RELEASE", map);
}
}