|
@@ -1,7 +1,6 @@ |
|
|
package repo |
|
|
package repo |
|
|
|
|
|
|
|
|
import ( |
|
|
import ( |
|
|
"fmt" |
|
|
|
|
|
"gim/internal/business/comm/utils" |
|
|
"gim/internal/business/comm/utils" |
|
|
"gim/internal/logic/domain/message/model" |
|
|
"gim/internal/logic/domain/message/model" |
|
|
"gim/pkg/db" |
|
|
"gim/pkg/db" |
|
@@ -16,7 +15,8 @@ type messageRepo struct{} |
|
|
var MessageRepo = new(messageRepo) |
|
|
var MessageRepo = new(messageRepo) |
|
|
|
|
|
|
|
|
func (*messageRepo) tableName(userId int64) string { |
|
|
func (*messageRepo) tableName(userId int64) string { |
|
|
return fmt.Sprintf("message_%03d", userId%messageTableNum) |
|
|
|
|
|
|
|
|
//return fmt.Sprintf("message_%03d", userId%messageTableNum) |
|
|
|
|
|
return "message" |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Save 插入一条消息 |
|
|
// Save 插入一条消息 |
|
|