修复 ocr 错误

This commit is contained in:
yml2213
2026-06-28 15:00:54 +08:00
parent 18eba36ef9
commit b124c74a46
8 changed files with 331 additions and 44 deletions
+6 -4
View File
@@ -2,6 +2,7 @@ package chat
import (
"errors"
"github.com/redis/go-redis/v9"
"gorm.io/gorm"
"gorm.io/gorm/clause"
"hfb_sys/backend/internal/model"
@@ -10,16 +11,17 @@ import (
)
type Repository struct {
db *gorm.DB
hub *chathub.Hub
db *gorm.DB
hub *chathub.Hub
redis *redis.Client
}
const (
defaultSupportRoleCode = "cs"
)
func NewRepository(db *gorm.DB, hub *chathub.Hub) *Repository {
return &Repository{db: db, hub: hub}
func NewRepository(db *gorm.DB, hub *chathub.Hub, redis *redis.Client) *Repository {
return &Repository{db: db, hub: hub, redis: redis}
}
func EnsureOrderConversation(tx *gorm.DB, order model.RentalOrder) (*model.ChatConversation, error) {
var existing model.ChatConversation