add: 打手初始化接口

This commit is contained in:
zetaloop
2026-04-04 03:35:36 +08:00
parent 85ce6a45c5
commit 32d58ef462
12 changed files with 224 additions and 21 deletions
@@ -7,6 +7,7 @@ import (
"errors"
"fmt"
"juwan-backend/app/player/rpc/internal/models/players"
"juwan-backend/pkg/types"
"time"
"entgo.io/ent/dialect/sql/sqlgraph"
@@ -314,7 +315,8 @@ func (_c *PlayersCreate) createSpec() (*Players, *sqlgraph.CreateSpec) {
_node.ShopID = &value
}
if value, ok := _c.mutation.Tags(); ok {
_spec.SetField(players.FieldTags, field.TypeJSON, value)
tags := types.TextArray{Elements: append([]string{}, value...), Valid: true}
_spec.SetField(players.FieldTags, field.TypeOther, tags)
_node.Tags = value
}
if value, ok := _c.mutation.Games(); ok {