Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
5d53defa7d
BIN
cmd/v2/icon.png
Normal file
BIN
cmd/v2/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 51 KiB |
@ -95,15 +95,16 @@ const (
|
|||||||
APP_MONITOR_BTN_VIEW = "查看"
|
APP_MONITOR_BTN_VIEW = "查看"
|
||||||
|
|
||||||
//form
|
//form
|
||||||
APP_TESTCASE_FORM_LABEL_HEROOBJID = "卡片OID"
|
APP_TESTCASE_FORM_LABEL_HEROOBJID = "卡片ID"
|
||||||
APP_TESTCASE_FORM_LABEL_RACECARD = "种族卡片"
|
APP_TESTCASE_FORM_LABEL_RACECARD = "种族卡片"
|
||||||
APP_TESTCASE_FORM_LABEL_CARD = "卡片"
|
APP_TESTCASE_FORM_LABEL_CARD = "卡片"
|
||||||
APP_TESTCASE_FORM_LABEL_EXPCARDS = "经验卡"
|
APP_TESTCASE_FORM_LABEL_EXPCARDS = "经验卡"
|
||||||
APP_TESTCASE_FORM_LABEL_OID = "卡片OID"
|
APP_TESTCASE_FORM_LABEL_OID = "卡片OID"
|
||||||
APP_TESTCASE_FORM_LABEL_NUM = "卡片数量"
|
APP_TESTCASE_FORM_LABEL_NUM = "数量"
|
||||||
APP_TESTCASE_FORM_TASKTAG = "任务类型"
|
APP_TESTCASE_FORM_TASKTAG = "任务类型"
|
||||||
APP_TESTCASE_FORM_TASK_OID = "任务OID"
|
APP_TESTCASE_FORM_TASK_OID = "任务OID"
|
||||||
APP_TESTCASE_FORM_NICKNAME = "昵称"
|
APP_TESTCASE_FORM_NICKNAME = "昵称"
|
||||||
|
APP_TESTCASE_FORM_SIGN = "签名"
|
||||||
APP_TESTCASE_OPTIONS = "选填"
|
APP_TESTCASE_OPTIONS = "选填"
|
||||||
AAP_TESTCASE_FORM_TASK_DAY = "日常任务"
|
AAP_TESTCASE_FORM_TASK_DAY = "日常任务"
|
||||||
APP_TESTCASE_FORM_TASK_WEEK = "周常任务"
|
APP_TESTCASE_FORM_TASK_WEEK = "周常任务"
|
||||||
@ -111,6 +112,11 @@ const (
|
|||||||
APP_TESTCASE_FORM_BINGO = "命令"
|
APP_TESTCASE_FORM_BINGO = "命令"
|
||||||
APP_TESTCASE_BTN_PUSH = "推送"
|
APP_TESTCASE_BTN_PUSH = "推送"
|
||||||
APP_TESTCASE_FORM_LABEL_FID = "好友ID"
|
APP_TESTCASE_FORM_LABEL_FID = "好友ID"
|
||||||
|
APP_TESTCASE_FORM_MAILID = "邮件ID"
|
||||||
|
APP_TESTCASE_FORM_ITEMTYPE = "道具类型"
|
||||||
|
APP_TESTCASE_FORM_ITEM_GEZIID = "格子ID"
|
||||||
|
APP_TESTCASE_FORM_ITEM_GOODSID = "物品ID"
|
||||||
|
APP_TESTCASE_FORM_ITEM_IDX = "下标"
|
||||||
|
|
||||||
//button
|
//button
|
||||||
BUTTON_LOGIN = "登录"
|
BUTTON_LOGIN = "登录"
|
||||||
@ -140,14 +146,21 @@ const (
|
|||||||
DATETIME = "时钟"
|
DATETIME = "时钟"
|
||||||
|
|
||||||
// userinfo
|
// userinfo
|
||||||
USERINFO_BTN_COPY = "复制UID"
|
USERINFO_BTN_COPY = "复制UID"
|
||||||
USERINFO_TITLE = "用户信息"
|
USERINFO_BTN_REFRESH = "刷新"
|
||||||
USERINFO_UID = "UID"
|
USERINFO_PANEL_TITLE = "用户信息"
|
||||||
USERINFO_ACC = "账号"
|
USERINFO_UID = "UID"
|
||||||
USERINFO_NAME = "昵称"
|
USERINFO_ACC = "账号"
|
||||||
USERINFO_LV = "等级"
|
USERINFO_NAME = "昵称"
|
||||||
USERINFO_GOLD = "金币"
|
USERINFO_TITLE = "头衔"
|
||||||
USERINFO_EXP = "经验"
|
USERINFO_LV = "等级"
|
||||||
USERINFO_VIP = "贵宾"
|
USERINFO_GOLD = "金币"
|
||||||
USERINFO_AVATAR = "头像"
|
USERINFO_EXP = "经验"
|
||||||
|
USERINFO_VIP = "贵宾"
|
||||||
|
USERINFO_AVATAR = "头像"
|
||||||
|
USERINFO_FRIENDPOINT = "友情点"
|
||||||
|
USERINFO_SIGN = "签名"
|
||||||
|
USERINFO_MODINAME = "免费改名次数"
|
||||||
|
USERINFO_ACTIVE_DAY = "日活"
|
||||||
|
USERINFO_ACTIVE_WEEK = "周活"
|
||||||
)
|
)
|
||||||
|
@ -5,6 +5,7 @@ import (
|
|||||||
"go_dreamfactory/cmd/v2/lib/common"
|
"go_dreamfactory/cmd/v2/lib/common"
|
||||||
"go_dreamfactory/cmd/v2/service"
|
"go_dreamfactory/cmd/v2/service"
|
||||||
"go_dreamfactory/cmd/v2/service/observer"
|
"go_dreamfactory/cmd/v2/service/observer"
|
||||||
|
"go_dreamfactory/cmd/v2/theme"
|
||||||
"go_dreamfactory/cmd/v2/ui"
|
"go_dreamfactory/cmd/v2/ui"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
@ -51,7 +52,9 @@ func main() {
|
|||||||
logrus.Info("Starting...")
|
logrus.Info("Starting...")
|
||||||
|
|
||||||
// create a new ui
|
// create a new ui
|
||||||
appUI := ui.NewUI(app.NewWithID("protocol-test-tool"), configService, connService, pttService, obs)
|
app := app.NewWithID("protocol-test-tool")
|
||||||
|
app.SetIcon(theme.ResourceIconPng)
|
||||||
|
appUI := ui.NewUI(app, configService, connService, pttService, obs)
|
||||||
mainWindow := ui.NewMainWindow(appUI)
|
mainWindow := ui.NewMainWindow(appUI)
|
||||||
|
|
||||||
mainWindow.CreateWindow(common.APP_NAME, 1366, 768, true)
|
mainWindow.CreateWindow(common.APP_NAME, 1366, 768, true)
|
||||||
|
@ -4,6 +4,7 @@ import "google.golang.org/protobuf/proto"
|
|||||||
|
|
||||||
type TestCase struct {
|
type TestCase struct {
|
||||||
Id string //用例ID 如果没有指定,会自动赋值uuid
|
Id string //用例ID 如果没有指定,会自动赋值uuid
|
||||||
|
NavLabel string //菜单名称
|
||||||
Desc string //用例描述
|
Desc string //用例描述
|
||||||
MainType string //协议类型 L1
|
MainType string //协议类型 L1
|
||||||
SubType string //协议类型 L2
|
SubType string //协议类型 L2
|
||||||
|
@ -11,6 +11,23 @@ fyne bundle msyh.ttc >> bundled.go
|
|||||||
fyne bundle -append msyhbd.ttc >> bundled.go
|
fyne bundle -append msyhbd.ttc >> bundled.go
|
||||||
(不要使用powershell 或vscode自带终端)
|
(不要使用powershell 或vscode自带终端)
|
||||||
|
|
||||||
|
|
||||||
|
## icon
|
||||||
|
|
||||||
|
1.
|
||||||
|
将静态资源编译为 go 文件
|
||||||
|
fyne bundle fav.png >> bundled.go
|
||||||
|
如果是要追加资源
|
||||||
|
fyne bundle -append image2.jpg >> bundled.go
|
||||||
|
|
||||||
|
2.
|
||||||
|
a := app.New()
|
||||||
|
a.SetIcon(resourceFavPng)
|
||||||
|
|
||||||
|
## package
|
||||||
|
|
||||||
|
fyne package -os windows -icon icon.png
|
||||||
|
|
||||||
## 开发协议参数表单
|
## 开发协议参数表单
|
||||||
|
|
||||||
1.
|
1.
|
||||||
|
@ -5,10 +5,11 @@ const (
|
|||||||
//用户详情
|
//用户详情
|
||||||
EVENT_USERINFO Event = "userinfo"
|
EVENT_USERINFO Event = "userinfo"
|
||||||
//协议推送
|
//协议推送
|
||||||
EVENT_APP_MONI Event = "push"
|
EVENT_APP_MONI Event = "push"
|
||||||
EVENT_USER_CHANGE = "chanage"
|
// 用户数据变化
|
||||||
|
EVENT_USER_CHANGE Event = "chanage"
|
||||||
//测试用例响应事件
|
//测试用例响应事件
|
||||||
EVENT_REQ_RSP Event = "response"
|
EVENT_REQ_RSP Event = "response"
|
||||||
// 清空 ui数据事件
|
// 清空 ui数据事件
|
||||||
EVENT_UI_CLEAN = "uiclean"
|
EVENT_UI_CLEAN Event = "uiclean"
|
||||||
)
|
)
|
||||||
|
12
cmd/v2/theme/icon.go
Normal file
12
cmd/v2/theme/icon.go
Normal file
File diff suppressed because one or more lines are too long
@ -104,17 +104,25 @@ func (a *appTester) makeNav(setNav func(testCase *model.TestCase)) fyne.CanvasOb
|
|||||||
}
|
}
|
||||||
if a.disEnabled(t) {
|
if a.disEnabled(t) {
|
||||||
obj.(*widget.Label).TextStyle = fyne.TextStyle{Italic: true}
|
obj.(*widget.Label).TextStyle = fyne.TextStyle{Italic: true}
|
||||||
if branch {
|
if branch { //parent
|
||||||
obj.(*widget.Label).SetText(fmt.Sprintf("%s(dis)", t.MainType))
|
obj.(*widget.Label).SetText(fmt.Sprintf("%s(dis)", t.MainType))
|
||||||
} else {
|
} else {
|
||||||
obj.(*widget.Label).SetText(fmt.Sprintf("%s(dis)", t.SubType))
|
obj.(*widget.Label).SetText(fmt.Sprintf("%s(dis)", t.SubType))
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
obj.(*widget.Label).TextStyle = fyne.TextStyle{}
|
if branch { //parent
|
||||||
if branch {
|
obj.(*widget.Label).TextStyle = fyne.TextStyle{Bold: true}
|
||||||
obj.(*widget.Label).SetText(t.MainType)
|
if t.NavLabel != "" {
|
||||||
|
obj.(*widget.Label).SetText(t.NavLabel)
|
||||||
|
} else {
|
||||||
|
obj.(*widget.Label).SetText(t.MainType)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
obj.(*widget.Label).SetText(t.SubType)
|
if t.NavLabel != "" {
|
||||||
|
obj.(*widget.Label).SetText(t.NavLabel)
|
||||||
|
} else {
|
||||||
|
obj.(*widget.Label).SetText(t.SubType)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ import (
|
|||||||
"fyne.io/fyne/v2/widget"
|
"fyne.io/fyne/v2/widget"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// 获取任务标签
|
||||||
func getTaskTagSelect() *widget.Select {
|
func getTaskTagSelect() *widget.Select {
|
||||||
var tagSelect *widget.Select
|
var tagSelect *widget.Select
|
||||||
tagSelect = widget.NewSelect([]string{
|
tagSelect = widget.NewSelect([]string{
|
||||||
@ -27,3 +28,26 @@ func getTaskTagSelect() *widget.Select {
|
|||||||
tagSelect.SetSelectedIndex(0)
|
tagSelect.SetSelectedIndex(0)
|
||||||
return tagSelect
|
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
|
||||||
|
}
|
||||||
|
23
cmd/v2/ui/formview/equip_list.go
Normal file
23
cmd/v2/ui/formview/equip_list.go
Normal 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 EquipListView struct {
|
||||||
|
BaseformView
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *EquipListView) CreateView(t *model.TestCase) fyne.CanvasObject {
|
||||||
|
this.form.OnSubmit = func() {
|
||||||
|
if err := service.GetPttService().SendToClient(t.MainType, t.SubType, &pb.EquipmentGetListReq{}); err != nil {
|
||||||
|
logrus.Error(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return this.form
|
||||||
|
}
|
59
cmd/v2/ui/formview/equip_updown.go
Normal file
59
cmd/v2/ui/formview/equip_updown.go
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
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 EquipUpDownView struct {
|
||||||
|
BaseformView
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *EquipUpDownView) CreateView(t *model.TestCase) fyne.CanvasObject {
|
||||||
|
heroObjID := widget.NewEntry()
|
||||||
|
heroObjID.PlaceHolder = "英雄ID"
|
||||||
|
this.form.AppendItem(widget.NewFormItem(common.APP_TESTCASE_FORM_LABEL_HEROOBJID, heroObjID))
|
||||||
|
|
||||||
|
equipId1 := widget.NewEntry()
|
||||||
|
equipId1.PlaceHolder = "装备ID1"
|
||||||
|
this.form.AppendItem(widget.NewFormItem("装备ID1", equipId1))
|
||||||
|
|
||||||
|
equipId2 := widget.NewEntry()
|
||||||
|
equipId2.PlaceHolder = "装备ID2"
|
||||||
|
this.form.AppendItem(widget.NewFormItem("装备ID2", equipId2))
|
||||||
|
|
||||||
|
equipId3 := widget.NewEntry()
|
||||||
|
equipId3.PlaceHolder = "装备ID3"
|
||||||
|
this.form.AppendItem(widget.NewFormItem("装备ID3", equipId3))
|
||||||
|
|
||||||
|
equipId4 := widget.NewEntry()
|
||||||
|
equipId4.PlaceHolder = "装备ID4"
|
||||||
|
this.form.AppendItem(widget.NewFormItem("装备ID5", equipId4))
|
||||||
|
|
||||||
|
equipId5 := widget.NewEntry()
|
||||||
|
equipId5.PlaceHolder = "装备ID5"
|
||||||
|
this.form.AppendItem(widget.NewFormItem("装备ID5", equipId5))
|
||||||
|
|
||||||
|
equipIds := []string{
|
||||||
|
equipId1.Text, equipId2.Text, equipId3.Text, equipId4.Text, equipId5.Text,
|
||||||
|
}
|
||||||
|
|
||||||
|
this.form.OnSubmit = func() {
|
||||||
|
if err := service.GetPttService().SendToClient(t.MainType, t.SubType,
|
||||||
|
&pb.EquipmentEquipReq{
|
||||||
|
HeroCardId: heroObjID.Text,
|
||||||
|
EquipmentId: equipIds,
|
||||||
|
}); err != nil {
|
||||||
|
logrus.Error(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.form
|
||||||
|
}
|
32
cmd/v2/ui/formview/equip_upgrade.go
Normal file
32
cmd/v2/ui/formview/equip_upgrade.go
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
package formview
|
||||||
|
|
||||||
|
import (
|
||||||
|
"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 EquipUpgradeView struct {
|
||||||
|
BaseformView
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *EquipUpgradeView) CreateView(t *model.TestCase) fyne.CanvasObject {
|
||||||
|
equipId := widget.NewEntry()
|
||||||
|
equipId.PlaceHolder = "装备ID"
|
||||||
|
this.form.AppendItem(widget.NewFormItem("装备ID", equipId))
|
||||||
|
|
||||||
|
this.form.OnSubmit = func() {
|
||||||
|
if err := service.GetPttService().SendToClient(t.MainType, t.SubType,
|
||||||
|
&pb.EquipmentUpgradeReq{
|
||||||
|
EquipmentId: equipId.Text,
|
||||||
|
}); err != nil {
|
||||||
|
logrus.Error(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return this.form
|
||||||
|
}
|
@ -27,7 +27,7 @@ func (this *FriendZanView) CreateView(t *model.TestCase) fyne.CanvasObject {
|
|||||||
|
|
||||||
if err := service.GetPttService().SendToClient(
|
if err := service.GetPttService().SendToClient(
|
||||||
t.MainType,
|
t.MainType,
|
||||||
t.SubType,
|
"zanreceive",
|
||||||
&pb.FriendZanreceiveReq{
|
&pb.FriendZanreceiveReq{
|
||||||
FriendId: this.selFriendIds[0],
|
FriendId: this.selFriendIds[0],
|
||||||
},
|
},
|
||||||
|
24
cmd/v2/ui/formview/items_list.go
Normal file
24
cmd/v2/ui/formview/items_list.go
Normal 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
|
||||||
|
}
|
48
cmd/v2/ui/formview/items_sell.go
Normal file
48
cmd/v2/ui/formview/items_sell.go
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
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"
|
||||||
|
"github.com/spf13/cast"
|
||||||
|
)
|
||||||
|
|
||||||
|
type ItemsSellView struct {
|
||||||
|
BaseformView
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *ItemsSellView) CreateView(t *model.TestCase) fyne.CanvasObject {
|
||||||
|
geziId := widget.NewEntry()
|
||||||
|
geziId.PlaceHolder = "格子ID"
|
||||||
|
this.form.AppendItem(widget.NewFormItem(common.APP_TESTCASE_FORM_ITEM_GEZIID, geziId))
|
||||||
|
|
||||||
|
wupinId := widget.NewEntry()
|
||||||
|
wupinId.PlaceHolder = "物品ID"
|
||||||
|
this.form.AppendItem(widget.NewFormItem(common.APP_TESTCASE_FORM_ITEM_GOODSID, wupinId))
|
||||||
|
|
||||||
|
amount := widget.NewEntry()
|
||||||
|
amount.PlaceHolder = "使用数量"
|
||||||
|
this.form.AppendItem(widget.NewFormItem(common.APP_TESTCASE_FORM_LABEL_NUM, amount))
|
||||||
|
|
||||||
|
this.form.OnSubmit = func() {
|
||||||
|
if err := service.GetPttService().SendToClient(
|
||||||
|
t.MainType,
|
||||||
|
t.SubType,
|
||||||
|
&pb.ItemsSellItemReq{
|
||||||
|
GridId: geziId.Text,
|
||||||
|
ItemId: wupinId.Text,
|
||||||
|
Amount: cast.ToUint32(amount.Text),
|
||||||
|
},
|
||||||
|
); err != nil {
|
||||||
|
logrus.Error(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return this.form
|
||||||
|
}
|
48
cmd/v2/ui/formview/items_use.go
Normal file
48
cmd/v2/ui/formview/items_use.go
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
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"
|
||||||
|
"github.com/spf13/cast"
|
||||||
|
)
|
||||||
|
|
||||||
|
type ItemsUseView struct {
|
||||||
|
BaseformView
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *ItemsUseView) CreateView(t *model.TestCase) fyne.CanvasObject {
|
||||||
|
geziId := widget.NewEntry()
|
||||||
|
geziId.PlaceHolder = "格子ID"
|
||||||
|
this.form.AppendItem(widget.NewFormItem(common.APP_TESTCASE_FORM_ITEM_GEZIID, geziId))
|
||||||
|
|
||||||
|
amount := widget.NewEntry()
|
||||||
|
amount.PlaceHolder = "使用数量"
|
||||||
|
this.form.AppendItem(widget.NewFormItem(common.APP_TESTCASE_FORM_LABEL_NUM, amount))
|
||||||
|
|
||||||
|
selectId := widget.NewEntry()
|
||||||
|
selectId.PlaceHolder = "选择下标"
|
||||||
|
this.form.AppendItem(widget.NewFormItem(common.APP_TESTCASE_FORM_ITEM_IDX, selectId))
|
||||||
|
|
||||||
|
this.form.OnSubmit = func() {
|
||||||
|
if err := service.GetPttService().SendToClient(
|
||||||
|
t.MainType,
|
||||||
|
t.SubType,
|
||||||
|
&pb.ItemsUseItemReq{
|
||||||
|
GridId: geziId.Text,
|
||||||
|
Amount: cast.ToUint32(amount.Text),
|
||||||
|
Select: cast.ToInt32(selectId),
|
||||||
|
},
|
||||||
|
); err != nil {
|
||||||
|
logrus.Error(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return this.form
|
||||||
|
}
|
31
cmd/v2/ui/formview/mail_attachment.go
Normal file
31
cmd/v2/ui/formview/mail_attachment.go
Normal 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
|
||||||
|
}
|
24
cmd/v2/ui/formview/mail_attachmentall.go
Normal file
24
cmd/v2/ui/formview/mail_attachmentall.go
Normal 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
|
||||||
|
}
|
31
cmd/v2/ui/formview/mail_del.go
Normal file
31
cmd/v2/ui/formview/mail_del.go
Normal 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
|
||||||
|
}
|
23
cmd/v2/ui/formview/mail_list.go
Normal file
23
cmd/v2/ui/formview/mail_list.go
Normal 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
|
||||||
|
}
|
31
cmd/v2/ui/formview/mail_readmail.go
Normal file
31
cmd/v2/ui/formview/mail_readmail.go
Normal 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
|
||||||
|
}
|
34
cmd/v2/ui/formview/mainline_challenge.go
Normal file
34
cmd/v2/ui/formview/mainline_challenge.go
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
package formview
|
||||||
|
|
||||||
|
import (
|
||||||
|
"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"
|
||||||
|
"github.com/spf13/cast"
|
||||||
|
)
|
||||||
|
|
||||||
|
type MainlineChallengeView struct {
|
||||||
|
BaseformView
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *MainlineChallengeView) CreateView(t *model.TestCase) fyne.CanvasObject {
|
||||||
|
chapterId := widget.NewEntry()
|
||||||
|
this.form.AppendItem(widget.NewFormItem("关卡ID", chapterId))
|
||||||
|
|
||||||
|
subChapterId := widget.NewEntry()
|
||||||
|
this.form.AppendItem(widget.NewFormItem("小关卡ID", subChapterId))
|
||||||
|
|
||||||
|
this.form.OnSubmit = func() {
|
||||||
|
if err := service.GetPttService().SendToClient(t.MainType, t.SubType, &pb.MainlineChallengeReq{
|
||||||
|
ChapterObj: chapterId.Text,
|
||||||
|
MainlineId: cast.ToUint32(subChapterId.Text),
|
||||||
|
}); err != nil {
|
||||||
|
logrus.Error(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return this.form
|
||||||
|
}
|
24
cmd/v2/ui/formview/mainline_list.go
Normal file
24
cmd/v2/ui/formview/mainline_list.go
Normal 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 MainlineListView struct {
|
||||||
|
BaseformView
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *MainlineListView) CreateView(t *model.TestCase) fyne.CanvasObject {
|
||||||
|
this.form.OnSubmit = func() {
|
||||||
|
if err := service.GetPttService().SendToClient(t.MainType, t.SubType, &pb.MainlineGetListReq{}); err != nil {
|
||||||
|
logrus.Error(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return this.form
|
||||||
|
}
|
29
cmd/v2/ui/formview/mainline_reward.go
Normal file
29
cmd/v2/ui/formview/mainline_reward.go
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
package formview
|
||||||
|
|
||||||
|
import (
|
||||||
|
"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 MainlineRewardView struct {
|
||||||
|
BaseformView
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *MainlineRewardView) CreateView(t *model.TestCase) fyne.CanvasObject {
|
||||||
|
chapterId := widget.NewEntry()
|
||||||
|
this.form.AppendItem(widget.NewFormItem("关卡ID", chapterId))
|
||||||
|
|
||||||
|
this.form.OnSubmit = func() {
|
||||||
|
if err := service.GetPttService().SendToClient(t.MainType, t.SubType, &pb.MainlineGetRewardReq{
|
||||||
|
ChapterObj: chapterId.Text,
|
||||||
|
}); err != nil {
|
||||||
|
logrus.Error(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return this.form
|
||||||
|
}
|
23
cmd/v2/ui/formview/pagoda_list.go
Normal file
23
cmd/v2/ui/formview/pagoda_list.go
Normal 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 PagodaListView struct {
|
||||||
|
BaseformView
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *PagodaListView) CreateView(t *model.TestCase) fyne.CanvasObject {
|
||||||
|
this.form.OnSubmit = func() {
|
||||||
|
if err := service.GetPttService().SendToClient(t.MainType, t.SubType, &pb.PagodaGetListReq{}); err != nil {
|
||||||
|
logrus.Error(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return this.form
|
||||||
|
}
|
42
cmd/v2/ui/formview/shop_buy.go
Normal file
42
cmd/v2/ui/formview/shop_buy.go
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
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"
|
||||||
|
"github.com/spf13/cast"
|
||||||
|
)
|
||||||
|
|
||||||
|
type ShopBuyView struct {
|
||||||
|
BaseformView
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *ShopBuyView) CreateView(t *model.TestCase) fyne.CanvasObject {
|
||||||
|
shopType := widget.NewEntry()
|
||||||
|
shopType.PlaceHolder = "商店类型"
|
||||||
|
this.form.AppendItem(widget.NewFormItem(common.APP_TESTCASE_FORM_ITEM_GEZIID, shopType))
|
||||||
|
|
||||||
|
goodsId := widget.NewEntry()
|
||||||
|
goodsId.PlaceHolder = "商品ID"
|
||||||
|
this.form.AppendItem(widget.NewFormItem(common.APP_TESTCASE_FORM_ITEM_GOODSID, goodsId))
|
||||||
|
|
||||||
|
amount := widget.NewEntry()
|
||||||
|
amount.PlaceHolder = "购买数量"
|
||||||
|
this.form.AppendItem(widget.NewFormItem(common.APP_TESTCASE_FORM_LABEL_NUM, amount))
|
||||||
|
|
||||||
|
this.form.OnSubmit = func() {
|
||||||
|
if err := service.GetPttService().SendToClient(t.MainType, t.SubType, &pb.ShopBuyReq{
|
||||||
|
ShopType: pb.ShopType(cast.ToInt32(shopType.Text)),
|
||||||
|
GoodsId: cast.ToInt32(goodsId.Text),
|
||||||
|
BuyNum: cast.ToInt32(amount.Text),
|
||||||
|
}); err != nil {
|
||||||
|
logrus.Error(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return this.form
|
||||||
|
}
|
23
cmd/v2/ui/formview/shop_list.go
Normal file
23
cmd/v2/ui/formview/shop_list.go
Normal 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 ShopListView struct {
|
||||||
|
BaseformView
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *ShopListView) CreateView(t *model.TestCase) fyne.CanvasObject {
|
||||||
|
this.form.OnSubmit = func() {
|
||||||
|
if err := service.GetPttService().SendToClient(t.MainType, t.SubType, &pb.ShopGetListReq{}); err != nil {
|
||||||
|
logrus.Error(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return this.form
|
||||||
|
}
|
35
cmd/v2/ui/formview/user_modifysign.go
Normal file
35
cmd/v2/ui/formview/user_modifysign.go
Normal 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
|
||||||
|
}
|
@ -215,13 +215,14 @@ func (ui *MainWindowImpl) createLoginWin(sid, sname string) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
logrus.WithField("appName", appName).Error(err)
|
logrus.WithField("appName", appName).Error(err)
|
||||||
}
|
}
|
||||||
|
// hide toolbar
|
||||||
|
ui.tb.toolbar.Hide()
|
||||||
// 必须在创建窗口之后调用
|
// 必须在创建窗口之后调用
|
||||||
ui.connService.ListenerPush()
|
ui.connService.ListenerPush()
|
||||||
if code := ui.pttService.Login(sid, account.Text); code != pb.ErrorCode_Success {
|
if code := ui.pttService.Login(sid, account.Text); code != pb.ErrorCode_Success {
|
||||||
err := fmt.Errorf("login err: %v[%d]", code, int32(code))
|
err := fmt.Errorf("login err: %v[%d]", code, int32(code))
|
||||||
dialog.ShowError(err, ui.w)
|
dialog.ShowError(err, ui.w)
|
||||||
} else {
|
} else {
|
||||||
//
|
|
||||||
ui.obs.AddListener(observer.EVENT_REQ_RSP, observer.Listener{
|
ui.obs.AddListener(observer.EVENT_REQ_RSP, observer.Listener{
|
||||||
OnNotify: func(data interface{}, args ...interface{}) {
|
OnNotify: func(data interface{}, args ...interface{}) {
|
||||||
if data == nil {
|
if data == nil {
|
||||||
@ -237,27 +238,24 @@ func (ui *MainWindowImpl) createLoginWin(sid, sname string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ui.w.SetTitle(fmt.Sprintf("%s[%s]", sname, sid))
|
ui.w.SetTitle(fmt.Sprintf("%s[%s]", sname, sid))
|
||||||
|
|
||||||
//show mainwindow
|
|
||||||
// logrus.Debug(rsp)
|
|
||||||
ui.pttService.SetUser(rsp.Data, rsp.Ex)
|
ui.pttService.SetUser(rsp.Data, rsp.Ex)
|
||||||
// isCreateRole
|
// isCreateRole
|
||||||
if rsp.Data.Created {
|
if rsp.Data.Created {
|
||||||
// ui.renderUserContainer()
|
// set statusbar message
|
||||||
|
|
||||||
ui.sb.setMessage(common.LABEL_WELCOME + rsp.Data.Binduid)
|
ui.sb.setMessage(common.LABEL_WELCOME + rsp.Data.Binduid)
|
||||||
|
// update userinfo
|
||||||
ui.obs.Notify(observer.EVENT_USERINFO, ui.pttService.GetUser())
|
ui.obs.Notify(observer.EVENT_USERINFO, ui.pttService.GetUser())
|
||||||
|
// show toolbar
|
||||||
|
ui.tb.toolbar.Show()
|
||||||
} else {
|
} else {
|
||||||
|
// create role
|
||||||
ui.createRoleWindowPopUp()
|
ui.createRoleWindowPopUp()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}, ui.w)
|
}, ui.w)
|
||||||
}
|
}
|
||||||
@ -298,16 +296,10 @@ func (ui *MainWindowImpl) createRoleWindowPopUp() {
|
|||||||
err := fmt.Errorf("login err: %v[%d]", code, int32(code))
|
err := fmt.Errorf("login err: %v[%d]", code, int32(code))
|
||||||
dialog.ShowError(err, ui.w)
|
dialog.ShowError(err, ui.w)
|
||||||
} else {
|
} else {
|
||||||
// if rsp.IsSucc {
|
|
||||||
user := ui.pttService.GetUser()
|
user := ui.pttService.GetUser()
|
||||||
logrus.WithField("uid", user.DbUser.Uid).Debug("create role succ")
|
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.obs.Notify(observer.EVENT_USERINFO, ui.pttService.GetUser())
|
||||||
// }
|
ui.tb.toolbar.Show()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ import (
|
|||||||
"go_dreamfactory/lego/core"
|
"go_dreamfactory/lego/core"
|
||||||
"go_dreamfactory/modules/friend"
|
"go_dreamfactory/modules/friend"
|
||||||
"go_dreamfactory/modules/hero"
|
"go_dreamfactory/modules/hero"
|
||||||
|
"go_dreamfactory/modules/mainline"
|
||||||
"go_dreamfactory/modules/task"
|
"go_dreamfactory/modules/task"
|
||||||
"go_dreamfactory/modules/user"
|
"go_dreamfactory/modules/user"
|
||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
@ -30,6 +31,17 @@ var (
|
|||||||
ff(comm.ModuleGM, "cmd"): &formview.BingoView{},
|
ff(comm.ModuleGM, "cmd"): &formview.BingoView{},
|
||||||
//user
|
//user
|
||||||
ff(comm.ModuleUser, user.UserSubTypeModifyName): &formview.UserModifynameView{},
|
ff(comm.ModuleUser, user.UserSubTypeModifyName): &formview.UserModifynameView{},
|
||||||
|
ff(comm.ModuleUser, user.UserSubTypeModifySign): &formview.UserSignView{},
|
||||||
|
// items
|
||||||
|
ff(comm.ModuleItems, "getlist"): &formview.ItemListView{},
|
||||||
|
ff(comm.ModuleItems, "sellitem"): &formview.ItemsSellView{},
|
||||||
|
ff(comm.ModuleItems, "useitem"): &formview.ItemsUseView{},
|
||||||
|
//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
|
//task
|
||||||
ff(comm.ModuleTask, task.TaskSubTypeList): &formview.TaskListView{},
|
ff(comm.ModuleTask, task.TaskSubTypeList): &formview.TaskListView{},
|
||||||
ff(comm.ModuleTask, task.TaskSubTypeReceive): &formview.TaskReceiveView{},
|
ff(comm.ModuleTask, task.TaskSubTypeReceive): &formview.TaskReceiveView{},
|
||||||
@ -39,17 +51,28 @@ var (
|
|||||||
ff(comm.ModuleHero, hero.HeroSubTypeList): &formview.HeroListView{},
|
ff(comm.ModuleHero, hero.HeroSubTypeList): &formview.HeroListView{},
|
||||||
ff(comm.ModuleHero, hero.StrengthenUplv): &formview.HeroStrengthenUplvView{},
|
ff(comm.ModuleHero, hero.StrengthenUplv): &formview.HeroStrengthenUplvView{},
|
||||||
ff(comm.ModuleHero, hero.StrengthenUpStar): &formview.HeroStrengthenUpStarView{},
|
ff(comm.ModuleHero, hero.StrengthenUpStar): &formview.HeroStrengthenUpStarView{},
|
||||||
|
//equip
|
||||||
|
ff(comm.ModuleEquipment, "getlist"): &formview.EquipListView{},
|
||||||
|
ff(comm.ModuleEquipment, "equip"): &formview.EquipUpDownView{},
|
||||||
|
ff(comm.ModuleEquipment, "upgrade"): &formview.EquipUpgradeView{},
|
||||||
//friend
|
//friend
|
||||||
ff(comm.ModuleFriend, friend.FriendSubTypeList): &formview.FriendListView{},
|
ff(comm.ModuleFriend, friend.FriendSubTypeList): &formview.FriendListView{},
|
||||||
ff(comm.ModuleFriend, friend.FriendSubTypeApply): &formview.FriendApplyView{},
|
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.FriendSubTypeAgree): &formview.FriendAgreeView{},
|
|
||||||
// ff(comm.ModuleFriend, friend.FriendSubTypeRefuse): &formview.FriendRefuseView{},
|
|
||||||
ff(comm.ModuleFriend, friend.FriendSubTypeBlacklist): &formview.FriendBlacklistView{},
|
ff(comm.ModuleFriend, friend.FriendSubTypeBlacklist): &formview.FriendBlacklistView{},
|
||||||
ff(comm.ModuleFriend, friend.FriendSubTypeAddBlack): &formview.FriendAddBlackView{},
|
ff(comm.ModuleFriend, friend.FriendSubTypeAddBlack): &formview.FriendAddBlackView{},
|
||||||
ff(comm.ModuleFriend, friend.FriendSubTypeDelBlack): &formview.FriendDelblackView{},
|
ff(comm.ModuleFriend, friend.FriendSubTypeDelBlack): &formview.FriendDelblackView{},
|
||||||
ff(comm.ModuleFriend, friend.FriendSubTypeSearch): &formview.FriendSearchView{},
|
ff(comm.ModuleFriend, friend.FriendSubTypeSearch): &formview.FriendSearchView{},
|
||||||
ff(comm.ModuleFriend, friend.FriendSubTypeZanList): &formview.FriendZanView{},
|
ff(comm.ModuleFriend, friend.FriendSubTypeZanList): &formview.FriendZanView{},
|
||||||
|
// shop
|
||||||
|
ff(comm.ModuleShop, "getlist"): &formview.ShopListView{},
|
||||||
|
ff(comm.ModuleShop, "buy"): &formview.ShopBuyView{},
|
||||||
|
// mailine
|
||||||
|
ff(comm.ModuleMainline, mainline.MainlineGetListResp): &formview.MainlineListView{},
|
||||||
|
ff(comm.ModuleMainline, mainline.MainlineChallengeResp): &formview.MainlineChallengeView{},
|
||||||
|
ff(comm.ModuleMainline, mainline.MainlineGetRewardResp): &formview.MainlineRewardView{},
|
||||||
|
// pagoda
|
||||||
|
ff(comm.ModulePagoda, "getlist"): &formview.PagodaListView{},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -62,16 +85,40 @@ var (
|
|||||||
string(comm.ModuleHero),
|
string(comm.ModuleHero),
|
||||||
string(comm.ModuleTask),
|
string(comm.ModuleTask),
|
||||||
string(comm.ModuleFriend),
|
string(comm.ModuleFriend),
|
||||||
|
string(comm.ModuleMail),
|
||||||
|
string(comm.ModuleItems),
|
||||||
|
string(comm.ModuleEquipment),
|
||||||
|
string(comm.ModuleShop),
|
||||||
|
string(comm.ModuleMainline),
|
||||||
|
string(comm.ModulePagoda),
|
||||||
},
|
},
|
||||||
"gm": {ff(comm.ModuleGM, "cmd")},
|
"gm": {ff(comm.ModuleGM, "cmd")},
|
||||||
"user": {
|
"user": {
|
||||||
ff(comm.ModuleUser, user.UserSubTypeModifyName),
|
ff(comm.ModuleUser, user.UserSubTypeModifyName),
|
||||||
|
ff(comm.ModuleUser, user.UserSubTypeModifySign),
|
||||||
|
},
|
||||||
|
"items": {
|
||||||
|
ff(comm.ModuleItems, "getlist"),
|
||||||
|
ff(comm.ModuleItems, "sellitem"),
|
||||||
|
ff(comm.ModuleItems, "useitem"),
|
||||||
|
},
|
||||||
|
"mail": {
|
||||||
|
ff(comm.ModuleMail, "getlist"),
|
||||||
|
ff(comm.ModuleMail, "readmail"),
|
||||||
|
ff(comm.ModuleMail, "delmail"),
|
||||||
|
ff(comm.ModuleMail, "getusermailattachment"),
|
||||||
|
ff(comm.ModuleMail, "getallmailattachment"),
|
||||||
},
|
},
|
||||||
"hero": {
|
"hero": {
|
||||||
ff(comm.ModuleHero, hero.HeroSubTypeList),
|
ff(comm.ModuleHero, hero.HeroSubTypeList),
|
||||||
ff(comm.ModuleHero, hero.StrengthenUplv),
|
ff(comm.ModuleHero, hero.StrengthenUplv),
|
||||||
ff(comm.ModuleHero, hero.StrengthenUpStar),
|
ff(comm.ModuleHero, hero.StrengthenUpStar),
|
||||||
},
|
},
|
||||||
|
"equipment": {
|
||||||
|
ff(comm.ModuleEquipment, "getlist"),
|
||||||
|
ff(comm.ModuleEquipment, "equip"),
|
||||||
|
ff(comm.ModuleEquipment, "upgrade"),
|
||||||
|
},
|
||||||
"task": {
|
"task": {
|
||||||
ff(comm.ModuleTask, task.TaskSubTypeList),
|
ff(comm.ModuleTask, task.TaskSubTypeList),
|
||||||
ff(comm.ModuleTask, task.TaskSubTypeReceive),
|
ff(comm.ModuleTask, task.TaskSubTypeReceive),
|
||||||
@ -81,15 +128,25 @@ var (
|
|||||||
"friend": {
|
"friend": {
|
||||||
ff(comm.ModuleFriend, friend.FriendSubTypeList),
|
ff(comm.ModuleFriend, friend.FriendSubTypeList),
|
||||||
ff(comm.ModuleFriend, friend.FriendSubTypeApply),
|
ff(comm.ModuleFriend, friend.FriendSubTypeApply),
|
||||||
// ff(comm.ModuleFriend, friend.FriendSubTypeApplyList),
|
|
||||||
ff(comm.ModuleFriend, friend.FriendSubTypeAgree),
|
ff(comm.ModuleFriend, friend.FriendSubTypeAgree),
|
||||||
// ff(comm.ModuleFriend, friend.FriendSubTypeRefuse),
|
|
||||||
ff(comm.ModuleFriend, friend.FriendSubTypeBlacklist),
|
ff(comm.ModuleFriend, friend.FriendSubTypeBlacklist),
|
||||||
ff(comm.ModuleFriend, friend.FriendSubTypeAddBlack),
|
ff(comm.ModuleFriend, friend.FriendSubTypeAddBlack),
|
||||||
ff(comm.ModuleFriend, friend.FriendSubTypeDelBlack),
|
ff(comm.ModuleFriend, friend.FriendSubTypeDelBlack),
|
||||||
ff(comm.ModuleFriend, friend.FriendSubTypeSearch),
|
ff(comm.ModuleFriend, friend.FriendSubTypeSearch),
|
||||||
ff(comm.ModuleFriend, friend.FriendSubTypeZanList),
|
ff(comm.ModuleFriend, friend.FriendSubTypeZanList),
|
||||||
},
|
},
|
||||||
|
"shop": {
|
||||||
|
ff(comm.ModuleShop, "getlist"),
|
||||||
|
ff(comm.ModuleShop, "buy"),
|
||||||
|
},
|
||||||
|
"mainline": {
|
||||||
|
ff(comm.ModuleMainline, mainline.MainlineGetListResp),
|
||||||
|
ff(comm.ModuleMainline, mainline.MainlineChallengeResp),
|
||||||
|
ff(comm.ModuleMainline, mainline.MainlineGetRewardResp),
|
||||||
|
},
|
||||||
|
"pagoda": {
|
||||||
|
ff(comm.ModulePagoda, "getlist"),
|
||||||
|
},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -98,6 +155,7 @@ var (
|
|||||||
CaseNav = map[string]*model.TestCase{
|
CaseNav = map[string]*model.TestCase{
|
||||||
// gm
|
// gm
|
||||||
"gm": {
|
"gm": {
|
||||||
|
NavLabel: "GM",
|
||||||
MainType: string(comm.ModuleGM),
|
MainType: string(comm.ModuleGM),
|
||||||
Enabled: true,
|
Enabled: true,
|
||||||
},
|
},
|
||||||
@ -111,11 +169,13 @@ var (
|
|||||||
},
|
},
|
||||||
// user
|
// user
|
||||||
"user": {
|
"user": {
|
||||||
|
NavLabel: "用户",
|
||||||
MainType: "user",
|
MainType: "user",
|
||||||
Enabled: true,
|
Enabled: true,
|
||||||
},
|
},
|
||||||
"user.modifyname": {
|
"user.modifyname": {
|
||||||
Desc: "用户昵称修改",
|
Desc: "用户昵称修改",
|
||||||
|
NavLabel: "修改昵称",
|
||||||
MainType: "user",
|
MainType: "user",
|
||||||
SubType: "modifyname",
|
SubType: "modifyname",
|
||||||
Req: &pb.UserModifynameReq{},
|
Req: &pb.UserModifynameReq{},
|
||||||
@ -126,12 +186,90 @@ var (
|
|||||||
},
|
},
|
||||||
Enabled: true,
|
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,
|
||||||
|
},
|
||||||
|
ff(comm.ModuleItems, "sellitem"): {
|
||||||
|
NavLabel: "道具售卖",
|
||||||
|
Desc: "道具售卖",
|
||||||
|
MainType: string(comm.ModuleItems),
|
||||||
|
SubType: "sellitem",
|
||||||
|
Enabled: true,
|
||||||
|
},
|
||||||
|
ff(comm.ModuleItems, "useitem"): {
|
||||||
|
NavLabel: "道具使用",
|
||||||
|
Desc: "道具使用",
|
||||||
|
MainType: string(comm.ModuleItems),
|
||||||
|
SubType: "useitem",
|
||||||
|
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
|
||||||
"task": {
|
"task": {
|
||||||
|
NavLabel: "任务",
|
||||||
MainType: "task",
|
MainType: "task",
|
||||||
Enabled: true,
|
Enabled: true,
|
||||||
},
|
},
|
||||||
"task.list": {
|
"task.list": {
|
||||||
|
NavLabel: "任务列表",
|
||||||
Desc: "用户任务列表",
|
Desc: "用户任务列表",
|
||||||
MainType: "task",
|
MainType: "task",
|
||||||
SubType: "list",
|
SubType: "list",
|
||||||
@ -140,12 +278,14 @@ var (
|
|||||||
Enabled: true,
|
Enabled: true,
|
||||||
},
|
},
|
||||||
"task.receive": {
|
"task.receive": {
|
||||||
|
NavLabel: "任务领取",
|
||||||
Desc: "用户任务领取",
|
Desc: "用户任务领取",
|
||||||
MainType: "task",
|
MainType: "task",
|
||||||
SubType: "receive",
|
SubType: "receive",
|
||||||
Enabled: true,
|
Enabled: true,
|
||||||
},
|
},
|
||||||
ff(comm.ModuleTask, task.TaskSubTypeActiveList): {
|
ff(comm.ModuleTask, task.TaskSubTypeActiveList): {
|
||||||
|
NavLabel: "活跃度",
|
||||||
Desc: "用户活跃度列表",
|
Desc: "用户活跃度列表",
|
||||||
MainType: string(comm.ModuleTask),
|
MainType: string(comm.ModuleTask),
|
||||||
SubType: task.TaskSubTypeActiveList,
|
SubType: task.TaskSubTypeActiveList,
|
||||||
@ -154,6 +294,7 @@ var (
|
|||||||
Enabled: true,
|
Enabled: true,
|
||||||
},
|
},
|
||||||
ff(comm.ModuleTask, task.TaskSubTypeActiveReceive): {
|
ff(comm.ModuleTask, task.TaskSubTypeActiveReceive): {
|
||||||
|
NavLabel: "活跃度领取",
|
||||||
Desc: "用户活跃度领取",
|
Desc: "用户活跃度领取",
|
||||||
MainType: string(comm.ModuleTask),
|
MainType: string(comm.ModuleTask),
|
||||||
SubType: task.TaskSubTypeActiveReceive,
|
SubType: task.TaskSubTypeActiveReceive,
|
||||||
@ -163,10 +304,12 @@ var (
|
|||||||
},
|
},
|
||||||
// hero
|
// hero
|
||||||
string(comm.ModuleHero): {
|
string(comm.ModuleHero): {
|
||||||
|
NavLabel: "英雄",
|
||||||
MainType: string(comm.ModuleHero),
|
MainType: string(comm.ModuleHero),
|
||||||
Enabled: true,
|
Enabled: true,
|
||||||
},
|
},
|
||||||
ff(comm.ModuleHero, hero.HeroSubTypeList): {
|
ff(comm.ModuleHero, hero.HeroSubTypeList): {
|
||||||
|
NavLabel: "英雄列表",
|
||||||
Desc: "英雄列表",
|
Desc: "英雄列表",
|
||||||
MainType: string(comm.ModuleHero),
|
MainType: string(comm.ModuleHero),
|
||||||
SubType: hero.HeroSubTypeList,
|
SubType: hero.HeroSubTypeList,
|
||||||
@ -181,6 +324,7 @@ var (
|
|||||||
Enabled: true,
|
Enabled: true,
|
||||||
},
|
},
|
||||||
ff(comm.ModuleHero, hero.StrengthenUplv): {
|
ff(comm.ModuleHero, hero.StrengthenUplv): {
|
||||||
|
NavLabel: "英雄升级",
|
||||||
Desc: "英雄等级升级",
|
Desc: "英雄等级升级",
|
||||||
MainType: string(comm.ModuleHero),
|
MainType: string(comm.ModuleHero),
|
||||||
SubType: hero.StrengthenUplv,
|
SubType: hero.StrengthenUplv,
|
||||||
@ -189,6 +333,7 @@ var (
|
|||||||
Enabled: true,
|
Enabled: true,
|
||||||
},
|
},
|
||||||
ff(comm.ModuleHero, hero.StrengthenUpStar): {
|
ff(comm.ModuleHero, hero.StrengthenUpStar): {
|
||||||
|
NavLabel: "英雄升星",
|
||||||
Desc: "英雄星级升级",
|
Desc: "英雄星级升级",
|
||||||
MainType: string(comm.ModuleHero),
|
MainType: string(comm.ModuleHero),
|
||||||
SubType: hero.StrengthenUpStar,
|
SubType: hero.StrengthenUpStar,
|
||||||
@ -196,12 +341,41 @@ var (
|
|||||||
Rsp: &pb.HeroStrengthenUpStarResp{},
|
Rsp: &pb.HeroStrengthenUpStarResp{},
|
||||||
Enabled: true,
|
Enabled: true,
|
||||||
},
|
},
|
||||||
|
//equipment
|
||||||
|
string(comm.ModuleEquipment): {
|
||||||
|
NavLabel: "装备",
|
||||||
|
MainType: string(comm.ModuleEquipment),
|
||||||
|
Enabled: true,
|
||||||
|
},
|
||||||
|
ff(comm.ModuleEquipment, "getlist"): {
|
||||||
|
NavLabel: "装备列表",
|
||||||
|
Desc: "装备列表",
|
||||||
|
MainType: string(comm.ModuleEquipment),
|
||||||
|
SubType: "getlist",
|
||||||
|
Enabled: true,
|
||||||
|
},
|
||||||
|
ff(comm.ModuleEquipment, "equip"): {
|
||||||
|
NavLabel: "穿卸装备",
|
||||||
|
Desc: "穿/卸装备",
|
||||||
|
MainType: string(comm.ModuleEquipment),
|
||||||
|
SubType: "equip",
|
||||||
|
Enabled: true,
|
||||||
|
},
|
||||||
|
ff(comm.ModuleEquipment, "upgrade"): {
|
||||||
|
NavLabel: "升级装备",
|
||||||
|
Desc: "升级装备",
|
||||||
|
MainType: string(comm.ModuleEquipment),
|
||||||
|
SubType: "upgrade",
|
||||||
|
Enabled: true,
|
||||||
|
},
|
||||||
//friend
|
//friend
|
||||||
string(comm.ModuleFriend): {
|
string(comm.ModuleFriend): {
|
||||||
|
NavLabel: "好友",
|
||||||
MainType: string(comm.ModuleFriend),
|
MainType: string(comm.ModuleFriend),
|
||||||
Enabled: true,
|
Enabled: true,
|
||||||
},
|
},
|
||||||
ff(comm.ModuleFriend, friend.FriendSubTypeList): {
|
ff(comm.ModuleFriend, friend.FriendSubTypeList): {
|
||||||
|
NavLabel: "好友列表",
|
||||||
Desc: "好友列表",
|
Desc: "好友列表",
|
||||||
MainType: string(comm.ModuleFriend),
|
MainType: string(comm.ModuleFriend),
|
||||||
SubType: friend.FriendSubTypeList,
|
SubType: friend.FriendSubTypeList,
|
||||||
@ -210,6 +384,7 @@ var (
|
|||||||
Enabled: true,
|
Enabled: true,
|
||||||
},
|
},
|
||||||
ff(comm.ModuleFriend, friend.FriendSubTypeApply): {
|
ff(comm.ModuleFriend, friend.FriendSubTypeApply): {
|
||||||
|
NavLabel: "好友申请",
|
||||||
Desc: "好友申请",
|
Desc: "好友申请",
|
||||||
MainType: string(comm.ModuleFriend),
|
MainType: string(comm.ModuleFriend),
|
||||||
SubType: friend.FriendSubTypeApply,
|
SubType: friend.FriendSubTypeApply,
|
||||||
@ -217,15 +392,8 @@ var (
|
|||||||
Rsp: &pb.FriendApplyResp{},
|
Rsp: &pb.FriendApplyResp{},
|
||||||
Enabled: true,
|
Enabled: true,
|
||||||
},
|
},
|
||||||
// ff(comm.ModuleFriend, friend.FriendSubTypeApplyList): {
|
|
||||||
// Desc: "申请列表",
|
|
||||||
// MainType: string(comm.ModuleFriend),
|
|
||||||
// SubType: friend.FriendSubTypeApplyList,
|
|
||||||
// Req: &pb.FriendApplyListReq{},
|
|
||||||
// Rsp: &pb.FriendApplyListResp{},
|
|
||||||
// Enabled: true,
|
|
||||||
// },
|
|
||||||
ff(comm.ModuleFriend, friend.FriendSubTypeBlacklist): {
|
ff(comm.ModuleFriend, friend.FriendSubTypeBlacklist): {
|
||||||
|
NavLabel: "黑名单",
|
||||||
Desc: "黑名单列表",
|
Desc: "黑名单列表",
|
||||||
MainType: string(comm.ModuleFriend),
|
MainType: string(comm.ModuleFriend),
|
||||||
SubType: friend.FriendSubTypeBlacklist,
|
SubType: friend.FriendSubTypeBlacklist,
|
||||||
@ -234,6 +402,7 @@ var (
|
|||||||
Enabled: true,
|
Enabled: true,
|
||||||
},
|
},
|
||||||
ff(comm.ModuleFriend, friend.FriendSubTypeAddBlack): {
|
ff(comm.ModuleFriend, friend.FriendSubTypeAddBlack): {
|
||||||
|
NavLabel: "加黑名单",
|
||||||
Desc: "添加黑名单",
|
Desc: "添加黑名单",
|
||||||
MainType: string(comm.ModuleFriend),
|
MainType: string(comm.ModuleFriend),
|
||||||
SubType: friend.FriendSubTypeAddBlack,
|
SubType: friend.FriendSubTypeAddBlack,
|
||||||
@ -242,6 +411,7 @@ var (
|
|||||||
Enabled: true,
|
Enabled: true,
|
||||||
},
|
},
|
||||||
ff(comm.ModuleFriend, friend.FriendSubTypeDelBlack): {
|
ff(comm.ModuleFriend, friend.FriendSubTypeDelBlack): {
|
||||||
|
NavLabel: "删黑名单",
|
||||||
Desc: "删除黑名单",
|
Desc: "删除黑名单",
|
||||||
MainType: string(comm.ModuleFriend),
|
MainType: string(comm.ModuleFriend),
|
||||||
SubType: friend.FriendSubTypeDelBlack,
|
SubType: friend.FriendSubTypeDelBlack,
|
||||||
@ -250,6 +420,7 @@ var (
|
|||||||
Enabled: true,
|
Enabled: true,
|
||||||
},
|
},
|
||||||
ff(comm.ModuleFriend, friend.FriendSubTypeAgree): {
|
ff(comm.ModuleFriend, friend.FriendSubTypeAgree): {
|
||||||
|
NavLabel: "好友审批",
|
||||||
Desc: "好友申请审批",
|
Desc: "好友申请审批",
|
||||||
MainType: string(comm.ModuleFriend),
|
MainType: string(comm.ModuleFriend),
|
||||||
SubType: friend.FriendSubTypeAgree,
|
SubType: friend.FriendSubTypeAgree,
|
||||||
@ -257,15 +428,8 @@ var (
|
|||||||
Rsp: &pb.FriendAgreeResp{},
|
Rsp: &pb.FriendAgreeResp{},
|
||||||
Enabled: true,
|
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): {
|
ff(comm.ModuleFriend, friend.FriendSubTypeSearch): {
|
||||||
|
NavLabel: "好友搜索",
|
||||||
Desc: "搜索好友",
|
Desc: "搜索好友",
|
||||||
MainType: string(comm.ModuleFriend),
|
MainType: string(comm.ModuleFriend),
|
||||||
SubType: friend.FriendSubTypeSearch,
|
SubType: friend.FriendSubTypeSearch,
|
||||||
@ -274,11 +438,72 @@ var (
|
|||||||
Enabled: true,
|
Enabled: true,
|
||||||
},
|
},
|
||||||
ff(comm.ModuleFriend, friend.FriendSubTypeZanList): {
|
ff(comm.ModuleFriend, friend.FriendSubTypeZanList): {
|
||||||
|
NavLabel: "好友点赞",
|
||||||
Desc: "点赞好友",
|
Desc: "点赞好友",
|
||||||
MainType: string(comm.ModuleFriend),
|
MainType: string(comm.ModuleFriend),
|
||||||
SubType: friend.FriendSubTypeZanList,
|
SubType: friend.FriendSubTypeZanList,
|
||||||
Enabled: true,
|
Enabled: true,
|
||||||
},
|
},
|
||||||
|
//shop
|
||||||
|
string(comm.ModuleShop): {
|
||||||
|
NavLabel: "商店",
|
||||||
|
MainType: string(comm.ModuleShop),
|
||||||
|
Enabled: true,
|
||||||
|
},
|
||||||
|
ff(comm.ModuleShop, "getlist"): {
|
||||||
|
NavLabel: "商店列表",
|
||||||
|
Desc: "商店列表",
|
||||||
|
MainType: string(comm.ModuleShop),
|
||||||
|
SubType: "getlist",
|
||||||
|
Enabled: true,
|
||||||
|
},
|
||||||
|
ff(comm.ModuleShop, "buy"): {
|
||||||
|
NavLabel: "购买商品",
|
||||||
|
Desc: "购买商品",
|
||||||
|
MainType: string(comm.ModuleShop),
|
||||||
|
SubType: "buy",
|
||||||
|
Enabled: true,
|
||||||
|
},
|
||||||
|
// mainline
|
||||||
|
string(comm.ModuleMainline): {
|
||||||
|
NavLabel: "主线关卡",
|
||||||
|
MainType: string(comm.ModuleShop),
|
||||||
|
Enabled: true,
|
||||||
|
},
|
||||||
|
ff(comm.ModuleMainline, mainline.MainlineGetListResp): {
|
||||||
|
NavLabel: "主线关卡",
|
||||||
|
Desc: "主线关卡",
|
||||||
|
MainType: string(comm.ModuleMainline),
|
||||||
|
SubType: mainline.MainlineGetListResp,
|
||||||
|
Enabled: true,
|
||||||
|
},
|
||||||
|
ff(comm.ModuleMainline, mainline.MainlineChallengeResp): {
|
||||||
|
NavLabel: "关卡挑战",
|
||||||
|
Desc: "关卡挑战",
|
||||||
|
MainType: string(comm.ModuleMainline),
|
||||||
|
SubType: mainline.MainlineChallengeResp,
|
||||||
|
Enabled: true,
|
||||||
|
},
|
||||||
|
ff(comm.ModuleMainline, mainline.MainlineGetRewardResp): {
|
||||||
|
NavLabel: "关卡奖励",
|
||||||
|
Desc: "获取关卡奖励",
|
||||||
|
MainType: string(comm.ModuleMainline),
|
||||||
|
SubType: mainline.MainlineGetRewardResp,
|
||||||
|
Enabled: true,
|
||||||
|
},
|
||||||
|
//pagoda
|
||||||
|
string(comm.ModulePagoda): {
|
||||||
|
NavLabel: "魔塔",
|
||||||
|
MainType: string(comm.ModulePagoda),
|
||||||
|
Enabled: true,
|
||||||
|
},
|
||||||
|
ff(comm.ModulePagoda, "getlist"): {
|
||||||
|
NavLabel: "魔塔列表",
|
||||||
|
Desc: "魔塔列表",
|
||||||
|
MainType: string(comm.ModulePagoda),
|
||||||
|
SubType: "getlist",
|
||||||
|
Enabled: true,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -29,15 +29,18 @@ type toyUserInfo struct {
|
|||||||
|
|
||||||
userInfo *service.UserInfo
|
userInfo *service.UserInfo
|
||||||
|
|
||||||
data binding.ExternalStringList
|
data binding.ExternalStringList
|
||||||
obs observer.Observer
|
obs observer.Observer
|
||||||
copyBtn *widget.Button
|
copyBtn *widget.Button
|
||||||
|
refreshBtn *widget.Button
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *toyUserInfo) Init(obs observer.Observer) error {
|
func (this *toyUserInfo) Init(obs observer.Observer) error {
|
||||||
this.obs = obs
|
this.obs = obs
|
||||||
this.titleLabel = widget.NewLabel(common.USERINFO_TITLE)
|
this.titleLabel = widget.NewLabel(common.USERINFO_PANEL_TITLE)
|
||||||
this.data = binding.BindStringList(&[]string{})
|
this.data = binding.BindStringList(&[]string{})
|
||||||
|
|
||||||
|
// 复制UID button
|
||||||
this.copyBtn = widget.NewButton(common.USERINFO_BTN_COPY, func() {
|
this.copyBtn = widget.NewButton(common.USERINFO_BTN_COPY, func() {
|
||||||
if this.userInfo != nil && this.userInfo.DbUser != nil {
|
if this.userInfo != nil && this.userInfo.DbUser != nil {
|
||||||
_ = clipboard.WriteAll(this.userInfo.DbUser.Uid)
|
_ = clipboard.WriteAll(this.userInfo.DbUser.Uid)
|
||||||
@ -45,6 +48,18 @@ func (this *toyUserInfo) Init(obs observer.Observer) error {
|
|||||||
})
|
})
|
||||||
this.copyBtn.Disable()
|
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,
|
this.dataList = widget.NewListWithData(this.data,
|
||||||
func() fyne.CanvasObject {
|
func() fyne.CanvasObject {
|
||||||
return widget.NewLabel("template")
|
return widget.NewLabel("template")
|
||||||
@ -55,7 +70,7 @@ func (this *toyUserInfo) Init(obs observer.Observer) error {
|
|||||||
)
|
)
|
||||||
|
|
||||||
this.widget = widget.NewCard("", "",
|
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)))
|
nil, nil, nil, container.NewVScroll(this.dataList)))
|
||||||
this.widget.Resize(fyne.NewSize(ToyWidth, 600))
|
this.widget.Resize(fyne.NewSize(ToyWidth, 600))
|
||||||
|
|
||||||
@ -71,19 +86,28 @@ func (this *toyUserInfo) dataListener() {
|
|||||||
if this.copyBtn.Disabled() {
|
if this.copyBtn.Disabled() {
|
||||||
this.copyBtn.Enable()
|
this.copyBtn.Enable()
|
||||||
}
|
}
|
||||||
|
if this.refreshBtn.Disabled() {
|
||||||
|
this.refreshBtn.Enable()
|
||||||
|
}
|
||||||
this.userInfo = d.(*service.UserInfo)
|
this.userInfo = d.(*service.UserInfo)
|
||||||
if this.userInfo == nil {
|
if this.userInfo == nil {
|
||||||
return
|
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_UID, this.userInfo.DbUser.Uid))
|
||||||
_ = this.data.Append(fmt.Sprintf("%-3s\t: %s", common.USERINFO_ACC, this.userInfo.DbUser.Binduid))
|
_ = this.data.Append(this.getAcc()) //0
|
||||||
_ = this.data.Append(fmt.Sprintf("%-3s\t: %s", common.USERINFO_NAME, this.userInfo.DbUser.Name))
|
_ = this.data.Append(this.getName()) //1
|
||||||
_ = this.data.Append(fmt.Sprintf("%-3s\t: %s", common.USERINFO_AVATAR, cast.ToString(this.userInfo.DbUser.Avatar)))
|
_ = this.data.Append(this.getAvatar()) //2
|
||||||
_ = this.data.Append(fmt.Sprintf("%-3s\t: %s", common.USERINFO_VIP, cast.ToString(this.userInfo.DbUser.Vip)))
|
_ = this.data.Append(this.getVip()) //3
|
||||||
_ = this.data.Append(fmt.Sprintf("%-3s\t: %s", common.USERINFO_LV, cast.ToString(this.userInfo.DbUser.Lv)))
|
_ = this.data.Append(this.getLv()) //4
|
||||||
_ = this.data.Append(fmt.Sprintf("%-3s\t: %s", common.USERINFO_GOLD, cast.ToString(this.userInfo.DbUser.Gold)))
|
_ = this.data.Append(this.getGold()) //5
|
||||||
_ = this.data.Append(fmt.Sprintf("%-3s\t: %s", common.USERINFO_EXP, cast.ToString(this.userInfo.DbUser.Exp)))
|
_ = 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) {
|
if !comm.ProtoUnmarshal(data, rsp) {
|
||||||
logrus.Error("unmarshal err")
|
logrus.Error("unmarshal err")
|
||||||
}
|
}
|
||||||
//TODO 改此协议 返回昵称
|
// updatename
|
||||||
// _=this.data.SetValue(1, fmt.Sprintf("%-3s\t: %s", common.USERINFO_NAME, rsp.Uid))
|
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) {
|
if !comm.ProtoUnmarshal(data.Msg, rsp) {
|
||||||
logrus.Error("unmarshal err")
|
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
|
// listener exp
|
||||||
if data.Msg.MainType == string(comm.ModuleUser) &&
|
if data.Msg.MainType == string(comm.ModuleUser) &&
|
||||||
data.Msg.SubType == "" {
|
data.Msg.SubType == "" {
|
||||||
//TODO change exp
|
//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))
|
||||||
|
}
|
||||||
|
@ -181,3 +181,10 @@ const (
|
|||||||
RaceHx int32 = 4 // 呼啸
|
RaceHx int32 = 4 // 呼啸
|
||||||
RaceSy int32 = 5 // 闪耀
|
RaceSy int32 = 5 // 闪耀
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// 共鸣属性
|
||||||
|
const (
|
||||||
|
ResonanceHpPro = "hppro"
|
||||||
|
ResonanceAtkPro = "atkpro"
|
||||||
|
ResonanceDefPro = "defpro"
|
||||||
|
)
|
||||||
|
@ -38,7 +38,7 @@ type (
|
|||||||
//创建新英雄
|
//创建新英雄
|
||||||
CreateHeroes(uid string, heroCfgId ...string) error
|
CreateHeroes(uid string, heroCfgId ...string) error
|
||||||
//创建指定数量
|
//创建指定数量
|
||||||
CreateRepeatHero(uid string, heroCfgId string, num int32) (*pb.DBHero, error)
|
CreateRepeatHero(session IUserSession, heroCfgId string, num int32, bPush bool) (code pb.ErrorCode)
|
||||||
// 批量创建英雄
|
// 批量创建英雄
|
||||||
CreateRepeatHeros(session IUserSession, heros map[string]int32, bPush bool) (code pb.ErrorCode)
|
CreateRepeatHeros(session IUserSession, heros map[string]int32, bPush bool) (code pb.ErrorCode)
|
||||||
// 获取英雄
|
// 获取英雄
|
||||||
@ -99,4 +99,10 @@ type (
|
|||||||
// 清理玩家任务数据
|
// 清理玩家任务数据
|
||||||
CleanData(uid string)
|
CleanData(uid string)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//好友
|
||||||
|
IFriend interface {
|
||||||
|
// 重置点赞列表和每日友情点
|
||||||
|
ResetFriend(uid string)
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
@ -48,6 +48,27 @@ func (this *apiComp) Zan(session comm.IUserSession, req *pb.FriendZanReq) (code
|
|||||||
return
|
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)
|
target.ZanIds = append(target.ZanIds, selfId)
|
||||||
|
|
||||||
|
@ -48,6 +48,28 @@ func (this *apiComp) Zanreceive(session comm.IUserSession, req *pb.FriendZanrece
|
|||||||
return
|
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,
|
if err := session.SendMsg(string(this.moduleFriend.GetType()), FriendSubTypeZanreceive,
|
||||||
&pb.FriendZanreceiveResp{Flag: true}); err != nil {
|
&pb.FriendZanreceiveResp{Flag: true}); err != nil {
|
||||||
code = pb.ErrorCode_SystemError
|
code = pb.ErrorCode_SystemError
|
||||||
|
@ -5,6 +5,7 @@ import (
|
|||||||
"go_dreamfactory/modules"
|
"go_dreamfactory/modules"
|
||||||
|
|
||||||
"go_dreamfactory/lego/core"
|
"go_dreamfactory/lego/core"
|
||||||
|
"go_dreamfactory/lego/sys/log"
|
||||||
|
|
||||||
"github.com/spf13/cast"
|
"github.com/spf13/cast"
|
||||||
)
|
)
|
||||||
@ -52,3 +53,39 @@ func (this *Friend) getBlackMax() int {
|
|||||||
}
|
}
|
||||||
return 0
|
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})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -57,7 +57,7 @@ func (this *apiComp) Resonance(session comm.IUserSession, req *pb.HeroResonanceR
|
|||||||
for k, v := range szCostHero {
|
for k, v := range szCostHero {
|
||||||
for _, v1 := range resonConfig.Heroneed {
|
for _, v1 := range resonConfig.Heroneed {
|
||||||
if v1.A == comm.HeroType {
|
if v1.A == comm.HeroType {
|
||||||
totalCostCard += 1
|
totalCostCard += v
|
||||||
}
|
}
|
||||||
|
|
||||||
_costHero, code = this.module.GetHeroByObjID(session.GetUserId(), k) // 查询消耗卡是否存在
|
_costHero, code = this.module.GetHeroByObjID(session.GetUserId(), k) // 查询消耗卡是否存在
|
||||||
@ -67,18 +67,18 @@ func (this *apiComp) Resonance(session comm.IUserSession, req *pb.HeroResonanceR
|
|||||||
if _costHero.Block {
|
if _costHero.Block {
|
||||||
code = pb.ErrorCode_HeroIsLock
|
code = pb.ErrorCode_HeroIsLock
|
||||||
}
|
}
|
||||||
if v1.T == _costHero.HeroID && (v1.N != v || _costHero.SameCount < v) {
|
// if v1.T == _costHero.HeroID && v1.N != v {
|
||||||
code = pb.ErrorCode_HeroNoEnough
|
// code = pb.ErrorCode_HeroNoEnough
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
_costMaphero[k] = _costHero
|
_costMaphero[k] = _costHero
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if int32(len(req.CostObjID)) != totalCostCard { // 总数消耗校验
|
// if int32(len(req.CostObjID)) != int32(len(szCostHero)) { // 总数消耗校验
|
||||||
code = pb.ErrorCode_HeroNoEnough // 消耗数量不对应
|
// code = pb.ErrorCode_HeroNoEnough // 消耗数量不对应
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
for k, v := range szCostHero {
|
for k, v := range szCostHero {
|
||||||
c := this.module.DelCard(session.GetUserId(), _costMaphero[k], v)
|
c := this.module.DelCard(session.GetUserId(), _costMaphero[k], v)
|
||||||
if c != pb.ErrorCode_Success {
|
if c != pb.ErrorCode_Success {
|
||||||
@ -105,7 +105,7 @@ func (this *apiComp) Resonance(session comm.IUserSession, req *pb.HeroResonanceR
|
|||||||
}
|
}
|
||||||
_hero.SameCount = 1
|
_hero.SameCount = 1
|
||||||
_hero.ResonateNum += 1
|
_hero.ResonateNum += 1
|
||||||
_hero.DistributionResonate += resonConfig.Energy
|
_hero.DistributionResonate += resonConfig.Energy * totalCostCard
|
||||||
_heroMap := map[string]interface{}{
|
_heroMap := map[string]interface{}{
|
||||||
"resonateNum": _hero.ResonateNum,
|
"resonateNum": _hero.ResonateNum,
|
||||||
"distributionResonate": _hero.DistributionResonate,
|
"distributionResonate": _hero.DistributionResonate,
|
||||||
|
@ -9,7 +9,7 @@ import (
|
|||||||
|
|
||||||
//参数校验
|
//参数校验
|
||||||
func (this *apiComp) ResonanceUseEnergyCheck(session comm.IUserSession, req *pb.HeroResonanceUseEnergyReq) (code pb.ErrorCode) {
|
func (this *apiComp) ResonanceUseEnergyCheck(session comm.IUserSession, req *pb.HeroResonanceUseEnergyReq) (code pb.ErrorCode) {
|
||||||
if len(req.HeroObjID) == 0 || req.UseEnergy <= 0 || req.UseType < 0 || req.UseType > 3 {
|
if len(req.HeroObjID) == 0 || req.UseEnergy <= 0 || (req.UseType != comm.ResonanceHpPro && req.UseType != comm.ResonanceAtkPro && req.UseType != comm.ResonanceDefPro) {
|
||||||
code = pb.ErrorCode_ReqParameterError
|
code = pb.ErrorCode_ReqParameterError
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,12 +56,6 @@ func (this *TestService) InitSys() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestMain(m *testing.M) {
|
func TestMain(m *testing.M) {
|
||||||
sz := GetMap()
|
|
||||||
if len(sz) == 0 {
|
|
||||||
sz = make(map[int32]int32, 0)
|
|
||||||
}
|
|
||||||
|
|
||||||
sz[2] = 2
|
|
||||||
hero := &pb.DBHero{}
|
hero := &pb.DBHero{}
|
||||||
hero.Block = false
|
hero.Block = false
|
||||||
hero.Lv = 12
|
hero.Lv = 12
|
||||||
@ -90,8 +84,9 @@ func GetMap() map[int32]int32 {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
func CloneNewHero(hero *pb.DBHero) (newHero *pb.DBHero) {
|
func CloneNewHero(hero *pb.DBHero) (newHero *pb.DBHero) {
|
||||||
temp := *hero
|
newHero = new(pb.DBHero)
|
||||||
newHero = &temp
|
*newHero = *hero
|
||||||
|
|
||||||
newHero.Block = true
|
newHero.Block = true
|
||||||
newHero.Lv = 100
|
newHero.Lv = 100
|
||||||
newHero.Id = primitive.NewObjectID().Hex()
|
newHero.Id = primitive.NewObjectID().Hex()
|
||||||
|
@ -42,20 +42,22 @@ func (this *ModelHero) initHero(uid string, heroCfgId string) *pb.DBHero {
|
|||||||
}
|
}
|
||||||
objId := primitive.NewObjectID().Hex()
|
objId := primitive.NewObjectID().Hex()
|
||||||
newHero := &pb.DBHero{
|
newHero := &pb.DBHero{
|
||||||
Id: objId,
|
Id: objId,
|
||||||
Uid: uid,
|
Uid: uid,
|
||||||
HeroID: heroCfg.Hid,
|
HeroID: heroCfg.Hid,
|
||||||
Star: heroCfg.Star, //初始星级
|
Star: heroCfg.Star, //初始星级
|
||||||
Lv: 1, //初始等级
|
Lv: 1, //初始等级
|
||||||
IsOverlying: true, //是否允许叠加,
|
IsOverlying: true, //是否允许叠加,
|
||||||
Block: false, //未锁定
|
Block: false, //未锁定
|
||||||
CardType: heroCfg.Type, //卡片类型
|
CardType: heroCfg.Type, //卡片类型
|
||||||
Skins: []int32{},
|
Skins: []int32{},
|
||||||
EquipID: make([]string, 6), //初始装备
|
EquipID: make([]string, 6), //初始装备
|
||||||
SameCount: 1, //默认叠加数量
|
SameCount: 1, //默认叠加数量
|
||||||
AddProperty: make(map[string]int32),
|
AddProperty: make(map[string]int32),
|
||||||
Energy: make(map[int32]int32),
|
Energy: make(map[string]int32),
|
||||||
Property: make(map[string]int32),
|
Property: make(map[string]int32),
|
||||||
|
EnergyProperty: make(map[string]int32),
|
||||||
|
JuexProperty: make(map[string]int32),
|
||||||
}
|
}
|
||||||
this.PropertyCompute(newHero)
|
this.PropertyCompute(newHero)
|
||||||
this.initHeroSkill(newHero)
|
this.initHeroSkill(newHero)
|
||||||
@ -102,8 +104,8 @@ func (this *ModelHero) createOneHero(uid string, heroCfgId string) (hero *pb.DBH
|
|||||||
|
|
||||||
// 克隆一个英雄
|
// 克隆一个英雄
|
||||||
func (this *ModelHero) CloneNewHero(hero *pb.DBHero) (newHero *pb.DBHero) {
|
func (this *ModelHero) CloneNewHero(hero *pb.DBHero) (newHero *pb.DBHero) {
|
||||||
temp := *hero
|
newHero = new(pb.DBHero)
|
||||||
newHero = &temp
|
*newHero = *hero
|
||||||
newHero.Id = primitive.NewObjectID().Hex()
|
newHero.Id = primitive.NewObjectID().Hex()
|
||||||
this.AddList(newHero.Uid, newHero.Id, newHero)
|
this.AddList(newHero.Uid, newHero.Id, newHero)
|
||||||
return
|
return
|
||||||
@ -113,24 +115,6 @@ func (this *ModelHero) CloneNewHero(hero *pb.DBHero) (newHero *pb.DBHero) {
|
|||||||
func (this *ModelHero) initHeroOverlying(uid string, heroCfgId string, count int32) (hero *pb.DBHero, err error) {
|
func (this *ModelHero) initHeroOverlying(uid string, heroCfgId string, count int32) (hero *pb.DBHero, err error) {
|
||||||
hero = this.initHero(uid, heroCfgId)
|
hero = this.initHero(uid, heroCfgId)
|
||||||
if hero != nil {
|
if hero != nil {
|
||||||
// 添加图鉴
|
|
||||||
go func(uid, heroCfgId string) { // 携程处理 图鉴数据
|
|
||||||
if result, err1 := this.moduleHero.ModuleUser.GetUserExpand(uid); err1 == nil {
|
|
||||||
|
|
||||||
if _, ok := result.GetTujian()[heroCfgId]; !ok {
|
|
||||||
sz := result.GetTujian()
|
|
||||||
if len(sz) == 0 {
|
|
||||||
sz = make(map[string]bool, 0)
|
|
||||||
}
|
|
||||||
sz[heroCfgId] = true
|
|
||||||
initUpdate := map[string]interface{}{
|
|
||||||
"tujian": sz,
|
|
||||||
}
|
|
||||||
|
|
||||||
this.moduleHero.ModuleUser.ChangeUserExpand(uid, initUpdate)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}(uid, heroCfgId)
|
|
||||||
|
|
||||||
hero.SameCount = count
|
hero.SameCount = count
|
||||||
if err = this.AddList(uid, hero.Id, hero); err != nil {
|
if err = this.AddList(uid, hero.Id, hero); err != nil {
|
||||||
@ -274,11 +258,11 @@ func (this *ModelHero) setEnergyProperty(hero *pb.DBHero) {
|
|||||||
}
|
}
|
||||||
EnergyProperty := make(map[string]int32) //副属性
|
EnergyProperty := make(map[string]int32) //副属性
|
||||||
for k, v := range hero.Energy {
|
for k, v := range hero.Energy {
|
||||||
if k == 1 {
|
if k == comm.ResonanceHpPro {
|
||||||
EnergyProperty[comm.Hp] += int32(math.Floor((1.0 + float64(resonConfig.Hppro*v)/1000) * float64(hero.Property[comm.Hp])))
|
EnergyProperty[comm.Hp] += int32(math.Floor((1.0 + float64(resonConfig.Hppro*v)/1000) * float64(hero.Property[comm.Hp])))
|
||||||
} else if k == 2 {
|
} else if k == comm.ResonanceAtkPro {
|
||||||
EnergyProperty[comm.Atk] += int32(math.Floor((1.0 + float64(resonConfig.Atkpro*v)/1000) * float64(hero.Property[comm.Atk])))
|
EnergyProperty[comm.Atk] += int32(math.Floor((1.0 + float64(resonConfig.Atkpro*v)/1000) * float64(hero.Property[comm.Atk])))
|
||||||
} else if k == 3 {
|
} else if k == comm.ResonanceDefPro {
|
||||||
EnergyProperty[comm.Def] += int32(math.Floor((1.0 + float64(resonConfig.Defpro*v)/1000) * float64(hero.Property[comm.Def])))
|
EnergyProperty[comm.Def] += int32(math.Floor((1.0 + float64(resonConfig.Defpro*v)/1000) * float64(hero.Property[comm.Def])))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -53,9 +53,35 @@ func (this *Hero) CreateHeroes(uid string, heroCfgId ...string) error {
|
|||||||
return this.modelHero.createMultiHero(uid, heroCfgId...)
|
return this.modelHero.createMultiHero(uid, heroCfgId...)
|
||||||
}
|
}
|
||||||
|
|
||||||
//创建叠加英雄
|
//创建单个叠加英雄
|
||||||
func (this *Hero) CreateRepeatHero(uid string, heroCfgId string, num int32) (*pb.DBHero, error) {
|
func (this *Hero) CreateRepeatHero(session comm.IUserSession, heroCfgId string, num int32, bPush bool) (code pb.ErrorCode) {
|
||||||
return this.modelHero.createHeroOverlying(uid, heroCfgId, num)
|
_hero, err := this.modelHero.createHeroOverlying(session.GetUserId(), heroCfgId, num)
|
||||||
|
if err == nil {
|
||||||
|
go func(uid string, heroCfgId string) { // 携程处理 图鉴数据
|
||||||
|
if result, err1 := this.ModuleUser.GetUserExpand(uid); err1 == nil {
|
||||||
|
initUpdate := map[string]interface{}{}
|
||||||
|
sz := result.GetTujian()
|
||||||
|
if len(sz) == 0 {
|
||||||
|
sz = make(map[string]bool, 0)
|
||||||
|
}
|
||||||
|
|
||||||
|
if _, ok := result.GetTujian()[heroCfgId]; !ok {
|
||||||
|
sz[heroCfgId] = true
|
||||||
|
initUpdate["tujian"] = sz
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(initUpdate) != 0 {
|
||||||
|
this.ModuleUser.ChangeUserExpand(uid, initUpdate)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}(session.GetUserId(), heroCfgId)
|
||||||
|
if bPush { //推送
|
||||||
|
session.SendMsg("hero", "change", &pb.HeroChangePush{List: []*pb.DBHero{_hero}})
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
code = pb.ErrorCode_HeroCreate
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取英雄
|
//获取英雄
|
||||||
@ -168,11 +194,30 @@ func (this *Hero) CreateRepeatHeros(session comm.IUserSession, heros map[string]
|
|||||||
hero, err := this.modelHero.createHeroOverlying(session.GetUserId(), heroCfgId, num)
|
hero, err := this.modelHero.createHeroOverlying(session.GetUserId(), heroCfgId, num)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
code = pb.ErrorCode_HeroCreate
|
code = pb.ErrorCode_HeroCreate
|
||||||
return
|
continue
|
||||||
}
|
}
|
||||||
changeHero = append(changeHero, hero)
|
changeHero = append(changeHero, hero)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 添加图鉴
|
||||||
|
go func(uid string, heros map[string]int32) { // 携程处理 图鉴数据
|
||||||
|
if result, err1 := this.ModuleUser.GetUserExpand(uid); err1 == nil {
|
||||||
|
initUpdate := map[string]interface{}{}
|
||||||
|
sz := result.GetTujian()
|
||||||
|
if len(sz) == 0 {
|
||||||
|
sz = make(map[string]bool, 0)
|
||||||
|
}
|
||||||
|
for k := range heros {
|
||||||
|
if _, ok := result.GetTujian()[k]; !ok {
|
||||||
|
sz[k] = true
|
||||||
|
initUpdate["tujian"] = sz
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if len(initUpdate) != 0 {
|
||||||
|
this.ModuleUser.ChangeUserExpand(uid, initUpdate)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}(session.GetUserId(), heros)
|
||||||
if bPush && len(changeHero) > 0 { //推送
|
if bPush && len(changeHero) > 0 { //推送
|
||||||
session.SendMsg("hero", "change", &pb.HeroChangePush{List: changeHero})
|
session.SendMsg("hero", "change", &pb.HeroChangePush{List: changeHero})
|
||||||
}
|
}
|
||||||
|
@ -30,6 +30,7 @@ type ModuleBase struct {
|
|||||||
ModuleHero comm.IHero //英雄模块
|
ModuleHero comm.IHero //英雄模块
|
||||||
ModuleEquipment comm.IEquipment //装备模块
|
ModuleEquipment comm.IEquipment //装备模块
|
||||||
ModuleTask comm.ITask //任务
|
ModuleTask comm.ITask //任务
|
||||||
|
ModuleFriend comm.IFriend //好友
|
||||||
}
|
}
|
||||||
|
|
||||||
//重构模块配置对象
|
//重构模块配置对象
|
||||||
@ -78,6 +79,11 @@ func (this *ModuleBase) Start() (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.ModuleTask = module.(comm.ITask)
|
this.ModuleTask = module.(comm.ITask)
|
||||||
|
|
||||||
|
if module, err = this.service.GetModule(comm.ModuleFriend); err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.ModuleFriend = module.(comm.IFriend)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@ const (
|
|||||||
UserSubTypeModifyName = "modifyname" //修改名称
|
UserSubTypeModifyName = "modifyname" //修改名称
|
||||||
UserSubTypeFigure = "figure" //形象
|
UserSubTypeFigure = "figure" //形象
|
||||||
UserSubTypeModifySign = "modifysign" // 修改签名
|
UserSubTypeModifySign = "modifysign" // 修改签名
|
||||||
|
UserSubTypeInfo = "info" //用户信息
|
||||||
)
|
)
|
||||||
|
|
||||||
type apiComp struct {
|
type apiComp struct {
|
||||||
|
35
modules/user/api_info.go
Normal file
35
modules/user/api_info.go
Normal 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
|
||||||
|
}
|
@ -111,6 +111,8 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (cod
|
|||||||
if utils.IsAfterWeek(user.Logintime) {
|
if utils.IsAfterWeek(user.Logintime) {
|
||||||
this.module.ModuleTask.ResetTask(user.Uid, comm.TASK_WEEKLY)
|
this.module.ModuleTask.ResetTask(user.Uid, comm.TASK_WEEKLY)
|
||||||
}
|
}
|
||||||
|
// 清理点赞
|
||||||
|
this.module.ModuleFriend.ResetFriend(user.Uid)
|
||||||
}
|
}
|
||||||
|
|
||||||
rsp.Data = user
|
rsp.Data = user
|
||||||
|
@ -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{
|
if err = session.SendMsg(string(this.module.GetType()), UserSubTypeModifyName, &pb.UserModifynameResp{
|
||||||
Uid: session.GetUserId(),
|
Uid: session.GetUserId(),
|
||||||
Count: uint32(left),
|
Count: uint32(left),
|
||||||
|
Name: req.Name,
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
code = pb.ErrorCode_SystemError
|
code = pb.ErrorCode_SystemError
|
||||||
}
|
}
|
||||||
|
@ -76,6 +76,7 @@ const (
|
|||||||
ErrorCode_FriendZaned ErrorCode = 1112 //已点赞
|
ErrorCode_FriendZaned ErrorCode = 1112 //已点赞
|
||||||
ErrorCode_FriendZanreceived ErrorCode = 1113 //已领取点赞
|
ErrorCode_FriendZanreceived ErrorCode = 1113 //已领取点赞
|
||||||
ErrorCode_FriendZanSelf ErrorCode = 1114 //不能给自己点赞
|
ErrorCode_FriendZanSelf ErrorCode = 1114 //不能给自己点赞
|
||||||
|
ErrorCode_FriendPointLimit ErrorCode = 1115 //友情点上线
|
||||||
// item
|
// item
|
||||||
ErrorCode_ItemsNoEnough ErrorCode = 1200 //背包物品不足
|
ErrorCode_ItemsNoEnough ErrorCode = 1200 //背包物品不足
|
||||||
ErrorCode_ItemsNoFoundGird ErrorCode = 1201 //背包未找到物品格子
|
ErrorCode_ItemsNoFoundGird ErrorCode = 1201 //背包未找到物品格子
|
||||||
@ -195,6 +196,7 @@ var (
|
|||||||
1112: "FriendZaned",
|
1112: "FriendZaned",
|
||||||
1113: "FriendZanreceived",
|
1113: "FriendZanreceived",
|
||||||
1114: "FriendZanSelf",
|
1114: "FriendZanSelf",
|
||||||
|
1115: "FriendPointLimit",
|
||||||
1200: "ItemsNoEnough",
|
1200: "ItemsNoEnough",
|
||||||
1201: "ItemsNoFoundGird",
|
1201: "ItemsNoFoundGird",
|
||||||
1202: "ItemsGridNumUpper",
|
1202: "ItemsGridNumUpper",
|
||||||
@ -303,6 +305,7 @@ var (
|
|||||||
"FriendZaned": 1112,
|
"FriendZaned": 1112,
|
||||||
"FriendZanreceived": 1113,
|
"FriendZanreceived": 1113,
|
||||||
"FriendZanSelf": 1114,
|
"FriendZanSelf": 1114,
|
||||||
|
"FriendPointLimit": 1115,
|
||||||
"ItemsNoEnough": 1200,
|
"ItemsNoEnough": 1200,
|
||||||
"ItemsNoFoundGird": 1201,
|
"ItemsNoFoundGird": 1201,
|
||||||
"ItemsGridNumUpper": 1202,
|
"ItemsGridNumUpper": 1202,
|
||||||
@ -392,7 +395,7 @@ var File_errorcode_proto protoreflect.FileDescriptor
|
|||||||
|
|
||||||
var file_errorcode_proto_rawDesc = []byte{
|
var file_errorcode_proto_rawDesc = []byte{
|
||||||
0x0a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
0xda, 0x08, 0x12, 0x15, 0x0a, 0x10, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x50, 0x6f, 0x69, 0x6e,
|
||||||
0x75, 0x67, 0x68, 0x10, 0xb0, 0x09, 0x12, 0x15, 0x0a, 0x10, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x4e,
|
0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x10, 0xdb, 0x08, 0x12, 0x12, 0x0a, 0x0d, 0x49, 0x74, 0x65,
|
||||||
0x6f, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x47, 0x69, 0x72, 0x64, 0x10, 0xb1, 0x09, 0x12, 0x16, 0x0a,
|
0x6d, 0x73, 0x4e, 0x6f, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xb0, 0x09, 0x12, 0x15, 0x0a,
|
||||||
0x11, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x47, 0x72, 0x69, 0x64, 0x4e, 0x75, 0x6d, 0x55, 0x70, 0x70,
|
0x10, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x4e, 0x6f, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x47, 0x69, 0x72,
|
||||||
0x65, 0x72, 0x10, 0xb2, 0x09, 0x12, 0x19, 0x0a, 0x14, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x47, 0x69,
|
0x64, 0x10, 0xb1, 0x09, 0x12, 0x16, 0x0a, 0x11, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x47, 0x72, 0x69,
|
||||||
0x72, 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x70, 0x70, 0x65, 0x72, 0x10, 0xb3, 0x09,
|
0x64, 0x4e, 0x75, 0x6d, 0x55, 0x70, 0x70, 0x65, 0x72, 0x10, 0xb2, 0x09, 0x12, 0x19, 0x0a, 0x14,
|
||||||
0x12, 0x19, 0x0a, 0x14, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x55, 0x73, 0x65, 0x4e, 0x6f, 0x74, 0x53,
|
0x49, 0x74, 0x65, 0x6d, 0x73, 0x47, 0x69, 0x72, 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x55,
|
||||||
0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x10, 0xb4, 0x09, 0x12, 0x10, 0x0a, 0x0b, 0x48,
|
0x70, 0x70, 0x65, 0x72, 0x10, 0xb3, 0x09, 0x12, 0x19, 0x0a, 0x14, 0x49, 0x74, 0x65, 0x6d, 0x73,
|
||||||
0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x45, 0x78, 0x69, 0x73, 0x74, 0x10, 0x94, 0x0a, 0x12, 0x11, 0x0a,
|
0x55, 0x73, 0x65, 0x4e, 0x6f, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x10,
|
||||||
0x0c, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0x95, 0x0a,
|
0xb4, 0x09, 0x12, 0x10, 0x0a, 0x0b, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x45, 0x78, 0x69, 0x73,
|
||||||
0x12, 0x0e, 0x0a, 0x09, 0x48, 0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x4c, 0x76, 0x10, 0x96, 0x0a,
|
0x74, 0x10, 0x94, 0x0a, 0x12, 0x11, 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x45, 0x6e,
|
||||||
0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x49, 0x6e, 0x69, 0x74, 0x43, 0x72, 0x65, 0x61,
|
0x6f, 0x75, 0x67, 0x68, 0x10, 0x95, 0x0a, 0x12, 0x0e, 0x0a, 0x09, 0x48, 0x65, 0x72, 0x6f, 0x4d,
|
||||||
0x74, 0x10, 0x97, 0x0a, 0x12, 0x11, 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x43, 0x6f, 0x6c, 0x6f,
|
0x61, 0x78, 0x4c, 0x76, 0x10, 0x96, 0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x49,
|
||||||
0x72, 0x45, 0x72, 0x72, 0x10, 0x98, 0x0a, 0x12, 0x13, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x53,
|
0x6e, 0x69, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x10, 0x97, 0x0a, 0x12, 0x11, 0x0a, 0x0c, 0x48,
|
||||||
0x6b, 0x69, 0x6c, 0x6c, 0x55, 0x70, 0x45, 0x72, 0x72, 0x10, 0x99, 0x0a, 0x12, 0x14, 0x0a, 0x0f,
|
0x65, 0x72, 0x6f, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x45, 0x72, 0x72, 0x10, 0x98, 0x0a, 0x12, 0x13,
|
||||||
0x48, 0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x52, 0x65, 0x73, 0x6f, 0x6e, 0x61, 0x74, 0x65, 0x10,
|
0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x55, 0x70, 0x45, 0x72, 0x72,
|
||||||
0x9a, 0x0a, 0x12, 0x13, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x52, 0x65, 0x73, 0x6f,
|
0x10, 0x99, 0x0a, 0x12, 0x14, 0x0a, 0x0f, 0x48, 0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x52, 0x65,
|
||||||
0x6e, 0x61, 0x74, 0x65, 0x10, 0x9b, 0x0a, 0x12, 0x18, 0x0a, 0x13, 0x48, 0x65, 0x72, 0x6f, 0x4e,
|
0x73, 0x6f, 0x6e, 0x61, 0x74, 0x65, 0x10, 0x9a, 0x0a, 0x12, 0x13, 0x0a, 0x0e, 0x48, 0x65, 0x72,
|
||||||
0x6f, 0x74, 0x4e, 0x65, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x6e, 0x61, 0x74, 0x65, 0x10, 0x9c,
|
0x6f, 0x4e, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x6e, 0x61, 0x74, 0x65, 0x10, 0x9b, 0x0a, 0x12, 0x18,
|
||||||
0x0a, 0x12, 0x11, 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x45, 0x6e, 0x65, 0x72, 0x67,
|
0x0a, 0x13, 0x48, 0x65, 0x72, 0x6f, 0x4e, 0x6f, 0x74, 0x4e, 0x65, 0x65, 0x64, 0x52, 0x65, 0x73,
|
||||||
0x79, 0x10, 0x9d, 0x0a, 0x12, 0x0f, 0x0a, 0x0a, 0x48, 0x65, 0x72, 0x6f, 0x43, 0x72, 0x65, 0x61,
|
0x6f, 0x6e, 0x61, 0x74, 0x65, 0x10, 0x9c, 0x0a, 0x12, 0x11, 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f,
|
||||||
0x74, 0x65, 0x10, 0x9e, 0x0a, 0x12, 0x14, 0x0a, 0x0f, 0x48, 0x65, 0x72, 0x6f, 0x45, 0x71, 0x75,
|
0x4e, 0x6f, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x10, 0x9d, 0x0a, 0x12, 0x0f, 0x0a, 0x0a, 0x48,
|
||||||
0x69, 0x70, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x10, 0x9f, 0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48,
|
0x65, 0x72, 0x6f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x10, 0x9e, 0x0a, 0x12, 0x14, 0x0a, 0x0f,
|
||||||
0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x41, 0x77, 0x61, 0x6b, 0x65, 0x6e, 0x10, 0xa0, 0x0a, 0x12,
|
0x48, 0x65, 0x72, 0x6f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x10,
|
||||||
0x0f, 0x0a, 0x0a, 0x48, 0x65, 0x72, 0x6f, 0x49, 0x73, 0x4c, 0x6f, 0x63, 0x6b, 0x10, 0xa1, 0x0a,
|
0x9f, 0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x41, 0x77, 0x61,
|
||||||
0x12, 0x11, 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x43, 0x6f, 0x75, 0x6e, 0x74,
|
0x6b, 0x65, 0x6e, 0x10, 0xa0, 0x0a, 0x12, 0x0f, 0x0a, 0x0a, 0x48, 0x65, 0x72, 0x6f, 0x49, 0x73,
|
||||||
0x10, 0xa2, 0x0a, 0x12, 0x14, 0x0a, 0x0f, 0x48, 0x65, 0x72, 0x6f, 0x43, 0x6f, 0x73, 0x74, 0x54,
|
0x4c, 0x6f, 0x63, 0x6b, 0x10, 0xa1, 0x0a, 0x12, 0x11, 0x0a, 0x0c, 0x48, 0x65, 0x72, 0x6f, 0x4d,
|
||||||
0x79, 0x70, 0x65, 0x45, 0x72, 0x72, 0x10, 0xa3, 0x0a, 0x12, 0x10, 0x0a, 0x0b, 0x48, 0x65, 0x72,
|
0x61, 0x78, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x10, 0xa2, 0x0a, 0x12, 0x14, 0x0a, 0x0f, 0x48, 0x65,
|
||||||
0x6f, 0x53, 0x74, 0x61, 0x72, 0x45, 0x72, 0x72, 0x10, 0xa4, 0x0a, 0x12, 0x10, 0x0a, 0x0b, 0x48,
|
0x72, 0x6f, 0x43, 0x6f, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x45, 0x72, 0x72, 0x10, 0xa3, 0x0a,
|
||||||
0x65, 0x72, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x45, 0x72, 0x72, 0x10, 0xa5, 0x0a, 0x12, 0x13, 0x0a,
|
0x12, 0x10, 0x0a, 0x0b, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x74, 0x61, 0x72, 0x45, 0x72, 0x72, 0x10,
|
||||||
0x0e, 0x48, 0x65, 0x72, 0x6f, 0x45, 0x78, 0x70, 0x54, 0x79, 0x70, 0x65, 0x45, 0x72, 0x72, 0x10,
|
0xa4, 0x0a, 0x12, 0x10, 0x0a, 0x0b, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x45, 0x72,
|
||||||
0xa6, 0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x41, 0x64, 0x64, 0x4d, 0x61, 0x78,
|
0x72, 0x10, 0xa5, 0x0a, 0x12, 0x13, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x45, 0x78, 0x70, 0x54,
|
||||||
0x45, 0x78, 0x70, 0x10, 0xa7, 0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x74,
|
0x79, 0x70, 0x65, 0x45, 0x72, 0x72, 0x10, 0xa6, 0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65, 0x72,
|
||||||
0x61, 0x72, 0x4c, 0x76, 0x45, 0x72, 0x72, 0x10, 0xa8, 0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65,
|
0x6f, 0x41, 0x64, 0x64, 0x4d, 0x61, 0x78, 0x45, 0x78, 0x70, 0x10, 0xa7, 0x0a, 0x12, 0x12, 0x0a,
|
||||||
0x72, 0x6f, 0x4d, 0x61, 0x78, 0x53, 0x74, 0x61, 0x72, 0x4c, 0x76, 0x10, 0xa9, 0x0a, 0x12, 0x19,
|
0x0d, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x74, 0x61, 0x72, 0x4c, 0x76, 0x45, 0x72, 0x72, 0x10, 0xa8,
|
||||||
0x0a, 0x14, 0x44, 0x72, 0x61, 0x77, 0x43, 0x61, 0x72, 0x64, 0x54, 0x79, 0x70, 0x65, 0x4e, 0x6f,
|
0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x53, 0x74, 0x61, 0x72,
|
||||||
0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xaa, 0x0a, 0x12, 0x13, 0x0a, 0x0e, 0x48, 0x65, 0x72,
|
0x4c, 0x76, 0x10, 0xa9, 0x0a, 0x12, 0x19, 0x0a, 0x14, 0x44, 0x72, 0x61, 0x77, 0x43, 0x61, 0x72,
|
||||||
0x6f, 0x4d, 0x61, 0x78, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x10, 0xab, 0x0a, 0x12, 0x1e,
|
0x64, 0x54, 0x79, 0x70, 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xaa, 0x0a,
|
||||||
0x0a, 0x19, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x4f, 0x6e, 0x46, 0x6f, 0x75,
|
0x12, 0x13, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x4d, 0x61, 0x78, 0x53, 0x6b, 0x69, 0x6c, 0x6c,
|
||||||
0x6e, 0x64, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0xf8, 0x0a, 0x12, 0x1c,
|
0x4c, 0x76, 0x10, 0xab, 0x0a, 0x12, 0x1e, 0x0a, 0x19, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65,
|
||||||
0x0a, 0x17, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x76, 0x6c, 0x69, 0x6d,
|
0x6e, 0x74, 0x4f, 0x6e, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65,
|
||||||
0x69, 0x74, 0x52, 0x65, 0x61, 0x63, 0x68, 0x65, 0x64, 0x10, 0xf9, 0x0a, 0x12, 0x14, 0x0a, 0x0f,
|
0x6e, 0x74, 0x10, 0xf8, 0x0a, 0x12, 0x1c, 0x0a, 0x17, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65,
|
||||||
0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x73, 0x57, 0x6f, 0x72, 0x6e, 0x10,
|
0x6e, 0x74, 0x4c, 0x76, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x61, 0x63, 0x68, 0x65, 0x64,
|
||||||
0xfa, 0x0a, 0x12, 0x1b, 0x0a, 0x16, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x6f,
|
0x10, 0xf9, 0x0a, 0x12, 0x14, 0x0a, 0x0f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74,
|
||||||
0x74, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x10, 0xdc, 0x0b, 0x12,
|
0x49, 0x73, 0x57, 0x6f, 0x72, 0x6e, 0x10, 0xfa, 0x0a, 0x12, 0x1b, 0x0a, 0x16, 0x4d, 0x61, 0x69,
|
||||||
0x15, 0x0a, 0x10, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x44, 0x46, 0x61, 0x69,
|
0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x68, 0x61, 0x70,
|
||||||
0x6c, 0x65, 0x64, 0x10, 0xdd, 0x0b, 0x12, 0x15, 0x0a, 0x10, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69,
|
0x74, 0x65, 0x72, 0x10, 0xdc, 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,
|
0x6e, 0x65, 0x49, 0x44, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0xdd, 0x0b, 0x12, 0x15, 0x0a,
|
||||||
0x13, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x50, 0x72, 0x65, 0x4e, 0x6f, 0x74, 0x46,
|
0x10, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e,
|
||||||
0x6f, 0x75, 0x6e, 0x64, 0x10, 0xdf, 0x0b, 0x12, 0x19, 0x0a, 0x14, 0x4d, 0x61, 0x69, 0x6e, 0x6c,
|
0x64, 0x10, 0xde, 0x0b, 0x12, 0x18, 0x0a, 0x13, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65,
|
||||||
0x69, 0x6e, 0x65, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x10,
|
0x50, 0x72, 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xdf, 0x0b, 0x12, 0x19,
|
||||||
0xe0, 0x0b, 0x12, 0x1b, 0x0a, 0x16, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f,
|
0x0a, 0x14, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74,
|
||||||
0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x10, 0xe1, 0x0b, 0x12,
|
0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x10, 0xe0, 0x0b, 0x12, 0x1b, 0x0a, 0x16, 0x4d, 0x61, 0x69,
|
||||||
0x0d, 0x0a, 0x08, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x69, 0x74, 0x10, 0xc0, 0x0c, 0x12, 0x0e,
|
0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x77,
|
||||||
0x0a, 0x09, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x65, 0x74, 0x10, 0xc1, 0x0c, 0x12, 0x0f,
|
0x61, 0x72, 0x64, 0x10, 0xe1, 0x0b, 0x12, 0x0d, 0x0a, 0x08, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e,
|
||||||
0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x10, 0xc2, 0x0c, 0x12,
|
0x69, 0x74, 0x10, 0xc0, 0x0c, 0x12, 0x0e, 0x0a, 0x09, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73,
|
||||||
0x11, 0x0a, 0x0c, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10,
|
0x65, 0x74, 0x10, 0xc1, 0x0c, 0x12, 0x0f, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x61, 0x6e,
|
||||||
0xc3, 0x0c, 0x12, 0x13, 0x0a, 0x0e, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65,
|
0x64, 0x6c, 0x65, 0x10, 0xc2, 0x0c, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65,
|
||||||
0x49, 0x6e, 0x69, 0x74, 0x10, 0xc4, 0x0c, 0x12, 0x16, 0x0a, 0x11, 0x54, 0x61, 0x73, 0x6b, 0x41,
|
0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0xc3, 0x0c, 0x12, 0x13, 0x0a, 0x0e, 0x54, 0x61, 0x73,
|
||||||
0x63, 0x74, 0x69, 0x76, 0x65, 0x4e, 0x6f, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xc5, 0x0c, 0x12,
|
0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x10, 0xc4, 0x0c, 0x12, 0x16,
|
||||||
0x17, 0x0a, 0x12, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4e, 0x6f, 0x65,
|
0x0a, 0x11, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4e, 0x6f, 0x66, 0x6f,
|
||||||
0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xc6, 0x0c, 0x12, 0x13, 0x0a, 0x0e, 0x54, 0x61, 0x73, 0x6b,
|
0x75, 0x6e, 0x64, 0x10, 0xc5, 0x0c, 0x12, 0x17, 0x0a, 0x12, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63,
|
||||||
0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0xc7, 0x0c, 0x12, 0x11, 0x0a,
|
0x74, 0x69, 0x76, 0x65, 0x4e, 0x6f, 0x65, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xc6, 0x0c, 0x12,
|
||||||
0x0c, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0xc8, 0x0c,
|
0x13, 0x0a, 0x0e, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65,
|
||||||
0x12, 0x11, 0x0a, 0x0c, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x61, 0x67, 0x45, 0x6d, 0x70, 0x74, 0x79,
|
0x64, 0x10, 0xc7, 0x0c, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69,
|
||||||
0x10, 0xc9, 0x0c, 0x12, 0x10, 0x0a, 0x0b, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x45, 0x6d, 0x70,
|
0x73, 0x68, 0x65, 0x64, 0x10, 0xc8, 0x0c, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x61, 0x73, 0x6b, 0x54,
|
||||||
0x74, 0x79, 0x10, 0xca, 0x0c, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x74,
|
0x61, 0x67, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x10, 0xc9, 0x0c, 0x12, 0x10, 0x0a, 0x0b, 0x54, 0x61,
|
||||||
0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xcb, 0x0c, 0x12, 0x17, 0x0a, 0x12, 0x53, 0x68, 0x6f, 0x70,
|
0x73, 0x6b, 0x49, 0x64, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x10, 0xca, 0x0c, 0x12, 0x11, 0x0a, 0x0c,
|
||||||
0x47, 0x6f, 0x6f, 0x64, 0x73, 0x49, 0x73, 0x53, 0x6f, 0x6c, 0x64, 0x4f, 0x75, 0x74, 0x10, 0xa4,
|
0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xcb, 0x0c, 0x12,
|
||||||
0x0d, 0x12, 0x1c, 0x0a, 0x17, 0x53, 0x68, 0x6f, 0x70, 0x4e, 0x6f, 0x53, 0x75, 0x72, 0x70, 0x6c,
|
0x17, 0x0a, 0x12, 0x53, 0x68, 0x6f, 0x70, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x49, 0x73, 0x53, 0x6f,
|
||||||
0x75, 0x73, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x4e, 0x75, 0x6d, 0x10, 0xa5, 0x0d, 0x12,
|
0x6c, 0x64, 0x4f, 0x75, 0x74, 0x10, 0xa4, 0x0d, 0x12, 0x1c, 0x0a, 0x17, 0x53, 0x68, 0x6f, 0x70,
|
||||||
0x0c, 0x0a, 0x07, 0x4d, 0x61, 0x69, 0x6c, 0x45, 0x72, 0x72, 0x10, 0x88, 0x0e, 0x12, 0x13, 0x0a,
|
0x4e, 0x6f, 0x53, 0x75, 0x72, 0x70, 0x6c, 0x75, 0x73, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68,
|
||||||
0x0e, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10,
|
0x4e, 0x75, 0x6d, 0x10, 0xa5, 0x0d, 0x12, 0x0c, 0x0a, 0x07, 0x4d, 0x61, 0x69, 0x6c, 0x45, 0x72,
|
||||||
0xec, 0x0e, 0x12, 0x13, 0x0a, 0x0d, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x4c, 0x65, 0x76, 0x6c,
|
0x72, 0x10, 0x88, 0x0e, 0x12, 0x13, 0x0a, 0x0e, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x4e, 0x6f,
|
||||||
0x45, 0x72, 0x72, 0x10, 0xb9, 0x94, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62,
|
0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xec, 0x0e, 0x12, 0x13, 0x0a, 0x0d, 0x50, 0x61, 0x67,
|
||||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
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 (
|
var (
|
||||||
|
@ -98,12 +98,13 @@ type DBHero struct {
|
|||||||
EquipID []string `protobuf:"bytes,16,rep,name=equipID,proto3" json:"equipID" bson:"equipID"` //装备 objID
|
EquipID []string `protobuf:"bytes,16,rep,name=equipID,proto3" json:"equipID" bson:"equipID"` //装备 objID
|
||||||
ResonateNum int32 `protobuf:"varint,17,opt,name=resonateNum,proto3" json:"resonateNum" bson:"resonateNum"` //共鸣次数
|
ResonateNum int32 `protobuf:"varint,17,opt,name=resonateNum,proto3" json:"resonateNum" bson:"resonateNum"` //共鸣次数
|
||||||
DistributionResonate int32 `protobuf:"varint,18,opt,name=distributionResonate,proto3" json:"distributionResonate" bson:"distributionResonate"` //分配的共鸣能量
|
DistributionResonate int32 `protobuf:"varint,18,opt,name=distributionResonate,proto3" json:"distributionResonate" bson:"distributionResonate"` //分配的共鸣能量
|
||||||
Energy map[int32]int32 `protobuf:"bytes,19,rep,name=energy,proto3" json:"energy" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // @go_tags(`bson:"energy"`)能量分配到哪里[1,0]
|
Energy map[string]int32 `protobuf:"bytes,19,rep,name=energy,proto3" json:"energy" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // @go_tags(`bson:"energy"`)能量分配到哪里[hppro:0,atkpro:0,defpro:20]
|
||||||
SameCount int32 `protobuf:"varint,20,opt,name=sameCount,proto3" json:"sameCount" bson:"sameCount"` // 卡片叠加数量
|
SameCount int32 `protobuf:"varint,20,opt,name=sameCount,proto3" json:"sameCount" bson:"sameCount"` // 卡片叠加数量
|
||||||
SuiteId int32 `protobuf:"varint,21,opt,name=suiteId,proto3" json:"suiteId" bson:"suiteId"` // 套装Id
|
SuiteId int32 `protobuf:"varint,21,opt,name=suiteId,proto3" json:"suiteId" bson:"suiteId"` // 套装Id
|
||||||
SuiteExtId int32 `protobuf:"varint,22,opt,name=suiteExtId,proto3" json:"suiteExtId"` // go_tags(`bson:"suiteExtId"`) 扩展套装Id
|
SuiteExtId int32 `protobuf:"varint,22,opt,name=suiteExtId,proto3" json:"suiteExtId"` // go_tags(`bson:"suiteExtId"`) 扩展套装Id
|
||||||
IsOverlying bool `protobuf:"varint,23,opt,name=isOverlying,proto3" json:"isOverlying"` // go_tags(`bson:"isOverlying"`) 是否允许叠加 默认true
|
IsOverlying bool `protobuf:"varint,23,opt,name=isOverlying,proto3" json:"isOverlying"` // go_tags(`bson:"isOverlying"`) 是否允许叠加 默认true
|
||||||
EnergyProperty map[string]int32 `protobuf:"bytes,24,rep,name=energyProperty,proto3" json:"energyProperty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3" bson:"energyProperty"` //
|
EnergyProperty map[string]int32 `protobuf:"bytes,24,rep,name=energyProperty,proto3" json:"energyProperty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3" bson:"energyProperty"` //
|
||||||
|
JuexProperty map[string]int32 `protobuf:"bytes,25,rep,name=juexProperty,proto3" json:"juexProperty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3" bson:"juexProperty"` ////hp
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DBHero) Reset() {
|
func (x *DBHero) Reset() {
|
||||||
@ -264,7 +265,7 @@ func (x *DBHero) GetDistributionResonate() int32 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DBHero) GetEnergy() map[int32]int32 {
|
func (x *DBHero) GetEnergy() map[string]int32 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Energy
|
return x.Energy
|
||||||
}
|
}
|
||||||
@ -306,6 +307,13 @@ func (x *DBHero) GetEnergyProperty() map[string]int32 {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *DBHero) GetJuexProperty() map[string]int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.JuexProperty
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
type Floor struct {
|
type Floor struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
@ -489,7 +497,7 @@ var file_hero_hero_db_proto_rawDesc = []byte{
|
|||||||
0x61, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01,
|
0x61, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01,
|
||||||
0x28, 0x05, 0x52, 0x07, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x73,
|
0x28, 0x05, 0x52, 0x07, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x73,
|
||||||
0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x6b,
|
0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x6b,
|
||||||
0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x22, 0x90, 0x08, 0x0a, 0x06, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f,
|
0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x22, 0x90, 0x09, 0x0a, 0x06, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f,
|
||||||
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 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,
|
0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75,
|
||||||
0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01,
|
0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01,
|
||||||
@ -538,19 +546,27 @@ var file_hero_hero_db_proto_rawDesc = []byte{
|
|||||||
0x67, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x18, 0x20, 0x03, 0x28, 0x0b,
|
0x67, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x18, 0x20, 0x03, 0x28, 0x0b,
|
||||||
0x32, 0x1b, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x2e, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79,
|
0x32, 0x1b, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x2e, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79,
|
||||||
0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x65,
|
0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x65,
|
||||||
0x6e, 0x65, 0x72, 0x67, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x1a, 0x3b, 0x0a,
|
0x6e, 0x65, 0x72, 0x67, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x3d, 0x0a,
|
||||||
0x0d, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
|
0x0c, 0x6a, 0x75, 0x65, 0x78, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x19, 0x20,
|
||||||
0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79,
|
0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x2e, 0x4a, 0x75, 0x65,
|
||||||
0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
|
0x78, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c,
|
||||||
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x64,
|
0x6a, 0x75, 0x65, 0x78, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x1a, 0x3b, 0x0a, 0x0d,
|
||||||
0x64, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
|
0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
|
||||||
0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79,
|
0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
|
||||||
0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
|
0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05,
|
||||||
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x39, 0x0a, 0x0b, 0x45, 0x6e,
|
0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x64, 0x64,
|
||||||
0x65, 0x72, 0x67, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
|
0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
|
||||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76,
|
0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
|
||||||
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
|
0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05,
|
||||||
0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x41, 0x0a, 0x13, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x50,
|
0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x39, 0x0a, 0x0b, 0x45, 0x6e, 0x65,
|
||||||
|
0x72, 0x67, 0x79, 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, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
|
||||||
|
0x3a, 0x02, 0x38, 0x01, 0x1a, 0x41, 0x0a, 0x13, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x50, 0x72,
|
||||||
|
0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 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, 0x05, 0x52, 0x05, 0x76, 0x61,
|
||||||
|
0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3f, 0x0a, 0x11, 0x4a, 0x75, 0x65, 0x78, 0x50,
|
||||||
0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03,
|
0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 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,
|
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, 0x05, 0x52, 0x05, 0x76,
|
0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76,
|
||||||
@ -590,7 +606,7 @@ func file_hero_hero_db_proto_rawDescGZIP() []byte {
|
|||||||
return file_hero_hero_db_proto_rawDescData
|
return file_hero_hero_db_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_hero_hero_db_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
|
var file_hero_hero_db_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
|
||||||
var file_hero_hero_db_proto_goTypes = []interface{}{
|
var file_hero_hero_db_proto_goTypes = []interface{}{
|
||||||
(*SkillData)(nil), // 0: SkillData
|
(*SkillData)(nil), // 0: SkillData
|
||||||
(*DBHero)(nil), // 1: DBHero
|
(*DBHero)(nil), // 1: DBHero
|
||||||
@ -600,6 +616,7 @@ var file_hero_hero_db_proto_goTypes = []interface{}{
|
|||||||
nil, // 5: DBHero.AddPropertyEntry
|
nil, // 5: DBHero.AddPropertyEntry
|
||||||
nil, // 6: DBHero.EnergyEntry
|
nil, // 6: DBHero.EnergyEntry
|
||||||
nil, // 7: DBHero.EnergyPropertyEntry
|
nil, // 7: DBHero.EnergyPropertyEntry
|
||||||
|
nil, // 8: DBHero.JuexPropertyEntry
|
||||||
}
|
}
|
||||||
var file_hero_hero_db_proto_depIdxs = []int32{
|
var file_hero_hero_db_proto_depIdxs = []int32{
|
||||||
0, // 0: DBHero.normalSkill:type_name -> SkillData
|
0, // 0: DBHero.normalSkill:type_name -> SkillData
|
||||||
@ -607,16 +624,17 @@ var file_hero_hero_db_proto_depIdxs = []int32{
|
|||||||
5, // 2: DBHero.addProperty:type_name -> DBHero.AddPropertyEntry
|
5, // 2: DBHero.addProperty:type_name -> DBHero.AddPropertyEntry
|
||||||
6, // 3: DBHero.energy:type_name -> DBHero.EnergyEntry
|
6, // 3: DBHero.energy:type_name -> DBHero.EnergyEntry
|
||||||
7, // 4: DBHero.energyProperty:type_name -> DBHero.EnergyPropertyEntry
|
7, // 4: DBHero.energyProperty:type_name -> DBHero.EnergyPropertyEntry
|
||||||
2, // 5: DBHeroRecord.race0:type_name -> Floor
|
8, // 5: DBHero.juexProperty:type_name -> DBHero.JuexPropertyEntry
|
||||||
2, // 6: DBHeroRecord.race1:type_name -> Floor
|
2, // 6: DBHeroRecord.race0:type_name -> Floor
|
||||||
2, // 7: DBHeroRecord.race2:type_name -> Floor
|
2, // 7: DBHeroRecord.race1:type_name -> Floor
|
||||||
2, // 8: DBHeroRecord.race3:type_name -> Floor
|
2, // 8: DBHeroRecord.race2:type_name -> Floor
|
||||||
2, // 9: DBHeroRecord.race4:type_name -> Floor
|
2, // 9: DBHeroRecord.race3:type_name -> Floor
|
||||||
10, // [10:10] is the sub-list for method output_type
|
2, // 10: DBHeroRecord.race4:type_name -> Floor
|
||||||
10, // [10:10] is the sub-list for method input_type
|
11, // [11:11] is the sub-list for method output_type
|
||||||
10, // [10:10] is the sub-list for extension type_name
|
11, // [11:11] is the sub-list for method input_type
|
||||||
10, // [10:10] is the sub-list for extension extendee
|
11, // [11:11] is the sub-list for extension type_name
|
||||||
0, // [0:10] is the sub-list for field type_name
|
11, // [11:11] is the sub-list for extension extendee
|
||||||
|
0, // [0:11] is the sub-list for field type_name
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_hero_hero_db_proto_init() }
|
func init() { file_hero_hero_db_proto_init() }
|
||||||
@ -680,7 +698,7 @@ func file_hero_hero_db_proto_init() {
|
|||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_hero_hero_db_proto_rawDesc,
|
RawDescriptor: file_hero_hero_db_proto_rawDesc,
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 8,
|
NumMessages: 9,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
},
|
},
|
||||||
|
@ -916,7 +916,7 @@ type HeroResonanceUseEnergyReq struct {
|
|||||||
|
|
||||||
HeroObjID string `protobuf:"bytes,1,opt,name=heroObjID,proto3" json:"heroObjID"` // 英雄对象ID
|
HeroObjID string `protobuf:"bytes,1,opt,name=heroObjID,proto3" json:"heroObjID"` // 英雄对象ID
|
||||||
UseEnergy int32 `protobuf:"varint,2,opt,name=useEnergy,proto3" json:"useEnergy"` // 使用的能量点数
|
UseEnergy int32 `protobuf:"varint,2,opt,name=useEnergy,proto3" json:"useEnergy"` // 使用的能量点数
|
||||||
UseType int32 `protobuf:"varint,3,opt,name=useType,proto3" json:"useType"` // 使用的类型 (攻击、血量、防御)
|
UseType string `protobuf:"bytes,3,opt,name=useType,proto3" json:"useType"` // 使用的类型 (攻击、血量、防御)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *HeroResonanceUseEnergyReq) Reset() {
|
func (x *HeroResonanceUseEnergyReq) Reset() {
|
||||||
@ -965,11 +965,11 @@ func (x *HeroResonanceUseEnergyReq) GetUseEnergy() int32 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *HeroResonanceUseEnergyReq) GetUseType() int32 {
|
func (x *HeroResonanceUseEnergyReq) GetUseType() string {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.UseType
|
return x.UseType
|
||||||
}
|
}
|
||||||
return 0
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
type HeroResonanceUseEnergyResp struct {
|
type HeroResonanceUseEnergyResp struct {
|
||||||
@ -1716,7 +1716,7 @@ var file_hero_hero_msg_proto_rawDesc = []byte{
|
|||||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x12,
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x12,
|
||||||
0x1c, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x18, 0x02, 0x20, 0x01,
|
0x1c, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x18, 0x02, 0x20, 0x01,
|
||||||
0x28, 0x05, 0x52, 0x09, 0x75, 0x73, 0x65, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x12, 0x18, 0x0a,
|
0x28, 0x05, 0x52, 0x09, 0x75, 0x73, 0x65, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x12, 0x18, 0x0a,
|
||||||
0x07, 0x75, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07,
|
0x07, 0x75, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
|
||||||
0x75, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x39, 0x0a, 0x1a, 0x48, 0x65, 0x72, 0x6f, 0x52,
|
0x75, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x39, 0x0a, 0x1a, 0x48, 0x65, 0x72, 0x6f, 0x52,
|
||||||
0x65, 0x73, 0x6f, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x55, 0x73, 0x65, 0x45, 0x6e, 0x65, 0x72, 0x67,
|
0x65, 0x73, 0x6f, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x55, 0x73, 0x65, 0x45, 0x6e, 0x65, 0x72, 0x67,
|
||||||
0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20,
|
0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20,
|
||||||
|
114
pb/user_db.pb.go
114
pb/user_db.pb.go
@ -104,25 +104,24 @@ type DBUser struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID
|
||||||
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID
|
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID
|
||||||
Uuid string `protobuf:"bytes,3,opt,name=uuid,proto3" json:"uuid" bson:"uuid"` //玩家唯一uuid
|
Uuid string `protobuf:"bytes,3,opt,name=uuid,proto3" json:"uuid" bson:"uuid"` //玩家唯一uuid
|
||||||
Binduid string `protobuf:"bytes,4,opt,name=binduid,proto3" json:"binduid" bson:"binduid"` //玩家账号
|
Binduid string `protobuf:"bytes,4,opt,name=binduid,proto3" json:"binduid" bson:"binduid"` //玩家账号
|
||||||
Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name" bson:"name"` //玩家名
|
Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name" bson:"name"` //玩家名
|
||||||
Sid string `protobuf:"bytes,6,opt,name=sid,proto3" json:"sid" bson:"sid"` //区服id
|
Sid string `protobuf:"bytes,6,opt,name=sid,proto3" json:"sid" bson:"sid"` //区服id
|
||||||
Createip string `protobuf:"bytes,7,opt,name=createip,proto3" json:"createip" bson:"createip"` //创建账号时的ip
|
Createip string `protobuf:"bytes,7,opt,name=createip,proto3" json:"createip" bson:"createip"` //创建账号时的ip
|
||||||
Lastloginip string `protobuf:"bytes,8,opt,name=lastloginip,proto3" json:"lastloginip" bson:"lastloginip"` //最后一次登录时的ip
|
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"` //玩家创号时间戳
|
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"` //最后一次登录时间
|
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"` //头像
|
||||||
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"` //金币
|
||||||
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"` //经验
|
||||||
Exp int32 `protobuf:"varint,14,opt,name=exp,proto3" json:"exp" bson:"exp"` //经验
|
Created bool `protobuf:"varint,15,opt,name=created,proto3" json:"created" bson:"created"` //创角
|
||||||
Created bool `protobuf:"varint,15,opt,name=created,proto3" json:"created" bson:"created"` //创角
|
Lv int32 `protobuf:"varint,16,opt,name=lv,proto3" json:"lv" bson:"lv"` //等级
|
||||||
Lv int32 `protobuf:"varint,16,opt,name=lv,proto3" json:"lv" bson:"lv"` //等级
|
Vip int32 `protobuf:"varint,17,opt,name=vip,proto3" json:"vip" bson:"vip"` // vip
|
||||||
Vip int32 `protobuf:"varint,17,opt,name=vip,proto3" json:"vip" bson:"vip"` // vip
|
Diamond int32 `protobuf:"varint,18,opt,name=diamond,proto3" json:"diamond" bson:"diamond"` // 钻石
|
||||||
Diamond int32 `protobuf:"varint,18,opt,name=diamond,proto3" json:"diamond" bson:"diamond"` // 钻石
|
Title int32 `protobuf:"varint,19,opt,name=title,proto3" json:"title"` //@go_tags(`bson:"title"`)头衔
|
||||||
Title int32 `protobuf:"varint,19,opt,name=title,proto3" json:"title"` //@go_tags(`bson:"title"`)头衔
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DBUser) Reset() {
|
func (x *DBUser) Reset() {
|
||||||
@ -227,13 +226,6 @@ func (x *DBUser) GetLogintime() int64 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DBUser) GetFriendPoint() int32 {
|
|
||||||
if x != nil {
|
|
||||||
return x.FriendPoint
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *DBUser) GetAvatar() string {
|
func (x *DBUser) GetAvatar() string {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Avatar
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28,
|
||||||
0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x50, 0x6f,
|
0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x67, 0x6f, 0x6c,
|
||||||
0x69, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x0c, 0x20,
|
0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x67, 0x6f, 0x6c, 0x64, 0x12, 0x10, 0x0a,
|
||||||
0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x67,
|
0x03, 0x65, 0x78, 0x70, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x78, 0x70, 0x12,
|
||||||
0x6f, 0x6c, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x67, 0x6f, 0x6c, 0x64, 0x12,
|
0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08,
|
||||||
0x10, 0x0a, 0x03, 0x65, 0x78, 0x70, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x78,
|
0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18,
|
||||||
0x70, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0f, 0x20, 0x01,
|
0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x69, 0x70,
|
||||||
0x28, 0x08, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x6c,
|
0x18, 0x11, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x76, 0x69, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x64,
|
||||||
0x76, 0x18, 0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x10, 0x0a, 0x03, 0x76,
|
0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x18, 0x12, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x64, 0x69,
|
||||||
0x69, 0x70, 0x18, 0x11, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x76, 0x69, 0x70, 0x12, 0x18, 0x0a,
|
0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x13,
|
||||||
0x07, 0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x18, 0x12, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07,
|
0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x22, 0xc7, 0x02, 0x0a, 0x0d,
|
||||||
0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65,
|
0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x10, 0x0a,
|
||||||
0x18, 0x13, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x22, 0xc7, 0x02,
|
0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12,
|
||||||
0x0a, 0x0d, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12,
|
0x16, 0x0a, 0x06, 0x68, 0x75, 0x61, 0x7a, 0x68, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52,
|
||||||
0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69,
|
0x06, 0x68, 0x75, 0x61, 0x7a, 0x68, 0x69, 0x12, 0x1c, 0x0a, 0x09, 0x6b, 0x61, 0x6e, 0x67, 0x6a,
|
||||||
0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x75, 0x61, 0x7a, 0x68, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28,
|
0x75, 0x63, 0x68, 0x69, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x6b, 0x61, 0x6e, 0x67,
|
||||||
0x0d, 0x52, 0x06, 0x68, 0x75, 0x61, 0x7a, 0x68, 0x69, 0x12, 0x1c, 0x0a, 0x09, 0x6b, 0x61, 0x6e,
|
0x6a, 0x75, 0x63, 0x68, 0x69, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x61, 0x6f, 0x67, 0x75, 0x61, 0x6e,
|
||||||
0x67, 0x6a, 0x75, 0x63, 0x68, 0x69, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x6b, 0x61,
|
0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x67, 0x61, 0x6f, 0x67, 0x75, 0x61, 0x6e,
|
||||||
0x6e, 0x67, 0x6a, 0x75, 0x63, 0x68, 0x69, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x61, 0x6f, 0x67, 0x75,
|
0x67, 0x12, 0x12, 0x0a, 0x04, 0x77, 0x75, 0x6c, 0x69, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||||
0x61, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x67, 0x61, 0x6f, 0x67, 0x75,
|
0x04, 0x77, 0x75, 0x6c, 0x69, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x75, 0x73, 0x69, 0x63, 0x18, 0x07,
|
||||||
0x61, 0x6e, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x77, 0x75, 0x6c, 0x69, 0x18, 0x06, 0x20, 0x01, 0x28,
|
0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x6d, 0x75, 0x73, 0x69, 0x63, 0x12, 0x16, 0x0a, 0x06, 0x65,
|
||||||
0x08, 0x52, 0x04, 0x77, 0x75, 0x6c, 0x69, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x75, 0x73, 0x69, 0x63,
|
0x66, 0x66, 0x65, 0x63, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x66, 0x66,
|
||||||
0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x6d, 0x75, 0x73, 0x69, 0x63, 0x12, 0x16, 0x0a,
|
0x65, 0x63, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x75, 0x61, 0x6a, 0x69, 0x18, 0x09, 0x20, 0x01,
|
||||||
0x06, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65,
|
0x28, 0x08, 0x52, 0x05, 0x67, 0x75, 0x61, 0x6a, 0x69, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x75, 0x62,
|
||||||
0x66, 0x66, 0x65, 0x63, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x75, 0x61, 0x6a, 0x69, 0x18, 0x09,
|
0x65, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x75, 0x62, 0x65, 0x6e, 0x12,
|
||||||
0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x67, 0x75, 0x61, 0x6a, 0x69, 0x12, 0x14, 0x0a, 0x05, 0x66,
|
0x16, 0x0a, 0x06, 0x74, 0x61, 0x6e, 0x73, 0x75, 0x6f, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||||
0x75, 0x62, 0x65, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x75, 0x62, 0x65,
|
0x06, 0x74, 0x61, 0x6e, 0x73, 0x75, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x75, 0x6f, 0x64, 0x6f,
|
||||||
0x6e, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x6e, 0x73, 0x75, 0x6f, 0x18, 0x0b, 0x20, 0x01, 0x28,
|
0x6e, 0x67, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x68, 0x75, 0x6f, 0x64, 0x6f, 0x6e,
|
||||||
0x08, 0x52, 0x06, 0x74, 0x61, 0x6e, 0x73, 0x75, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x75, 0x6f,
|
0x67, 0x12, 0x1c, 0x0a, 0x09, 0x78, 0x75, 0x61, 0x6e, 0x73, 0x68, 0x61, 0x6e, 0x67, 0x18, 0x0d,
|
||||||
0x64, 0x6f, 0x6e, 0x67, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x68, 0x75, 0x6f, 0x64,
|
0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x78, 0x75, 0x61, 0x6e, 0x73, 0x68, 0x61, 0x6e, 0x67, 0x12,
|
||||||
0x6f, 0x6e, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x78, 0x75, 0x61, 0x6e, 0x73, 0x68, 0x61, 0x6e, 0x67,
|
0x14, 0x0a, 0x05, 0x73, 0x61, 0x69, 0x6a, 0x69, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05,
|
||||||
0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x78, 0x75, 0x61, 0x6e, 0x73, 0x68, 0x61, 0x6e,
|
0x73, 0x61, 0x69, 0x6a, 0x69, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70,
|
||||||
0x67, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x61, 0x69, 0x6a, 0x69, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08,
|
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
0x52, 0x05, 0x73, 0x61, 0x69, 0x6a, 0x69, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62,
|
|
||||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -383,6 +383,9 @@ type DBUserExpand struct {
|
|||||||
Activeday int32 `protobuf:"varint,11,opt,name=activeday,proto3" json:"activeday"` //日活跃度
|
Activeday int32 `protobuf:"varint,11,opt,name=activeday,proto3" json:"activeday"` //日活跃度
|
||||||
Activeweek int32 `protobuf:"varint,12,opt,name=activeweek,proto3" json:"activeweek"` //周活跃度
|
Activeweek int32 `protobuf:"varint,12,opt,name=activeweek,proto3" json:"activeweek"` //周活跃度
|
||||||
Sign string `protobuf:"bytes,13,opt,name=sign,proto3" json:"sign"` //用户签名
|
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() {
|
func (x *DBUserExpand) Reset() {
|
||||||
@ -508,6 +511,27 @@ func (x *DBUserExpand) GetSign() string {
|
|||||||
return ""
|
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 protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_userexpand_proto_rawDesc = []byte{
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
0x09, 0x52, 0x04, 0x73, 0x69, 0x67, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x66, 0x72, 0x69, 0x65, 0x6e,
|
||||||
0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
|
0x64, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x66, 0x72,
|
||||||
0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
|
0x69, 0x65, 0x6e, 0x64, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x66, 0x72, 0x69,
|
||||||
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02,
|
0x65, 0x6e, 0x64, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05,
|
||||||
0x38, 0x01, 0x1a, 0x46, 0x0a, 0x0f, 0x50, 0x72, 0x65, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c,
|
0x52, 0x0d, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x49, 0x44, 0x12,
|
||||||
0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
|
0x24, 0x0a, 0x0d, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x44,
|
||||||
0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
|
0x18, 0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x50, 0x6f,
|
||||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x46, 0x69, 0x67, 0x75, 0x72, 0x65, 0x52,
|
0x69, 0x6e, 0x74, 0x4f, 0x44, 0x1a, 0x39, 0x0a, 0x0b, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x45,
|
||||||
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b,
|
0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||||
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
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 (
|
var (
|
||||||
|
@ -192,7 +192,9 @@ func (this *Configure) checkConfigure() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
for _, v := range handle.events {
|
for _, v := range handle.events {
|
||||||
v()
|
if v != nil {
|
||||||
|
v()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,10 +9,11 @@ import (
|
|||||||
"github.com/spf13/cast"
|
"github.com/spf13/cast"
|
||||||
)
|
)
|
||||||
|
|
||||||
func ParseP(p string) (string, string, bool) {
|
// 拆分Uid
|
||||||
s := strings.SplitN(p, ".", 2)
|
func UIdSplit(uid string) (string, string, bool) {
|
||||||
|
s := strings.SplitN(uid, "_", 2)
|
||||||
if len(s) < 2 {
|
if len(s) < 2 {
|
||||||
log.Debugf("param P err: %s", p)
|
log.Debugf("split uid err: %s", uid)
|
||||||
return "", "", false
|
return "", "", false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user