添加测试接口

This commit is contained in:
wh_zcy 2022-08-11 18:06:17 +08:00
parent 0aba7a3fef
commit 206fa0f9bb
31 changed files with 1227 additions and 481 deletions

View File

@ -104,6 +104,7 @@ const (
APP_TESTCASE_FORM_TASKTAG = "任务类型"
APP_TESTCASE_FORM_TASK_OID = "任务OID"
APP_TESTCASE_FORM_NICKNAME = "昵称"
APP_TESTCASE_FORM_SIGN = "签名"
APP_TESTCASE_OPTIONS = "选填"
AAP_TESTCASE_FORM_TASK_DAY = "日常任务"
APP_TESTCASE_FORM_TASK_WEEK = "周常任务"
@ -111,6 +112,8 @@ const (
APP_TESTCASE_FORM_BINGO = "命令"
APP_TESTCASE_BTN_PUSH = "推送"
APP_TESTCASE_FORM_LABEL_FID = "好友ID"
APP_TESTCASE_FORM_MAILID = "邮件ID"
APP_TESTCASE_FORM_ITEMTYPE = "道具类型"
//button
BUTTON_LOGIN = "登录"
@ -141,13 +144,20 @@ const (
// userinfo
USERINFO_BTN_COPY = "复制UID"
USERINFO_TITLE = "用户信息"
USERINFO_BTN_REFRESH = "刷新"
USERINFO_PANEL_TITLE = "用户信息"
USERINFO_UID = "UID"
USERINFO_ACC = "账号"
USERINFO_NAME = "昵称"
USERINFO_TITLE = "头衔"
USERINFO_LV = "等级"
USERINFO_GOLD = "金币"
USERINFO_EXP = "经验"
USERINFO_VIP = "贵宾"
USERINFO_AVATAR = "头像"
USERINFO_FRIENDPOINT = "友情点"
USERINFO_SIGN = "签名"
USERINFO_MODINAME = "免费改名次数"
USERINFO_ACTIVE_DAY = "日活"
USERINFO_ACTIVE_WEEK = "周活"
)

View File

@ -4,6 +4,7 @@ import "google.golang.org/protobuf/proto"
type TestCase struct {
Id string //用例ID 如果没有指定,会自动赋值uuid
NavLabel string //菜单名称
Desc string //用例描述
MainType string //协议类型 L1
SubType string //协议类型 L2

View File

@ -6,9 +6,10 @@ const (
EVENT_USERINFO Event = "userinfo"
//协议推送
EVENT_APP_MONI Event = "push"
EVENT_USER_CHANGE = "chanage"
// 用户数据变化
EVENT_USER_CHANGE Event = "chanage"
//测试用例响应事件
EVENT_REQ_RSP Event = "response"
// 清空 ui数据事件
EVENT_UI_CLEAN = "uiclean"
EVENT_UI_CLEAN Event = "uiclean"
)

View File

@ -104,18 +104,26 @@ func (a *appTester) makeNav(setNav func(testCase *model.TestCase)) fyne.CanvasOb
}
if a.disEnabled(t) {
obj.(*widget.Label).TextStyle = fyne.TextStyle{Italic: true}
if branch {
if branch { //parent
obj.(*widget.Label).SetText(fmt.Sprintf("%s(dis)", t.MainType))
} else {
obj.(*widget.Label).SetText(fmt.Sprintf("%s(dis)", t.SubType))
}
} else {
obj.(*widget.Label).TextStyle = fyne.TextStyle{}
if branch {
if branch { //parent
obj.(*widget.Label).TextStyle = fyne.TextStyle{Bold: true}
if t.NavLabel != "" {
obj.(*widget.Label).SetText(t.NavLabel)
} else {
obj.(*widget.Label).SetText(t.MainType)
}
} else {
if t.NavLabel != "" {
obj.(*widget.Label).SetText(t.NavLabel)
} else {
obj.(*widget.Label).SetText(t.SubType)
}
}
}
},

View File

@ -6,6 +6,7 @@ import (
"fyne.io/fyne/v2/widget"
)
// 获取任务标签
func getTaskTagSelect() *widget.Select {
var tagSelect *widget.Select
tagSelect = widget.NewSelect([]string{
@ -27,3 +28,26 @@ func getTaskTagSelect() *widget.Select {
tagSelect.SetSelectedIndex(0)
return tagSelect
}
// 获取道具类型
func getItemTypeSelect() *widget.Select {
var tagSelect *widget.Select
tagSelect = widget.NewSelect([]string{
common.AAP_TESTCASE_FORM_TASK_DAY,
common.APP_TESTCASE_FORM_TASK_WEEK,
common.APP_TESTCASE_FORM_TASK_ACHIEVE}, func(s string) {
switch s {
case common.AAP_TESTCASE_FORM_TASK_DAY:
tagSelect.Selected = "1"
case common.APP_TESTCASE_FORM_TASK_WEEK:
tagSelect.Selected = "2"
case common.APP_TESTCASE_FORM_TASK_ACHIEVE:
tagSelect.Selected = "3"
default:
tagSelect.Selected = "0"
}
})
tagSelect.SetSelectedIndex(0)
return tagSelect
}

View File

@ -27,7 +27,7 @@ func (this *FriendZanView) CreateView(t *model.TestCase) fyne.CanvasObject {
if err := service.GetPttService().SendToClient(
t.MainType,
t.SubType,
"zanreceive",
&pb.FriendZanreceiveReq{
FriendId: this.selFriendIds[0],
},

View File

@ -0,0 +1,24 @@
package formview
import (
"go_dreamfactory/cmd/v2/model"
"go_dreamfactory/cmd/v2/service"
"go_dreamfactory/pb"
"fyne.io/fyne/v2"
"github.com/sirupsen/logrus"
)
type ItemListView struct {
BaseformView
}
func (this *ItemListView) CreateView(t *model.TestCase) fyne.CanvasObject {
this.form.OnSubmit = func() {
if err := service.GetPttService().SendToClient(t.MainType, t.SubType, &pb.ItemsGetlistReq{}); err != nil {
logrus.Error(err)
}
}
return this.form
}

View File

@ -0,0 +1,15 @@
package formview
import (
"go_dreamfactory/cmd/v2/model"
"fyne.io/fyne/v2"
)
type ItemsSellView struct {
BaseformView
}
func (this *ItemsSellView) CreateView(t *model.TestCase) fyne.CanvasObject {
return this.form
}

View File

@ -0,0 +1,31 @@
package formview
import (
"go_dreamfactory/cmd/v2/lib/common"
"go_dreamfactory/cmd/v2/model"
"go_dreamfactory/cmd/v2/service"
"go_dreamfactory/pb"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/widget"
"github.com/sirupsen/logrus"
)
type MailAttachmentView struct {
BaseformView
}
func (this *MailAttachmentView) CreateView(t *model.TestCase) fyne.CanvasObject {
mailId := widget.NewEntry()
mailId.PlaceHolder = "邮件ID"
this.form.AppendItem(widget.NewFormItem(common.APP_TESTCASE_FORM_MAILID, mailId))
this.form.OnSubmit = func() {
if err := service.GetPttService().SendToClient(t.MainType, t.SubType, &pb.MailGetUserMailAttachmentReq{
ObjID: mailId.Text,
}); err != nil {
logrus.Error(err)
}
}
return this.form
}

View File

@ -0,0 +1,24 @@
package formview
import (
"go_dreamfactory/cmd/v2/model"
"go_dreamfactory/cmd/v2/service"
"go_dreamfactory/pb"
"fyne.io/fyne/v2"
"github.com/sirupsen/logrus"
)
type MailAttachmentAllView struct {
BaseformView
}
func (this *MailAttachmentAllView) CreateView(t *model.TestCase) fyne.CanvasObject {
this.form.OnSubmit = func() {
if err := service.GetPttService().SendToClient(t.MainType, t.SubType, &pb.MailGetAllMailAttachmentReq{}); err != nil {
logrus.Error(err)
}
}
return this.form
}

View File

@ -0,0 +1,31 @@
package formview
import (
"go_dreamfactory/cmd/v2/lib/common"
"go_dreamfactory/cmd/v2/model"
"go_dreamfactory/cmd/v2/service"
"go_dreamfactory/pb"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/widget"
"github.com/sirupsen/logrus"
)
type MailDelView struct {
BaseformView
}
func (this *MailDelView) CreateView(t *model.TestCase) fyne.CanvasObject {
mailId := widget.NewEntry()
mailId.PlaceHolder = "邮件ID"
this.form.AppendItem(widget.NewFormItem(common.APP_TESTCASE_FORM_MAILID, mailId))
this.form.OnSubmit = func() {
if err := service.GetPttService().SendToClient(t.MainType, t.SubType, &pb.MailDelMailReq{
ObjID: mailId.Text,
}); err != nil {
logrus.Error(err)
}
}
return this.form
}

View File

@ -0,0 +1,23 @@
package formview
import (
"go_dreamfactory/cmd/v2/model"
"go_dreamfactory/cmd/v2/service"
"go_dreamfactory/pb"
"fyne.io/fyne/v2"
"github.com/sirupsen/logrus"
)
type MailListView struct {
BaseformView
}
func (this *MailListView) CreateView(t *model.TestCase) fyne.CanvasObject {
this.form.OnSubmit = func() {
if err := service.GetPttService().SendToClient(t.MainType, t.SubType, &pb.MailGetListReq{}); err != nil {
logrus.Error(err)
}
}
return this.form
}

View File

@ -0,0 +1,31 @@
package formview
import (
"go_dreamfactory/cmd/v2/lib/common"
"go_dreamfactory/cmd/v2/model"
"go_dreamfactory/cmd/v2/service"
"go_dreamfactory/pb"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/widget"
"github.com/sirupsen/logrus"
)
type MailReadMailView struct {
BaseformView
}
func (this *MailReadMailView) CreateView(t *model.TestCase) fyne.CanvasObject {
mailId := widget.NewEntry()
mailId.PlaceHolder = "邮件ID"
this.form.AppendItem(widget.NewFormItem(common.APP_TESTCASE_FORM_MAILID, mailId))
this.form.OnSubmit = func() {
if err := service.GetPttService().SendToClient(t.MainType, t.SubType, &pb.MailReadMailReq{
ObjID: mailId.Text,
}); err != nil {
logrus.Error(err)
}
}
return this.form
}

View File

@ -0,0 +1,35 @@
package formview
import (
"go_dreamfactory/cmd/v2/lib/common"
"go_dreamfactory/cmd/v2/model"
"go_dreamfactory/cmd/v2/service"
"go_dreamfactory/pb"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/widget"
"github.com/sirupsen/logrus"
)
type UserSignView struct {
BaseformView
}
func (this *UserSignView) CreateView(t *model.TestCase) fyne.CanvasObject {
sign := widget.NewMultiLineEntry()
sign.PlaceHolder = "这个家伙很懒,什么都没有留下"
this.form.AppendItem(widget.NewFormItem(common.APP_TESTCASE_FORM_SIGN, sign))
this.form.OnSubmit = func() {
if err := service.GetPttService().SendToClient(
t.MainType,
t.SubType,
&pb.UserModifysignReq{Sign: sign.Text},
); err != nil {
logrus.Error(err)
return
}
}
return this.form
}

View File

@ -215,13 +215,14 @@ func (ui *MainWindowImpl) createLoginWin(sid, sname string) {
if err != nil {
logrus.WithField("appName", appName).Error(err)
}
// hide toolbar
ui.tb.toolbar.Hide()
// 必须在创建窗口之后调用
ui.connService.ListenerPush()
if code := ui.pttService.Login(sid, account.Text); code != pb.ErrorCode_Success {
err := fmt.Errorf("login err: %v[%d]", code, int32(code))
dialog.ShowError(err, ui.w)
} else {
//
ui.obs.AddListener(observer.EVENT_REQ_RSP, observer.Listener{
OnNotify: func(data interface{}, args ...interface{}) {
if data == nil {
@ -237,27 +238,24 @@ func (ui *MainWindowImpl) createLoginWin(sid, sname string) {
}
ui.w.SetTitle(fmt.Sprintf("%s[%s]", sname, sid))
//show mainwindow
// logrus.Debug(rsp)
ui.pttService.SetUser(rsp.Data, rsp.Ex)
// isCreateRole
if rsp.Data.Created {
// ui.renderUserContainer()
// set statusbar message
ui.sb.setMessage(common.LABEL_WELCOME + rsp.Data.Binduid)
// update userinfo
ui.obs.Notify(observer.EVENT_USERINFO, ui.pttService.GetUser())
// show toolbar
ui.tb.toolbar.Show()
} else {
// create role
ui.createRoleWindowPopUp()
}
}
},
})
}
}
}
}, ui.w)
}
@ -298,16 +296,10 @@ func (ui *MainWindowImpl) createRoleWindowPopUp() {
err := fmt.Errorf("login err: %v[%d]", code, int32(code))
dialog.ShowError(err, ui.w)
} else {
// if rsp.IsSucc {
user := ui.pttService.GetUser()
logrus.WithField("uid", user.DbUser.Uid).Debug("create role succ")
ui.createWindowContainer()
appName, err := ui.at.openDefaultApp()
if err != nil {
logrus.WithField("appName", appName).Error(err)
}
ui.obs.Notify(observer.EVENT_USERINFO, ui.pttService.GetUser())
// }
ui.tb.toolbar.Show()
}
}
}

View File

@ -30,6 +30,15 @@ var (
ff(comm.ModuleGM, "cmd"): &formview.BingoView{},
//user
ff(comm.ModuleUser, user.UserSubTypeModifyName): &formview.UserModifynameView{},
ff(comm.ModuleUser, user.UserSubTypeModifySign): &formview.UserSignView{},
// items
ff(comm.ModuleItems, "getlist"): &formview.ItemListView{},
//mail
ff(comm.ModuleMail, "getlist"): &formview.MailListView{},
ff(comm.ModuleMail, "readmail"): &formview.MailReadMailView{},
ff(comm.ModuleMail, "delmail"): &formview.MailDelView{},
ff(comm.ModuleMail, "getusermailattachment"): &formview.MailAttachmentView{},
ff(comm.ModuleMail, "getallmailattachment"): &formview.MailAttachmentAllView{},
//task
ff(comm.ModuleTask, task.TaskSubTypeList): &formview.TaskListView{},
ff(comm.ModuleTask, task.TaskSubTypeReceive): &formview.TaskReceiveView{},
@ -42,9 +51,7 @@ var (
//friend
ff(comm.ModuleFriend, friend.FriendSubTypeList): &formview.FriendListView{},
ff(comm.ModuleFriend, friend.FriendSubTypeApply): &formview.FriendApplyView{},
// ff(comm.ModuleFriend, friend.FriendSubTypeApplyList): &formview.FriendApplyListView{},
ff(comm.ModuleFriend, friend.FriendSubTypeAgree): &formview.FriendAgreeView{},
// ff(comm.ModuleFriend, friend.FriendSubTypeRefuse): &formview.FriendRefuseView{},
ff(comm.ModuleFriend, friend.FriendSubTypeBlacklist): &formview.FriendBlacklistView{},
ff(comm.ModuleFriend, friend.FriendSubTypeAddBlack): &formview.FriendAddBlackView{},
ff(comm.ModuleFriend, friend.FriendSubTypeDelBlack): &formview.FriendDelblackView{},
@ -62,10 +69,23 @@ var (
string(comm.ModuleHero),
string(comm.ModuleTask),
string(comm.ModuleFriend),
string(comm.ModuleMail),
string(comm.ModuleItems),
},
"gm": {ff(comm.ModuleGM, "cmd")},
"user": {
ff(comm.ModuleUser, user.UserSubTypeModifyName),
ff(comm.ModuleUser, user.UserSubTypeModifySign),
},
"items": {
ff(comm.ModuleItems, "getlist"),
},
"mail": {
ff(comm.ModuleMail, "getlist"),
ff(comm.ModuleMail, "readmail"),
ff(comm.ModuleMail, "delmail"),
ff(comm.ModuleMail, "getusermailattachment"),
ff(comm.ModuleMail, "getallmailattachment"),
},
"hero": {
ff(comm.ModuleHero, hero.HeroSubTypeList),
@ -98,6 +118,7 @@ var (
CaseNav = map[string]*model.TestCase{
// gm
"gm": {
NavLabel: "GM",
MainType: string(comm.ModuleGM),
Enabled: true,
},
@ -111,11 +132,13 @@ var (
},
// user
"user": {
NavLabel: "用户",
MainType: "user",
Enabled: true,
},
"user.modifyname": {
Desc: "用户昵称修改",
NavLabel: "修改昵称",
MainType: "user",
SubType: "modifyname",
Req: &pb.UserModifynameReq{},
@ -126,12 +149,76 @@ var (
},
Enabled: true,
},
ff(comm.ModuleUser, user.UserSubTypeModifySign): {
NavLabel: "修改签名",
Desc: "用户签名修改",
MainType: string(comm.ModuleUser),
SubType: user.UserSubTypeModifySign,
Enabled: true,
},
//items
string(comm.ModuleItems): {
NavLabel: "道具",
MainType: string(comm.ModuleItems),
Enabled: true,
},
ff(comm.ModuleItems, "getlist"): {
NavLabel: "道具列表",
Desc: "道具列表",
MainType: string(comm.ModuleItems),
SubType: "getlist",
Enabled: true,
},
//mail
string(comm.ModuleMail): {
NavLabel: "邮箱",
MainType: string(comm.ModuleMail),
Enabled: true,
},
ff(comm.ModuleMail, "getlist"): {
NavLabel: "邮件列表",
Desc: "邮件列表",
MainType: string(comm.ModuleMail),
SubType: "getlist",
Enabled: true,
},
ff(comm.ModuleMail, "readmail"): {
NavLabel: "读邮件",
Desc: "读取邮件",
MainType: string(comm.ModuleMail),
SubType: "readmail",
Enabled: true,
},
ff(comm.ModuleMail, "delmail"): {
NavLabel: "删除邮件",
Desc: "删除邮件",
MainType: string(comm.ModuleMail),
SubType: "delmail",
Enabled: true,
},
ff(comm.ModuleMail, "getusermailattachment"): {
NavLabel: "领取附件",
Desc: "领取附件",
MainType: string(comm.ModuleMail),
SubType: "getusermailattachment",
Enabled: true,
},
ff(comm.ModuleMail, "getallmailattachment"): {
NavLabel: "一键领取",
Desc: "领取所有附件",
MainType: string(comm.ModuleMail),
SubType: "getallmailattachment",
Enabled: true,
},
// task
"task": {
NavLabel: "任务",
MainType: "task",
Enabled: true,
},
"task.list": {
NavLabel: "任务列表",
Desc: "用户任务列表",
MainType: "task",
SubType: "list",
@ -140,12 +227,14 @@ var (
Enabled: true,
},
"task.receive": {
NavLabel: "任务领取",
Desc: "用户任务领取",
MainType: "task",
SubType: "receive",
Enabled: true,
},
ff(comm.ModuleTask, task.TaskSubTypeActiveList): {
NavLabel: "活跃度",
Desc: "用户活跃度列表",
MainType: string(comm.ModuleTask),
SubType: task.TaskSubTypeActiveList,
@ -154,6 +243,7 @@ var (
Enabled: true,
},
ff(comm.ModuleTask, task.TaskSubTypeActiveReceive): {
NavLabel: "活跃度领取",
Desc: "用户活跃度领取",
MainType: string(comm.ModuleTask),
SubType: task.TaskSubTypeActiveReceive,
@ -163,10 +253,12 @@ var (
},
// hero
string(comm.ModuleHero): {
NavLabel: "英雄",
MainType: string(comm.ModuleHero),
Enabled: true,
},
ff(comm.ModuleHero, hero.HeroSubTypeList): {
NavLabel: "英雄列表",
Desc: "英雄列表",
MainType: string(comm.ModuleHero),
SubType: hero.HeroSubTypeList,
@ -181,6 +273,7 @@ var (
Enabled: true,
},
ff(comm.ModuleHero, hero.StrengthenUplv): {
NavLabel: "英雄升级",
Desc: "英雄等级升级",
MainType: string(comm.ModuleHero),
SubType: hero.StrengthenUplv,
@ -189,6 +282,7 @@ var (
Enabled: true,
},
ff(comm.ModuleHero, hero.StrengthenUpStar): {
NavLabel: "英雄升星",
Desc: "英雄星级升级",
MainType: string(comm.ModuleHero),
SubType: hero.StrengthenUpStar,
@ -198,10 +292,12 @@ var (
},
//friend
string(comm.ModuleFriend): {
NavLabel: "好友",
MainType: string(comm.ModuleFriend),
Enabled: true,
},
ff(comm.ModuleFriend, friend.FriendSubTypeList): {
NavLabel: "好友列表",
Desc: "好友列表",
MainType: string(comm.ModuleFriend),
SubType: friend.FriendSubTypeList,
@ -210,6 +306,7 @@ var (
Enabled: true,
},
ff(comm.ModuleFriend, friend.FriendSubTypeApply): {
NavLabel: "好友申请",
Desc: "好友申请",
MainType: string(comm.ModuleFriend),
SubType: friend.FriendSubTypeApply,
@ -226,6 +323,7 @@ var (
// Enabled: true,
// },
ff(comm.ModuleFriend, friend.FriendSubTypeBlacklist): {
NavLabel: "黑名单",
Desc: "黑名单列表",
MainType: string(comm.ModuleFriend),
SubType: friend.FriendSubTypeBlacklist,
@ -234,6 +332,7 @@ var (
Enabled: true,
},
ff(comm.ModuleFriend, friend.FriendSubTypeAddBlack): {
NavLabel: "加黑名单",
Desc: "添加黑名单",
MainType: string(comm.ModuleFriend),
SubType: friend.FriendSubTypeAddBlack,
@ -242,6 +341,7 @@ var (
Enabled: true,
},
ff(comm.ModuleFriend, friend.FriendSubTypeDelBlack): {
NavLabel: "删黑名单",
Desc: "删除黑名单",
MainType: string(comm.ModuleFriend),
SubType: friend.FriendSubTypeDelBlack,
@ -250,6 +350,7 @@ var (
Enabled: true,
},
ff(comm.ModuleFriend, friend.FriendSubTypeAgree): {
NavLabel: "好友审批",
Desc: "好友申请审批",
MainType: string(comm.ModuleFriend),
SubType: friend.FriendSubTypeAgree,
@ -257,15 +358,8 @@ var (
Rsp: &pb.FriendAgreeResp{},
Enabled: true,
},
// ff(comm.ModuleFriend, friend.FriendSubTypeRefuse): {
// Desc: "拒绝",
// MainType: string(comm.ModuleFriend),
// SubType: friend.FriendSubTypeRefuse,
// Req: &pb.FriendRefuseReq{},
// Rsp: &pb.FriendRefuseResp{},
// Enabled: true,
// },
ff(comm.ModuleFriend, friend.FriendSubTypeSearch): {
NavLabel: "好友搜索",
Desc: "搜索好友",
MainType: string(comm.ModuleFriend),
SubType: friend.FriendSubTypeSearch,
@ -274,6 +368,7 @@ var (
Enabled: true,
},
ff(comm.ModuleFriend, friend.FriendSubTypeZanList): {
NavLabel: "好友点赞",
Desc: "点赞好友",
MainType: string(comm.ModuleFriend),
SubType: friend.FriendSubTypeZanList,

View File

@ -32,12 +32,15 @@ type toyUserInfo struct {
data binding.ExternalStringList
obs observer.Observer
copyBtn *widget.Button
refreshBtn *widget.Button
}
func (this *toyUserInfo) Init(obs observer.Observer) error {
this.obs = obs
this.titleLabel = widget.NewLabel(common.USERINFO_TITLE)
this.titleLabel = widget.NewLabel(common.USERINFO_PANEL_TITLE)
this.data = binding.BindStringList(&[]string{})
// 复制UID button
this.copyBtn = widget.NewButton(common.USERINFO_BTN_COPY, func() {
if this.userInfo != nil && this.userInfo.DbUser != nil {
_ = clipboard.WriteAll(this.userInfo.DbUser.Uid)
@ -45,6 +48,18 @@ func (this *toyUserInfo) Init(obs observer.Observer) error {
})
this.copyBtn.Disable()
// 刷新
this.refreshBtn = widget.NewButton(common.USERINFO_BTN_REFRESH, func() {
if err := service.GetPttService().SendToClient(
string(comm.ModuleUser),
user.UserSubTypeInfo,
&pb.UserInfoReq{}); err != nil {
logrus.Error(err)
return
}
})
this.refreshBtn.Disable()
this.dataList = widget.NewListWithData(this.data,
func() fyne.CanvasObject {
return widget.NewLabel("template")
@ -55,7 +70,7 @@ func (this *toyUserInfo) Init(obs observer.Observer) error {
)
this.widget = widget.NewCard("", "",
container.NewBorder(container.NewHBox(this.titleLabel, layout.NewSpacer(), this.copyBtn),
container.NewBorder(container.NewHBox(this.titleLabel, layout.NewSpacer(), this.refreshBtn, this.copyBtn),
nil, nil, nil, container.NewVScroll(this.dataList)))
this.widget.Resize(fyne.NewSize(ToyWidth, 600))
@ -71,19 +86,28 @@ func (this *toyUserInfo) dataListener() {
if this.copyBtn.Disabled() {
this.copyBtn.Enable()
}
if this.refreshBtn.Disabled() {
this.refreshBtn.Enable()
}
this.userInfo = d.(*service.UserInfo)
if this.userInfo == nil {
return
}
// _ = this.data.Append(fmt.Sprintf("%-3s\t: %s", common.USERINFO_UID, this.userInfo.DbUser.Uid))
_ = this.data.Append(fmt.Sprintf("%-3s\t: %s", common.USERINFO_ACC, this.userInfo.DbUser.Binduid))
_ = this.data.Append(fmt.Sprintf("%-3s\t: %s", common.USERINFO_NAME, this.userInfo.DbUser.Name))
_ = this.data.Append(fmt.Sprintf("%-3s\t: %s", common.USERINFO_AVATAR, cast.ToString(this.userInfo.DbUser.Avatar)))
_ = this.data.Append(fmt.Sprintf("%-3s\t: %s", common.USERINFO_VIP, cast.ToString(this.userInfo.DbUser.Vip)))
_ = this.data.Append(fmt.Sprintf("%-3s\t: %s", common.USERINFO_LV, cast.ToString(this.userInfo.DbUser.Lv)))
_ = this.data.Append(fmt.Sprintf("%-3s\t: %s", common.USERINFO_GOLD, cast.ToString(this.userInfo.DbUser.Gold)))
_ = this.data.Append(fmt.Sprintf("%-3s\t: %s", common.USERINFO_EXP, cast.ToString(this.userInfo.DbUser.Exp)))
_ = this.data.Append(this.getAcc()) //0
_ = this.data.Append(this.getName()) //1
_ = this.data.Append(this.getAvatar()) //2
_ = this.data.Append(this.getVip()) //3
_ = this.data.Append(this.getLv()) //4
_ = this.data.Append(this.getGold()) //5
_ = this.data.Append(this.getExp()) //6
_ = this.data.Append(this.getTitle()) //7
_ = this.data.Append(this.getActiveDay()) //8
_ = this.data.Append(this.getActiveWeek()) //9
_ = this.data.Append(this.getFriendPoint()) //10
_ = this.data.Append(this.getModiNameCount()) //11
_ = this.data.Append(this.getSign()) //12
},
})
@ -97,8 +121,29 @@ func (this *toyUserInfo) dataListener() {
if !comm.ProtoUnmarshal(data, rsp) {
logrus.Error("unmarshal err")
}
//TODO 改此协议 返回昵称
// _=this.data.SetValue(1, fmt.Sprintf("%-3s\t: %s", common.USERINFO_NAME, rsp.Uid))
// updatename
this.setProp(1, common.USERINFO_NAME, rsp.Name)
}
//update info
if data.MainType == string(comm.ModuleUser) &&
data.SubType == user.UserSubTypeInfo {
rsp := &pb.UserInfoResp{}
if !comm.ProtoUnmarshal(data, rsp) {
logrus.Error("unmarshal err")
return
}
this.setProp(2, common.USERINFO_AVATAR, rsp.Data.Avatar)
this.setProp(3, common.USERINFO_VIP, rsp.Data.Vip)
this.setProp(4, common.USERINFO_LV, rsp.Data.Lv)
this.setProp(5, common.USERINFO_GOLD, rsp.Data.Gold)
this.setProp(6, common.USERINFO_EXP, rsp.Data.Exp)
this.setProp(7, common.USERINFO_TITLE, rsp.Data.Title)
this.setProp(8, common.USERINFO_ACTIVE_DAY, rsp.Ex.Activeday)
this.setProp(9, common.USERINFO_ACTIVE_WEEK, rsp.Ex.Activeweek)
this.setProp(10, common.USERINFO_FRIENDPOINT, rsp.Ex.FriendPoint)
this.setProp(11, common.USERINFO_MODINAME, rsp.Ex.ModifynameCount)
this.setProp(12, common.USERINFO_SIGN, rsp.Ex.Sign)
}
},
})
@ -113,16 +158,87 @@ func (this *toyUserInfo) dataListener() {
if !comm.ProtoUnmarshal(data.Msg, rsp) {
logrus.Error("unmarshal err")
}
_ = this.data.SetValue(5, fmt.Sprintf("%-3s\t: %s", common.USERINFO_GOLD, cast.ToString(rsp.Gold)))
this.setProp(5, common.USERINFO_GOLD, rsp.Gold)
}
// listener exp
if data.Msg.MainType == string(comm.ModuleUser) &&
data.Msg.SubType == "" {
//TODO change exp
}
//
logrus.WithField("key", "a").Debug(data.Msg.SubType)
},
})
}
func (this *toyUserInfo) setProp(idx int, label string, val interface{}) {
if err := this.data.SetValue(idx, fmt.Sprintf("%-3s\t: %v", label, val)); err != nil {
logrus.WithFields(logrus.Fields{"idx": idx, "val": val}).Error(err)
}
}
func (this *toyUserInfo) getAcc() string {
return fmt.Sprintf("%-3s\t: %s", common.USERINFO_ACC, this.userInfo.DbUser.Binduid)
}
func (this *toyUserInfo) getName() string {
return fmt.Sprintf("%-3s\t: %s", common.USERINFO_NAME, this.userInfo.DbUser.Name)
}
func (this *toyUserInfo) getAvatar() string {
return fmt.Sprintf("%-3s\t: %s", common.USERINFO_AVATAR, this.userInfo.DbUser.Avatar)
}
func (this *toyUserInfo) getVip() string {
return fmt.Sprintf("%-3s\t: %s", common.USERINFO_VIP, cast.ToString(this.userInfo.DbUser.Vip))
}
func (this *toyUserInfo) getLv() string {
return fmt.Sprintf("%-3s\t: %s", common.USERINFO_LV, cast.ToString(this.userInfo.DbUser.Lv))
}
func (this *toyUserInfo) getGold() string {
return fmt.Sprintf("%-3s\t: %s", common.USERINFO_GOLD, cast.ToString(this.userInfo.DbUser.Gold))
}
func (this *toyUserInfo) getExp() string {
return fmt.Sprintf("%-3s\t: %s", common.USERINFO_EXP, cast.ToString(this.userInfo.DbUser.Exp))
}
func (this *toyUserInfo) getTitle() string {
return fmt.Sprintf("%-3s\t: %s", common.USERINFO_TITLE, cast.ToString(this.userInfo.DbUser.Exp))
}
func (this *toyUserInfo) getActiveDay() string {
if this.userInfo.DbUserExpand == nil {
return fmt.Sprintf("%-3s\t: %s", common.USERINFO_ACTIVE_DAY, cast.ToString(0))
}
return fmt.Sprintf("%-3s\t: %s", common.USERINFO_ACTIVE_DAY, cast.ToString(this.userInfo.DbUserExpand.Activeday))
}
func (this *toyUserInfo) getActiveWeek() string {
if this.userInfo.DbUserExpand == nil {
return fmt.Sprintf("%-3s\t: %s", common.USERINFO_ACTIVE_WEEK, cast.ToString(0))
}
return fmt.Sprintf("%-3s\t: %s", common.USERINFO_ACTIVE_WEEK, cast.ToString(this.userInfo.DbUserExpand.Activeweek))
}
func (this *toyUserInfo) getFriendPoint() string {
if this.userInfo.DbUserExpand == nil {
return fmt.Sprintf("%-3s\t: %s", common.USERINFO_FRIENDPOINT, cast.ToString(0))
}
return fmt.Sprintf("%-3s\t: %s", common.USERINFO_FRIENDPOINT, cast.ToString(this.userInfo.DbUserExpand.FriendPoint))
}
func (this *toyUserInfo) getModiNameCount() string {
if this.userInfo.DbUserExpand == nil {
return fmt.Sprintf("%-3s\t: %s", common.USERINFO_MODINAME, "")
}
return fmt.Sprintf("%-3s\t: %s", common.USERINFO_MODINAME, cast.ToString(this.userInfo.DbUserExpand.ModifynameCount))
}
func (this *toyUserInfo) getSign() string {
if this.userInfo.DbUserExpand == nil {
return fmt.Sprintf("%-3s\t: %s", common.USERINFO_SIGN, "")
}
return fmt.Sprintf("%-3s\t: %s", common.USERINFO_SIGN, cast.ToString(this.userInfo.DbUserExpand.Sign))
}

View File

@ -99,4 +99,10 @@ type (
// 清理玩家任务数据
CleanData(uid string)
}
//好友
IFriend interface {
// 重置点赞列表和每日友情点
ResetFriend(uid string)
}
)

View File

@ -48,6 +48,27 @@ func (this *apiComp) Zan(session comm.IUserSession, req *pb.FriendZanReq) (code
return
}
//设置友情值
ue, err := this.moduleFriend.ModuleUser.GetUserExpand(session.GetUserId())
if err != nil {
code = pb.ErrorCode_DBError
return
}
// 今日送出的友情点是否达到上限
if ue.FriendPointOD >= int32(this.moduleFriend.getOutFriendPointMax()) {
code = pb.ErrorCode_FriendPointLimit
return
}
update := map[string]interface{}{
"friendPointOD": ue.FriendPointOD + 10,
}
if err := this.moduleFriend.ModuleUser.ChangeUserExpand(session.GetUserId(), update); err != nil {
code = pb.ErrorCode_DBError
return
}
//设置被点赞玩家
target.ZanIds = append(target.ZanIds, selfId)

View File

@ -48,6 +48,28 @@ func (this *apiComp) Zanreceive(session comm.IUserSession, req *pb.FriendZanrece
return
}
//设置友情值
ue, err := this.moduleFriend.ModuleUser.GetUserExpand(session.GetUserId())
if err != nil {
code = pb.ErrorCode_DBError
return
}
// 今日获赠的友情点是否达到上限
if ue.FriendPointID >= int32(this.moduleFriend.getInFriendPointMax()) {
code = pb.ErrorCode_FriendPointLimit
return
}
update := map[string]interface{}{
"friendPoint": ue.FriendPoint + 10,
"friendPointID": ue.FriendPointID + 10,
}
if err := this.moduleFriend.ModuleUser.ChangeUserExpand(session.GetUserId(), update); err != nil {
code = pb.ErrorCode_DBError
return
}
if err := session.SendMsg(string(this.moduleFriend.GetType()), FriendSubTypeZanreceive,
&pb.FriendZanreceiveResp{Flag: true}); err != nil {
code = pb.ErrorCode_SystemError

View File

@ -5,6 +5,7 @@ import (
"go_dreamfactory/modules"
"go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/log"
"github.com/spf13/cast"
)
@ -52,3 +53,39 @@ func (this *Friend) getBlackMax() int {
}
return 0
}
// 每日最大送出友情点
func (this *Friend) getOutFriendPointMax() int {
if max := this.configure.GetGlobalConf("friend_maxsendnum"); max != "" {
return cast.ToInt(max)
}
return 0
}
// 每日最大获赠友情点
func (this *Friend) getInFriendPointMax() int {
if max := this.configure.GetGlobalConf("friend_maxsendnum"); max != "" {
return cast.ToInt(max)
}
return 0
}
func (this *Friend) ResetFriend(uid string) {
// 重置点赞列表
zanUpdate := map[string]interface{}{
"zanIds": []string{},
}
if err := this.modelFriend.Change(uid, zanUpdate); err != nil {
log.Error("resetZanFriend err", log.Field{Key: "err", Value: err})
}
// 重置今日友情点
update := map[string]interface{}{
"friendPointID": 0,
"friendPointOD": 0,
}
if err := this.ModuleUser.ChangeUserExpand(uid, update); err != nil {
log.Error("resetFriend err", log.Field{Key: "err", Value: err})
}
}

View File

@ -30,6 +30,7 @@ type ModuleBase struct {
ModuleHero comm.IHero //英雄模块
ModuleEquipment comm.IEquipment //装备模块
ModuleTask comm.ITask //任务
ModuleFriend comm.IFriend //好友
}
//重构模块配置对象
@ -78,6 +79,11 @@ func (this *ModuleBase) Start() (err error) {
return
}
this.ModuleTask = module.(comm.ITask)
if module, err = this.service.GetModule(comm.ModuleFriend); err != nil {
return
}
this.ModuleFriend = module.(comm.IFriend)
return
}

View File

@ -22,6 +22,7 @@ const (
UserSubTypeModifyName = "modifyname" //修改名称
UserSubTypeFigure = "figure" //形象
UserSubTypeModifySign = "modifysign" // 修改签名
UserSubTypeInfo = "info" //用户信息
)
type apiComp struct {

35
modules/user/api_info.go Normal file
View File

@ -0,0 +1,35 @@
package user
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
"google.golang.org/protobuf/proto"
)
func (this *apiComp) InfoCheck(session comm.IUserSession, req *pb.UserInfoReq) (code pb.ErrorCode) {
return
}
func (this *apiComp) Info(session comm.IUserSession, req *pb.UserInfoReq) (code pb.ErrorCode, data proto.Message) {
if code = this.InfoCheck(session, req); code != pb.ErrorCode_Success {
return
}
dbUser := this.module.GetUser(session.GetUserId())
ue, err := this.module.GetUserExpand(session.GetUserId())
if err != nil {
code = pb.ErrorCode_DBError
}
rsp := &pb.UserInfoResp{
Data: dbUser,
Ex: ue,
}
if err := session.SendMsg(string(this.module.GetType()), UserSubTypeInfo, rsp); err != nil {
code = pb.ErrorCode_SystemError
}
return
}

View File

@ -111,6 +111,8 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (cod
if utils.IsAfterWeek(user.Logintime) {
this.module.ModuleTask.ResetTask(user.Uid, comm.TASK_WEEKLY)
}
// 清理点赞
this.module.ModuleFriend.ResetFriend(user.Uid)
}
rsp.Data = user

View File

@ -69,6 +69,7 @@ func (this *apiComp) Modifyname(session comm.IUserSession, req *pb.UserModifynam
if err = session.SendMsg(string(this.module.GetType()), UserSubTypeModifyName, &pb.UserModifynameResp{
Uid: session.GetUserId(),
Count: uint32(left),
Name: req.Name,
}); err != nil {
code = pb.ErrorCode_SystemError
}

View File

@ -76,6 +76,7 @@ const (
ErrorCode_FriendZaned ErrorCode = 1112 //已点赞
ErrorCode_FriendZanreceived ErrorCode = 1113 //已领取点赞
ErrorCode_FriendZanSelf ErrorCode = 1114 //不能给自己点赞
ErrorCode_FriendPointLimit ErrorCode = 1115 //友情点上线
// item
ErrorCode_ItemsNoEnough ErrorCode = 1200 //背包物品不足
ErrorCode_ItemsNoFoundGird ErrorCode = 1201 //背包未找到物品格子
@ -195,6 +196,7 @@ var (
1112: "FriendZaned",
1113: "FriendZanreceived",
1114: "FriendZanSelf",
1115: "FriendPointLimit",
1200: "ItemsNoEnough",
1201: "ItemsNoFoundGird",
1202: "ItemsGridNumUpper",
@ -303,6 +305,7 @@ var (
"FriendZaned": 1112,
"FriendZanreceived": 1113,
"FriendZanSelf": 1114,
"FriendPointLimit": 1115,
"ItemsNoEnough": 1200,
"ItemsNoFoundGird": 1201,
"ItemsGridNumUpper": 1202,
@ -392,7 +395,7 @@ var File_errorcode_proto protoreflect.FileDescriptor
var file_errorcode_proto_rawDesc = []byte{
0x0a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x2a, 0xc3, 0x11, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
0x6f, 0x2a, 0xda, 0x11, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
0x0b, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d,
0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x10, 0x0a, 0x12,
0x1b, 0x0a, 0x17, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
@ -458,82 +461,83 @@ var file_errorcode_proto_rawDesc = []byte{
0x6e, 0x65, 0x64, 0x10, 0xd8, 0x08, 0x12, 0x16, 0x0a, 0x11, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64,
0x5a, 0x61, 0x6e, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0xd9, 0x08, 0x12, 0x12,
0x0a, 0x0d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5a, 0x61, 0x6e, 0x53, 0x65, 0x6c, 0x66, 0x10,
0xda, 0x08, 0x12, 0x12, 0x0a, 0x0d, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x4e, 0x6f, 0x45, 0x6e, 0x6f,
0x75, 0x67, 0x68, 0x10, 0xb0, 0x09, 0x12, 0x15, 0x0a, 0x10, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x4e,
0x6f, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x47, 0x69, 0x72, 0x64, 0x10, 0xb1, 0x09, 0x12, 0x16, 0x0a,
0x11, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x47, 0x72, 0x69, 0x64, 0x4e, 0x75, 0x6d, 0x55, 0x70, 0x70,
0x65, 0x72, 0x10, 0xb2, 0x09, 0x12, 0x19, 0x0a, 0x14, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x47, 0x69,
0x72, 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x70, 0x70, 0x65, 0x72, 0x10, 0xb3, 0x09,
0x12, 0x19, 0x0a, 0x14, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x55, 0x73, 0x65, 0x4e, 0x6f, 0x74, 0x53,
0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x10, 0xb4, 0x09, 0x12, 0x10, 0x0a, 0x0b, 0x48,
0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x45, 0x78, 0x69, 0x73, 0x74, 0x10, 0x94, 0x0a, 0x12, 0x11, 0x0a,
0x0c, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0x95, 0x0a,
0x12, 0x0e, 0x0a, 0x09, 0x48, 0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x4c, 0x76, 0x10, 0x96, 0x0a,
0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x49, 0x6e, 0x69, 0x74, 0x43, 0x72, 0x65, 0x61,
0x74, 0x10, 0x97, 0x0a, 0x12, 0x11, 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x43, 0x6f, 0x6c, 0x6f,
0x72, 0x45, 0x72, 0x72, 0x10, 0x98, 0x0a, 0x12, 0x13, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x53,
0x6b, 0x69, 0x6c, 0x6c, 0x55, 0x70, 0x45, 0x72, 0x72, 0x10, 0x99, 0x0a, 0x12, 0x14, 0x0a, 0x0f,
0x48, 0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x52, 0x65, 0x73, 0x6f, 0x6e, 0x61, 0x74, 0x65, 0x10,
0x9a, 0x0a, 0x12, 0x13, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x52, 0x65, 0x73, 0x6f,
0x6e, 0x61, 0x74, 0x65, 0x10, 0x9b, 0x0a, 0x12, 0x18, 0x0a, 0x13, 0x48, 0x65, 0x72, 0x6f, 0x4e,
0x6f, 0x74, 0x4e, 0x65, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x6e, 0x61, 0x74, 0x65, 0x10, 0x9c,
0x0a, 0x12, 0x11, 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x45, 0x6e, 0x65, 0x72, 0x67,
0x79, 0x10, 0x9d, 0x0a, 0x12, 0x0f, 0x0a, 0x0a, 0x48, 0x65, 0x72, 0x6f, 0x43, 0x72, 0x65, 0x61,
0x74, 0x65, 0x10, 0x9e, 0x0a, 0x12, 0x14, 0x0a, 0x0f, 0x48, 0x65, 0x72, 0x6f, 0x45, 0x71, 0x75,
0x69, 0x70, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x10, 0x9f, 0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48,
0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x41, 0x77, 0x61, 0x6b, 0x65, 0x6e, 0x10, 0xa0, 0x0a, 0x12,
0x0f, 0x0a, 0x0a, 0x48, 0x65, 0x72, 0x6f, 0x49, 0x73, 0x4c, 0x6f, 0x63, 0x6b, 0x10, 0xa1, 0x0a,
0x12, 0x11, 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x43, 0x6f, 0x75, 0x6e, 0x74,
0x10, 0xa2, 0x0a, 0x12, 0x14, 0x0a, 0x0f, 0x48, 0x65, 0x72, 0x6f, 0x43, 0x6f, 0x73, 0x74, 0x54,
0x79, 0x70, 0x65, 0x45, 0x72, 0x72, 0x10, 0xa3, 0x0a, 0x12, 0x10, 0x0a, 0x0b, 0x48, 0x65, 0x72,
0x6f, 0x53, 0x74, 0x61, 0x72, 0x45, 0x72, 0x72, 0x10, 0xa4, 0x0a, 0x12, 0x10, 0x0a, 0x0b, 0x48,
0x65, 0x72, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x45, 0x72, 0x72, 0x10, 0xa5, 0x0a, 0x12, 0x13, 0x0a,
0x0e, 0x48, 0x65, 0x72, 0x6f, 0x45, 0x78, 0x70, 0x54, 0x79, 0x70, 0x65, 0x45, 0x72, 0x72, 0x10,
0xa6, 0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x41, 0x64, 0x64, 0x4d, 0x61, 0x78,
0x45, 0x78, 0x70, 0x10, 0xa7, 0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x74,
0x61, 0x72, 0x4c, 0x76, 0x45, 0x72, 0x72, 0x10, 0xa8, 0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65,
0x72, 0x6f, 0x4d, 0x61, 0x78, 0x53, 0x74, 0x61, 0x72, 0x4c, 0x76, 0x10, 0xa9, 0x0a, 0x12, 0x19,
0x0a, 0x14, 0x44, 0x72, 0x61, 0x77, 0x43, 0x61, 0x72, 0x64, 0x54, 0x79, 0x70, 0x65, 0x4e, 0x6f,
0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xaa, 0x0a, 0x12, 0x13, 0x0a, 0x0e, 0x48, 0x65, 0x72,
0x6f, 0x4d, 0x61, 0x78, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x10, 0xab, 0x0a, 0x12, 0x1e,
0x0a, 0x19, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x4f, 0x6e, 0x46, 0x6f, 0x75,
0x6e, 0x64, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0xf8, 0x0a, 0x12, 0x1c,
0x0a, 0x17, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x76, 0x6c, 0x69, 0x6d,
0x69, 0x74, 0x52, 0x65, 0x61, 0x63, 0x68, 0x65, 0x64, 0x10, 0xf9, 0x0a, 0x12, 0x14, 0x0a, 0x0f,
0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x73, 0x57, 0x6f, 0x72, 0x6e, 0x10,
0xfa, 0x0a, 0x12, 0x1b, 0x0a, 0x16, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x6f,
0x74, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x10, 0xdc, 0x0b, 0x12,
0x15, 0x0a, 0x10, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x44, 0x46, 0x61, 0x69,
0x6c, 0x65, 0x64, 0x10, 0xdd, 0x0b, 0x12, 0x15, 0x0a, 0x10, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69,
0x6e, 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xde, 0x0b, 0x12, 0x18, 0x0a,
0x13, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x50, 0x72, 0x65, 0x4e, 0x6f, 0x74, 0x46,
0x6f, 0x75, 0x6e, 0x64, 0x10, 0xdf, 0x0b, 0x12, 0x19, 0x0a, 0x14, 0x4d, 0x61, 0x69, 0x6e, 0x6c,
0x69, 0x6e, 0x65, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x10,
0xe0, 0x0b, 0x12, 0x1b, 0x0a, 0x16, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f,
0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x10, 0xe1, 0x0b, 0x12,
0x0d, 0x0a, 0x08, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x69, 0x74, 0x10, 0xc0, 0x0c, 0x12, 0x0e,
0x0a, 0x09, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x65, 0x74, 0x10, 0xc1, 0x0c, 0x12, 0x0f,
0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x10, 0xc2, 0x0c, 0x12,
0x11, 0x0a, 0x0c, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10,
0xc3, 0x0c, 0x12, 0x13, 0x0a, 0x0e, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65,
0x49, 0x6e, 0x69, 0x74, 0x10, 0xc4, 0x0c, 0x12, 0x16, 0x0a, 0x11, 0x54, 0x61, 0x73, 0x6b, 0x41,
0x63, 0x74, 0x69, 0x76, 0x65, 0x4e, 0x6f, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xc5, 0x0c, 0x12,
0x17, 0x0a, 0x12, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4e, 0x6f, 0x65,
0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xc6, 0x0c, 0x12, 0x13, 0x0a, 0x0e, 0x54, 0x61, 0x73, 0x6b,
0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0xc7, 0x0c, 0x12, 0x11, 0x0a,
0x0c, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0xc8, 0x0c,
0x12, 0x11, 0x0a, 0x0c, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x61, 0x67, 0x45, 0x6d, 0x70, 0x74, 0x79,
0x10, 0xc9, 0x0c, 0x12, 0x10, 0x0a, 0x0b, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x45, 0x6d, 0x70,
0x74, 0x79, 0x10, 0xca, 0x0c, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x74,
0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xcb, 0x0c, 0x12, 0x17, 0x0a, 0x12, 0x53, 0x68, 0x6f, 0x70,
0x47, 0x6f, 0x6f, 0x64, 0x73, 0x49, 0x73, 0x53, 0x6f, 0x6c, 0x64, 0x4f, 0x75, 0x74, 0x10, 0xa4,
0x0d, 0x12, 0x1c, 0x0a, 0x17, 0x53, 0x68, 0x6f, 0x70, 0x4e, 0x6f, 0x53, 0x75, 0x72, 0x70, 0x6c,
0x75, 0x73, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x4e, 0x75, 0x6d, 0x10, 0xa5, 0x0d, 0x12,
0x0c, 0x0a, 0x07, 0x4d, 0x61, 0x69, 0x6c, 0x45, 0x72, 0x72, 0x10, 0x88, 0x0e, 0x12, 0x13, 0x0a,
0x0e, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10,
0xec, 0x0e, 0x12, 0x13, 0x0a, 0x0d, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x4c, 0x65, 0x76, 0x6c,
0x45, 0x72, 0x72, 0x10, 0xb9, 0x94, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0xda, 0x08, 0x12, 0x15, 0x0a, 0x10, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x50, 0x6f, 0x69, 0x6e,
0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x10, 0xdb, 0x08, 0x12, 0x12, 0x0a, 0x0d, 0x49, 0x74, 0x65,
0x6d, 0x73, 0x4e, 0x6f, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xb0, 0x09, 0x12, 0x15, 0x0a,
0x10, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x4e, 0x6f, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x47, 0x69, 0x72,
0x64, 0x10, 0xb1, 0x09, 0x12, 0x16, 0x0a, 0x11, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x47, 0x72, 0x69,
0x64, 0x4e, 0x75, 0x6d, 0x55, 0x70, 0x70, 0x65, 0x72, 0x10, 0xb2, 0x09, 0x12, 0x19, 0x0a, 0x14,
0x49, 0x74, 0x65, 0x6d, 0x73, 0x47, 0x69, 0x72, 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x55,
0x70, 0x70, 0x65, 0x72, 0x10, 0xb3, 0x09, 0x12, 0x19, 0x0a, 0x14, 0x49, 0x74, 0x65, 0x6d, 0x73,
0x55, 0x73, 0x65, 0x4e, 0x6f, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x10,
0xb4, 0x09, 0x12, 0x10, 0x0a, 0x0b, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x45, 0x78, 0x69, 0x73,
0x74, 0x10, 0x94, 0x0a, 0x12, 0x11, 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x45, 0x6e,
0x6f, 0x75, 0x67, 0x68, 0x10, 0x95, 0x0a, 0x12, 0x0e, 0x0a, 0x09, 0x48, 0x65, 0x72, 0x6f, 0x4d,
0x61, 0x78, 0x4c, 0x76, 0x10, 0x96, 0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x49,
0x6e, 0x69, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x10, 0x97, 0x0a, 0x12, 0x11, 0x0a, 0x0c, 0x48,
0x65, 0x72, 0x6f, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x45, 0x72, 0x72, 0x10, 0x98, 0x0a, 0x12, 0x13,
0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x55, 0x70, 0x45, 0x72, 0x72,
0x10, 0x99, 0x0a, 0x12, 0x14, 0x0a, 0x0f, 0x48, 0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x52, 0x65,
0x73, 0x6f, 0x6e, 0x61, 0x74, 0x65, 0x10, 0x9a, 0x0a, 0x12, 0x13, 0x0a, 0x0e, 0x48, 0x65, 0x72,
0x6f, 0x4e, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x6e, 0x61, 0x74, 0x65, 0x10, 0x9b, 0x0a, 0x12, 0x18,
0x0a, 0x13, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x74, 0x4e, 0x65, 0x65, 0x64, 0x52, 0x65, 0x73,
0x6f, 0x6e, 0x61, 0x74, 0x65, 0x10, 0x9c, 0x0a, 0x12, 0x11, 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f,
0x4e, 0x6f, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x10, 0x9d, 0x0a, 0x12, 0x0f, 0x0a, 0x0a, 0x48,
0x65, 0x72, 0x6f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x10, 0x9e, 0x0a, 0x12, 0x14, 0x0a, 0x0f,
0x48, 0x65, 0x72, 0x6f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x10,
0x9f, 0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x41, 0x77, 0x61,
0x6b, 0x65, 0x6e, 0x10, 0xa0, 0x0a, 0x12, 0x0f, 0x0a, 0x0a, 0x48, 0x65, 0x72, 0x6f, 0x49, 0x73,
0x4c, 0x6f, 0x63, 0x6b, 0x10, 0xa1, 0x0a, 0x12, 0x11, 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x4d,
0x61, 0x78, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x10, 0xa2, 0x0a, 0x12, 0x14, 0x0a, 0x0f, 0x48, 0x65,
0x72, 0x6f, 0x43, 0x6f, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x45, 0x72, 0x72, 0x10, 0xa3, 0x0a,
0x12, 0x10, 0x0a, 0x0b, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x74, 0x61, 0x72, 0x45, 0x72, 0x72, 0x10,
0xa4, 0x0a, 0x12, 0x10, 0x0a, 0x0b, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x45, 0x72,
0x72, 0x10, 0xa5, 0x0a, 0x12, 0x13, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x45, 0x78, 0x70, 0x54,
0x79, 0x70, 0x65, 0x45, 0x72, 0x72, 0x10, 0xa6, 0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65, 0x72,
0x6f, 0x41, 0x64, 0x64, 0x4d, 0x61, 0x78, 0x45, 0x78, 0x70, 0x10, 0xa7, 0x0a, 0x12, 0x12, 0x0a,
0x0d, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x74, 0x61, 0x72, 0x4c, 0x76, 0x45, 0x72, 0x72, 0x10, 0xa8,
0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x53, 0x74, 0x61, 0x72,
0x4c, 0x76, 0x10, 0xa9, 0x0a, 0x12, 0x19, 0x0a, 0x14, 0x44, 0x72, 0x61, 0x77, 0x43, 0x61, 0x72,
0x64, 0x54, 0x79, 0x70, 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xaa, 0x0a,
0x12, 0x13, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x53, 0x6b, 0x69, 0x6c, 0x6c,
0x4c, 0x76, 0x10, 0xab, 0x0a, 0x12, 0x1e, 0x0a, 0x19, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65,
0x6e, 0x74, 0x4f, 0x6e, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65,
0x6e, 0x74, 0x10, 0xf8, 0x0a, 0x12, 0x1c, 0x0a, 0x17, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65,
0x6e, 0x74, 0x4c, 0x76, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x61, 0x63, 0x68, 0x65, 0x64,
0x10, 0xf9, 0x0a, 0x12, 0x14, 0x0a, 0x0f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74,
0x49, 0x73, 0x57, 0x6f, 0x72, 0x6e, 0x10, 0xfa, 0x0a, 0x12, 0x1b, 0x0a, 0x16, 0x4d, 0x61, 0x69,
0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x68, 0x61, 0x70,
0x74, 0x65, 0x72, 0x10, 0xdc, 0x0b, 0x12, 0x15, 0x0a, 0x10, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69,
0x6e, 0x65, 0x49, 0x44, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0xdd, 0x0b, 0x12, 0x15, 0x0a,
0x10, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e,
0x64, 0x10, 0xde, 0x0b, 0x12, 0x18, 0x0a, 0x13, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65,
0x50, 0x72, 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xdf, 0x0b, 0x12, 0x19,
0x0a, 0x14, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74,
0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x10, 0xe0, 0x0b, 0x12, 0x1b, 0x0a, 0x16, 0x4d, 0x61, 0x69,
0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x77,
0x61, 0x72, 0x64, 0x10, 0xe1, 0x0b, 0x12, 0x0d, 0x0a, 0x08, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e,
0x69, 0x74, 0x10, 0xc0, 0x0c, 0x12, 0x0e, 0x0a, 0x09, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73,
0x65, 0x74, 0x10, 0xc1, 0x0c, 0x12, 0x0f, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x61, 0x6e,
0x64, 0x6c, 0x65, 0x10, 0xc2, 0x0c, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65,
0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0xc3, 0x0c, 0x12, 0x13, 0x0a, 0x0e, 0x54, 0x61, 0x73,
0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x10, 0xc4, 0x0c, 0x12, 0x16,
0x0a, 0x11, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4e, 0x6f, 0x66, 0x6f,
0x75, 0x6e, 0x64, 0x10, 0xc5, 0x0c, 0x12, 0x17, 0x0a, 0x12, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63,
0x74, 0x69, 0x76, 0x65, 0x4e, 0x6f, 0x65, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xc6, 0x0c, 0x12,
0x13, 0x0a, 0x0e, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65,
0x64, 0x10, 0xc7, 0x0c, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69,
0x73, 0x68, 0x65, 0x64, 0x10, 0xc8, 0x0c, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x61, 0x73, 0x6b, 0x54,
0x61, 0x67, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x10, 0xc9, 0x0c, 0x12, 0x10, 0x0a, 0x0b, 0x54, 0x61,
0x73, 0x6b, 0x49, 0x64, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x10, 0xca, 0x0c, 0x12, 0x11, 0x0a, 0x0c,
0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xcb, 0x0c, 0x12,
0x17, 0x0a, 0x12, 0x53, 0x68, 0x6f, 0x70, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x49, 0x73, 0x53, 0x6f,
0x6c, 0x64, 0x4f, 0x75, 0x74, 0x10, 0xa4, 0x0d, 0x12, 0x1c, 0x0a, 0x17, 0x53, 0x68, 0x6f, 0x70,
0x4e, 0x6f, 0x53, 0x75, 0x72, 0x70, 0x6c, 0x75, 0x73, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68,
0x4e, 0x75, 0x6d, 0x10, 0xa5, 0x0d, 0x12, 0x0c, 0x0a, 0x07, 0x4d, 0x61, 0x69, 0x6c, 0x45, 0x72,
0x72, 0x10, 0x88, 0x0e, 0x12, 0x13, 0x0a, 0x0e, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x4e, 0x6f,
0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xec, 0x0e, 0x12, 0x13, 0x0a, 0x0d, 0x50, 0x61, 0x67,
0x6f, 0x64, 0x61, 0x4c, 0x65, 0x76, 0x6c, 0x45, 0x72, 0x72, 0x10, 0xb9, 0x94, 0x01, 0x42, 0x06,
0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -114,7 +114,6 @@ type DBUser struct {
Lastloginip string `protobuf:"bytes,8,opt,name=lastloginip,proto3" json:"lastloginip" bson:"lastloginip"` //最后一次登录时的ip
Ctime int64 `protobuf:"varint,9,opt,name=ctime,proto3" json:"ctime" bson:"ctime"` //玩家创号时间戳
Logintime int64 `protobuf:"varint,10,opt,name=logintime,proto3" json:"logintime" bson:"logintime"` //最后一次登录时间
FriendPoint int32 `protobuf:"varint,11,opt,name=friendPoint,proto3" json:"friendPoint" bson:"friendPoint"` //友情点
Avatar string `protobuf:"bytes,12,opt,name=avatar,proto3" json:"avatar" bson:"avatar"` //头像
Gold int32 `protobuf:"varint,13,opt,name=gold,proto3" json:"gold" bson:"gold"` //金币
Exp int32 `protobuf:"varint,14,opt,name=exp,proto3" json:"exp" bson:"exp"` //经验
@ -227,13 +226,6 @@ func (x *DBUser) GetLogintime() int64 {
return 0
}
func (x *DBUser) GetFriendPoint() int32 {
if x != nil {
return x.FriendPoint
}
return 0
}
func (x *DBUser) GetAvatar() string {
if x != nil {
return x.Avatar
@ -446,7 +438,7 @@ var file_user_user_db_proto_rawDesc = []byte{
0x61, 0x67, 0x12, 0x2a, 0x0a, 0x10, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x47, 0x61,
0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x0e,
0x0a, 0x02, 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x22, 0xbc,
0x0a, 0x02, 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x22, 0x9a,
0x03, 0x0a, 0x06, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75,
@ -462,41 +454,39 @@ var file_user_user_db_proto_rawDesc = []byte{
0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x74,
0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x74, 0x69, 0x6d, 0x65,
0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x74, 0x69, 0x6d,
0x65, 0x12, 0x20, 0x0a, 0x0b, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x50, 0x6f, 0x69, 0x6e, 0x74,
0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x50, 0x6f,
0x69, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x0c, 0x20,
0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x67,
0x6f, 0x6c, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x67, 0x6f, 0x6c, 0x64, 0x12,
0x10, 0x0a, 0x03, 0x65, 0x78, 0x70, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x78,
0x70, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0f, 0x20, 0x01,
0x28, 0x08, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x6c,
0x76, 0x18, 0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x10, 0x0a, 0x03, 0x76,
0x69, 0x70, 0x18, 0x11, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x76, 0x69, 0x70, 0x12, 0x18, 0x0a,
0x07, 0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x18, 0x12, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07,
0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65,
0x18, 0x13, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 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, 0x7a, 0x68, 0x69, 0x12, 0x1c, 0x0a, 0x09, 0x6b, 0x61, 0x6e,
0x67, 0x6a, 0x75, 0x63, 0x68, 0x69, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x6b, 0x61,
0x6e, 0x67, 0x6a, 0x75, 0x63, 0x68, 0x69, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x61, 0x6f, 0x67, 0x75,
0x61, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x67, 0x61, 0x6f, 0x67, 0x75,
0x61, 0x6e, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x77, 0x75, 0x6c, 0x69, 0x18, 0x06, 0x20, 0x01, 0x28,
0x08, 0x52, 0x04, 0x77, 0x75, 0x6c, 0x69, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x75, 0x73, 0x69, 0x63,
0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x6d, 0x75, 0x73, 0x69, 0x63, 0x12, 0x16, 0x0a,
0x06, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65,
0x66, 0x66, 0x65, 0x63, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x75, 0x61, 0x6a, 0x69, 0x18, 0x09,
0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x67, 0x75, 0x61, 0x6a, 0x69, 0x12, 0x14, 0x0a, 0x05, 0x66,
0x75, 0x62, 0x65, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x75, 0x62, 0x65,
0x6e, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x6e, 0x73, 0x75, 0x6f, 0x18, 0x0b, 0x20, 0x01, 0x28,
0x08, 0x52, 0x06, 0x74, 0x61, 0x6e, 0x73, 0x75, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x75, 0x6f,
0x64, 0x6f, 0x6e, 0x67, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x68, 0x75, 0x6f, 0x64,
0x6f, 0x6e, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x78, 0x75, 0x61, 0x6e, 0x73, 0x68, 0x61, 0x6e, 0x67,
0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x78, 0x75, 0x61, 0x6e, 0x73, 0x68, 0x61, 0x6e,
0x67, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x61, 0x69, 0x6a, 0x69, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08,
0x52, 0x05, 0x73, 0x61, 0x69, 0x6a, 0x69, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28,
0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x67, 0x6f, 0x6c,
0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x67, 0x6f, 0x6c, 0x64, 0x12, 0x10, 0x0a,
0x03, 0x65, 0x78, 0x70, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x78, 0x70, 0x12,
0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08,
0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18,
0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x69, 0x70,
0x18, 0x11, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x76, 0x69, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x64,
0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x18, 0x12, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x64, 0x69,
0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x13,
0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 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, 0x7a, 0x68, 0x69, 0x12, 0x1c, 0x0a, 0x09, 0x6b, 0x61, 0x6e, 0x67, 0x6a,
0x75, 0x63, 0x68, 0x69, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x6b, 0x61, 0x6e, 0x67,
0x6a, 0x75, 0x63, 0x68, 0x69, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x61, 0x6f, 0x67, 0x75, 0x61, 0x6e,
0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x67, 0x61, 0x6f, 0x67, 0x75, 0x61, 0x6e,
0x67, 0x12, 0x12, 0x0a, 0x04, 0x77, 0x75, 0x6c, 0x69, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52,
0x04, 0x77, 0x75, 0x6c, 0x69, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x75, 0x73, 0x69, 0x63, 0x18, 0x07,
0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x6d, 0x75, 0x73, 0x69, 0x63, 0x12, 0x16, 0x0a, 0x06, 0x65,
0x66, 0x66, 0x65, 0x63, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x66, 0x66,
0x65, 0x63, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x75, 0x61, 0x6a, 0x69, 0x18, 0x09, 0x20, 0x01,
0x28, 0x08, 0x52, 0x05, 0x67, 0x75, 0x61, 0x6a, 0x69, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x75, 0x62,
0x65, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x75, 0x62, 0x65, 0x6e, 0x12,
0x16, 0x0a, 0x06, 0x74, 0x61, 0x6e, 0x73, 0x75, 0x6f, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52,
0x06, 0x74, 0x61, 0x6e, 0x73, 0x75, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x75, 0x6f, 0x64, 0x6f,
0x6e, 0x67, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x68, 0x75, 0x6f, 0x64, 0x6f, 0x6e,
0x67, 0x12, 0x1c, 0x0a, 0x09, 0x78, 0x75, 0x61, 0x6e, 0x73, 0x68, 0x61, 0x6e, 0x67, 0x18, 0x0d,
0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x78, 0x75, 0x61, 0x6e, 0x73, 0x68, 0x61, 0x6e, 0x67, 0x12,
0x14, 0x0a, 0x05, 0x73, 0x61, 0x69, 0x6a, 0x69, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05,
0x73, 0x61, 0x69, 0x6a, 0x69, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

File diff suppressed because it is too large Load Diff

View File

@ -383,6 +383,9 @@ type DBUserExpand struct {
Activeday int32 `protobuf:"varint,11,opt,name=activeday,proto3" json:"activeday"` //日活跃度
Activeweek int32 `protobuf:"varint,12,opt,name=activeweek,proto3" json:"activeweek"` //周活跃度
Sign string `protobuf:"bytes,13,opt,name=sign,proto3" json:"sign"` //用户签名
FriendPoint int32 `protobuf:"varint,14,opt,name=friendPoint,proto3" json:"friendPoint"` //友情点
FriendPointID int32 `protobuf:"varint,15,opt,name=friendPointID,proto3" json:"friendPointID"` //每日获赠友情点
FriendPointOD int32 `protobuf:"varint,16,opt,name=friendPointOD,proto3" json:"friendPointOD"` //每日送出友情点
}
func (x *DBUserExpand) Reset() {
@ -508,6 +511,27 @@ func (x *DBUserExpand) GetSign() string {
return ""
}
func (x *DBUserExpand) GetFriendPoint() int32 {
if x != nil {
return x.FriendPoint
}
return 0
}
func (x *DBUserExpand) GetFriendPointID() int32 {
if x != nil {
return x.FriendPointID
}
return 0
}
func (x *DBUserExpand) GetFriendPointOD() int32 {
if x != nil {
return x.FriendPointOD
}
return 0
}
var File_userexpand_proto protoreflect.FileDescriptor
var file_userexpand_proto_rawDesc = []byte{
@ -536,7 +560,7 @@ var file_userexpand_proto_rawDesc = []byte{
0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x2b, 0x0a, 0x0a, 0x63, 0x6f, 0x6d,
0x70, 0x6c, 0x65, 0x78, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e,
0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x70,
0x6c, 0x65, 0x78, 0x69, 0x6f, 0x6e, 0x22, 0xe1, 0x04, 0x0a, 0x0c, 0x44, 0x42, 0x55, 0x73, 0x65,
0x6c, 0x65, 0x78, 0x69, 0x6f, 0x6e, 0x22, 0xcf, 0x05, 0x0a, 0x0c, 0x44, 0x42, 0x55, 0x73, 0x65,
0x72, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x11, 0x6c, 0x61, 0x73,
@ -566,16 +590,23 @@ var file_userexpand_proto_rawDesc = []byte{
0x64, 0x61, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x77, 0x65, 0x65,
0x6b, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x77,
0x65, 0x65, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x67, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28,
0x09, 0x52, 0x04, 0x73, 0x69, 0x67, 0x6e, 0x1a, 0x39, 0x0a, 0x0b, 0x54, 0x75, 0x6a, 0x69, 0x61,
0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02,
0x38, 0x01, 0x1a, 0x46, 0x0a, 0x0f, 0x50, 0x72, 0x65, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c,
0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x46, 0x69, 0x67, 0x75, 0x72, 0x65, 0x52,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b,
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x09, 0x52, 0x04, 0x73, 0x69, 0x67, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x66, 0x72, 0x69, 0x65, 0x6e,
0x64, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x66, 0x72,
0x69, 0x65, 0x6e, 0x64, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x66, 0x72, 0x69,
0x65, 0x6e, 0x64, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05,
0x52, 0x0d, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x49, 0x44, 0x12,
0x24, 0x0a, 0x0d, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x44,
0x18, 0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x50, 0x6f,
0x69, 0x6e, 0x74, 0x4f, 0x44, 0x1a, 0x39, 0x0a, 0x0b, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x45,
0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01,
0x1a, 0x46, 0x0a, 0x0f, 0x50, 0x72, 0x65, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x45, 0x6e,
0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x46, 0x69, 0x67, 0x75, 0x72, 0x65, 0x52, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -9,10 +9,11 @@ import (
"github.com/spf13/cast"
)
func ParseP(p string) (string, string, bool) {
s := strings.SplitN(p, ".", 2)
// 拆分Uid
func UIdSplit(uid string) (string, string, bool) {
s := strings.SplitN(uid, "_", 2)
if len(s) < 2 {
log.Debugf("param P err: %s", p)
log.Debugf("split uid err: %s", uid)
return "", "", false
}