From 066dde2d0bc4a6e03e7c5a1dae7eb1a42c1a188b Mon Sep 17 00:00:00 2001 From: 1 <1@72wo.cn> Date: Tue, 7 Oct 2025 08:04:57 +0000 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=94=AF=E4=B8=80=E7=BA=A6?= =?UTF-8?q?=E6=9D=9F=EF=BC=8C=E9=98=B2=E6=AD=A2=E9=87=8D=E5=A4=8D=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/blazing/service/user.go | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/modules/blazing/service/user.go b/modules/blazing/service/user.go index bbdb33c8..4b8f63d7 100644 --- a/modules/blazing/service/user.go +++ b/modules/blazing/service/user.go @@ -24,10 +24,18 @@ func NewUserService(id uint32) *UserService { }, info: &cool.Service{ Model: model.NewPlayer(), + UniqueKey: map[string]string{ + "player_id": "角色名称不能重复", + }, }, - pet: &cool.Service{Model: model.NewPet()}, - item: &cool.Service{Model: model.NewPlayerBag()}, - talk: &cool.Service{Model: model.NewTalk()}, + pet: &cool.Service{Model: model.NewPet()}, + item: &cool.Service{Model: model.NewPlayerBag(), + UniqueKey: map[string]string{ + "player_id": "角色名称不能重复", + }}, + talk: &cool.Service{Model: model.NewTalk(), UniqueKey: map[string]string{ + "player_id": "角色名称不能重复", + }}, } }