``refactor(service): 统一数据库模型访问方式,使用s.Model替代cool.DBM``
This commit is contained in:
@@ -11,6 +11,7 @@ func Exec[T cool.UserModel, F any](userid uint32, s *cool.Service, processFunc f
|
||||
//todo待测试
|
||||
var player T
|
||||
|
||||
|
||||
m1 := cool.DBM(s.Model).Where("player_id", userid)
|
||||
m1.Scan(&player)
|
||||
// 方法2:使用反射获取
|
||||
|
||||
Reference in New Issue
Block a user