feat 修改usn类型为string
This commit is contained in:
21
internal/dao/repository/define.go
Normal file
21
internal/dao/repository/define.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package repository
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"git.hlsq.asia/mmorpg/service-common/db/mysql"
|
||||
)
|
||||
|
||||
var dbName mysql.DBName = "user_db"
|
||||
|
||||
var (
|
||||
cacheBySn = "c:%v:s:%v"
|
||||
userCacheByPhone = "c:user:p:%v"
|
||||
)
|
||||
|
||||
func keyCacheBySn(sn string, tableName string) string {
|
||||
return fmt.Sprintf(cacheBySn, tableName, sn)
|
||||
}
|
||||
|
||||
func keyUserCacheByPhone(phone string) string {
|
||||
return fmt.Sprintf(userCacheByPhone, phone)
|
||||
}
|
||||
Reference in New Issue
Block a user