From 49883dfbd26364803def032be02be9aa736ac015 Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Fri, 14 Oct 2022 18:37:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=AD=97=E6=AE=B5=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/v2/ui/views/user_modifybgp.go | 3 +-- pb/user_db.pb.go | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/cmd/v2/ui/views/user_modifybgp.go b/cmd/v2/ui/views/user_modifybgp.go index 5d21a987d..2036c50a6 100644 --- a/cmd/v2/ui/views/user_modifybgp.go +++ b/cmd/v2/ui/views/user_modifybgp.go @@ -8,7 +8,6 @@ import ( "fyne.io/fyne/v2" "fyne.io/fyne/v2/widget" "github.com/sirupsen/logrus" - "github.com/spf13/cast" ) // 修改背景 @@ -24,7 +23,7 @@ func (this *UserModifybgpView) CreateView(t *model.TestCase) fyne.CanvasObject { if err := service.GetPttService().SendToClient( t.MainType, t.SubType, - &pb.UserModifybgpReq{BgpId: cast.ToInt32(bgpId.Text)}, + &pb.UserModifybgpReq{BgpId: bgpId.Text}, ); err != nil { logrus.Error(err) return diff --git a/pb/user_db.pb.go b/pb/user_db.pb.go index 7c1df9e67..def3b0c33 100644 --- a/pb/user_db.pb.go +++ b/pb/user_db.pb.go @@ -124,7 +124,7 @@ type DBUser struct { Title int32 `protobuf:"varint,19,opt,name=title,proto3" json:"title"` //@go_tags(`bson:"title"`)头衔 Offlinetime int64 `protobuf:"varint,11,opt,name=offlinetime,proto3" json:"offlinetime" bson:"offlinetime"` //离线时间 Figure int32 `protobuf:"varint,20,opt,name=figure,proto3" json:"figure" bson:"figure"` //主角形象 - Bgp int32 `protobuf:"varint,21,opt,name=bgp,proto3" json:"bgp" bson:"bgp"` //背景 + Bgp string `protobuf:"bytes,21,opt,name=bgp,proto3" json:"bgp" bson:"bgp"` //背景 } func (x *DBUser) Reset() { @@ -299,11 +299,11 @@ func (x *DBUser) GetFigure() int32 { return 0 } -func (x *DBUser) GetBgp() int32 { +func (x *DBUser) GetBgp() string { if x != nil { return x.Bgp } - return 0 + return "" } type DBUserSetting struct { @@ -493,7 +493,7 @@ var file_user_user_db_proto_rawDesc = []byte{ 0x52, 0x0b, 0x6f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x67, 0x70, 0x18, 0x15, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x03, 0x62, 0x67, 0x70, 0x22, 0xc7, 0x02, 0x0a, 0x0d, 0x44, 0x42, 0x55, 0x73, + 0x28, 0x09, 0x52, 0x03, 0x62, 0x67, 0x70, 0x22, 0xc7, 0x02, 0x0a, 0x0d, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x75, 0x61, 0x7a, 0x68, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x68, 0x75, 0x61,