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

Commit 833e2f63 authored by 胡佳晨's avatar 胡佳晨

修改消费日志

parent 65b5b3a1
...@@ -87,10 +87,11 @@ public class ConsumerProcessor { ...@@ -87,10 +87,11 @@ public class ConsumerProcessor {
// 处理长sql语句 // 处理长sql语句
private void consumerOperationOrderClose(Message msg, Channel channel) { private void consumerOperationOrderClose(Message msg, Channel channel) {
String jsonStr = StringEscapeUtils.unescapeJava(new String(msg.getBody())); String jsonStr = StringEscapeUtils.unescapeJava(new String(msg.getBody()));
OrderCloseMapping.orderCloseMessage mqMessage = JsonUtils.fromJson(jsonStr.substring(1,jsonStr.length()-1), OrderCloseMapping.orderCloseMessage.class); OrderCloseMapping.orderCloseMessage mqMessage = JsonUtils.fromJson(jsonStr.substring(1, jsonStr.length() - 1), OrderCloseMapping.orderCloseMessage.class);
log.debug("consumer ==> mqMessage:{}", mqMessage); log.debug("consumer ==> mqMessage:{}", mqMessage.getOrderTicketIds());
try { try {
mqMessage.getOrderTicketIds().forEach(t -> { for (int x = 0; x< mqMessage.getOrderTicketIds().size(); x++) {
String t = mqMessage.getOrderTicketIds().get(x);
String orderTicketId = t.split(",")[0]; String orderTicketId = t.split(",")[0];
String uid = t.split(",")[1]; String uid = t.split(",")[1];
KylinOrderTicketVo vo = (KylinOrderTicketVo) redisUtil.get("kylin:order:id:" + orderTicketId); KylinOrderTicketVo vo = (KylinOrderTicketVo) redisUtil.get("kylin:order:id:" + orderTicketId);
...@@ -103,7 +104,7 @@ public class ConsumerProcessor { ...@@ -103,7 +104,7 @@ public class ConsumerProcessor {
KylinOrderTicketEntitiesVo items = vo.getEntitiesVoList().get(i); KylinOrderTicketEntitiesVo items = vo.getEntitiesVoList().get(i);
kylinUtils.changeBuyInfo(items.getUserId(), items.getEnterIdCode(), items.getPerformanceId(), items.getTicketId(), -1); kylinUtils.changeBuyInfo(items.getUserId(), items.getEnterIdCode(), items.getPerformanceId(), items.getTicketId(), -1);
} }
}); }
channel.basicAck(msg.getMessageProperties().getDeliveryTag(), false); channel.basicAck(msg.getMessageProperties().getDeliveryTag(), false);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
...@@ -455,6 +456,7 @@ public class ConsumerProcessor { ...@@ -455,6 +456,7 @@ public class ConsumerProcessor {
log.info("=== CONSUMER_ORDER_REFUND ==="); log.info("=== CONSUMER_ORDER_REFUND ===");
this.consumerSqlDaoHandler(msg, channel); this.consumerSqlDaoHandler(msg, channel);
} }
@RabbitListener(bindings = @QueueBinding( @RabbitListener(bindings = @QueueBinding(
exchange = @Exchange(MQConst.EXCHANGES_LIQUIDNET_SQL_ORDER_REFUND), key = MQConst.ROUTING_KEY_SQL_ORDER_REFUND, exchange = @Exchange(MQConst.EXCHANGES_LIQUIDNET_SQL_ORDER_REFUND), key = MQConst.ROUTING_KEY_SQL_ORDER_REFUND,
value = @Queue(MQConst.QUEUES_SQL_ORDER_REFUND) value = @Queue(MQConst.QUEUES_SQL_ORDER_REFUND)
...@@ -463,6 +465,7 @@ public class ConsumerProcessor { ...@@ -463,6 +465,7 @@ public class ConsumerProcessor {
log.info("=== CONSUMER_ORDER_REFUND ==="); log.info("=== CONSUMER_ORDER_REFUND ===");
this.consumerSqlDaoHandler(msg, channel); this.consumerSqlDaoHandler(msg, channel);
} }
@RabbitListener(bindings = @QueueBinding( @RabbitListener(bindings = @QueueBinding(
exchange = @Exchange(MQConst.EXCHANGES_LIQUIDNET_SQL_ORDER_REFUND), key = MQConst.ROUTING_KEY_SQL_ORDER_REFUND, exchange = @Exchange(MQConst.EXCHANGES_LIQUIDNET_SQL_ORDER_REFUND), key = MQConst.ROUTING_KEY_SQL_ORDER_REFUND,
value = @Queue(MQConst.QUEUES_SQL_ORDER_REFUND) value = @Queue(MQConst.QUEUES_SQL_ORDER_REFUND)
...@@ -471,6 +474,7 @@ public class ConsumerProcessor { ...@@ -471,6 +474,7 @@ public class ConsumerProcessor {
log.info("=== CONSUMER_ORDER_REFUND ==="); log.info("=== CONSUMER_ORDER_REFUND ===");
this.consumerSqlDaoHandler(msg, channel); this.consumerSqlDaoHandler(msg, channel);
} }
@RabbitListener(bindings = @QueueBinding( @RabbitListener(bindings = @QueueBinding(
exchange = @Exchange(MQConst.EXCHANGES_LIQUIDNET_SQL_ORDER_REFUND), key = MQConst.ROUTING_KEY_SQL_ORDER_REFUND, exchange = @Exchange(MQConst.EXCHANGES_LIQUIDNET_SQL_ORDER_REFUND), key = MQConst.ROUTING_KEY_SQL_ORDER_REFUND,
value = @Queue(MQConst.QUEUES_SQL_ORDER_REFUND) value = @Queue(MQConst.QUEUES_SQL_ORDER_REFUND)
...@@ -479,6 +483,7 @@ public class ConsumerProcessor { ...@@ -479,6 +483,7 @@ public class ConsumerProcessor {
log.info("=== CONSUMER_ORDER_REFUND ==="); log.info("=== CONSUMER_ORDER_REFUND ===");
this.consumerSqlDaoHandler(msg, channel); this.consumerSqlDaoHandler(msg, channel);
} }
@RabbitListener(bindings = @QueueBinding( @RabbitListener(bindings = @QueueBinding(
exchange = @Exchange(MQConst.EXCHANGES_LIQUIDNET_SQL_ORDER_REFUND), key = MQConst.ROUTING_KEY_SQL_ORDER_REFUND, exchange = @Exchange(MQConst.EXCHANGES_LIQUIDNET_SQL_ORDER_REFUND), key = MQConst.ROUTING_KEY_SQL_ORDER_REFUND,
value = @Queue(MQConst.QUEUES_SQL_ORDER_REFUND) value = @Queue(MQConst.QUEUES_SQL_ORDER_REFUND)
...@@ -497,6 +502,7 @@ public class ConsumerProcessor { ...@@ -497,6 +502,7 @@ public class ConsumerProcessor {
log.info("=== CONSUMER_ORDER_WITHDRAW ==="); log.info("=== CONSUMER_ORDER_WITHDRAW ===");
this.consumerSqlDaoHandler(msg, channel); this.consumerSqlDaoHandler(msg, channel);
} }
@RabbitListener(bindings = @QueueBinding( @RabbitListener(bindings = @QueueBinding(
exchange = @Exchange(MQConst.EXCHANGES_LIQUIDNET_SQL_ORDER_WITHDRAW), key = MQConst.ROUTING_KEY_SQL_ORDER_WITHDRAW, exchange = @Exchange(MQConst.EXCHANGES_LIQUIDNET_SQL_ORDER_WITHDRAW), key = MQConst.ROUTING_KEY_SQL_ORDER_WITHDRAW,
value = @Queue(MQConst.QUEUES_SQL_ORDER_WITHDRAW) value = @Queue(MQConst.QUEUES_SQL_ORDER_WITHDRAW)
...@@ -505,6 +511,7 @@ public class ConsumerProcessor { ...@@ -505,6 +511,7 @@ public class ConsumerProcessor {
log.info("=== CONSUMER_ORDER_WITHDRAW ==="); log.info("=== CONSUMER_ORDER_WITHDRAW ===");
this.consumerSqlDaoHandler(msg, channel); this.consumerSqlDaoHandler(msg, channel);
} }
@RabbitListener(bindings = @QueueBinding( @RabbitListener(bindings = @QueueBinding(
exchange = @Exchange(MQConst.EXCHANGES_LIQUIDNET_SQL_ORDER_WITHDRAW), key = MQConst.ROUTING_KEY_SQL_ORDER_WITHDRAW, exchange = @Exchange(MQConst.EXCHANGES_LIQUIDNET_SQL_ORDER_WITHDRAW), key = MQConst.ROUTING_KEY_SQL_ORDER_WITHDRAW,
value = @Queue(MQConst.QUEUES_SQL_ORDER_WITHDRAW) value = @Queue(MQConst.QUEUES_SQL_ORDER_WITHDRAW)
...@@ -513,6 +520,7 @@ public class ConsumerProcessor { ...@@ -513,6 +520,7 @@ public class ConsumerProcessor {
log.info("=== CONSUMER_ORDER_WITHDRAW ==="); log.info("=== CONSUMER_ORDER_WITHDRAW ===");
this.consumerSqlDaoHandler(msg, channel); this.consumerSqlDaoHandler(msg, channel);
} }
@RabbitListener(bindings = @QueueBinding( @RabbitListener(bindings = @QueueBinding(
exchange = @Exchange(MQConst.EXCHANGES_LIQUIDNET_SQL_ORDER_WITHDRAW), key = MQConst.ROUTING_KEY_SQL_ORDER_WITHDRAW, exchange = @Exchange(MQConst.EXCHANGES_LIQUIDNET_SQL_ORDER_WITHDRAW), key = MQConst.ROUTING_KEY_SQL_ORDER_WITHDRAW,
value = @Queue(MQConst.QUEUES_SQL_ORDER_WITHDRAW) value = @Queue(MQConst.QUEUES_SQL_ORDER_WITHDRAW)
...@@ -521,6 +529,7 @@ public class ConsumerProcessor { ...@@ -521,6 +529,7 @@ public class ConsumerProcessor {
log.info("=== CONSUMER_ORDER_WITHDRAW ==="); log.info("=== CONSUMER_ORDER_WITHDRAW ===");
this.consumerSqlDaoHandler(msg, channel); this.consumerSqlDaoHandler(msg, channel);
} }
@RabbitListener(bindings = @QueueBinding( @RabbitListener(bindings = @QueueBinding(
exchange = @Exchange(MQConst.EXCHANGES_LIQUIDNET_SQL_ORDER_WITHDRAW), key = MQConst.ROUTING_KEY_SQL_ORDER_WITHDRAW, exchange = @Exchange(MQConst.EXCHANGES_LIQUIDNET_SQL_ORDER_WITHDRAW), key = MQConst.ROUTING_KEY_SQL_ORDER_WITHDRAW,
value = @Queue(MQConst.QUEUES_SQL_ORDER_WITHDRAW) value = @Queue(MQConst.QUEUES_SQL_ORDER_WITHDRAW)
......
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