1
This commit is contained in:
@@ -5,6 +5,7 @@ import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.jarvis.domain.ErpGoofishOrder;
|
||||
import com.ruoyi.jarvis.domain.ErpGoofishOrderEventLog;
|
||||
import com.ruoyi.jarvis.mapper.ErpGoofishOrderEventLogMapper;
|
||||
import com.ruoyi.jarvis.wecom.WxSendGoofishNotifyClient;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -30,6 +31,9 @@ public class GoofishOrderChangeLogger {
|
||||
@Resource
|
||||
private ErpGoofishOrderEventLogMapper erpGoofishOrderEventLogMapper;
|
||||
|
||||
@Resource
|
||||
private WxSendGoofishNotifyClient wxSendGoofishNotifyClient;
|
||||
|
||||
public void append(Long orderId, String appKey, String orderNo, String eventType, String source, String message) {
|
||||
if (orderId == null || StringUtils.isEmpty(message)) {
|
||||
return;
|
||||
@@ -47,8 +51,14 @@ public class GoofishOrderChangeLogger {
|
||||
erpGoofishOrderEventLogMapper.insert(row);
|
||||
} catch (Exception e) {
|
||||
log.warn("闲管家订单事件日志写入失败 orderId={} {}", orderId, e.toString());
|
||||
return;
|
||||
}
|
||||
log.info("[goofish-order-event] orderId={} orderNo={} type={} source={} {}", orderId, orderNo, eventType, source, msg);
|
||||
try {
|
||||
wxSendGoofishNotifyClient.notifyGoofishEvent(orderNo, eventType, source, msg);
|
||||
} catch (Exception ex) {
|
||||
log.debug("闲鱼订单事件 wxSend 通知跳过 err={}", ex.toString());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user