Browse Source

修改日志打印的方式1

training
pref_mail@163.com 1 year ago
parent
commit
dc07ad64b2
  1. 15
      blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/OrderStatusHandler.java

15
blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/OrderStatusHandler.java

@ -9,7 +9,6 @@ import com.logpm.factory.zb.service.IZbFactoryDataService;
import com.logpm.oldproject.entity.AdvanceEntity;
import com.logpm.oldproject.feign.IAdvanceClient;
import com.rabbitmq.client.Channel;
import lombok.Builder;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.RabbitConstant;
import org.springblade.common.exception.CustomerException;
@ -49,7 +48,6 @@ public class OrderStatusHandler {
@Autowired
private IOuPaiFactoryService ouPaiFactoryService;
private Integer retryCount = 1;
@RabbitHandler
public void orderStatusHandler(Map map, Message message, Channel channel) throws IOException, NoSuchAlgorithmException {
@ -72,22 +70,19 @@ public class OrderStatusHandler {
switch (type) {
case FactoryConstant.PIANO:
r = panFactoryDataService.handleStatusData(orderStatusDTO);
int code = r.getCode();
if (code == 400 || code == 200) {
if (r.getCode() == 400 || r.getCode() == 200) {
log.info("TAG {} ##################orderStatusHandler: 该条数据不用处理 orderNo={}", FactoryConstant.PIANO, orderSelfNum);
// channel.basicAck(deliveryTag,true);
} else {
throw new CustomerException(code, r.getMsg());
throw new CustomerException(r.getCode(), r.getMsg());
}
break;
case FactoryConstant.MENGT:
r = mtFactoryDataService.handleStatusData(orderStatusDTO);
code = r.getCode();
if (code == 400 || code == 200) {
log.info("##################orderStatusHandler: 该条数据不用处理 orderNo={}", orderSelfNum);
// channel.basicAck(deliveryTag,true);
if (r.getCode() == 400 || r.getCode() == 200) {
log.info("TAG {} ##################orderStatusHandler: 该条数据不用处理 orderNo={}", FactoryConstant.MENGT, orderSelfNum);
} else {
throw new CustomerException(code, r.getMsg());
throw new CustomerException(r.getCode(), r.getMsg());
}
break;
case FactoryConstant.ZHIBANG:

Loading…
Cancel
Save