修复平台代管订单流程

This commit is contained in:
yml2213
2026-07-25 19:17:19 +08:00
parent e0cb15f408
commit 4bc25b87d8
35 changed files with 2216 additions and 284 deletions
+29 -19
View File
@@ -115,25 +115,35 @@ func (r *Repository) Create(ctx context.Context, userID uint64, orderID uint64,
title = "订单进入结账争议"
content = "对方已发起结账争议,请等待客服仲裁或补充结账证据。"
}
if err := notification.Append(tx,
notification.Entry{
UserID: targetID,
Type: "dispute",
Title: title,
Content: content,
BizType: "dispute",
BizID: &disputeID,
},
notification.Entry{
UserID: userID,
Type: "dispute",
Title: "申诉已提交",
Content: "申诉已进入待处理状态,客服仲裁后会通知双方。",
BizType: "dispute",
BizID: &disputeID,
},
); err != nil {
return err
initiatorNotification := notification.Entry{
UserID: userID,
Type: "dispute",
Title: "申诉已提交",
Content: "申诉已进入待处理状态,客服仲裁后会通知双方。",
BizType: "dispute",
BizID: &disputeID,
}
if isPlatformManagedOrder(order) {
if err := appendPlatformManagedAdminNotification(tx, order, "dispute", title, content); err != nil {
return err
}
if err := notification.Append(tx, initiatorNotification); err != nil {
return err
}
} else {
if err := notification.Append(tx,
notification.Entry{
UserID: targetID,
Type: "dispute",
Title: title,
Content: content,
BizType: "dispute",
BizID: &disputeID,
},
initiatorNotification,
); err != nil {
return err
}
}
createdID = row.ID
return nil