记得上下班打卡 | git大法好,push需谨慎

Commit a65d4815 authored by jiangxiulong's avatar jiangxiulong

sendMsgByRedisGoblinStock type改为传参

parent c3cd29c5
......@@ -580,7 +580,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
GoblinOrderAttrVo orderAttrVo = GoblinOrderAttrVo.getNew().copy(orderAttr);
//待支付发送队列
queueUtils.sendMsgByRedisGoblinStock(orderVo.getMasterOrderCode(), storeOrder.getCreatedAt());
queueUtils.sendMsgByRedisGoblinStock(orderVo.getMasterOrderCode(), storeOrder.getCreatedAt(), "GOBLIN");
//redis 赋值
orderVo.setOrderAttrVo(orderAttrVo);
orderVo.setOrderSkuVoIds(goblinOrderSkuIdList);
......
......@@ -51,7 +51,7 @@ public class QueueUtils {
* @param createTime 订单创建时间
* @param masterOrderCode Goblin主订单号
*/
public void sendMsgByRedisGoblinStock(String masterOrderCode, LocalDateTime createTime) {
public void sendMsgByRedisGoblinStock(String masterOrderCode, LocalDateTime createTime, String type) {
String streamKey;
int key = createTime.getMinute() % 10;
switch (key) {
......@@ -88,7 +88,7 @@ public class QueueUtils {
}
HashMap<String, String> map = ObjectUtil.cloneHashMapStringAndString();
map.put("id", masterOrderCode);
map.put("type", "GOBLIN");
map.put("type", type);
map.put("time", createTime.toString());
stringRedisTemplate.opsForStream().add(StreamRecords.mapBacked(map).withStreamKey(streamKey));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment