修改自动生成模板

This commit is contained in:
ayflying
2025-02-10 14:42:02 +08:00
parent 167f90b250
commit 2b51cc5f7c
5 changed files with 38 additions and 11 deletions

View File

@@ -1,7 +1,6 @@
package act{id}
import (
v1 "game_server/api/act/v1"
"game_server/internal/service"
"github.com/gogf/gf/v2/os/gctx"
)
@@ -28,7 +27,7 @@ func init() {
func (s *sAct{id}) GetData(uid int64) (data *Data) {
get, _ := service.GameAct().Info(uid, ActId)
get.Scan(&data)
if get.IsEmpty() || data == nil {
if get.IsEmpty() || get.IsNil() || data == nil {
data = &Data{
}
}