This commit is contained in:
van
2026-04-10 00:39:44 +08:00
parent 0205fe2c09
commit ce3af838bd
4 changed files with 182 additions and 0 deletions

View File

@@ -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());
}
}
/**