|
|
@ -1,8 +1,8 @@ |
|
|
|
package com.logpm.factory.receiver; |
|
|
|
package com.logpm.factory.receiver; |
|
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
|
|
|
import com.logpm.factory.snm.entity.PanOrderStatusLog; |
|
|
|
import com.logpm.factory.snm.entity.OrderStatusLog; |
|
|
|
import com.logpm.factory.snm.service.IPanOrderStatusLogService; |
|
|
|
import com.logpm.factory.snm.service.IOrderStatusLogService; |
|
|
|
import com.rabbitmq.client.Channel; |
|
|
|
import com.rabbitmq.client.Channel; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springblade.common.constant.RabbitConstant; |
|
|
|
import org.springblade.common.constant.RabbitConstant; |
|
|
@ -27,7 +27,7 @@ import java.util.Map; |
|
|
|
public class ErrorQueueHandler { |
|
|
|
public class ErrorQueueHandler { |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
|
private IPanOrderStatusLogService panOrderStatusLogService; |
|
|
|
private IOrderStatusLogService orderStatusLogService; |
|
|
|
|
|
|
|
|
|
|
|
@RabbitHandler |
|
|
|
@RabbitHandler |
|
|
|
public void orderStatusHandlerManualAck(Map map, Message message, Channel channel) { |
|
|
|
public void orderStatusHandlerManualAck(Map map, Message message, Channel channel) { |
|
|
@ -35,10 +35,10 @@ public class ErrorQueueHandler { |
|
|
|
final long deliveryTag = message.getMessageProperties().getDeliveryTag(); |
|
|
|
final long deliveryTag = message.getMessageProperties().getDeliveryTag(); |
|
|
|
try { |
|
|
|
try { |
|
|
|
Long logId = (Long) map.get("logId"); |
|
|
|
Long logId = (Long) map.get("logId"); |
|
|
|
UpdateWrapper<PanOrderStatusLog> updateWrapper = new UpdateWrapper<>(); |
|
|
|
UpdateWrapper<OrderStatusLog> updateWrapper = new UpdateWrapper<>(); |
|
|
|
updateWrapper.set("status",2) |
|
|
|
updateWrapper.set("status",2) |
|
|
|
.eq("id",logId); |
|
|
|
.eq("id",logId); |
|
|
|
boolean updateFlag = panOrderStatusLogService.update(updateWrapper); |
|
|
|
boolean updateFlag = orderStatusLogService.update(updateWrapper); |
|
|
|
if(updateFlag){ |
|
|
|
if(updateFlag){ |
|
|
|
channel.basicAck(deliveryTag, false); |
|
|
|
channel.basicAck(deliveryTag, false); |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|