From 61c4c3f45e4257e2e7662f033e2719e62366c632 Mon Sep 17 00:00:00 2001
From: wlzboy <66905212@qq.com>
Date: 星期二, 31 三月 2026 23:02:22 +0800
Subject: [PATCH] feat: 优化申请发票,还可以修改发票信息
---
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/NotifySendLogServiceImpl.java | 46 ++++++++++++++++++++++++++++++++++++++--------
1 files changed, 38 insertions(+), 8 deletions(-)
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/NotifySendLogServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/NotifySendLogServiceImpl.java
index f671855..4093e5e 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/NotifySendLogServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/NotifySendLogServiceImpl.java
@@ -49,6 +49,14 @@
}
/**
+ * 鏍规嵁浠诲姟ID鍜岀敤鎴稩D鏌ヨ鍙戦�佽褰�
+ */
+ @Override
+ public NotifySendLog selectNotifySendLog(Long taskId, Long userId, String notifyType, String channel) {
+ return notifySendLogMapper.selectNotifySendLog(taskId, userId, notifyType, channel);
+ }
+
+ /**
* 妫�鏌ユ槸鍚﹀凡鍙戦�佽繃閫氱煡锛堥槻閲嶆鏌ワ級
*
* @param taskId 浠诲姟ID
@@ -75,7 +83,7 @@
* @return 鍒涘缓鐨勮褰曪紝濡傛灉宸插瓨鍦ㄥ垯杩斿洖null
*/
@Override
- @Transactional
+
public NotifySendLog tryCreateSendLog(Long taskId, Long userId, String userName,
String notifyType, String channel) {
// 鍏堟鏌ユ槸鍚﹀凡瀛樺湪
@@ -114,18 +122,29 @@
}
/**
- * 鏇存柊鍙戦�佺姸鎬佷负鎴愬姛
+ * 鏇存柊鍙戦�佺姸鎬佷负鎴愬姛锛堝悜鍚庡吋瀹癸級
*
* @param id 璁板綍ID
* @param result 鍙戦�佺粨鏋滀俊鎭�
*/
- @Override
public void markSendSuccess(Long id, String result) {
+ markSendSuccess(id, result, null);
+ }
+
+ /**
+ * 鏇存柊鍙戦�佺姸鎬佷负鎴愬姛
+ *
+ * @param id 璁板綍ID
+ * @param result 鍙戦�佺粨鏋滀俊鎭�
+ * @param content 鍙戦�佸唴瀹�
+ */
+ @Override
+ public void markSendSuccess(Long id, String result, String content) {
if (id == null) {
return;
}
try {
- notifySendLogMapper.updateSendStatus(id, NotifySendLog.SEND_STATUS_SUCCESS, result);
+ notifySendLogMapper.updateSendStatus(id, NotifySendLog.SEND_STATUS_SUCCESS, result, content);
log.debug("鏇存柊閫氱煡鍙戦�佺姸鎬佷负鎴愬姛锛宨d={}", id);
} catch (Exception e) {
log.error("鏇存柊閫氱煡鍙戦�佺姸鎬佸け璐ワ紝id={}", id, e);
@@ -133,13 +152,24 @@
}
/**
- * 鏇存柊鍙戦�佺姸鎬佷负澶辫触
+ * 鏇存柊鍙戦�佺姸鎬佷负澶辫触锛堝悜鍚庡吋瀹癸級
*
* @param id 璁板綍ID
* @param errorMsg 閿欒淇℃伅
*/
- @Override
public void markSendFailed(Long id, String errorMsg) {
+ markSendFailed(id, errorMsg, null);
+ }
+
+ /**
+ * 鏇存柊鍙戦�佺姸鎬佷负澶辫触
+ *
+ * @param id 璁板綍ID
+ * @param errorMsg 閿欒淇℃伅
+ * @param content 鍙戦�佸唴瀹�
+ */
+ @Override
+ public void markSendFailed(Long id, String errorMsg, String content) {
if (id == null) {
return;
}
@@ -148,7 +178,7 @@
if (errorMsg != null && errorMsg.length() > 500) {
errorMsg = errorMsg.substring(0, 500);
}
- notifySendLogMapper.updateSendStatus(id, NotifySendLog.SEND_STATUS_FAILED, errorMsg);
+ notifySendLogMapper.updateSendStatus(id, NotifySendLog.SEND_STATUS_FAILED, errorMsg, content);
log.debug("鏇存柊閫氱煡鍙戦�佺姸鎬佷负澶辫触锛宨d={}, error={}", id, errorMsg);
} catch (Exception e) {
log.error("鏇存柊閫氱煡鍙戦�佺姸鎬佸け璐ワ紝id={}", id, e);
@@ -207,7 +237,7 @@
* @param maxRetryCount 鏈�澶ч噸璇曟鏁�
* @return 澶辫触璁板綍鍒楄〃
*/
- @Override
+
public List<NotifySendLog> selectFailedNotifySendLogs(Integer maxRetryCount) {
return notifySendLogMapper.selectFailedNotifySendLogs(maxRetryCount);
}
--
Gitblit v1.9.1