合并 main 分支并融合订单列表最小化与 SQL 治理
- Auth/权限中间件取 main 演进版(错误细分、token 来源),保留 dev 的用户 cookie 与登出撤销语义 - 后台订单列表:融合 main 的首页免 COUNT 优化与关键词索引路由,保留 dev 的最小化 AdminOrderListItemDTO(结账明细仍由详情接口返回,同步调整对应集成测试) - 保留 dev 的 token_version 冻结/解冻递增与 main 的状态变化判断及通知 - 前端:保留 dev 登出接口与 main 的 fetchMe silent 参数、SSE 登录跳转;后台订单表按 dev 最小化 DTO 移除号主到手列
This commit is contained in:
@@ -195,7 +195,7 @@ func AddRenterToListingConversation(tx *gorm.DB, listingID uint64, renterID uint
|
||||
if handoffSupportID > 0 {
|
||||
message += ",卖号组客服已接入"
|
||||
}
|
||||
return sendSystemMessage(tx, conv.ID, message)
|
||||
return sendSystemMessageWithAttention(tx, conv.ID, message, "order_paid")
|
||||
}
|
||||
|
||||
// RemoveRenterFromListingConversation 移出租客,返回是否真的删除了租客成员记录。
|
||||
@@ -248,13 +248,18 @@ func getListingGroupWelcomeMessage(tx *gorm.DB) string {
|
||||
}
|
||||
|
||||
func sendSystemMessage(tx *gorm.DB, conversationID uint64, content string) error {
|
||||
return sendSystemMessageWithAttention(tx, conversationID, content, "")
|
||||
}
|
||||
|
||||
func sendSystemMessageWithAttention(tx *gorm.DB, conversationID uint64, content, attentionType string) error {
|
||||
message := model.ChatMessage{
|
||||
ConversationID: conversationID,
|
||||
SenderType: "system",
|
||||
SenderRole: "system",
|
||||
ContentType: "system",
|
||||
Content: content,
|
||||
AttachmentURLS: emptyJSONList(),
|
||||
ConversationID: conversationID,
|
||||
SenderType: "system",
|
||||
SenderRole: "system",
|
||||
ContentType: "system",
|
||||
Content: content,
|
||||
AttachmentURLS: emptyJSONList(),
|
||||
AdminAttentionType: attentionType,
|
||||
}
|
||||
|
||||
if err := tx.Create(&message).Error; err != nil {
|
||||
|
||||
Reference in New Issue
Block a user