``refactor(service): 统一数据库模型访问方式,使用s.Model替代cool.DBM``

This commit is contained in:
1
2025-10-17 21:04:19 +00:00
parent eb3d5f05a1
commit 6e7dc9ebca
4 changed files with 6 additions and 5 deletions

View File

@@ -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使用反射获取