fix: 修正 player_services 数组字段的 SQL 序列化错误
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"juwan-backend/app/player/rpc/internal/models/playerservices"
|
||||
"juwan-backend/pkg/types"
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
@@ -306,7 +307,8 @@ func (_c *PlayerServicesCreate) createSpec() (*PlayerServices, *sqlgraph.CreateS
|
||||
_node.RankRange = &value
|
||||
}
|
||||
if value, ok := _c.mutation.Availability(); ok {
|
||||
_spec.SetField(playerservices.FieldAvailability, field.TypeJSON, value)
|
||||
availability := types.TextArray{Elements: append([]string{}, value...), Valid: true}
|
||||
_spec.SetField(playerservices.FieldAvailability, field.TypeOther, availability)
|
||||
_node.Availability = value
|
||||
}
|
||||
if value, ok := _c.mutation.Rating(); ok {
|
||||
|
||||
Reference in New Issue
Block a user