g\x87v\xe4\xea\xbdA\x11\x14L\xc1v,w\xfa\xab\v\xab]OO\x04Ƭ@\xd7\xed\xe5\xe3DD^F\x8e\x81\xf3\xe9\x1c\xd7\x1d\x11<\x12\x84\xdc\x1e\xa8\xf3&}\xf0n\xdf0\xa1\xe9O\xf9\xa7|\x1b\xb7\xcc(zS\xfej\x18\x8aZ\xd9~\xf5[\xb8\xb90\xe5\xd6{Ͳ:\xe9\xe2\x8a)\x1d=LZ\x10\x97\x16\xe5\x14\x85\x80\xf8[\xfc\xaa\x1cvA\xbbfF\xe0\xa1\xde$x\xd3\xf0\xf2\xa9\x0e\x04\xfd߃\xe9u\xff\x00\xd6*\xac:\xdd\xce?\x8a\x9c\xa4\xd2L\xd9^\xbdHӃO\x8b&]\xf0n\xdf0\xa1\xe9O\xf9\xa7|\x1b\xb7\xcc(zs\xfej\x18\xb3\xf9\xa8kf=\xee\xb7qu\xd9+\xe5\xb9ڭ\xd5\xf2\xb1\x91\xc9U\x0e\xd8\xf6G\x99cN\x91\x19\r-\xff\x002\x86\xec\x89\xe5\xac^\xaa\xb7\xad\x12\x93a/\xdd\xcb\x17\xd1\a]\xca3\xb2'\x96\xb1z\xaa\u07b4J\xd9xON\xe1\xb7m\x97\xd1\x7fD\b\xeb<\xa8\x87Y\xe5EI\xe3\x1e\x8e\xf1\x9f\xcewX\xac,\xbb\xc6\x7f9\xddb\xb0\xb8@.\xce\x1a\xb4|3u\x82\a\xb7:Jm\x1a\xaa\xee\x03\x1b]\xe0Dy\xe7{\x90\x15\xc5$4\x17\x1d\xe0\x01%[\x98J\xcem\x16\xa8\xf6\xe6h\xd6֑UW\x9e\xb6\x122dG\x987\x8f\xa4\x9e\x15(,\xb3U\xad\x1d\xadN<\x91ݚXi\xe1\x9ay\x9c\x19\x14\x11>Y\\u5\x8cis\x8a\x84\xe1\x1cA%m\xd6\xf5OPt~\x11\x95\xf7\nV\x9f\x8a\xe65\xb1\xba/cC2敱\x8e\ue6de\x86\x1bdN\xcaZ\xe3\xa76Z\xdbM\x11\a#\xcevC\x90\x15^RUOCUI[\a\x96\xa5\x99\x930j\xd2\xd1\xd6\xc3\xe8p\xcc\x1eUd\xa5\x86n\xb9\xb9\xd1V)r\\˖\xf1m\x8a\xedn\xab\xa1~A\xd27J\x17\x91\xe4\xe7g\x84\xc7\xea\xe1\xd7\xe8'\x85R\xd2\xc5,\x12\xcb\f\xcc,\x96\x19\x1f\x14\xacv\xb6\xbd\x84\xb5\xc0\xabΖ\xa6\n\xcajj\xa8\x1d\xa5\rLQ\xcd\x11\xe1c\xda\x1c3\xff\x00꯱ݧh\xa9\x86\xed\vr\x8a\xac\x88j\xb2\x1bͨh\xf0^y\xc0e\xca\xdf\xfb\x92k+\"\xfa\x96\xa8\xed\x17\x97\xf0B\x91\x11Rx\xe1Ip\xa4xe\xef\xba\x1b\xee\xe1\xd1\r\xa5ܛ\xb4\x81\xbf\x9c\xbbf\x86\x7fÚ\x8d\"\xeax'Nz$\xa5\x8c\x96nӱw\x05\x8b\xa4\xcf\xcd6\x9d\x8b\xb8,]&~j\xb2E-~\x86\xbd\xf3\xf4\"촋(\xa3kl\xfb\x9bq\t%\r܄m[f\x97\x87\x96^|\xf5\xae\x01\x87b\xfc\xcebŞg?\t\x9a\xfe\xb5\xed\x80\xff\x00\xe4\x11\xfd6\xbb\xfa\x8a\xad:\xdd\xce?\x8a\x93\x96\x12\xe0j\xadq\xa6\x10\x96\x95ij6\x9d\x8b\xb8,]&~i\xb4\xec_\xc1b\xe93\xf3U\x92\xcf棯\xd0˾~\x84^6\xe1m\x14T\x82۴\xee\x11\x1f\xec۟-\xabC3\xe2z5\xa8>ȞZ\xc7\xea\xabz\xd1)6\x12\xfdܱ}\x10uܣ;\"yk\x17\xaa\xad\xebD\xac\x97\x84\xddr\xf5[g\xfd\x103\xac\xf2\xa2\xc1\xd6yQRxǣ\xbcg\xf3\x9d\xd6+\v.\xf1\x9f\xcewX\xac.\x10>\x98\xf7\xc6\xf8\xe4a\xc9\xf1\xbd\xb20\xe4\x0e\x8b\xd8C\x9ar;\xdb\xc5vً\xb1c5\\\x9e}d\x14\xaf\xfcc\\$D\xda%\x19\xca\x1e\x17\x83j\xbe\xe1]s\xa8uUl\xbbl匏KE\xad\x01\xac\xd4\x1a\u058c\x87\x9f\xeb\xf4\xadTD8\xdbo,\x93Yq}m\x9e\x89\x94;\x96:\x98c\x92G\xc4_+\xe3s\x1a\xf3\xa4X2i\x19g\x99\x1c\xabz\xbf\x1bR\xdc誨j\xec\xef\x11\xd4FX]\x1dXqcDŽ״:!\xbe\b\x04o\xf9\x94-\x14\xb52\xf5sUGNx\r\xf4DQ3\x85ײX+oϭe5E<;\x91\xb09\xe6v\xc8\xed-\xb8\xbc\r\x1d\x0e\r\x13\x9f*\xe4-\xba;\x95\xce߷n\x1a\xb9\xa9\xf6\xed\r\xb7i i\xe8g\xa3\x9e`\xea\xcc\xfdh\xb1\xe6N\x9b\x8a\x92\xd7ȓw\xbe\xbdq\x85\xbf\xec\xea\x13\xbd\xf5\xeb\x8c-\xff\x00gP\xb8\x9d\xd2b~6\xac\xe93\xb2\x9d\xd2b~6\xac\xe93\xb2\xa7\x98\x9au\xdbv\xbf\x9e囆\xedU\x16[c(\xaa%\x8aY\x05ED\xdap\x87\x86e+\xf4\x80\xf0\xf7\xd44\xec}z$\x9f\x84-\xfb\xe4\x9f'Q¥x>\xae\xb2\xba\xc9OQW<\x93\xce\xea\x8aƺI\b.-d\xcekF\xf0\xf3*\xe8\xe2LO\x9b\xbfͫ5\x9f\x8c\xce\x1ej\x93\xc6\x16Mu\xe5ES\x86\xa4\xf1\xe4v\xbb\xdf^\xb8\xc2\xdf\xf6u\t\xde\xfa\xf5\xc6\x16\xfd\x7f'P\xb8\x9d\xd2b~6\xac\xe93\xb2\xb3\xdd&'\xe3jΓ;*9\x89\x93]\xb7k\xf9\xeeZ\x96J\x19m\x96\xabu\x04\xb22I)aڞ\xf8Ã\x1ct\x89͡\xdb\xfeu\x0e\xd9\x13\xcbX\xbdUoZ%+\xc3U\x155v+=EL\xaf\x96yi\x83\xa4\x92M\xf7=\xdaN\x19\x92\x14SdO-b\xf5U\xbdh\x95\x92\xf0\x9e\x85\xce7n\x1c\xb8\x10#\xac\xf2\xa2\x1dg\x95\x15'\x8cz;\xc6\x7f9\xddb\xb0\xbe\x9d\xe3?\x9c\xee\xb1_+\x84\x02\" \b\x88\x80\"\"\x00\x88\x88\x02\xfak%\x90\x91\x1cR\xc8[\x91v\xd5\x1c\x92e\x9e\xac\xf4\x01_*u\xb1ז\xc4\x1e\xae\xdd֝v+/\x05\xb4i\xedf\xa1Ԅ\xed\x15\x7f5\xab\xf7i\xfb\t\xb9\xea\xfekW\xee\xd3\xf6\x15\xf1\x9f\xf7\x9a\xc6\x7f\xdej͙\xe8\xfe\x1c\xbb\x88\xde\bd\x8c\xb0R\xb6F=\x8e\xddU\xc7FF9\x8e\xc8\xce\xe2\x0eO\x00\xaa\xb4\xd3\xd5\xe6\xef\xd9j\xf5\x9f\xfai\xf8y\x8a\xf6\xcd?\xbdjN\x19I\x1a*Z*\x91\x8csȢ6\x8a\xbf\x9a\xd5\xfb\xb4\xfd\x85\x9d\xa2\xaf\xe6\xb5z\xfem?a^\xf9\xff\x00y\xa6\x7f\xdej;3?\xe1˸\xe2aF\xbd\x98z\xc6\u05f5\xcdsi@s^\xd75\xc0\xe9\xbbXp\xcdF6D\xf2\xd6/U[։XY\xaa\xf7d?-c\xf5U\xbdh\x94\xa4\xb1\x12\xfb\xa8\xe9\xb7q\xe9\x82\x04u\x9eTY:\xcf**px\xa7^\xab\x0f\xe2JgHe\xb5Vh\xe98\xe9B\xc1Pܳל\x05\xc7\xee\\\xa7\xe7\x1b\x8b%\x0e\x8d\xe31\xa3+]\x1b\xbe\xa7\x80U\xf8\xbc傞v\x96O\x14R\xb0\xfcYX\u05f7\xeap!Y\xb3=I}=?\f\x8a\x1d\x15\xc3Q\x850\xadI%\xf6\xbav8\xfcjm:s\xff\x00\xa0\xb4.=F\xc7\xd6w\xe6ik+\xa9Ϙ9\xd1N\xc1\xec{C\xbf\x99E\xd3fyXU\\\xb0\xca\xd9\x14ʣc\xeb\xc334\xb5\xf4S\x81\xa8L\xc9i\xdc}\xad\xd3\v\x91Q\x851]0%\xd6\xc9%h\xf8ԲE0<\x8d\x0e\x0f\xfeU\x17\x16\x8c\xf2\xb7\xab\x1eqg\x11\x17\xa4\xf4\xf5T\xa7F\xaa\x9e\xa2\x9c\xf0T\xc3,_\xd4h\v\xcc\x10w\xc1\x04z\b+\x85\rc\x98DD\x01m\xd1W\xddhLۂ\xa2\xaa\x13(fݹ\x83\x89pnz:z \xea\xcc\xe5ʵ\x14\xefc\xaf-\x88=]\xbb\xf1\x9dv+,\xba\x84\x1c\xea(\xa7\x827\xf0\xfe+\xe3\v\xa7FN\xc2|?\x8b8\xc2\xe9ѓ\xb0\xaeTV\xe8}OSs\x9f\xdc\x7f=\xcag\xe1\xfcY\xc6\x17N\x8c\x9d\x85\x9f\x87\xf1g\x18]:2v\x15ʉ\xa1\xf5\x1b\x9c\xfe\xe3\xf9\xeeS_\x0f\xe2\xbe0\xbatd\xec'\xc3\xf8\xaf\x8c.\x9d\x19;\n\xe5D\xd0\xfa\x8d\xce\x7fq\xfc\xf7)\xaf\x87\xf1_\x18]:2v\x17\x93\x9d\x89/\x93A\v\x9bp\xae\x9d\x9aM\x84H\xc7\xe8\xc6\x1eFe\xcfsCZ7\x86d\x9f2\xba\x914?6sqo\x84\xa6\xda \xb0\xec}I\xb4\xc1\xba+\xa4\xdb\xf6\xa8\xf6\xfd\xa9\x80Ƕ\xe8\x8d-\x02w\xf2\xcf<\xb7\x91N\x91OJ4\ued3a\x04D]4\x84D@\x11\x11\x01\x82\xd0\xe0C\x80 \xeb\x04f\x0f\xb0\xaeeN\x1fÕ\x99\x9a\x8b]\x13\x9cu\xbd\xb0\xb69:q\xe4\xef\xbdu\x11\b\xb8\xa9sDN\xa3\x01a\xc9s0:\xb6\x98\x9d[L\xe6F\x8f\xe1\xa8\x0f\xfcW\"\xa3cʡ\xbfIu\x89\xfc\r\xaa\xa7s\x0f\xb5\xf18\x8f\xe4V\x1a(\xb8\xa6g\x95\xa5\x19~R\xa5\xa8\xc1x\xaa\f\xcbi`\xa8h\xf3\xd2\xd40\x9e\x8c\xda\x05Hp%\rʆ{譣\xa9\xa6/\x8e\x803tF\xe6\a\xe8\xba|\xf4\x1d✳\x19\xe4|\xear\x8b\x8a\t<\x90\xa7g\nsS\x8b\xe4\x11\x11L\xda\x11\x11\x00DD\x01\x11\x10\x04D@\x11\x11\x00DD\x01\x11\x10\x04D@\x11\x11\x00DD\x01\x11\x10\x04D@\x11\x11\x00DD\x01\x11\x10\x1f\xff\xd9"),
+}
diff --git a/cmd/v2/theme/icon/excel.jpg b/cmd/v2/theme/icon/excel.jpg
new file mode 100644
index 000000000..f5f167d3f
Binary files /dev/null and b/cmd/v2/theme/icon/excel.jpg differ
diff --git a/cmd/v2/theme/icon/mongodb.jpg b/cmd/v2/theme/icon/mongodb.jpg
new file mode 100644
index 000000000..b6f97a47c
Binary files /dev/null and b/cmd/v2/theme/icon/mongodb.jpg differ
diff --git a/cmd/v2/ui/app_container.go b/cmd/v2/ui/app_container.go
index c3657aa95..0da9770c3 100644
--- a/cmd/v2/ui/app_container.go
+++ b/cmd/v2/ui/app_container.go
@@ -60,6 +60,23 @@ func (at *appContainer) openApp(app appInterface) error {
return nil
}
+func (at *appContainer) openWelcome() (string, error) {
+ var firstTab *container.TabItem
+ app := &appWelcome{}
+ if err := at.initApp(app); err != nil {
+ return app.GetAppName(), err
+ }
+ tab := app.GetTabItem()
+ at.Append(tab)
+ if firstTab == nil {
+ firstTab = tab
+ }
+ if firstTab != nil {
+ at.Select(firstTab)
+ }
+ return "", nil
+}
+
// open default app
func (at *appContainer) openDefaultApp(appName string) (string, error) {
var firstTab *container.TabItem
diff --git a/cmd/v2/ui/app_interface.go b/cmd/v2/ui/app_interface.go
index e0e3769a1..e5b612bf8 100644
--- a/cmd/v2/ui/app_interface.go
+++ b/cmd/v2/ui/app_interface.go
@@ -27,21 +27,14 @@ var (
}
toolRegister = []appInterface{
- &appWelcome{},
+ // &appWelcome{},
&appGen{},
&appPbGen{},
&appLock{},
&appTerm{},
&appPing{},
&appMgo{},
- }
-
- perfRegister = []appInterface{
- &perfWelcome{},
- &perfConf{},
- &perfPb{},
- &perfResult{},
- &perfChoose{},
+ &appConfigValid{},
}
)
diff --git a/cmd/v2/ui/app_test.go b/cmd/v2/ui/app_test.go
deleted file mode 100644
index 447c3bff0..000000000
--- a/cmd/v2/ui/app_test.go
+++ /dev/null
@@ -1,18 +0,0 @@
-package ui
-
-import (
- "fmt"
- cfg "go_dreamfactory/cmd/v2/configure/structs"
- "go_dreamfactory/cmd/v2/lib/common"
- "testing"
-)
-
-func TestGjson(t *testing.T) {
- if tables, err := cfg.NewTables(common.Loader); err != nil {
- println(err.Error())
- } else {
- for _, v := range tables.TestFlow.GetDataList() {
- fmt.Println(v.Msg)
- }
- }
-}
diff --git a/cmd/v2/ui/perf_choose.go b/cmd/v2/ui/perf_choose.go
deleted file mode 100644
index 2d4825ee9..000000000
--- a/cmd/v2/ui/perf_choose.go
+++ /dev/null
@@ -1,224 +0,0 @@
-package ui
-
-import (
- "go_dreamfactory/cmd/v2/lib"
- "go_dreamfactory/cmd/v2/lib/common"
- "go_dreamfactory/cmd/v2/lib/storage"
- "go_dreamfactory/cmd/v2/service"
- "go_dreamfactory/cmd/v2/service/observer"
- "go_dreamfactory/comm"
- "go_dreamfactory/pb"
- "time"
-
- "fyne.io/fyne/v2"
- "fyne.io/fyne/v2/container"
- "fyne.io/fyne/v2/layout"
- "fyne.io/fyne/v2/theme"
- "fyne.io/fyne/v2/widget"
- "github.com/Pallinder/go-randomdata"
- "github.com/sirupsen/logrus"
- "google.golang.org/protobuf/proto"
-)
-
-type perfChoose struct {
- appAdapter
-
- obs observer.Observer
- conf *storage.Config
- binduids []string //账号
- handler lib.Handler
-}
-
-func (app *perfChoose) LazyInit(ptService service.PttService, obs observer.Observer) error {
- app.obs = obs
- app.conf = perfWin.UIImpl.config
-
- app.tabItem = container.NewTabItemWithIcon(common.TOOLBAR_PERF_CHOOSE, theme.ContentCopyIcon(), nil)
- content := container.NewMax()
- content.Objects = []fyne.CanvasObject{}
-
- loginTestBtn := widget.NewButton("登陆(注册)", nil)
- loginTestBtn.OnTapped = func() {
- closeApp3(perfWin.tabs, common.TOOLBAR_PERF_CHOOSE)
- openApp3(perfWin.tabs, common.TOOLBAR_PERF_RES)
- var err error
-
- app.handler, err = service.NewWsCli(app.conf.WsAddr, 2*time.Second)
- if err != nil {
- panic(err)
- }
-
- userCount := app.conf.UserCount
- for i := int32(0); i < userCount; i++ {
- account := randomdata.SillyName()
- app.binduids = append(app.binduids, account)
- // 登录
- rqLogin := ReqParams{
- Sid: app.conf.SId,
- Account: account,
- PbReq: &pb.UserLoginReq{Sid: app.conf.SId, Account: account},
- MainType: "user",
- SubType: "login",
- }
- b, err := app.buildReq(rqLogin)
- if err != nil {
- logrus.Error(err)
- return
- }
- app.handler.SetReq(b, false)
-
- }
-
- param := lib.ParamMgr{
- Caller: app.handler,
- Timeout: time.Duration(app.conf.Pressure.TimeoutMs) * time.Millisecond,
- Lps: uint32(app.conf.Pressure.Concurrency),
- Duration: time.Duration(app.conf.Pressure.DurationS) * time.Second,
- ResultCh: make(chan *lib.CallResult, 50),
- }
- a, err := lib.NewAssistant(obs, param)
- if err != nil {
- logrus.Error(err)
- }
-
- a.Start()
-
- a.ShowResult()
- }
-
- createTestBtn := widget.NewButton("创角", func() {
- closeApp3(perfWin.tabs, common.TOOLBAR_PERF_CHOOSE)
- openApp3(perfWin.tabs, common.TOOLBAR_PERF_RES)
-
- for _, account := range app.binduids {
- rq := ReqParams{
- Sid: app.conf.SId,
- Account: account,
- PbReq: &pb.UserCreateReq{NickName: account},
- MainType: "user",
- SubType: "create",
- }
- b, err := app.buildReq(rq)
- if err != nil {
- logrus.Error(err)
- return
- }
- app.handler.SetReq(b, false)
- }
-
- param := lib.ParamMgr{
- Caller: app.handler,
- Timeout: time.Duration(app.conf.Pressure.TimeoutMs) * time.Millisecond,
- Lps: uint32(app.conf.Pressure.Concurrency),
- Duration: time.Duration(app.conf.Pressure.DurationS) * time.Second,
- ResultCh: make(chan *lib.CallResult, 50),
- }
- a, err := lib.NewAssistant(obs, param)
- if err != nil {
- logrus.Error(err)
- }
-
- a.Start()
-
- a.ShowResult()
- })
-
- //场景
- scenBtn := widget.NewButton("其它场景", nil)
- scenBtn.OnTapped = func() {
- // defer openApp3(perfWin.tabs, common.TOOLBAR_PERF_PB)
- // closeApp3(perfWin.tabs, common.TOOLBAR_PERF_CHOOSE)
- closeApp3(perfWin.tabs, common.TOOLBAR_PERF_CHOOSE)
- openApp3(perfWin.tabs, common.TOOLBAR_PERF_RES)
-
- // if tables, err := cfg.NewTables(common.Loader); err != nil {
- // println(err.Error())
- // } else {
- // for _, v := range tables.TestFlow.GetDataList() {
- // p, ok := pbMap[v.Route]
- // if !ok {
- // logrus.WithField("route", v.Route).Debug("未注册")
- // continue
- // }
- // routeStr := strings.SplitN(v.Route, ".", 2)
- // for _, account := range app.binduids {
- // rq := ReqParams{
- // Sid: app.conf.SId,
- // Account: account,
- // PbReq: p,
- // MainType: routeStr[0],
- // SubType: routeStr[1],
- // }
- // b, err := app.buildReq(rq)
- // if err != nil {
- // logrus.Error(err)
- // return
- // }
- // app.handler.SetReq(b, true)
- // }
-
- // param := lib.ParamMgr{
- // Caller: app.handler,
- // Timeout: time.Duration(app.conf.Pressure.TimeoutMs) * time.Millisecond,
- // Lps: uint32(app.conf.Pressure.Concurrency),
- // Duration: time.Duration(app.conf.Pressure.DurationS) * time.Second,
- // ResultCh: make(chan *lib.CallResult, 50),
- // }
- // a, err := lib.NewAssistant(obs, param)
- // if err != nil {
- // logrus.Error(err)
- // }
-
- // a.Start()
-
- // a.ShowResult()
- // }
- // }
- }
-
- //上一步
- preBtn := widget.NewButtonWithIcon("上一步", theme.NavigateBackIcon(), nil)
- preBtn.OnTapped = func() {
- defer openApp3(perfWin.tabs, common.TOOLBAR_PERF_CONF)
- closeApp3(perfWin.tabs, common.TOOLBAR_PERF_CHOOSE)
- }
- btns := container.NewVBox(loginTestBtn, createTestBtn, scenBtn)
- c := container.NewBorder(nil, container.NewHBox(layout.NewSpacer(), preBtn), nil, nil, btns)
- content.Objects = append(content.Objects, c)
- app.tabItem.Content = content
- return nil
-}
-
-func (a *perfChoose) GetAppName() string {
- return common.TOOLBAR_PERF_CHOOSE
-}
-
-func (a *perfChoose) OnClose() bool {
- return false
-}
-
-func (a *perfChoose) OnDestroy() bool {
- return true
-}
-
-type ReqParams struct {
- Sid string
- Account string
- PbReq proto.Message
- MainType string
- SubType string
-}
-
-func (a *perfChoose) buildReq(rp ReqParams) ([]byte, error) {
- head := &pb.UserMessage{MainType: rp.MainType, SubType: rp.SubType}
- head.Sec = common.BuildSecStr(rp.Sid, rp.Account)
- if comm.ProtoMarshal(rp.PbReq, head) {
- data, err := proto.Marshal(head)
- if err != nil {
- return nil, err
- }
-
- return data, nil
- }
- return nil, nil
-}
diff --git a/cmd/v2/ui/perf_conf.go b/cmd/v2/ui/perf_conf.go
deleted file mode 100644
index e4153f22e..000000000
--- a/cmd/v2/ui/perf_conf.go
+++ /dev/null
@@ -1,154 +0,0 @@
-package ui
-
-import (
- "go_dreamfactory/cmd/v2/lib/common"
- "go_dreamfactory/cmd/v2/lib/storage"
- "go_dreamfactory/cmd/v2/service"
- "go_dreamfactory/cmd/v2/service/observer"
-
- "fyne.io/fyne/v2"
- "fyne.io/fyne/v2/container"
- "fyne.io/fyne/v2/layout"
- "fyne.io/fyne/v2/theme"
- "fyne.io/fyne/v2/widget"
- "github.com/sirupsen/logrus"
- "github.com/spf13/cast"
-)
-
-type perfConf struct {
- appAdapter
-
- obs observer.Observer
- conf *storage.Config
-}
-
-func (app *perfConf) LazyInit(ptService service.PttService, obs observer.Observer) error {
- app.obs = obs
- app.conf = perfWin.UIImpl.config
-
- app.tabItem = container.NewTabItemWithIcon(common.TOOLBAR_PERF_CONF, theme.ContentCopyIcon(), nil)
- content := container.NewMax()
- content.Objects = []fyne.CanvasObject{}
-
- // 压测form
- wsAddrEntry := widget.NewEntry()
- wsAddrEntry.PlaceHolder = "服务地址"
- wsAddrEntry.Text = app.conf.WsAddr
-
- timeoutEntry := widget.NewEntry()
- timeoutEntry.PlaceHolder = "毫秒数"
- timeoutEntry.Text = cast.ToString(app.conf.Pressure.TimeoutMs)
-
- lpsEntry := widget.NewEntry()
- lpsEntry.PlaceHolder = "并发数量"
- lpsEntry.Text = cast.ToString(app.conf.Pressure.Concurrency)
-
- durationEntry := widget.NewEntry()
- durationEntry.PlaceHolder = "秒数"
- durationEntry.Text = cast.ToString(app.conf.Pressure.DurationS)
-
- userCountEntry := widget.NewEntry()
- userCountEntry.PlaceHolder = "自动创建的用户数"
- userCountEntry.Text = cast.ToString(app.conf.UserCount)
-
- sidEntry := widget.NewEntry()
- sidEntry.PlaceHolder = "区服ID"
- sidEntry.Text = app.conf.SId
-
- intervalEntry := widget.NewEntry()
- intervalEntry.PlaceHolder = "间隔时间(s)"
- intervalEntry.Text = cast.ToString(app.conf.IntervalS)
-
- form := widget.NewForm(
- widget.NewFormItem("服务地址", wsAddrEntry),
- widget.NewFormItem("区服", sidEntry),
- widget.NewFormItem("用户数", userCountEntry),
- widget.NewFormItem("超时(ms)", timeoutEntry),
- widget.NewFormItem("并发量", lpsEntry),
- widget.NewFormItem("持续时间(s)", durationEntry),
- widget.NewFormItem("间隔时间(s)", intervalEntry),
- )
- // btn
- nextBtn := widget.NewButtonWithIcon("下一步", theme.NavigateNextIcon(), nil)
- nextBtn.OnTapped = func() {
- //校验表单数据
- if wsAddrEntry.Text == "" {
- common.ShowTip("服务地址必填")
- return
- }
-
- if sidEntry.Text == "" {
- common.ShowTip("区服ID必填")
- return
- }
-
- if timeoutEntry.Text == "" {
- common.ShowTip("超时时间必填")
- return
- }
- if lpsEntry.Text == "" {
- common.ShowTip("并发数必填")
- return
- }
-
- if durationEntry.Text == "" {
- common.ShowTip("持续时间")
- return
- }
-
- if userCountEntry.Text == "" {
- common.ShowTip("用户数至少是1")
- return
- }
-
- pressure := app.conf.Pressure
- pressure.TimeoutMs = cast.ToInt32(timeoutEntry.Text)
- pressure.Concurrency = cast.ToInt32(lpsEntry.Text)
- pressure.DurationS = cast.ToInt32(durationEntry.Text)
- app.conf.Pressure = pressure
- app.conf.UserCount = cast.ToInt32(userCountEntry.Text)
- app.conf.WsAddr = wsAddrEntry.Text
- app.conf.SId = sidEntry.Text
- if err := perfWin.UIImpl.storage.StoreConfig(app.conf); err != nil {
- logrus.Error(err)
- }
-
- //next
- defer closeApp3(perfWin.tabs, common.TOOLBAR_PERF_CONF)
- openApp3(perfWin.tabs, common.TOOLBAR_PERF_CHOOSE)
- }
-
- resetBtn := widget.NewButtonWithIcon("重置", theme.ContentRedoIcon(), nil)
- resetBtn.OnTapped = func() {
- timeoutEntry.Text = ""
- lpsEntry.Text = ""
- durationEntry.Text = ""
- userCountEntry.Text = ""
- wsAddrEntry.Text = ""
- sidEntry.Text = ""
- form.Refresh()
- }
-
- preBtn := widget.NewButtonWithIcon("上一步", theme.NavigateBackIcon(), nil)
- preBtn.OnTapped = func() {
- defer closeApp3(perfWin.tabs, common.TOOLBAR_PERF_CONF)
- openApp3(perfWin.tabs, common.TOOLBAR_PERF_TIP)
- }
-
- c := container.NewBorder(nil, container.NewHBox(layout.NewSpacer(), preBtn, resetBtn, nextBtn), nil, nil, form)
- content.Objects = append(content.Objects, c)
- app.tabItem.Content = content
- return nil
-}
-
-func (a *perfConf) GetAppName() string {
- return common.TOOLBAR_PERF_CONF
-}
-
-func (a *perfConf) OnClose() bool {
- return false
-}
-
-func (a *perfConf) OnDestroy() bool {
- return true
-}
diff --git a/cmd/v2/ui/perf_create.go b/cmd/v2/ui/perf_create.go
deleted file mode 100644
index bc2450c52..000000000
--- a/cmd/v2/ui/perf_create.go
+++ /dev/null
@@ -1,38 +0,0 @@
-package ui
-
-import (
- "go_dreamfactory/cmd/v2/lib/common"
- "go_dreamfactory/cmd/v2/lib/storage"
- "go_dreamfactory/cmd/v2/service"
- "go_dreamfactory/cmd/v2/service/observer"
-
- "fyne.io/fyne/v2"
- "fyne.io/fyne/v2/container"
- "fyne.io/fyne/v2/theme"
-)
-
-type perfCreate struct {
- appAdapter
-
- obs observer.Observer
- conf *storage.Config
-}
-
-func (app *perfCreate) LazyInit(ptService service.PttService, obs observer.Observer) error {
- app.obs = obs
- app.conf = perfWin.UIImpl.config
-
- app.tabItem = container.NewTabItemWithIcon(common.TOOLBAR_PERF_CONF, theme.ContentCopyIcon(), nil)
- content := container.NewMax()
- content.Objects = []fyne.CanvasObject{}
-
- return nil
-}
-
-func (a *perfCreate) GetAppName() string {
- return common.TOOLBAR_PERF_CREATE
-}
-
-func (a *perfCreate) OnClose() bool {
- return false
-}
diff --git a/cmd/v2/ui/perf_login.go b/cmd/v2/ui/perf_login.go
deleted file mode 100644
index 0a6715907..000000000
--- a/cmd/v2/ui/perf_login.go
+++ /dev/null
@@ -1,49 +0,0 @@
-package ui
-
-import (
- "go_dreamfactory/cmd/v2/lib/common"
- "go_dreamfactory/cmd/v2/lib/storage"
- "go_dreamfactory/cmd/v2/service"
- "go_dreamfactory/cmd/v2/service/observer"
-
- "fyne.io/fyne/v2"
- "fyne.io/fyne/v2/container"
- "fyne.io/fyne/v2/theme"
- "fyne.io/fyne/v2/widget"
-)
-
-type perfLogin struct {
- appAdapter
-
- obs observer.Observer
- conf *storage.Config
-}
-
-func (app *perfLogin) LazyInit(ptService service.PttService, obs observer.Observer) error {
- app.obs = obs
- app.conf = perfWin.UIImpl.config
-
- app.tabItem = container.NewTabItemWithIcon(common.TOOLBAR_PERF_CONF, theme.ContentCopyIcon(), nil)
- content := container.NewMax()
- content.Objects = []fyne.CanvasObject{}
-
- loginTestBtn := widget.NewButton("登陆/注册", func() {
-
- })
-
- createTestBtn := widget.NewButton("创角", func() {})
-
- btns := container.NewHBox(loginTestBtn, createTestBtn)
- c := container.NewBorder(btns, nil, nil, nil)
- content.Objects = append(content.Objects, c)
- app.tabItem.Content = content
- return nil
-}
-
-func (a *perfLogin) GetAppName() string {
- return common.TOOLBAR_PERF_LOGIN
-}
-
-func (a *perfLogin) OnClose() bool {
- return false
-}
diff --git a/cmd/v2/ui/perf_pb.go b/cmd/v2/ui/perf_pb.go
deleted file mode 100644
index 49ea09ff2..000000000
--- a/cmd/v2/ui/perf_pb.go
+++ /dev/null
@@ -1,215 +0,0 @@
-package ui
-
-import (
- "go_dreamfactory/cmd/v2/lib"
- "go_dreamfactory/cmd/v2/lib/common"
- "go_dreamfactory/cmd/v2/lib/storage"
- "go_dreamfactory/cmd/v2/service"
- "go_dreamfactory/cmd/v2/service/observer"
- "go_dreamfactory/comm"
- "go_dreamfactory/pb"
- cfg "go_dreamfactory/sys/configure/structs"
- "strings"
- "time"
-
- "fyne.io/fyne/v2"
- "fyne.io/fyne/v2/container"
- "fyne.io/fyne/v2/layout"
- "fyne.io/fyne/v2/theme"
- "fyne.io/fyne/v2/widget"
- "github.com/Pallinder/go-randomdata"
- "github.com/sirupsen/logrus"
- "google.golang.org/protobuf/proto"
-)
-
-type perfPb struct {
- appAdapter
-
- obs observer.Observer
-
- itemList common.ItemList
-
- pbList func() //协议列表
- conf *storage.Config
-}
-
-func (app *perfPb) LazyInit(ptService service.PttService, obs observer.Observer) error {
- app.obs = obs
- app.conf = perfWin.UIImpl.config
-
- app.tabItem = container.NewTabItemWithIcon(common.TOOLBAR_PERF_PB, theme.ContentCopyIcon(), nil)
- content := container.NewMax()
- content.Objects = []fyne.CanvasObject{}
-
- app.itemList = *common.NewItemList()
- app.itemList.ItemList = app.itemList.CreateList()
-
- app.pbList = func() {
- // if tables, err := cfg.NewTables(common.Loader); err != nil {
- // println(err.Error())
- // } else {
- // for _, v := range tables.TestFlow.GetDataList() {
- // item := common.Item{
- // Id: cast.ToString(v.Id),
- // Text: fmt.Sprintf("%-6d %-20s %-20s %s", v.Id, v.Msg, v.Route, v.Params),
- // Data: v,
- // }
- // app.itemList.AddItem(item)
- // }
- // }
- }
- defer app.pbList()
-
- // 刷新按钮
- refeshBtn := widget.NewButtonWithIcon("", theme.ViewRefreshIcon(), func() {
- app.itemList.Reset()
- app.pbList()
- })
-
- // next按钮
- nextBtn := widget.NewButtonWithIcon("下一步", theme.NavigateNextIcon(), nil)
- nextBtn.OnTapped = func() {
- defer closeApp3(perfWin.tabs, common.TOOLBAR_PERF_PB)
- openApp3(perfWin.tabs, common.TOOLBAR_PERF_RES)
- // 根据填写的用户数创建用户
- userCount := perfWin.config.UserCount
-
- // 遍历时,通过sleep 控制增加的用户数
- for i := int32(0); i < userCount; i++ {
- handler, err := service.NewWsCli(perfWin.config.WsAddr, time.Duration(perfWin.config.Pressure.TimeoutMs)*time.Millisecond)
- if err != nil {
- continue
- }
- var login *UserLogin
- login, err = app.loginReq(perfWin.config.SId)
- handler.SetReq(login.req, false)
- assist := app.createAssistantWithoutConf(handler)
- assist.Start()
- assist.ShowResult()
-
- // 遍历测试的协议
- for _, item := range app.itemList.CachedList.Items {
- if data, ok := item.Data.(*cfg.GameTestFlowData); ok {
- logrus.Debugf("%v %v", data.Route, data.Params)
- var (
- reqData []byte
- err error
- )
-
- if login == nil {
- continue
- }
- if v, ok := pbMap[data.Route]; ok {
- routeStr := strings.SplitN(data.Route, ".", 2)
- head := &pb.UserMessage{MainType: routeStr[0], SubType: routeStr[1]}
- head.Sec = common.BuildSecStr(login.sid, login.account)
- if err := common.Json2Pb(data.Params, v); err != nil {
- logrus.Error(err)
- continue
- }
- if comm.ProtoMarshal(v, head) {
- reqData, err = proto.Marshal(head)
- if err != nil {
- logrus.Error(err)
- continue
- }
- }
- }
-
- handler.SetReq(reqData, false)
- assist := app.createAssistant(handler)
- assist.Start()
- assist.ShowResult()
-
- }
- }
-
- // time.Sleep(time.Second)
- }
-
- obs.Notify(observer.EVENT_FINISH, true)
- }
-
- preBtn := widget.NewButtonWithIcon("上一步", theme.NavigateBackIcon(), nil)
- preBtn.OnTapped = func() {
- defer closeApp3(perfWin.tabs, common.TOOLBAR_PERF_PB)
- openApp3(perfWin.tabs, common.TOOLBAR_PERF_CONF)
- }
-
- //layout
- c := container.NewBorder(container.NewHBox(refeshBtn), container.NewHBox(layout.NewSpacer(), preBtn, nextBtn), nil, nil, app.itemList.ItemList)
- content.Objects = append(content.Objects, c)
- app.tabItem.Content = content
- return nil
-}
-
-func (a *perfPb) GetAppName() string {
- return common.TOOLBAR_PERF_PB
-}
-
-func (a *perfPb) OnClose() bool {
- return false
-}
-
-func (a *perfPb) createAssistantWithoutConf(handler lib.Handler) lib.Aiassistant {
-
- param := lib.ParamMgr{
- Caller: handler,
- Timeout: time.Duration(a.conf.Pressure.TimeoutMs) * time.Millisecond,
- Lps: 1,
- Duration: 1,
- ResultCh: make(chan *lib.CallResult, 50),
- }
- assist, err := lib.NewAssistant(a.obs, param)
- if err != nil {
- logrus.Errorf("AI助手初始化错误: %v", err)
- return nil
- }
- return assist
-}
-
-//
-func (a *perfPb) createAssistant(handler lib.Handler) lib.Aiassistant {
-
- param := lib.ParamMgr{
- Caller: handler,
- Timeout: time.Duration(a.conf.Pressure.TimeoutMs) * time.Millisecond,
- Lps: uint32(a.conf.Pressure.Concurrency),
- Duration: time.Duration(a.conf.Pressure.DurationS) * time.Second,
- ResultCh: make(chan *lib.CallResult, 50),
- }
- assist, err := lib.NewAssistant(a.obs, param)
- if err != nil {
- logrus.Errorf("AI助手初始化错误: %v", err)
- return nil
- }
- return assist
-}
-
-type UserLogin struct {
- req []byte
- sid string
- account string
-}
-
-func (a *perfPb) loginReq(sid string) (*UserLogin, error) {
- login := &UserLogin{sid: sid}
- head := &pb.UserMessage{MainType: "user", SubType: "login"}
- account := randomdata.SillyName()
- login.account = account
- head.Sec = common.BuildSecStr(login.sid, login.account)
- if comm.ProtoMarshal(&pb.UserLoginReq{
- Sid: login.sid,
- Account: login.account,
- }, head) {
- logrus.WithField("账号", login.account).Info("登录")
- data, err := proto.Marshal(head)
- if err != nil {
- return nil, err
- }
- login.req = data
-
- return login, nil
- }
- return nil, nil
-}
diff --git a/cmd/v2/ui/perf_result.go b/cmd/v2/ui/perf_result.go
deleted file mode 100644
index 470d33020..000000000
--- a/cmd/v2/ui/perf_result.go
+++ /dev/null
@@ -1,121 +0,0 @@
-package ui
-
-import (
- "fmt"
- "go_dreamfactory/cmd/v2/lib"
- "go_dreamfactory/cmd/v2/lib/common"
- "go_dreamfactory/cmd/v2/lib/storage"
- "go_dreamfactory/cmd/v2/service"
- "go_dreamfactory/cmd/v2/service/observer"
-
- "fyne.io/fyne/v2"
- "fyne.io/fyne/v2/container"
- "fyne.io/fyne/v2/layout"
- "fyne.io/fyne/v2/theme"
- "fyne.io/fyne/v2/widget"
-)
-
-type perfResult struct {
- appAdapter
-
- obs observer.Observer
- conf *storage.Config
-
- itemList common.ItemList
-
- resultList func() //结果列表
- resetBtn *widget.Button
- returnBtn *widget.Button
- report *widget.Card
- layout *fyne.Container
-}
-
-func (app *perfResult) LazyInit(ptService service.PttService, obs observer.Observer) error {
- app.obs = obs
- app.conf = perfWin.UIImpl.config
-
- app.tabItem = container.NewTabItemWithIcon(common.TOOLBAR_PERF_RES, theme.ContentCopyIcon(), nil)
- content := container.NewMax()
- content.Objects = []fyne.CanvasObject{}
-
- app.itemList = *common.NewItemList()
- app.itemList.ItemList = app.itemList.CreateList()
-
- //重新开始
- app.resetBtn = widget.NewButtonWithIcon("再来一次", theme.ContentRedoIcon(), nil)
- app.resetBtn.Hide()
- app.resetBtn.OnTapped = func() {
- defer openApp3(perfWin.tabs, common.TOOLBAR_PERF_TIP)
- app.itemList.Reset()
- closeApp3(perfWin.tabs, common.TOOLBAR_PERF_RES)
- }
-
- // 返回
- app.returnBtn = widget.NewButtonWithIcon("", theme.NavigateBackIcon(), nil)
- app.returnBtn.Disable()
- app.returnBtn.OnTapped = func() {
- defer openApp3(perfWin.tabs, common.TOOLBAR_PERF_CHOOSE)
- app.itemList.Reset()
- closeApp3(perfWin.tabs, common.TOOLBAR_PERF_RES)
- }
- app.returnBtn.Text = "等待中..."
-
- //统计Panel
- app.report = widget.NewCard("测试报告", "登录/创角", container.NewVBox(
- // widget.NewLabel("结果:"),
- ))
- app.report.Hide()
-
- //layout
- app.layout = container.NewBorder(app.report, container.NewHBox(layout.NewSpacer(), app.resetBtn, app.returnBtn), nil, nil, app.itemList.ItemList)
- content.Objects = append(content.Objects, app.layout)
- app.tabItem.Content = content
- app.listen()
- return nil
-}
-
-func (app *perfResult) listen() {
- app.obs.AddListener(observer.EVENT_RESULT, observer.Listener{
- OnNotify: func(data interface{}, args ...interface{}) {
- res, ok := data.(*lib.Statistics)
- if !ok {
- return
- }
-
- item := common.Item{
- Text: fmt.Sprintf("协议名称:%s, 调用次数:%d, 总耗时:%vms, 平均耗时:%vms, 最大耗时:%vms, 最小耗时:%vms",
- res.Route, res.CallCount, res.ElapseTotal, res.AvgElapse, res.MaxElapse, res.MinElapse),
- Data: res,
- }
- app.itemList.AddItem(item)
- app.returnBtn.Text = "返回"
- app.returnBtn.Enable()
- app.returnBtn.Refresh()
- app.layout.Refresh()
- },
- })
-
- app.obs.AddListener(observer.EVENT_FINISH, observer.Listener{
- OnNotify: func(data interface{}, args ...interface{}) {
- finish, ok := data.(bool)
- if !ok {
- return
- }
-
- if finish {
- app.resetBtn.Show()
- app.resetBtn.Refresh()
- app.report.Show()
- app.report.Refresh()
- }
- },
- })
-}
-
-func (app *perfResult) GetAppName() string {
- return common.TOOLBAR_PERF_RES
-}
-
-func (a *perfResult) OnClose() bool {
- return false
-}
diff --git a/cmd/v2/ui/perf_welcome.go b/cmd/v2/ui/perf_welcome.go
deleted file mode 100644
index ce6741293..000000000
--- a/cmd/v2/ui/perf_welcome.go
+++ /dev/null
@@ -1,64 +0,0 @@
-package ui
-
-import (
- "go_dreamfactory/cmd/v2/lib/common"
- "go_dreamfactory/cmd/v2/service"
- "go_dreamfactory/cmd/v2/service/observer"
-
- "fyne.io/fyne/v2"
- "fyne.io/fyne/v2/container"
- "fyne.io/fyne/v2/theme"
- "fyne.io/fyne/v2/widget"
-)
-
-type perfWelcome struct {
- appAdapter
-
- obs observer.Observer
-}
-
-func (app *perfWelcome) LazyInit(service service.PttService, obs observer.Observer) error {
- app.obs = obs
-
- app.tabItem = container.NewTabItemWithIcon(common.TOOLBAR_PERF_TIP, theme.ContentCopyIcon(), nil)
- content := container.NewMax()
- content.Objects = []fyne.CanvasObject{}
-
- wel := widget.NewRichTextFromMarkdown("# 自动化性能测试工具使用说明" +
- `
- * 基于Luban工具生成协议文件(json格式)
- `)
- for i := range wel.Segments {
- if seg, ok := wel.Segments[i].(*widget.TextSegment); ok {
- seg.Style.Alignment = fyne.TextAlignLeading
- }
- }
-
- goBtn := widget.NewButton("开始测试 >>", nil)
- goBtn.OnTapped = func() {
- defer closeApp3(perfWin.tabs, common.TOOLBAR_PERF_TIP)
- openApp3(perfWin.tabs, common.TOOLBAR_PERF_CONF)
- }
- app.tabItem.Content = container.NewCenter(
- container.NewVBox(
- wel,
- goBtn,
- ))
- return nil
-}
-
-func (a *perfWelcome) OpenDefault() string {
- return common.TOOLBAR_PERF_TIP
-}
-
-func (a *perfWelcome) GetAppName() string {
- return common.TOOLBAR_PERF_TIP
-}
-
-func (a *perfWelcome) OnClose() bool {
- return false
-}
-
-func (a *perfWelcome) OnDestroy() bool {
- return true
-}
diff --git a/cmd/v2/ui/perfwindow.go b/cmd/v2/ui/perfwindow.go
deleted file mode 100644
index 22c5b344e..000000000
--- a/cmd/v2/ui/perfwindow.go
+++ /dev/null
@@ -1,107 +0,0 @@
-package ui
-
-import (
- "fmt"
- "go_dreamfactory/cmd/v2/lib/common"
- "go_dreamfactory/pb"
- "reflect"
- "strings"
-
- "fyne.io/fyne/v2"
- "fyne.io/fyne/v2/container"
- "fyne.io/fyne/v2/widget"
- "github.com/sirupsen/logrus"
- "google.golang.org/protobuf/proto"
-)
-
-var perfWin *PerfWindowImpl
-
-var pbMap map[string]proto.Message //pb
-
-type PerfWindow interface {
- WindowInterface
-}
-
-type PerfWindowImpl struct {
- UIImpl
- parent fyne.Window
- w fyne.Window
- statusbar *statusBar //状态栏
- tabs *appContainer //tabs
- toolbar *toolBar //工具条
-}
-
-func NewPerfWindow(ui *UIImpl, parent fyne.Window) PerfWindow {
-
- pw := &PerfWindowImpl{
- UIImpl: *ui,
- parent: parent,
- }
-
- perfWin = pw
-
- pbMap = make(map[string]proto.Message)
-
- pw.initPb()
- return pw
-}
-
-func (ui *PerfWindowImpl) CreateWindow(_ string, width, height float32, _ bool) {
- title := fmt.Sprintf(common.APP_WIN_TITLE, "自动化性能测试工具", ui.app.Metadata().Version, ui.app.Metadata().Build, common.APP_NAME)
- w := ui.app.NewWindow(title)
- ui.AddWindow("main", w)
- ui.w = w
-
- w.Resize(fyne.NewSize(width, height))
- w.CenterOnScreen()
- w.SetCloseIntercept(func() {
- ui.parent.Show()
- })
-
- ui.statusbar = newStatusBar()
- toolbar := widget.NewToolbar(
- // widget.NewToolbarAction(theme.MediaVideoIcon(), func() {
- // openApp(ui.tabs, common.TOOLBAR_PERF_TIP)
- // }),
- // widget.NewToolbarAction(theme.MediaVideoIcon(), func() {
- // openApp(ui.tabs, common.TOOLBAR_PERF_CONF)
- // }),
- )
- ui.toolbar = newToolBar(toolbar)
-
- ui.tabs = newAppContainer(perfRegister, ui.pttService, ui.obs)
- content := container.NewBorder(ui.toolbar.toolbar, ui.statusbar.widget, nil, nil, ui.tabs)
- ui.w.SetContent(content)
-
- defer func() {
- appName, err := ui.tabs.openDefaultApp(common.TOOLBAR_PERF_TIP)
- if err != nil {
- logrus.WithField("appName", appName).Error(err)
- }
- }()
-
- w.SetCloseIntercept(func() {
- ui.parent.Show()
- w.Close()
- })
- w.Show()
-}
-
-func (ui *PerfWindowImpl) registerPb(route string, pb proto.Message) {
- typeOf := reflect.TypeOf(pb)
- pbName := typeOf.Elem().Name()
- if strings.HasSuffix(pbName, "Req") {
- s := strings.SplitN(route, ".", 2)
- low := strings.ToLower(pbName)
- if strings.Contains(low, s[0]) &&
- strings.Contains(low, s[1]) {
- pbMap[route] = pb
- }
- }
-}
-
-func (ui *PerfWindowImpl) initPb() {
- ui.registerPb("user.login", &pb.UserLoginReq{})
- ui.registerPb("user.create", &pb.UserCreateReq{})
- ui.registerPb("sys.funclist", &pb.SysFuncListReq{})
-}
diff --git a/cmd/v2/ui/tool_bar.go b/cmd/v2/ui/tool_bar.go
index 1387cfd0f..db3e802aa 100644
--- a/cmd/v2/ui/tool_bar.go
+++ b/cmd/v2/ui/tool_bar.go
@@ -42,17 +42,6 @@ func openApp2(ac *appContainer, name string) {
}
}
-func openApp3(ac *appContainer, name string) {
- for _, app := range perfRegister {
- if app.GetAppName() == name {
- err := ac.openApp(app)
- if err != nil {
- logrus.Error(fmt.Errorf("%s %v", app.GetAppName(), err))
- }
- }
- }
-}
-
func closeApp3(ac *appContainer, name string) {
for _, appItem := range ac.Items {
if appItem.Text == name {
diff --git a/cmd/v2/ui/tool_luban.go b/cmd/v2/ui/tool_luban.go
index a4a9ce817..bddf0f1b4 100644
--- a/cmd/v2/ui/tool_luban.go
+++ b/cmd/v2/ui/tool_luban.go
@@ -431,3 +431,6 @@ func openFile(entry *widget.Entry, w fyne.Window) {
func (a *appGen) GetAppName() string {
return common.TOOLBAR_GEN
}
+func(a *appGen) Icon() fyne.Resource{
+ return theme.ContentCopyIcon()
+}
\ No newline at end of file
diff --git a/cmd/v2/ui/tool_menu.go b/cmd/v2/ui/tool_menu.go
new file mode 100644
index 000000000..5ca299fff
--- /dev/null
+++ b/cmd/v2/ui/tool_menu.go
@@ -0,0 +1,53 @@
+package ui
+
+import (
+ "fyne.io/fyne/v2"
+ "fyne.io/fyne/v2/theme"
+ "github.com/sirupsen/logrus"
+)
+
+type toolMenu struct {
+ *fyne.MainMenu
+ sysMenu *fyne.Menu
+ appMenus []*fyne.MenuItem
+
+ //退出
+ quite *fyne.MenuItem
+
+ // 工具
+ toolMenu *fyne.Menu
+ //同步配置
+ syncConfMenu *fyne.MenuItem
+}
+
+func newToolMenu() *toolMenu {
+ var mm toolMenu
+ // system
+ mm.appMenus = make([]*fyne.MenuItem, len(toolRegister))
+ for i, app := range toolRegister {
+ mm.appMenus[i] = fyne.NewMenuItem(app.GetAppName(), func() {
+ err := toolWin.at.openApp(app)
+ if err != nil {
+ logrus.Errorf("打开 %s, err:%v", app.GetAppName(), err)
+ }
+ })
+ mm.appMenus[i].Icon = app.Icon()
+ }
+ mm.quite = fyne.NewMenuItem("退出", toolWin.quiteHandle)
+ mm.quite.Icon = theme.LogoutIcon()
+ mm.quite.IsQuit = true
+ mm.sysMenu = fyne.NewMenu("应用", mm.appMenus...)
+ mm.sysMenu.Items = append(mm.sysMenu.Items, fyne.NewMenuItemSeparator(), mm.quite)
+
+ //tool
+ mm.syncConfMenu = fyne.NewMenuItem("同步云配置", toolWin.syncConfig)
+ mm.toolMenu = fyne.NewMenu("工具",
+ mm.syncConfMenu,
+ )
+
+ mm.MainMenu = fyne.NewMainMenu(
+ mm.sysMenu,
+ mm.toolMenu,
+ )
+ return &mm
+}
diff --git a/cmd/v2/ui/tool_mgo.go b/cmd/v2/ui/tool_mgo.go
index 4a30fc8c5..3453195a2 100644
--- a/cmd/v2/ui/tool_mgo.go
+++ b/cmd/v2/ui/tool_mgo.go
@@ -11,6 +11,8 @@ import (
"go_dreamfactory/pb"
"strings"
+ mytheme "go_dreamfactory/cmd/v2/theme"
+
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/container"
"fyne.io/fyne/v2/dialog"
@@ -244,3 +246,6 @@ func (this *appMgo) showConWin() {
func (a *appMgo) GetAppName() string {
return common.TOOLBAR_MGODB
}
+func (a *appMgo) Icon() fyne.Resource {
+ return mytheme.ResourceMongodbJpg
+}
diff --git a/cmd/v2/ui/tool_newlock.go b/cmd/v2/ui/tool_newlock.go
index 9a505d981..cf4b47563 100644
--- a/cmd/v2/ui/tool_newlock.go
+++ b/cmd/v2/ui/tool_newlock.go
@@ -68,3 +68,6 @@ func (this *appLock) LazyInit(ptService service.PttService, obs observer.Observe
func (a *appLock) GetAppName() string {
return common.TOOLBAR_SEC
}
+func (a *appLock) Icon() fyne.Resource {
+ return theme.DownloadIcon()
+}
diff --git a/cmd/v2/ui/tool_pb.go b/cmd/v2/ui/tool_pb.go
index 822362bdc..2362c1442 100644
--- a/cmd/v2/ui/tool_pb.go
+++ b/cmd/v2/ui/tool_pb.go
@@ -191,6 +191,9 @@ func (this *appPbGen) LazyInit(ptService service.PttService, obs observer.Observ
func (a *appPbGen) GetAppName() string {
return common.TOOLBAR_PB
}
+func (a *appPbGen) Icon() fyne.Resource {
+ return theme.ContentAddIcon()
+}
type folderList struct {
selItemIds []string //选择的ID
diff --git a/cmd/v2/ui/tool_ping.go b/cmd/v2/ui/tool_ping.go
index 8d0ee168a..9e4cccd40 100644
--- a/cmd/v2/ui/tool_ping.go
+++ b/cmd/v2/ui/tool_ping.go
@@ -130,3 +130,7 @@ func (this *appPing) ping(targetHost string, ports []string) {
func (a *appPing) GetAppName() string {
return common.TOOLBAR_PING
}
+
+func (a *appPing) Icon() fyne.Resource {
+ return theme.ComputerIcon()
+}
diff --git a/cmd/v2/ui/tool_term.go b/cmd/v2/ui/tool_term.go
index 87a04e90c..d2969acce 100644
--- a/cmd/v2/ui/tool_term.go
+++ b/cmd/v2/ui/tool_term.go
@@ -549,6 +549,9 @@ func (app *appTerm) LazyInit(ptService service.PttService, obs observer.Observer
func (a *appTerm) GetAppName() string {
return common.TOOLBAR_TERM
}
+func (a *appTerm) Icon() fyne.Resource {
+ return theme.MailSendIcon()
+}
func OpenExplor(dir string) {
if dir == "" {
diff --git a/cmd/v2/ui/tool_valid.go b/cmd/v2/ui/tool_valid.go
new file mode 100644
index 000000000..35062e743
--- /dev/null
+++ b/cmd/v2/ui/tool_valid.go
@@ -0,0 +1,122 @@
+package ui
+
+import (
+ "go_dreamfactory/cmd/v2/lib/common"
+ os_storage "go_dreamfactory/cmd/v2/lib/storage"
+ "go_dreamfactory/cmd/v2/service"
+ "go_dreamfactory/cmd/v2/service/observer"
+ mytheme "go_dreamfactory/cmd/v2/theme"
+ "io/ioutil"
+
+ "fyne.io/fyne/v2"
+ "fyne.io/fyne/v2/container"
+ "fyne.io/fyne/v2/dialog"
+ fyne_storage "fyne.io/fyne/v2/storage"
+ "fyne.io/fyne/v2/theme"
+ "fyne.io/fyne/v2/widget"
+ "github.com/sirupsen/logrus"
+)
+
+type jsonFileList struct {
+ selItemId string //选择的文件ID
+ cacheList common.List
+ itemList *widget.List
+ fileTotal int //文件数
+}
+
+func newJsonFileList() *jsonFileList {
+ return &jsonFileList{
+ cacheList: common.NewList(""),
+ }
+}
+
+type appConfigValid struct {
+ appAdapter
+ jsonFileList
+}
+
+func (a *appConfigValid) LazyInit(pt service.PttService, obs observer.Observer) error {
+ a.tabItem = container.NewTabItemWithIcon(common.TOOLBAR_VALID, mytheme.ResourceExcelJpg, nil)
+ a.jsonFileList = *newJsonFileList()
+
+ //load conf
+ storage, _ := os_storage.NewOSStorage()
+ conf, err := storage.LoadConfig()
+ if err != nil {
+ logrus.Error(err)
+ return err
+ }
+
+ if conf.JsonDir!=""{
+
+ }
+ content := container.NewMax()
+ content.Objects = []fyne.CanvasObject{}
+
+ // 打开目录
+ openFolder := func(entry *widget.Entry) {
+ dConf := dialog.NewFolderOpen(func(lu fyne.ListableURI, err error) {
+ if lu == nil {
+ return
+ }
+ entry.Text = lu.Path()
+ entry.Refresh()
+ }, toolWin.w)
+ luri, _ := fyne_storage.ListerForURI(fyne_storage.NewFileURI("."))
+ dConf.SetLocation(luri)
+ dConf.SetConfirmText("打开")
+ dConf.SetDismissText("取消")
+ dConf.Resize(fyne.NewSize(750, 500))
+ dConf.Show()
+ }
+ //配置json路径
+ jsonDir := widget.NewEntry()
+ jsonDir.PlaceHolder = "json目录"
+ form := widget.NewForm(
+ widget.NewFormItem("json目录", container.NewBorder(nil, nil, nil, widget.NewButtonWithIcon("", theme.FolderIcon(), func() {
+ openFolder(jsonDir)
+ a.jsonFileList.initItem(jsonDir.Text)
+ }), jsonDir)),
+ )
+
+ jsonDir.SetText(conf.JsonDir)
+
+ c := container.NewBorder(form, nil, nil, nil)
+
+ content.Objects = append(content.Objects, c)
+ a.tabItem.Content = content
+ return nil
+}
+
+func (a *appConfigValid) GetAppName() string {
+ return common.TOOLBAR_VALID
+}
+
+func (a *appConfigValid) Icon() fyne.Resource {
+ return mytheme.ResourceExcelJpg
+}
+
+func (f *jsonFileList) initItem(dir string) {
+ files, err := ioutil.ReadDir(dir)
+ if err != nil {
+ logrus.Error(err)
+ return
+ }
+
+ for _, file := range files {
+ if file.IsDir() {
+ if file.Name() == ".vscode" {
+ continue
+ }
+ fm := common.Item{
+ Text: file.Name(),
+ Checked: false,
+ }
+ f.cacheList.Items = append(f.cacheList.Items, fm)
+ // f.selItemIds = append(f.selItemIds, fm.Id)
+ f.fileTotal++
+ // logrus.Debugf("%v", fm.Id)
+ }
+ }
+
+}
diff --git a/cmd/v2/ui/toolwindow.go b/cmd/v2/ui/toolwindow.go
index 48bb2d3f7..146635d60 100644
--- a/cmd/v2/ui/toolwindow.go
+++ b/cmd/v2/ui/toolwindow.go
@@ -1,11 +1,20 @@
package ui
import (
+ "encoding/json"
+ "errors"
"fmt"
"go_dreamfactory/cmd/v2/lib/common"
+ "go_dreamfactory/cmd/v2/lib/storage"
+ "io/ioutil"
+ "net/http"
+ "time"
+
+ mytheme "go_dreamfactory/cmd/v2/theme"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/container"
+ "fyne.io/fyne/v2/dialog"
"fyne.io/fyne/v2/theme"
"fyne.io/fyne/v2/widget"
"github.com/sirupsen/logrus"
@@ -24,6 +33,7 @@ type ToolWindowImpl struct {
tb *toolBar //工具条
sb *statusBar //状态栏
at *appContainer //tabs
+ mm *toolMenu //菜单
}
func NewToolWindow(ui *UIImpl, parent fyne.Window) ToolWindow {
@@ -56,10 +66,15 @@ func NewToolWindow(ui *UIImpl, parent fyne.Window) ToolWindow {
widget.NewToolbarAction(theme.ComputerIcon(), func() {
openApp2(mw.at, common.TOOLBAR_PING)
}),
- widget.NewToolbarAction(theme.SettingsIcon(), func() {
+
+ widget.NewToolbarAction(mytheme.ResourceMongodbJpg, func() {
openApp2(mw.at, common.TOOLBAR_MGODB)
}),
+ widget.NewToolbarAction(mytheme.ResourceExcelJpg, func() {
+ openApp2(mw.at, common.TOOLBAR_VALID)
+ }),
+
widget.NewToolbarSpacer(),
widget.NewToolbarAction(theme.HelpIcon(), func() {
showAbout()
@@ -78,11 +93,13 @@ func (ui *ToolWindowImpl) CreateWindow(title string, width, height float32, _ bo
ui.AddWindow("tool", w)
ui.w = w
+ ui.mm = newToolMenu()
+ ui.w.SetMainMenu(ui.mm.MainMenu)
// content
content := container.NewBorder(ui.tb.toolbar, ui.sb.widget,
nil, nil, ui.at)
ui.w.SetContent(content)
- appName, err := ui.at.openDefaultApp(common.TOOLBAR_WEL)
+ appName, err := ui.at.openWelcome()
if err != nil {
logrus.WithField("appName", appName).Error(err)
}
@@ -105,3 +122,50 @@ func (ui *ToolWindowImpl) CreateWindow(title string, width, height float32, _ bo
})
w.Show()
}
+func (ui *ToolWindowImpl) quiteHandle() {
+ dialog.ShowConfirm("提示", "确定退出吗", func(b bool) {
+ if !b {
+ return
+ }
+ ui.app.Quit()
+ }, ui.w)
+}
+
+func (ui *ToolWindowImpl) syncConfig() {
+ cli := http.Client{Timeout: time.Second * 10}
+ r, err := cli.Get("http://10.0.0.9:8080/prd/config.json")
+ if err != nil {
+ logrus.Error(err)
+ dialog.ShowError(err, ui.w)
+ return
+ }
+
+ defer r.Body.Close()
+
+ b, err2 := ioutil.ReadAll(r.Body)
+ if err2 != nil {
+ logrus.Error(err)
+ dialog.ShowError(err2, ui.w)
+ return
+ }
+ if len(b) == 0 {
+ dialog.ShowError(errors.New("云配置可能不存在"), ui.w)
+ return
+ }
+ config := &storage.Config{}
+ if err := json.Unmarshal(b, config); err != nil {
+ dialog.ShowError(fmt.Errorf("云配置解析错误: %s", err), ui.w)
+ return
+ }
+
+ s, err := storage.NewOSStorage()
+ s.StoreConfig(config)
+
+ dialog.ShowConfirm("提示", "云配置同步成功,需要重新打开窗口", func(b bool) {
+ if !b {
+ return
+ }
+ ui.parent.Show()
+ ui.w.Close()
+ }, ui.w)
+}
diff --git a/comm/const.go b/comm/const.go
index 7428fa987..3c1c9711c 100644
--- a/comm/const.go
+++ b/comm/const.go
@@ -140,7 +140,7 @@ const (
TableSeasonRecord = "seasonRecord" // 赛季塔记录
/// 美食馆
- TableSmithy = "smithy"
+ TableSmithy = "smithy"
TableSmithyTrade = "trade"
/// 赛季塔数据表
TableSeasonPagoda = "seasonpagoda"
@@ -222,6 +222,9 @@ const (
// pvp
TablePvp = "pvp"
+
+ // 铁匠铺铸造台
+ TableStove = "stove"
)
// RPC服务接口定义处
@@ -723,3 +726,10 @@ const (
UseType1 int32 = 1 //英雄碎片
UseType8 int32 = 8 //觉醒材料合成
)
+
+const (
+ SmithyReelType1 = 1 //炉温消耗减少
+ SmithyReelType2 = 2 // 材料消耗减少
+ SmithyReelType3 = 3 // 解锁图纸【紫金雷神锤】
+ SmithyReelType4 = 4
+)
diff --git a/modules/smithy/api_forgeequip.go b/modules/smithy/api_forgeequip.go
index 2776c12f4..c3b1bb27a 100644
--- a/modules/smithy/api_forgeequip.go
+++ b/modules/smithy/api_forgeequip.go
@@ -3,13 +3,15 @@ package smithy
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
+ "go_dreamfactory/sys/configure"
+ cfg "go_dreamfactory/sys/configure/structs"
"google.golang.org/protobuf/proto"
)
//参数校验
func (this *apiComp) ForgeEquipCheck(session comm.IUserSession, req *pb.SmithyForgeEquipReq) (code pb.ErrorCode) {
- if req.EquipType == 0 {
+ if req.ReelId == 0 {
code = pb.ErrorCode_ReqParameterError
return
}
@@ -18,18 +20,81 @@ func (this *apiComp) ForgeEquipCheck(session comm.IUserSession, req *pb.SmithyFo
// 打造装备
func (this *apiComp) ForgeEquip(session comm.IUserSession, req *pb.SmithyForgeEquipReq) (code pb.ErrorCode, data proto.Message) {
- var ()
+ var (
+ stove *pb.DBStove
+ err error
+ update map[string]interface{}
+ costRes []*cfg.Gameatn
+ )
+ update = make(map[string]interface{})
code = this.ForgeEquipCheck(session, req)
if code != pb.ErrorCode_Success {
return // 参数校验失败直接返回
}
- stove, err := this.module.modelSmithy.getSmithyStoveList(session.GetUserId())
+ stove, err = this.module.modelStove.getSmithyStoveList(session.GetUserId())
if err != nil {
code = pb.ErrorCode_DBError
return
}
+ reelcfg := this.module.configure.GetSmithyReelConfigData(req.ReelId)
+ if reelcfg == nil {
+ code = pb.ErrorCode_ReqParameterError // 没有找到该类型的图纸信息
+ return
+ }
+ // 校验图纸是否激活
+ if _, ok := stove.Data[req.ReelId]; !ok { // 是不是首次打造
+ if !this.module.configure.CheckSmithyFirstReelConfigData(reelcfg.Type, req.ReelId) { // 没有激活图纸
+ code = pb.ErrorCode_SmithyNoReel
+ return
+ }
+ stove.Data[req.ReelId] = &pb.Mastery{
+ Lv: 1,
+ Value: 0,
+ }
+ //update["data"] = stove.Data
+ }
+ stove.Data[req.ReelId].Value += 1
+ // 是否是精益打造
+ if req.Quality > 0 {
+ costRes = append(costRes, reelcfg.Quality)
+ }
+ costRes = append(costRes, reelcfg.Consume...)
+ subAtn := this.module.modelStove.CheckForgeConsume(req.ReelId, stove.Data[req.ReelId].Lv)
+ costRes = append(costRes, subAtn...)
+ if code = this.module.CheckRes(session, costRes); code != pb.ErrorCode_Success {
+ return
+ }
+ // 熟练度减少的温度
+ t := this.module.modelStove.CheckTemperature(req.ReelId, stove.Data[req.ReelId].Lv)
+ // 检查炉温 是否够
+ if stove.Temperature < reelcfg.Temperature-t {
+ code = pb.ErrorCode_SmithyNoTemperature // 炉温不够 直接返回
+ return
+ }
+ // 检查是否提升了熟练度等级
+ nextProficiency := this.module.configure.GetSmithyProficileData(req.ReelId, stove.Data[req.ReelId].Lv+1)
+ if nextProficiency != nil && nextProficiency.Proficiency >= stove.Data[req.ReelId].Value { // 提升熟练度
+ stove.Data[req.ReelId].Lv += 1
+ stove.Data[req.ReelId].Value = 0
+ // 校验是否解锁了新的图纸
+ if nextProficiency.Type == comm.SmithyReelType3 {
+ stove.Data[nextProficiency.Value1] = &pb.Mastery{
+ Lv: 1,
+ Value: 0,
+ }
+ }
+ }
+ if code = this.module.ConsumeRes(session, costRes, true); code != pb.ErrorCode_Success {
+ return
+ }
+ stove.Temperature -= (reelcfg.Temperature - t) // 消耗温度
+ stove.RecoveTime = configure.Now().Unix()
+ update["data"] = stove.Data
+ update["recoveTime"] = stove.RecoveTime
+ update["temperature"] = stove.Temperature
+ this.module.modelStove.updateSmithyStove(session.GetUserId(), update)
session.SendMsg(string(this.module.GetType()), "forgeequip", &pb.SmithyForgeEquipResp{Data: stove})
return
}
diff --git a/modules/smithy/api_getCustomer.go b/modules/smithy/api_getCustomer.go
new file mode 100644
index 000000000..58acfb0f3
--- /dev/null
+++ b/modules/smithy/api_getCustomer.go
@@ -0,0 +1,48 @@
+package smithy
+
+import (
+ "go_dreamfactory/comm"
+ "go_dreamfactory/pb"
+ "go_dreamfactory/utils"
+
+ "go.mongodb.org/mongo-driver/mongo"
+ "google.golang.org/protobuf/proto"
+)
+
+func (this *apiComp) CustomerCheck(session comm.IUserSession, req *pb.SmithyCustomerReq) (code pb.ErrorCode) {
+ return
+}
+
+func (this *apiComp) Customer(session comm.IUserSession, req *pb.SmithyCustomerReq) (code pb.ErrorCode, data proto.Message) {
+ cus, err := this.module.modelTrade.getDBCustomer(session.GetUserId())
+ if err != nil {
+ if err == mongo.ErrNoDocuments {
+ c, err := this.module.modelTrade.addCustomer(session.GetUserId(), 3)
+ if err != nil {
+ code = pb.ErrorCode_DBError
+ return
+ }
+ cus = c
+ } else {
+ code = pb.ErrorCode_DBError
+ return
+ }
+ }
+
+ if utils.IsFirstTody(cus.LastRefreshTime) {
+ this.module.modelTrade.DelByUId(session.GetUserId())
+ c, err := this.module.modelTrade.addCustomer(session.GetUserId(), 3)
+ if err != nil {
+ code = pb.ErrorCode_DBError
+ return
+ }
+ cus = c
+ }
+
+ rsp := &pb.SmithyCustomerResp{
+ CustomerIds: cus.CustomerIds,
+ }
+
+ session.SendMsg(string(this.module.GetType()), "customer", rsp)
+ return
+}
diff --git a/modules/smithy/api_getstoveinfo.go b/modules/smithy/api_getstoveinfo.go
index ee80cc7da..2d8ab6c1c 100644
--- a/modules/smithy/api_getstoveinfo.go
+++ b/modules/smithy/api_getstoveinfo.go
@@ -20,11 +20,12 @@ func (this *apiComp) GetStoveInfo(session comm.IUserSession, req *pb.SmithyGetSt
if code != pb.ErrorCode_Success {
return // 参数校验失败直接返回
}
- _smithy, err := this.module.modelSmithy.getSmithyStoveList(session.GetUserId())
+ _smithy, err := this.module.modelStove.getSmithyStoveList(session.GetUserId())
if err != nil {
code = pb.ErrorCode_DBError
return
}
+ this.module.modelStove.calculationRecoveryT(session.GetUserId(), _smithy)
session.SendMsg(string(this.module.GetType()), "getstoveinfo", &pb.SmithyGetStoveInfoResp{Data: _smithy})
return
}
diff --git a/modules/smithy/api_orderequip.go b/modules/smithy/api_orderequip.go
index 2077d094d..55c08b842 100644
--- a/modules/smithy/api_orderequip.go
+++ b/modules/smithy/api_orderequip.go
@@ -24,7 +24,7 @@ func (this *apiComp) OrderEquip(session comm.IUserSession, req *pb.SmithyOrderEq
if code != pb.ErrorCode_Success {
return // 参数校验失败直接返回
}
- stove, err := this.module.modelSmithy.getSmithyStoveList(session.GetUserId())
+ stove, err := this.module.modelStove.getSmithyStoveList(session.GetUserId())
if err != nil {
code = pb.ErrorCode_DBError
return
diff --git a/modules/smithy/api_rise.go b/modules/smithy/api_rise.go
index 49a203fbe..f25f4bc66 100644
--- a/modules/smithy/api_rise.go
+++ b/modules/smithy/api_rise.go
@@ -23,7 +23,7 @@ func (this *apiComp) Rise(session comm.IUserSession, req *pb.SmithyRiseReq) (cod
if code != pb.ErrorCode_Success {
return // 参数校验失败直接返回
}
- stove, err := this.module.modelSmithy.getSmithyStoveList(session.GetUserId())
+ stove, err := this.module.modelStove.getSmithyStoveList(session.GetUserId())
if err != nil {
code = pb.ErrorCode_DBError
return
diff --git a/modules/smithy/api_stoveup.go b/modules/smithy/api_stoveup.go
index 126464119..8ccf8114c 100644
--- a/modules/smithy/api_stoveup.go
+++ b/modules/smithy/api_stoveup.go
@@ -8,23 +8,40 @@ import (
)
//参数校验
-func (this *apiComp) StrveUpCheck(session comm.IUserSession, req *pb.SmithyStoveUpReq) (code pb.ErrorCode) {
+func (this *apiComp) StoveUpCheck(session comm.IUserSession, req *pb.SmithyStoveUpReq) (code pb.ErrorCode) {
return
}
// 炉子升级
-func (this *apiComp) StrveUp(session comm.IUserSession, req *pb.SmithyStoveUpReq) (code pb.ErrorCode, data proto.Message) {
- code = this.StrveUpCheck(session, req)
+func (this *apiComp) StoveUp(session comm.IUserSession, req *pb.SmithyStoveUpReq) (code pb.ErrorCode, data proto.Message) {
+ code = this.StoveUpCheck(session, req)
if code != pb.ErrorCode_Success {
return // 参数校验失败直接返回
}
- stove, err := this.module.modelSmithy.getSmithyStoveList(session.GetUserId())
+ stove, err := this.module.modelStove.getSmithyStoveList(session.GetUserId())
if err != nil {
code = pb.ErrorCode_DBError
return
}
-
+ conf := this.module.configure.GetSmithyStoveConf(stove.Lv)
+ if conf == nil {
+ code = pb.ErrorCode_ConfigNoFound
+ return
+ }
+ nexConf := this.module.configure.GetSmithyStoveConf(stove.Lv + 1)
+ if nexConf == nil {
+ code = pb.ErrorCode_SmithyStoveMaxLv
+ return
+ }
+ if code = this.module.ConsumeRes(session, conf.UpMaterial, true); code != pb.ErrorCode_Success {
+ return
+ }
+ stove.Lv += 1
+ update := make(map[string]interface{})
+ update["temperature"] = stove.Temperature
+ update["recoveTime"] = stove.RecoveTime
+ this.module.modelStove.updateSmithyStove(session.GetUserId(), update)
session.SendMsg(string(this.module.GetType()), "stoveup", &pb.SmithyStoveUpResp{Data: stove})
return
}
diff --git a/modules/smithy/api_toolsup.go b/modules/smithy/api_toolsup.go
index 685abf26c..1e709fed7 100644
--- a/modules/smithy/api_toolsup.go
+++ b/modules/smithy/api_toolsup.go
@@ -19,11 +19,30 @@ func (this *apiComp) ToolsUp(session comm.IUserSession, req *pb.SmithyToolsUpReq
if code != pb.ErrorCode_Success {
return // 参数校验失败直接返回
}
- stove, err := this.module.modelSmithy.getSmithyStoveList(session.GetUserId())
+ stove, err := this.module.modelStove.getSmithyStoveList(session.GetUserId())
if err != nil {
code = pb.ErrorCode_DBError
return
}
+ conf := this.module.configure.GetSmithyToolsData(req.Id)
+ if conf == nil {
+ code = pb.ErrorCode_ReqParameterError
+ return
+ }
+ // 校验前置条件
+ if conf.Preconditions == 0 {
+ stove.Skill[conf.SkillType] = conf.SkillLv
+ } else {
+ //TODU
+ }
+
+ if this.module.ConsumeRes(session, conf.UpMaterial, true); code != pb.ErrorCode_Success {
+ return
+ }
+
+ update := make(map[string]interface{})
+ update["skill"] = stove.Skill
+ this.module.modelStove.updateSmithyStove(session.GetUserId(), update)
session.SendMsg(string(this.module.GetType()), "toolsup", &pb.SmithyToolsUpResp{Data: stove})
return
diff --git a/modules/smithy/api_trade.go b/modules/smithy/api_trade.go
index 61a53e49e..2bf2f76fe 100644
--- a/modules/smithy/api_trade.go
+++ b/modules/smithy/api_trade.go
@@ -3,10 +3,43 @@ package smithy
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
+
+ "github.com/golang/protobuf/proto"
)
// 贸易
-func (this *apiComp) TradeCheck(session comm.IUserSession, req *pb.SmithySellItemReq) (code pb.ErrorCode) {
+func (this *apiComp) SellCheck(session comm.IUserSession, req *pb.SmithySellReq) (code pb.ErrorCode) {
+ if req.CustomerId == 0 || len(req.Ids) == 0 {
+ code = pb.ErrorCode_ReqParameterError
+ }
+ return
+}
+
+func (this *apiComp) SellItem(session comm.IUserSession, req *pb.SmithySellReq) (code pb.ErrorCode, data proto.Message) {
+ if code = this.SellCheck(session, req); code != pb.ErrorCode_Success {
+ return
+ }
+
+ //校验customer类型,因为有的类型是不能进入交易逻辑的
+ //TODO
+
+ _ = this.module.modelTrade.updateCustomer(session.GetUserId(), req.CustomerId)
+
+ conf := this.module.configure.GetSmithyCustomerConf(req.CustomerId)
+ if conf == nil {
+ code = pb.ErrorCode_ConfigNoFound
+ return
+ }
+
+ // 发奖励
+ this.module.DispenseRes(session, conf.Reword, true)
+
+ rsp := &pb.SmithySellResp{
+ CustomerId: req.CustomerId,
+ Ids: req.Ids,
+ }
+
+ session.SendMsg(string(this.module.GetType()), "sell", rsp)
return
}
diff --git a/modules/smithy/comp_configure.go b/modules/smithy/comp_configure.go
index 3487bcfb7..4d0dbf8e4 100644
--- a/modules/smithy/comp_configure.go
+++ b/modules/smithy/comp_configure.go
@@ -10,23 +10,32 @@ import (
)
const (
- game_smithy = "game_smithy.json"
- game_smithystove = "game_smithystove.json"
+ game_smithy = "game_smithy.json"
+ game_smithystoveold = "game_smithystove.json"
+
+ game_smithyreel = "game_newsmithy.json" // 新版铁匠铺卷轴
+ game_smproficiency = "game_smithyproficiency.json" // 铁匠铺熟练度
+ game_smithystove = "game_smithystovev1.json" // 铁匠铺台子 打造配置
+ game_smithytools = "game_smithytool.json" // 铁匠铺工具台
+ game_smithycustomer = "game_smithycustomer.json"
)
-///配置管理基础组件
+// /配置管理基础组件
type configureComp struct {
modules.MCompConfigure
module *Smithy
hlock sync.RWMutex
_smithyMap map[int64]*cfg.GameSmithyData
+
+ _mapProficile map[int64]*cfg.GameSmithyProficiencyData // 熟练度 key 卷轴ID+ 等级
+ _mapskill map[int64]*cfg.GameSmithyToolData // 熟练度 key 技能类型+ 技能等级等级
}
-//组件初始化接口
+// 组件初始化接口
func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
err = this.MCompConfigure.Init(service, module, comp, options)
- this._smithyMap = make(map[int64]*cfg.GameSmithyData, 0)
this.module = module.(*Smithy)
+ this._smithyMap = make(map[int64]*cfg.GameSmithyData, 0)
configure.RegisterConfigure(game_smithy, cfg.NewGameSmithy, func() {
if v, err := this.GetConfigure(game_smithy); err == nil {
if configure, ok := v.(*cfg.GameSmithy); ok {
@@ -41,7 +50,17 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
log.Errorf("get game_pagoda conf err:%v", err)
return
})
- err = this.LoadConfigure(game_smithystove, cfg.NewGameSmithyStove)
+
+ this._mapProficile = make(map[int64]*cfg.GameSmithyProficiencyData, 0)
+ configure.RegisterConfigure(game_smproficiency, cfg.NewGameSmithyProficiency, this.LoadProficileData)
+ this._mapskill = make(map[int64]*cfg.GameSmithyToolData, 0)
+ configure.RegisterConfigure(game_smithytools, cfg.NewGameSmithyTool, this.LoadSmithySkillData)
+ err = this.LoadConfigure(game_smithyreel, cfg.NewGameSmithyStove)
+ err = this.LoadConfigure(game_smithystove, cfg.NewGameSmithyStoveV1)
+ err = this.LoadConfigure(game_smithytools, cfg.NewGameSmithyTool)
+ err = this.LoadConfigure(game_smithystoveold, cfg.NewGameSmithyStove)
+ err = this.LoadConfigure(game_smithycustomer, cfg.NewGameSmithyCustomer)
+
return
}
@@ -66,7 +85,7 @@ func (this *configureComp) GetSmithyTypeConfigData() (mapType map[int32]struct{}
// 获取炉子配置数据
func (this *configureComp) GetSmithyStoveConfigData(level int32) (data *cfg.GameSmithyStoveData) {
- if v, err := this.GetConfigure(game_smithystove); err == nil {
+ if v, err := this.GetConfigure(game_smithystoveold); err == nil {
if configure, ok := v.(*cfg.GameSmithyStove); ok {
data = configure.Get(int32(level))
return
@@ -75,7 +94,7 @@ func (this *configureComp) GetSmithyStoveConfigData(level int32) (data *cfg.Game
return
}
-//加载多个配置文件
+// 加载多个配置文件
func (this *configureComp) LoadMultiConfigure(confs map[string]interface{}) (err error) {
for k, v := range confs {
err = configure.RegisterConfigure(k, v, nil)
@@ -87,7 +106,132 @@ func (this *configureComp) LoadMultiConfigure(confs map[string]interface{}) (err
return
}
-//读取配置数据
+// 读取配置数据
func (this *configureComp) GetConfigure(name string) (v interface{}, err error) {
return configure.GetConfigure(name)
}
+
+// 获取图纸信息
+func (this *configureComp) GetSmithyReelConfigData(id int32) (data *cfg.GameNewSmithyData) {
+ if v, err := this.GetConfigure(game_smithyreel); err == nil {
+ if configure, ok := v.(*cfg.GameNewSmithy); ok {
+ data = configure.Get(int32(id))
+ return
+ }
+ }
+ return
+}
+
+func (this *configureComp) CheckSmithyFirstReelConfigData(etype int32, id int32) bool {
+ if v, err := this.GetConfigure(game_smithyreel); err == nil {
+ if configure, ok := v.(*cfg.GameNewSmithy); ok {
+ for _, v := range configure.GetDataList() {
+ if v.Type == etype {
+ if v.Id == id {
+ return true
+ } else {
+ return false
+ }
+ }
+ }
+ return true
+ }
+ }
+ return false
+}
+
+// 获取铁匠铺熟练度数据
+func (this *configureComp) GetSmithProficiencyConf(id int32) (data *cfg.GameSmithyProficiencyData) {
+ if v, err := this.GetConfigure(game_smproficiency); err == nil {
+ if configure, ok := v.(*cfg.GameSmithyProficiency); ok {
+ data = configure.Get(int32(id))
+ return
+ }
+ }
+ return
+}
+
+// 获取铁匠铺的工具台技能
+func (this *configureComp) GetSmithySkill(skillType int32, skillLv int32) *cfg.GameSmithyToolData {
+ return this._mapskill[int64(skillType<<16)+int64(skillLv)]
+}
+
+func (this *configureComp) LoadSmithySkillData() {
+ if v, err := this.GetConfigure(game_smithytools); err == nil {
+ if configure, ok := v.(*cfg.GameSmithyTool); ok {
+ this.hlock.Lock()
+ defer this.hlock.Unlock()
+ for _, value := range configure.GetDataList() {
+ this._mapskill[int64(value.SkillType<<16)+int64(value.SkillLv)] = value
+ }
+ return
+ }
+ } else {
+ log.Errorf("get LoadSmithySkillData conf err:%v", err)
+
+ }
+}
+
+func (this *configureComp) LoadProficileData() {
+
+ if v, err := this.GetConfigure(game_smproficiency); err == nil {
+ if configure, ok := v.(*cfg.GameSmithyProficiency); ok {
+ this.hlock.Lock()
+ defer this.hlock.Unlock()
+ for _, value := range configure.GetDataList() {
+ this._mapProficile[int64(value.ReelId<<16)+int64(value.ProficiencyLv)] = value
+ }
+ return
+ }
+ } else {
+ log.Errorf("get game_pagoda conf err:%v", err)
+
+ }
+ return
+}
+
+func (this *configureComp) GetSmithyProficileData(reelid int32, proficile int32) *cfg.GameSmithyProficiencyData {
+ return this._mapProficile[int64(reelid<<16)+int64(proficile)]
+}
+
+// 获取铁匠铺顾客配置
+func (this *configureComp) GetSmithyCustomerConfList() (data []*cfg.GameSmithyCustomerData) {
+ if v, err := this.GetConfigure(game_smithycustomer); err != nil {
+ if conf, ok := v.(*cfg.GameSmithyCustomer); ok {
+ data = conf.GetDataList()
+ return
+ }
+ }
+ return
+}
+
+func (this *configureComp) GetSmithyCustomerConf(id int32) *cfg.GameSmithyCustomerData {
+ if v, err := this.GetConfigure(game_smithycustomer); err == nil {
+ if configure, ok := v.(*cfg.GameSmithyCustomer); ok {
+ return configure.GetDataMap()[id]
+ }
+ }
+ return nil
+}
+
+// 获取铁匠铺工作台信息
+func (this *configureComp) GetSmithyToolsData(id int32) (data *cfg.GameSmithyToolData) {
+ if v, err := this.GetConfigure(game_smithytools); err == nil {
+ if configure, ok := v.(*cfg.GameSmithyTool); ok {
+ data = configure.Get(int32(id))
+ return
+
+ }
+ }
+ return nil
+}
+
+func (this *configureComp) GetSmithyStoveConf(level int32) (data *cfg.GameSmithyStoveV1Data) {
+ if v, err := this.GetConfigure(game_smithystove); err == nil {
+ if configure, ok := v.(*cfg.GameSmithyStoveV1); ok {
+ data = configure.Get(int32(level))
+ return
+ }
+ }
+ return
+}
diff --git a/modules/smithy/model_smithy.go b/modules/smithy/model_smithy.go
index bee6178c8..728863f21 100644
--- a/modules/smithy/model_smithy.go
+++ b/modules/smithy/model_smithy.go
@@ -186,33 +186,3 @@ func (this *modelSmithy) CalculationStoveSkillLv(uid string, Smithy *pb.DBSmithy
mapData["orderCostTime"] = Smithy.OrderCostTime
this.module.ModifySmithyData(uid, mapData)
}
-
-// 获取铁匠铺信息
-func (this *modelSmithy) getSmithyStoveList(uid string) (result *pb.DBStove, err error) {
- result = &pb.DBStove{}
- if err = this.Get(uid, result); err != nil {
- if redis.RedisNil != err { // 没有数据直接创建新的数据
- result.Id = primitive.NewObjectID().Hex()
- result.Uid = uid
- result.Data = make(map[int32]int32, 0)
- result.Skill = make(map[int32]int32, 0)
- result.Lv = 1
- result.Temperature = 20000 // 配置
- result.RecoveTime = 0
-
- if err = this.Add(uid, result); err != nil {
- this.module.Errorf("err:%v", err)
- err = nil
- return
- }
- }
- return
- }
- err = nil
- return result, err
-}
-
-func (this *modelSmithy) updateSmithyStove(uid string, update map[string]interface{}) (err error) {
- err = this.Change(uid, update)
- return err
-}
diff --git a/modules/smithy/model_stove.go b/modules/smithy/model_stove.go
new file mode 100644
index 000000000..4fd071481
--- /dev/null
+++ b/modules/smithy/model_stove.go
@@ -0,0 +1,117 @@
+package smithy
+
+import (
+ "go_dreamfactory/comm"
+ "go_dreamfactory/lego/core"
+ "go_dreamfactory/lego/sys/redis"
+ "go_dreamfactory/modules"
+ "go_dreamfactory/pb"
+ "go_dreamfactory/sys/configure"
+ cfg "go_dreamfactory/sys/configure/structs"
+ "strconv"
+
+ "go.mongodb.org/mongo-driver/bson/primitive"
+ "go.mongodb.org/mongo-driver/mongo"
+ "go.mongodb.org/mongo-driver/x/bsonx"
+)
+
+type modelStove struct {
+ modules.MCompModel
+ module *Smithy
+}
+
+func (this *modelStove) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
+ this.TableName = string(comm.TableStove)
+ err = this.MCompModel.Init(service, module, comp, options)
+ this.module = module.(*Smithy)
+ // uid 创建索引
+ this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{
+ Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}},
+ })
+ return
+}
+
+// 获取铁匠铺信息
+func (this *modelStove) getSmithyStoveList(uid string) (result *pb.DBStove, err error) {
+ result = &pb.DBStove{}
+ if err = this.Get(uid, result); err != nil {
+ if redis.RedisNil != err { // 没有数据直接创建新的数据
+ result.Id = primitive.NewObjectID().Hex()
+ result.Uid = uid
+ result.Data = make(map[int32]*pb.Mastery, 0)
+ result.Skill = make(map[int32]int32, 0)
+ result.Forge = make(map[int32]int32, 0)
+ result.Lv = 1
+ result.Temperature = 20000 // 配置
+ result.RecoveTime = 0
+
+ if err = this.Add(uid, result); err != nil {
+ this.module.Errorf("err:%v", err)
+ err = nil
+ return
+ }
+ }
+ return
+ }
+ err = nil
+ return result, err
+}
+
+func (this *modelStove) updateSmithyStove(uid string, update map[string]interface{}) (err error) {
+ err = this.Change(uid, update)
+ return err
+}
+
+// 图纸属性 炉温消耗减少
+func (this *modelStove) CheckTemperature(reelId int32, lv int32) (t int32) {
+ var index int32
+ for index = 1; index <= lv; index++ {
+ if cfg := this.module.configure.GetSmithyProficileData(reelId, index); cfg != nil {
+ if cfg.Type == comm.SmithyReelType1 {
+ t += cfg.Value1
+ }
+ }
+ }
+ return
+}
+
+// 检查消耗减少
+func (this *modelStove) CheckForgeConsume(reelId int32, lv int32) (atn []*cfg.Gameatn) {
+ var index int32
+ for index = 1; index <= lv; index++ {
+ if cfgData := this.module.configure.GetSmithyProficileData(reelId, index); cfgData != nil {
+ if cfgData.Type == comm.SmithyReelType2 {
+ atn = append(atn, &cfg.Gameatn{
+ A: "item",
+ T: strconv.Itoa(int(cfgData.Value1)),
+ N: cfgData.Value2,
+ })
+ }
+ }
+ }
+ return
+}
+
+// 计算恢复进度
+func (this *modelStove) calculationRecoveryT(uid string, stove *pb.DBStove) {
+
+ conf := this.module.configure.GetSmithyStoveConf(stove.Lv)
+ if conf == nil {
+ return
+ }
+ if stove.Temperature < conf.MaxTemperature {
+ update := make(map[string]interface{})
+ // 小于最高温度就开始恢复
+ addT := (configure.Now().Unix() - stove.RecoveTime) / int64(conf.TemperatureRecovery)
+ stove.Temperature += int32(addT)
+ if stove.Temperature > conf.MaxTemperature {
+ stove.Temperature = conf.MaxTemperature
+ stove.RecoveTime = 0
+ } else {
+ stove.RecoveTime += addT * int64(conf.TemperatureRecovery)
+ }
+ update["temperature"] = stove.Temperature
+ update["recoveTime"] = stove.RecoveTime
+ this.module.modelStove.updateSmithyStove(uid, update)
+ }
+}
diff --git a/modules/smithy/model_trade.go b/modules/smithy/model_trade.go
index 2254a8b27..793f675b5 100644
--- a/modules/smithy/model_trade.go
+++ b/modules/smithy/model_trade.go
@@ -4,7 +4,12 @@ import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
+ "go_dreamfactory/pb"
+ "go_dreamfactory/sys/configure"
+ cfg "go_dreamfactory/sys/configure/structs"
+ "math/rand"
+ "go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/x/bsonx"
)
@@ -24,4 +29,107 @@ func (this *modelTrade) Init(service core.IService, module core.IModule, comp co
})
return
}
-//
\ No newline at end of file
+
+// 权重项目
+type WeightedRandom struct {
+ items []*cfg.GameSmithyCustomerData
+ totalWeight int
+}
+
+func newWeightedRandom(items []*cfg.GameSmithyCustomerData) *WeightedRandom {
+ wr := &WeightedRandom{items: items}
+ for _, item := range wr.items {
+ wr.totalWeight += int(item.Weight)
+ }
+ return wr
+}
+
+func (wr *WeightedRandom) pick() *cfg.GameSmithyCustomerData {
+ randomNumber := rand.Intn(wr.totalWeight)
+ for _, item := range wr.items {
+ if randomNumber < int(item.Weight) {
+ return item
+ }
+ randomNumber -= int(item.Weight)
+ }
+ return nil
+}
+
+// 随机顾客
+func (s *modelTrade) getCustomerRandom() (customerId int32) {
+ items := s.module.configure.GetSmithyCustomerConfList()
+ wr := newWeightedRandom(items)
+ if c := wr.pick(); c != nil {
+ customerId = c.CustomerId
+ }
+ return
+}
+
+func (s *modelTrade) getDBCustomer(uid string) (*pb.DBCustomer, error) {
+ customer := &pb.DBCustomer{}
+ if err := s.Get(uid, customer); err != nil {
+ s.module.Errorln(err)
+ return nil, err
+ }
+ return customer, nil
+}
+
+// 初始顾客
+func (s *modelTrade) addCustomer(uid string, num int32) (*pb.DBCustomer, error) {
+ customer := &pb.DBCustomer{
+ Id: primitive.NewObjectID().Hex(),
+ Uid: uid,
+ Total: num,
+ LastRefreshTime: configure.Now().Unix(),
+ }
+ for i := 0; i < int(num); i++ {
+ customer.CustomerIds = append(customer.CustomerIds, s.getCustomerRandom())
+ }
+ if err := s.Add(uid, customer); err != nil {
+ s.module.Errorln(err)
+ return nil, err
+ }
+ return customer, nil
+}
+
+// 移除顾客
+func (s *modelTrade) removeCustomer(cus *pb.DBCustomer, customerId int32) *pb.DBCustomer {
+ for i, v := range cus.CustomerIds {
+ if v == customerId {
+ cus.CustomerIds = append(cus.CustomerIds[:i], cus.CustomerIds[i+1:]...)
+ i--
+ }
+ }
+ return cus
+}
+
+// 随机新顾客
+func (s *modelTrade) updateCustomer(uid string, customerId int32) error {
+ cus, err := s.getDBCustomer(uid)
+ if err == nil {
+ cus = s.removeCustomer(cus, customerId)
+ cus.Total++
+ //上限
+ limit := 20
+ left := limit - int(cus.Total)
+ if left <= 0 {
+ return comm.NewCustomError(pb.ErrorCode_SmithyCustomerLimit)
+ }
+
+ cus.CustomerIds = append(cus.CustomerIds, s.getCustomerRandom())
+ cus.LastRefreshTime = configure.Now().Unix()
+ update := map[string]interface{}{
+ "customerIds": cus.CustomerIds,
+ "total": cus.Total,
+ "lastRefreshTime": cus.LastRefreshTime,
+ }
+ if err := s.Change(uid, update); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+//顾客类型策略
+
+//交易
diff --git a/modules/smithy/module.go b/modules/smithy/module.go
index 319c74782..a1b888948 100644
--- a/modules/smithy/module.go
+++ b/modules/smithy/module.go
@@ -18,6 +18,7 @@ type Smithy struct {
modelTrade *modelTrade
api *apiComp
configure *configureComp
+ modelStove *modelStove
}
func NewModule() core.IModule {
@@ -40,6 +41,7 @@ func (this *Smithy) OnInstallComp() {
this.modelSmithy = this.RegisterComp(new(modelSmithy)).(*modelSmithy)
this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
this.modelTrade = this.RegisterComp(new(modelTrade)).(*modelTrade)
+ this.modelStove = this.RegisterComp(new(modelStove)).(*modelStove)
}
// 接口信息
diff --git a/pb/errorcode.pb.go b/pb/errorcode.pb.go
index 85d31b146..6f7c40d1d 100644
--- a/pb/errorcode.pb.go
+++ b/pb/errorcode.pb.go
@@ -315,6 +315,11 @@ const (
// AutoBattle
ErrorCode_AutoBattleNoData ErrorCode = 4001 //没有正在自动战斗的数据
ErrorCode_AutoBattleStatesErr ErrorCode = 4002 // 自动战斗状态错误
+ // smithy
+ ErrorCode_SmithyNoReel ErrorCode = 4101 // 没有激活图纸信息
+ ErrorCode_SmithyNoTemperature ErrorCode = 4102 // 炉温不够不能打造
+ ErrorCode_SmithyStoveMaxLv ErrorCode = 4103 // 炉子达到最大等级
+ ErrorCode_SmithyCustomerLimit ErrorCode = 4104 //顾客上限
)
// Enum value maps for ErrorCode.
@@ -581,6 +586,10 @@ var (
3901: "AcademyTaskNoCompleteTask",
4001: "AutoBattleNoData",
4002: "AutoBattleStatesErr",
+ 4101: "SmithyNoReel",
+ 4102: "SmithyNoTemperature",
+ 4103: "SmithyStoveMaxLv",
+ 4104: "SmithyCustomerLimit",
}
ErrorCode_value = map[string]int32{
"Success": 0,
@@ -844,6 +853,10 @@ var (
"AcademyTaskNoCompleteTask": 3901,
"AutoBattleNoData": 4001,
"AutoBattleStatesErr": 4002,
+ "SmithyNoReel": 4101,
+ "SmithyNoTemperature": 4102,
+ "SmithyStoveMaxLv": 4103,
+ "SmithyCustomerLimit": 4104,
}
)
@@ -878,7 +891,7 @@ var File_errorcode_proto protoreflect.FileDescriptor
var file_errorcode_proto_rawDesc = []byte{
0x0a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x2a, 0x92, 0x2f, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
+ 0x6f, 0x2a, 0xf0, 0x2f, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
0x0b, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d,
0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x10, 0x0a, 0x12,
0x1b, 0x0a, 0x17, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
@@ -1255,8 +1268,14 @@ var file_errorcode_proto_rawDesc = []byte{
0x73, 0x6b, 0x10, 0xbd, 0x1e, 0x12, 0x15, 0x0a, 0x10, 0x41, 0x75, 0x74, 0x6f, 0x42, 0x61, 0x74,
0x74, 0x6c, 0x65, 0x4e, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x10, 0xa1, 0x1f, 0x12, 0x18, 0x0a, 0x13,
0x41, 0x75, 0x74, 0x6f, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73,
- 0x45, 0x72, 0x72, 0x10, 0xa2, 0x1f, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x45, 0x72, 0x72, 0x10, 0xa2, 0x1f, 0x12, 0x11, 0x0a, 0x0c, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79,
+ 0x4e, 0x6f, 0x52, 0x65, 0x65, 0x6c, 0x10, 0x85, 0x20, 0x12, 0x18, 0x0a, 0x13, 0x53, 0x6d, 0x69,
+ 0x74, 0x68, 0x79, 0x4e, 0x6f, 0x54, 0x65, 0x6d, 0x70, 0x65, 0x72, 0x61, 0x74, 0x75, 0x72, 0x65,
+ 0x10, 0x86, 0x20, 0x12, 0x15, 0x0a, 0x10, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x53, 0x74, 0x6f,
+ 0x76, 0x65, 0x4d, 0x61, 0x78, 0x4c, 0x76, 0x10, 0x87, 0x20, 0x12, 0x18, 0x0a, 0x13, 0x53, 0x6d,
+ 0x69, 0x74, 0x68, 0x79, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x4c, 0x69, 0x6d, 0x69,
+ 0x74, 0x10, 0x88, 0x20, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x33,
}
var (
diff --git a/pb/smithy_db.pb.go b/pb/smithy_db.pb.go
index 7ae947142..1d360c4b2 100644
--- a/pb/smithy_db.pb.go
+++ b/pb/smithy_db.pb.go
@@ -20,26 +20,81 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
+type Mastery struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Lv int32 `protobuf:"varint,1,opt,name=lv,proto3" json:"lv"`
+ Value int32 `protobuf:"varint,2,opt,name=value,proto3" json:"value"`
+}
+
+func (x *Mastery) Reset() {
+ *x = Mastery{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_smithy_smithy_db_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Mastery) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Mastery) ProtoMessage() {}
+
+func (x *Mastery) ProtoReflect() protoreflect.Message {
+ mi := &file_smithy_smithy_db_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Mastery.ProtoReflect.Descriptor instead.
+func (*Mastery) Descriptor() ([]byte, []int) {
+ return file_smithy_smithy_db_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *Mastery) GetLv() int32 {
+ if x != nil {
+ return x.Lv
+ }
+ return 0
+}
+
+func (x *Mastery) GetValue() int32 {
+ if x != nil {
+ return x.Value
+ }
+ return 0
+}
+
// 炉子信息
type DBStove struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- 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
- Lv int32 `protobuf:"varint,3,opt,name=lv,proto3" json:"lv"` // 炉子等级
- Data map[int32]int32 `protobuf:"bytes,4,rep,name=data,proto3" json:"data" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // key 套装类型 value 熟练度
- Skill map[int32]int32 `protobuf:"bytes,5,rep,name=skill,proto3" json:"skill" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 台子技能
- Forge map[int32]int32 `protobuf:"bytes,6,rep,name=forge,proto3" json:"forge" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // key 套装类型 value 打造次数
- Temperature int32 `protobuf:"varint,7,opt,name=temperature,proto3" json:"temperature"` // 炉子温度
- RecoveTime int64 `protobuf:"varint,8,opt,name=recoveTime,proto3" json:"recoveTime"` // 恢复满时间
+ 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
+ Lv int32 `protobuf:"varint,3,opt,name=lv,proto3" json:"lv"` // 炉子等级
+ Data map[int32]*Mastery `protobuf:"bytes,4,rep,name=data,proto3" json:"data" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // key 图纸ID value 熟练度
+ Skill map[int32]int32 `protobuf:"bytes,5,rep,name=skill,proto3" json:"skill" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 台子技能
+ Forge map[int32]int32 `protobuf:"bytes,6,rep,name=forge,proto3" json:"forge" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // key 套装类型 value 打造次数
+ Temperature int32 `protobuf:"varint,7,opt,name=temperature,proto3" json:"temperature"` // 炉子温度
+ RecoveTime int64 `protobuf:"varint,8,opt,name=recoveTime,proto3" json:"recoveTime"` // 恢复满时间
}
func (x *DBStove) Reset() {
*x = DBStove{}
if protoimpl.UnsafeEnabled {
- mi := &file_smithy_smithy_db_proto_msgTypes[0]
+ mi := &file_smithy_smithy_db_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -52,7 +107,7 @@ func (x *DBStove) String() string {
func (*DBStove) ProtoMessage() {}
func (x *DBStove) ProtoReflect() protoreflect.Message {
- mi := &file_smithy_smithy_db_proto_msgTypes[0]
+ mi := &file_smithy_smithy_db_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -65,7 +120,7 @@ func (x *DBStove) ProtoReflect() protoreflect.Message {
// Deprecated: Use DBStove.ProtoReflect.Descriptor instead.
func (*DBStove) Descriptor() ([]byte, []int) {
- return file_smithy_smithy_db_proto_rawDescGZIP(), []int{0}
+ return file_smithy_smithy_db_proto_rawDescGZIP(), []int{1}
}
func (x *DBStove) GetId() string {
@@ -89,7 +144,7 @@ func (x *DBStove) GetLv() int32 {
return 0
}
-func (x *DBStove) GetData() map[int32]int32 {
+func (x *DBStove) GetData() map[int32]*Mastery {
if x != nil {
return x.Data
}
@@ -124,68 +179,20 @@ func (x *DBStove) GetRecoveTime() int64 {
return 0
}
-// 商人信息
-type DBBusiness struct {
+type DBCustomer struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Shop map[int32]int32 `protobuf:"bytes,1,rep,name=shop,proto3" json:"shop" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
+ 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"` //
+ CustomerIds []int32 `protobuf:"varint,3,rep,packed,name=customerIds,proto3" json:"customerIds" bson:"customerIds"` // 顾客Ids
+ Total int32 `protobuf:"varint,4,opt,name=total,proto3" json:"total" bson:"total"` //顾客累计数
+ LastRefreshTime int64 `protobuf:"varint,5,opt,name=lastRefreshTime,proto3" json:"lastRefreshTime" bson:"lastRefreshTime"` // 上次更新时间
}
-func (x *DBBusiness) Reset() {
- *x = DBBusiness{}
- if protoimpl.UnsafeEnabled {
- mi := &file_smithy_smithy_db_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *DBBusiness) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*DBBusiness) ProtoMessage() {}
-
-func (x *DBBusiness) ProtoReflect() protoreflect.Message {
- mi := &file_smithy_smithy_db_proto_msgTypes[1]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use DBBusiness.ProtoReflect.Descriptor instead.
-func (*DBBusiness) Descriptor() ([]byte, []int) {
- return file_smithy_smithy_db_proto_rawDescGZIP(), []int{1}
-}
-
-func (x *DBBusiness) GetShop() map[int32]int32 {
- if x != nil {
- return x.Shop
- }
- return nil
-}
-
-type DBBusinessData struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- 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
- Data []*DBBusiness `protobuf:"bytes,3,rep,name=data,proto3" json:"data"`
- Count int32 `protobuf:"varint,4,opt,name=count,proto3" json:"count"` // 刷新次数
- RefreshTime int64 `protobuf:"varint,5,opt,name=refreshTime,proto3" json:"refreshTime" bson:"refreshTime"` //刷新开始时间
-}
-
-func (x *DBBusinessData) Reset() {
- *x = DBBusinessData{}
+func (x *DBCustomer) Reset() {
+ *x = DBCustomer{}
if protoimpl.UnsafeEnabled {
mi := &file_smithy_smithy_db_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -193,13 +200,13 @@ func (x *DBBusinessData) Reset() {
}
}
-func (x *DBBusinessData) String() string {
+func (x *DBCustomer) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*DBBusinessData) ProtoMessage() {}
+func (*DBCustomer) ProtoMessage() {}
-func (x *DBBusinessData) ProtoReflect() protoreflect.Message {
+func (x *DBCustomer) ProtoReflect() protoreflect.Message {
mi := &file_smithy_smithy_db_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -211,42 +218,42 @@ func (x *DBBusinessData) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use DBBusinessData.ProtoReflect.Descriptor instead.
-func (*DBBusinessData) Descriptor() ([]byte, []int) {
+// Deprecated: Use DBCustomer.ProtoReflect.Descriptor instead.
+func (*DBCustomer) Descriptor() ([]byte, []int) {
return file_smithy_smithy_db_proto_rawDescGZIP(), []int{2}
}
-func (x *DBBusinessData) GetId() string {
+func (x *DBCustomer) GetId() string {
if x != nil {
return x.Id
}
return ""
}
-func (x *DBBusinessData) GetUid() string {
+func (x *DBCustomer) GetUid() string {
if x != nil {
return x.Uid
}
return ""
}
-func (x *DBBusinessData) GetData() []*DBBusiness {
+func (x *DBCustomer) GetCustomerIds() []int32 {
if x != nil {
- return x.Data
+ return x.CustomerIds
}
return nil
}
-func (x *DBBusinessData) GetCount() int32 {
+func (x *DBCustomer) GetTotal() int32 {
if x != nil {
- return x.Count
+ return x.Total
}
return 0
}
-func (x *DBBusinessData) GetRefreshTime() int64 {
+func (x *DBCustomer) GetLastRefreshTime() int64 {
if x != nil {
- return x.RefreshTime
+ return x.LastRefreshTime
}
return 0
}
@@ -653,111 +660,108 @@ var File_smithy_smithy_db_proto protoreflect.FileDescriptor
var file_smithy_smithy_db_proto_rawDesc = []byte{
0x0a, 0x16, 0x73, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x2f, 0x73, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x5f,
0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa8, 0x03, 0x0a, 0x07, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x76, 0x65,
- 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64,
- 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75,
- 0x69, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02,
- 0x6c, 0x76, 0x12, 0x26, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b,
- 0x32, 0x12, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x76, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45,
- 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x29, 0x0a, 0x05, 0x73, 0x6b,
- 0x69, 0x6c, 0x6c, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x44, 0x42, 0x53, 0x74,
- 0x6f, 0x76, 0x65, 0x2e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05,
- 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x12, 0x29, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x67, 0x65, 0x18, 0x06,
- 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x76, 0x65, 0x2e, 0x46,
- 0x6f, 0x72, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x67, 0x65,
- 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x65, 0x6d, 0x70, 0x65, 0x72, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18,
- 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x74, 0x65, 0x6d, 0x70, 0x65, 0x72, 0x61, 0x74, 0x75,
- 0x72, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65,
- 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x54, 0x69,
- 0x6d, 0x65, 0x1a, 0x37, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12,
- 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 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, 0x38, 0x0a, 0x0a, 0x53,
+ 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2f, 0x0a, 0x07, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x79, 0x12,
+ 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12,
+ 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05,
+ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xb2, 0x03, 0x0a, 0x07, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x76,
+ 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
+ 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
+ 0x75, 0x69, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52,
+ 0x02, 0x6c, 0x76, 0x12, 0x26, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, 0x28,
+ 0x0b, 0x32, 0x12, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x76, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x61,
+ 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x29, 0x0a, 0x05, 0x73,
+ 0x6b, 0x69, 0x6c, 0x6c, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x44, 0x42, 0x53,
+ 0x74, 0x6f, 0x76, 0x65, 0x2e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
+ 0x05, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x12, 0x29, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x67, 0x65, 0x18,
+ 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x76, 0x65, 0x2e,
+ 0x46, 0x6f, 0x72, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x67,
+ 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x65, 0x6d, 0x70, 0x65, 0x72, 0x61, 0x74, 0x75, 0x72, 0x65,
+ 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x74, 0x65, 0x6d, 0x70, 0x65, 0x72, 0x61, 0x74,
+ 0x75, 0x72, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x54, 0x69, 0x6d,
+ 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x54,
+ 0x69, 0x6d, 0x65, 0x1a, 0x41, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79,
+ 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b,
+ 0x65, 0x79, 0x12, 0x1e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x08, 0x2e, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c,
+ 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x38, 0x0a, 0x0a, 0x53, 0x6b, 0x69, 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, 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, 0x38, 0x0a, 0x0a, 0x46, 0x6f, 0x72, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
+ 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 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, 0x22, 0x90, 0x01, 0x0a, 0x0a, 0x44,
+ 0x42, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x63,
+ 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05,
+ 0x52, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x14, 0x0a,
+ 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f,
+ 0x74, 0x61, 0x6c, 0x12, 0x28, 0x0a, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x52, 0x65, 0x66, 0x72, 0x65,
+ 0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x6c, 0x61,
+ 0x73, 0x74, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xba, 0x01,
+ 0x0a, 0x08, 0x44, 0x42, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69,
+ 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2d, 0x0a, 0x06,
+ 0x74, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44,
+ 0x42, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x2e, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x45, 0x6e,
+ 0x74, 0x72, 0x79, 0x52, 0x06, 0x74, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73,
+ 0x6c, 0x69, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x6c, 0x69,
+ 0x64, 0x65, 0x72, 0x1a, 0x45, 0x0a, 0x0b, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x45, 0x6e, 0x74,
+ 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
+ 0x03, 0x6b, 0x65, 0x79, 0x12, 0x20, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x46, 0x6f, 0x72, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52,
+ 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x55, 0x0a, 0x09, 0x46, 0x6f,
+ 0x72, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x6f, 0x72, 0x67, 0x65,
+ 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x66, 0x6f, 0x72,
+ 0x67, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x18, 0x0a, 0x07, 0x71, 0x75, 0x61, 0x6c, 0x69,
+ 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x74,
+ 0x79, 0x22, 0x4f, 0x0a, 0x05, 0x43, 0x6c, 0x61, 0x6e, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65,
+ 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x65,
+ 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05,
+ 0x73, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x54, 0x69,
+ 0x6d, 0x65, 0x22, 0x5a, 0x0a, 0x0a, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x6e, 0x67,
+ 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x05, 0x52, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05,
+ 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75,
+ 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x65, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03,
+ 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6e, 0x65, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x82,
+ 0x04, 0x0a, 0x08, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69,
+ 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75,
+ 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a,
+ 0x05, 0x63, 0x6c, 0x61, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x43,
+ 0x6c, 0x61, 0x6e, 0x67, 0x52, 0x05, 0x63, 0x6c, 0x61, 0x6e, 0x67, 0x12, 0x23, 0x0a, 0x06, 0x6f,
+ 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x4f, 0x72,
+ 0x64, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x6e, 0x67, 0x52, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73,
+ 0x12, 0x21, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x69, 0x74,
+ 0x65, 0x6d, 0x73, 0x12, 0x2a, 0x0a, 0x05, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x18, 0x06, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x2e, 0x53, 0x6b,
+ 0x69, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x12,
+ 0x18, 0x0a, 0x07, 0x73, 0x74, 0x6f, 0x76, 0x65, 0x4c, 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05,
+ 0x52, 0x07, 0x73, 0x74, 0x6f, 0x76, 0x65, 0x4c, 0x76, 0x12, 0x24, 0x0a, 0x0d, 0x6f, 0x72, 0x64,
+ 0x65, 0x72, 0x43, 0x6f, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05,
+ 0x52, 0x0d, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12,
+ 0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05,
+ 0x63, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, 0x73, 0x6b, 0x46, 0x6c, 0x6f,
+ 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69,
+ 0x74, 0x68, 0x79, 0x2e, 0x44, 0x65, 0x73, 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x45, 0x6e, 0x74,
+ 0x72, 0x79, 0x52, 0x09, 0x64, 0x65, 0x73, 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x12, 0x1e, 0x0a,
+ 0x0a, 0x73, 0x74, 0x6f, 0x76, 0x65, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28,
+ 0x05, 0x52, 0x0a, 0x73, 0x74, 0x6f, 0x76, 0x65, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x12, 0x1c, 0x0a,
+ 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05,
+ 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x1a, 0x38, 0x0a, 0x0a, 0x53,
0x6b, 0x69, 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, 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, 0x38, 0x0a, 0x0a, 0x46, 0x6f, 0x72, 0x67, 0x65, 0x45, 0x6e,
- 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
- 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, 0x22,
- 0x70, 0x0a, 0x0a, 0x44, 0x42, 0x42, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x12, 0x29, 0x0a,
- 0x04, 0x73, 0x68, 0x6f, 0x70, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42,
- 0x42, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x2e, 0x53, 0x68, 0x6f, 0x70, 0x45, 0x6e, 0x74,
- 0x72, 0x79, 0x52, 0x04, 0x73, 0x68, 0x6f, 0x70, 0x1a, 0x37, 0x0a, 0x09, 0x53, 0x68, 0x6f, 0x70,
- 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x05, 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, 0x22, 0x8b, 0x01, 0x0a, 0x0e, 0x44, 0x42, 0x42, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73,
- 0x44, 0x61, 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03,
- 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x42, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73,
- 0x73, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74,
- 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x20, 0x0a,
- 0x0b, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01,
- 0x28, 0x03, 0x52, 0x0b, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x22,
- 0xba, 0x01, 0x0a, 0x08, 0x44, 0x42, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x12, 0x0e, 0x0a, 0x02,
- 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03,
- 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2d,
- 0x0a, 0x06, 0x74, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15,
- 0x2e, 0x44, 0x42, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x2e, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e,
- 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x74, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x12, 0x16, 0x0a,
- 0x06, 0x73, 0x6c, 0x69, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73,
- 0x6c, 0x69, 0x64, 0x65, 0x72, 0x1a, 0x45, 0x0a, 0x0b, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x45,
- 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x20, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
- 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x46, 0x6f, 0x72, 0x67, 0x65, 0x44, 0x61, 0x74,
- 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x55, 0x0a, 0x09,
- 0x46, 0x6f, 0x72, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x6f, 0x72,
- 0x67, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x66,
- 0x6f, 0x72, 0x67, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18,
- 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x18, 0x0a, 0x07, 0x71, 0x75, 0x61,
- 0x6c, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x71, 0x75, 0x61, 0x6c,
- 0x69, 0x74, 0x79, 0x22, 0x4f, 0x0a, 0x05, 0x43, 0x6c, 0x61, 0x6e, 0x67, 0x12, 0x1a, 0x0a, 0x08,
- 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08,
- 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x54, 0x69, 0x6d,
- 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14,
- 0x0a, 0x05, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73,
- 0x54, 0x69, 0x6d, 0x65, 0x22, 0x5a, 0x0a, 0x0a, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6c, 0x61,
- 0x6e, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14,
- 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63,
- 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x65, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65,
- 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6e, 0x65, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65,
- 0x22, 0x82, 0x04, 0x0a, 0x08, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x12, 0x0e, 0x0a,
- 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a,
- 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12,
- 0x1c, 0x0a, 0x05, 0x63, 0x6c, 0x61, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06,
- 0x2e, 0x43, 0x6c, 0x61, 0x6e, 0x67, 0x52, 0x05, 0x63, 0x6c, 0x61, 0x6e, 0x67, 0x12, 0x23, 0x0a,
- 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e,
- 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x6e, 0x67, 0x52, 0x06, 0x6f, 0x72, 0x64, 0x65,
- 0x72, 0x73, 0x12, 0x21, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28,
- 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05,
- 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x2a, 0x0a, 0x05, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x18, 0x06,
- 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x2e,
- 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x73, 0x6b, 0x69, 0x6c,
- 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x6f, 0x76, 0x65, 0x4c, 0x76, 0x18, 0x07, 0x20, 0x01,
- 0x28, 0x05, 0x52, 0x07, 0x73, 0x74, 0x6f, 0x76, 0x65, 0x4c, 0x76, 0x12, 0x24, 0x0a, 0x0d, 0x6f,
- 0x72, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01,
- 0x28, 0x05, 0x52, 0x0d, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x73, 0x74, 0x54, 0x69, 0x6d,
- 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03,
- 0x52, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, 0x73, 0x6b, 0x46,
- 0x6c, 0x6f, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x44, 0x42, 0x53,
- 0x6d, 0x69, 0x74, 0x68, 0x79, 0x2e, 0x44, 0x65, 0x73, 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x45,
- 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x64, 0x65, 0x73, 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x12,
- 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x6f, 0x76, 0x65, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x18, 0x0b, 0x20,
- 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x74, 0x6f, 0x76, 0x65, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x12,
- 0x1c, 0x0a, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01,
- 0x28, 0x05, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x1a, 0x38, 0x0a,
- 0x0a, 0x53, 0x6b, 0x69, 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, 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, 0x3c, 0x0a, 0x0e, 0x44, 0x65, 0x73, 0x6b, 0x46,
- 0x6c, 0x6f, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 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, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3c, 0x0a, 0x0e, 0x44, 0x65, 0x73, 0x6b, 0x46, 0x6c, 0x6f,
+ 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x05, 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, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x33,
}
var (
@@ -772,43 +776,41 @@ func file_smithy_smithy_db_proto_rawDescGZIP() []byte {
return file_smithy_smithy_db_proto_rawDescData
}
-var file_smithy_smithy_db_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
+var file_smithy_smithy_db_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
var file_smithy_smithy_db_proto_goTypes = []interface{}{
- (*DBStove)(nil), // 0: DBStove
- (*DBBusiness)(nil), // 1: DBBusiness
- (*DBBusinessData)(nil), // 2: DBBusinessData
- (*DBTujian)(nil), // 3: DBTujian
- (*ForgeData)(nil), // 4: ForgeData
- (*Clang)(nil), // 5: Clang
- (*OrderClang)(nil), // 6: OrderClang
- (*DBSmithy)(nil), // 7: DBSmithy
- nil, // 8: DBStove.DataEntry
- nil, // 9: DBStove.SkillEntry
- nil, // 10: DBStove.ForgeEntry
- nil, // 11: DBBusiness.ShopEntry
- nil, // 12: DBTujian.TujianEntry
- nil, // 13: DBSmithy.SkillEntry
- nil, // 14: DBSmithy.DeskFloorEntry
- (*UserAssets)(nil), // 15: UserAssets
+ (*Mastery)(nil), // 0: Mastery
+ (*DBStove)(nil), // 1: DBStove
+ (*DBCustomer)(nil), // 2: DBCustomer
+ (*DBTujian)(nil), // 3: DBTujian
+ (*ForgeData)(nil), // 4: ForgeData
+ (*Clang)(nil), // 5: Clang
+ (*OrderClang)(nil), // 6: OrderClang
+ (*DBSmithy)(nil), // 7: DBSmithy
+ nil, // 8: DBStove.DataEntry
+ nil, // 9: DBStove.SkillEntry
+ nil, // 10: DBStove.ForgeEntry
+ nil, // 11: DBTujian.TujianEntry
+ nil, // 12: DBSmithy.SkillEntry
+ nil, // 13: DBSmithy.DeskFloorEntry
+ (*UserAssets)(nil), // 14: UserAssets
}
var file_smithy_smithy_db_proto_depIdxs = []int32{
8, // 0: DBStove.data:type_name -> DBStove.DataEntry
9, // 1: DBStove.skill:type_name -> DBStove.SkillEntry
10, // 2: DBStove.forge:type_name -> DBStove.ForgeEntry
- 11, // 3: DBBusiness.shop:type_name -> DBBusiness.ShopEntry
- 1, // 4: DBBusinessData.data:type_name -> DBBusiness
- 12, // 5: DBTujian.tujian:type_name -> DBTujian.TujianEntry
- 5, // 6: DBSmithy.clang:type_name -> Clang
- 6, // 7: DBSmithy.orders:type_name -> OrderClang
- 15, // 8: DBSmithy.items:type_name -> UserAssets
- 13, // 9: DBSmithy.skill:type_name -> DBSmithy.SkillEntry
- 14, // 10: DBSmithy.deskFloor:type_name -> DBSmithy.DeskFloorEntry
- 4, // 11: DBTujian.TujianEntry.value:type_name -> ForgeData
- 12, // [12:12] is the sub-list for method output_type
- 12, // [12:12] is the sub-list for method input_type
- 12, // [12:12] is the sub-list for extension type_name
- 12, // [12:12] is the sub-list for extension extendee
- 0, // [0:12] is the sub-list for field type_name
+ 11, // 3: DBTujian.tujian:type_name -> DBTujian.TujianEntry
+ 5, // 4: DBSmithy.clang:type_name -> Clang
+ 6, // 5: DBSmithy.orders:type_name -> OrderClang
+ 14, // 6: DBSmithy.items:type_name -> UserAssets
+ 12, // 7: DBSmithy.skill:type_name -> DBSmithy.SkillEntry
+ 13, // 8: DBSmithy.deskFloor:type_name -> DBSmithy.DeskFloorEntry
+ 0, // 9: DBStove.DataEntry.value:type_name -> Mastery
+ 4, // 10: DBTujian.TujianEntry.value:type_name -> ForgeData
+ 11, // [11:11] is the sub-list for method output_type
+ 11, // [11:11] is the sub-list for method input_type
+ 11, // [11:11] is the sub-list for extension 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_smithy_smithy_db_proto_init() }
@@ -819,7 +821,7 @@ func file_smithy_smithy_db_proto_init() {
file_comm_proto_init()
if !protoimpl.UnsafeEnabled {
file_smithy_smithy_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*DBStove); i {
+ switch v := v.(*Mastery); i {
case 0:
return &v.state
case 1:
@@ -831,7 +833,7 @@ func file_smithy_smithy_db_proto_init() {
}
}
file_smithy_smithy_db_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*DBBusiness); i {
+ switch v := v.(*DBStove); i {
case 0:
return &v.state
case 1:
@@ -843,7 +845,7 @@ func file_smithy_smithy_db_proto_init() {
}
}
file_smithy_smithy_db_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*DBBusinessData); i {
+ switch v := v.(*DBCustomer); i {
case 0:
return &v.state
case 1:
@@ -921,7 +923,7 @@ func file_smithy_smithy_db_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_smithy_smithy_db_proto_rawDesc,
NumEnums: 0,
- NumMessages: 15,
+ NumMessages: 14,
NumExtensions: 0,
NumServices: 0,
},
diff --git a/pb/smithy_msg.pb.go b/pb/smithy_msg.pb.go
index 0fbe0ff3e..b91728ce2 100644
--- a/pb/smithy_msg.pb.go
+++ b/pb/smithy_msg.pb.go
@@ -112,9 +112,9 @@ type SmithyForgeEquipReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- EquipType int32 `protobuf:"varint,1,opt,name=equipType,proto3" json:"equipType"` // 装备类型
- Lava int32 `protobuf:"varint,2,opt,name=lava,proto3" json:"lava"` // 添加熔岩
- Quality int32 `protobuf:"varint,3,opt,name=quality,proto3" json:"quality"` // 精益制造
+ ReelId int32 `protobuf:"varint,1,opt,name=reelId,proto3" json:"reelId"` // 卷轴ID
+ Lava int32 `protobuf:"varint,2,opt,name=lava,proto3" json:"lava"` // 添加熔岩
+ Quality int32 `protobuf:"varint,3,opt,name=quality,proto3" json:"quality"` // 精益制造
}
func (x *SmithyForgeEquipReq) Reset() {
@@ -149,9 +149,9 @@ func (*SmithyForgeEquipReq) Descriptor() ([]byte, []int) {
return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{2}
}
-func (x *SmithyForgeEquipReq) GetEquipType() int32 {
+func (x *SmithyForgeEquipReq) GetReelId() int32 {
if x != nil {
- return x.EquipType
+ return x.ReelId
}
return 0
}
@@ -637,14 +637,14 @@ func (x *SmithyToolsUpResp) GetData() *DBStove {
}
// 刷新商人
-type SmithyRefreshShopReq struct {
+type SmithyCustomerReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
-func (x *SmithyRefreshShopReq) Reset() {
- *x = SmithyRefreshShopReq{}
+func (x *SmithyCustomerReq) Reset() {
+ *x = SmithyCustomerReq{}
if protoimpl.UnsafeEnabled {
mi := &file_smithy_smithy_msg_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -652,13 +652,13 @@ func (x *SmithyRefreshShopReq) Reset() {
}
}
-func (x *SmithyRefreshShopReq) String() string {
+func (x *SmithyCustomerReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*SmithyRefreshShopReq) ProtoMessage() {}
+func (*SmithyCustomerReq) ProtoMessage() {}
-func (x *SmithyRefreshShopReq) ProtoReflect() protoreflect.Message {
+func (x *SmithyCustomerReq) ProtoReflect() protoreflect.Message {
mi := &file_smithy_smithy_msg_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -670,21 +670,21 @@ func (x *SmithyRefreshShopReq) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use SmithyRefreshShopReq.ProtoReflect.Descriptor instead.
-func (*SmithyRefreshShopReq) Descriptor() ([]byte, []int) {
+// Deprecated: Use SmithyCustomerReq.ProtoReflect.Descriptor instead.
+func (*SmithyCustomerReq) Descriptor() ([]byte, []int) {
return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{12}
}
-type SmithyRefreshShopResp struct {
+type SmithyCustomerResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Data *DBBusiness `protobuf:"bytes,1,opt,name=data,proto3" json:"data"`
+ CustomerIds []int32 `protobuf:"varint,1,rep,packed,name=customerIds,proto3" json:"customerIds"` //顾客
}
-func (x *SmithyRefreshShopResp) Reset() {
- *x = SmithyRefreshShopResp{}
+func (x *SmithyCustomerResp) Reset() {
+ *x = SmithyCustomerResp{}
if protoimpl.UnsafeEnabled {
mi := &file_smithy_smithy_msg_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -692,13 +692,13 @@ func (x *SmithyRefreshShopResp) Reset() {
}
}
-func (x *SmithyRefreshShopResp) String() string {
+func (x *SmithyCustomerResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*SmithyRefreshShopResp) ProtoMessage() {}
+func (*SmithyCustomerResp) ProtoMessage() {}
-func (x *SmithyRefreshShopResp) ProtoReflect() protoreflect.Message {
+func (x *SmithyCustomerResp) ProtoReflect() protoreflect.Message {
mi := &file_smithy_smithy_msg_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -710,30 +710,30 @@ func (x *SmithyRefreshShopResp) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use SmithyRefreshShopResp.ProtoReflect.Descriptor instead.
-func (*SmithyRefreshShopResp) Descriptor() ([]byte, []int) {
+// Deprecated: Use SmithyCustomerResp.ProtoReflect.Descriptor instead.
+func (*SmithyCustomerResp) Descriptor() ([]byte, []int) {
return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{13}
}
-func (x *SmithyRefreshShopResp) GetData() *DBBusiness {
+func (x *SmithyCustomerResp) GetCustomerIds() []int32 {
if x != nil {
- return x.Data
+ return x.CustomerIds
}
return nil
}
// 出售装备
-type SmithySellItemReq struct {
+type SmithySellReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"` // 装备ID
- Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count"` // 数量
+ Ids []int32 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids"` // 装备ID
+ CustomerId int32 `protobuf:"varint,2,opt,name=customerId,proto3" json:"customerId"` //顾客ID
}
-func (x *SmithySellItemReq) Reset() {
- *x = SmithySellItemReq{}
+func (x *SmithySellReq) Reset() {
+ *x = SmithySellReq{}
if protoimpl.UnsafeEnabled {
mi := &file_smithy_smithy_msg_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -741,13 +741,13 @@ func (x *SmithySellItemReq) Reset() {
}
}
-func (x *SmithySellItemReq) String() string {
+func (x *SmithySellReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*SmithySellItemReq) ProtoMessage() {}
+func (*SmithySellReq) ProtoMessage() {}
-func (x *SmithySellItemReq) ProtoReflect() protoreflect.Message {
+func (x *SmithySellReq) ProtoReflect() protoreflect.Message {
mi := &file_smithy_smithy_msg_proto_msgTypes[14]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -759,35 +759,36 @@ func (x *SmithySellItemReq) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use SmithySellItemReq.ProtoReflect.Descriptor instead.
-func (*SmithySellItemReq) Descriptor() ([]byte, []int) {
+// Deprecated: Use SmithySellReq.ProtoReflect.Descriptor instead.
+func (*SmithySellReq) Descriptor() ([]byte, []int) {
return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{14}
}
-func (x *SmithySellItemReq) GetId() int32 {
+func (x *SmithySellReq) GetIds() []int32 {
if x != nil {
- return x.Id
+ return x.Ids
+ }
+ return nil
+}
+
+func (x *SmithySellReq) GetCustomerId() int32 {
+ if x != nil {
+ return x.CustomerId
}
return 0
}
-func (x *SmithySellItemReq) GetCount() int32 {
- if x != nil {
- return x.Count
- }
- return 0
-}
-
-type SmithySellItemResp struct {
+type SmithySellResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Data *DBBusiness `protobuf:"bytes,1,opt,name=data,proto3" json:"data"`
+ CustomerId int32 `protobuf:"varint,1,opt,name=customerId,proto3" json:"customerId"` //顾客ID
+ Ids []int32 `protobuf:"varint,2,rep,packed,name=ids,proto3" json:"ids"` //出售的装备
}
-func (x *SmithySellItemResp) Reset() {
- *x = SmithySellItemResp{}
+func (x *SmithySellResp) Reset() {
+ *x = SmithySellResp{}
if protoimpl.UnsafeEnabled {
mi := &file_smithy_smithy_msg_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -795,13 +796,13 @@ func (x *SmithySellItemResp) Reset() {
}
}
-func (x *SmithySellItemResp) String() string {
+func (x *SmithySellResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*SmithySellItemResp) ProtoMessage() {}
+func (*SmithySellResp) ProtoMessage() {}
-func (x *SmithySellItemResp) ProtoReflect() protoreflect.Message {
+func (x *SmithySellResp) ProtoReflect() protoreflect.Message {
mi := &file_smithy_smithy_msg_proto_msgTypes[15]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -813,14 +814,21 @@ func (x *SmithySellItemResp) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use SmithySellItemResp.ProtoReflect.Descriptor instead.
-func (*SmithySellItemResp) Descriptor() ([]byte, []int) {
+// Deprecated: Use SmithySellResp.ProtoReflect.Descriptor instead.
+func (*SmithySellResp) Descriptor() ([]byte, []int) {
return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{15}
}
-func (x *SmithySellItemResp) GetData() *DBBusiness {
+func (x *SmithySellResp) GetCustomerId() int32 {
if x != nil {
- return x.Data
+ return x.CustomerId
+ }
+ return 0
+}
+
+func (x *SmithySellResp) GetIds() []int32 {
+ if x != nil {
+ return x.Ids
}
return nil
}
@@ -1380,95 +1388,96 @@ var file_smithy_smithy_msg_proto_rawDesc = []byte{
0x0a, 0x16, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x76, 0x65,
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x76, 0x65,
- 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x61, 0x0a, 0x13, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79,
- 0x46, 0x6f, 0x72, 0x67, 0x65, 0x45, 0x71, 0x75, 0x69, 0x70, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a,
- 0x09, 0x65, 0x71, 0x75, 0x69, 0x70, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
- 0x52, 0x09, 0x65, 0x71, 0x75, 0x69, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c,
- 0x61, 0x76, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x6c, 0x61, 0x76, 0x61, 0x12,
- 0x18, 0x0a, 0x07, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05,
- 0x52, 0x07, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x22, 0x4a, 0x0a, 0x14, 0x53, 0x6d, 0x69,
- 0x74, 0x68, 0x79, 0x46, 0x6f, 0x72, 0x67, 0x65, 0x45, 0x71, 0x75, 0x69, 0x70, 0x52, 0x65, 0x73,
- 0x70, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x71, 0x75, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
- 0x52, 0x05, 0x65, 0x71, 0x75, 0x69, 0x70, 0x12, 0x1c, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18,
- 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x76, 0x65, 0x52,
- 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x79, 0x0a, 0x13, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x4f,
- 0x72, 0x64, 0x65, 0x72, 0x45, 0x71, 0x75, 0x69, 0x70, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07,
- 0x73, 0x75, 0x69, 0x74, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73,
- 0x75, 0x69, 0x74, 0x65, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69,
- 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69,
- 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x61, 0x76, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05,
- 0x52, 0x04, 0x6c, 0x61, 0x76, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x74,
- 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79,
- 0x22, 0x4a, 0x0a, 0x14, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x45,
- 0x71, 0x75, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x71, 0x75, 0x69,
- 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x65, 0x71, 0x75, 0x69, 0x70, 0x12, 0x1c,
- 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x44,
- 0x42, 0x53, 0x74, 0x6f, 0x76, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x12, 0x0a, 0x10,
- 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x53, 0x74, 0x6f, 0x76, 0x65, 0x55, 0x70, 0x52, 0x65, 0x71,
- 0x22, 0x31, 0x0a, 0x11, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x53, 0x74, 0x6f, 0x76, 0x65, 0x55,
+ 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x5b, 0x0a, 0x13, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79,
+ 0x46, 0x6f, 0x72, 0x67, 0x65, 0x45, 0x71, 0x75, 0x69, 0x70, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a,
+ 0x06, 0x72, 0x65, 0x65, 0x6c, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72,
+ 0x65, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x61, 0x76, 0x61, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x05, 0x52, 0x04, 0x6c, 0x61, 0x76, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x71, 0x75, 0x61,
+ 0x6c, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x71, 0x75, 0x61, 0x6c,
+ 0x69, 0x74, 0x79, 0x22, 0x4a, 0x0a, 0x14, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x46, 0x6f, 0x72,
+ 0x67, 0x65, 0x45, 0x71, 0x75, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x65,
+ 0x71, 0x75, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x65, 0x71, 0x75, 0x69,
+ 0x70, 0x12, 0x1c, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x08, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x76, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22,
+ 0x79, 0x0a, 0x13, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x45, 0x71,
+ 0x75, 0x69, 0x70, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x69, 0x74, 0x65, 0x49,
+ 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x75, 0x69, 0x74, 0x65, 0x49, 0x64,
+ 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x05, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04,
+ 0x6c, 0x61, 0x76, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x6c, 0x61, 0x76, 0x61,
+ 0x12, 0x18, 0x0a, 0x07, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28,
+ 0x05, 0x52, 0x07, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x22, 0x4a, 0x0a, 0x14, 0x53, 0x6d,
+ 0x69, 0x74, 0x68, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x45, 0x71, 0x75, 0x69, 0x70, 0x52, 0x65,
+ 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x71, 0x75, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x05, 0x52, 0x05, 0x65, 0x71, 0x75, 0x69, 0x70, 0x12, 0x1c, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x76, 0x65,
+ 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x12, 0x0a, 0x10, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79,
+ 0x53, 0x74, 0x6f, 0x76, 0x65, 0x55, 0x70, 0x52, 0x65, 0x71, 0x22, 0x31, 0x0a, 0x11, 0x53, 0x6d,
+ 0x69, 0x74, 0x68, 0x79, 0x53, 0x74, 0x6f, 0x76, 0x65, 0x55, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12,
+ 0x1c, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e,
+ 0x44, 0x42, 0x53, 0x74, 0x6f, 0x76, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3d, 0x0a,
+ 0x0d, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x52, 0x69, 0x73, 0x65, 0x52, 0x65, 0x71, 0x12, 0x16,
+ 0x0a, 0x06, 0x69, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
+ 0x69, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x2e, 0x0a, 0x0e,
+ 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x52, 0x69, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c,
+ 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x44,
+ 0x42, 0x53, 0x74, 0x6f, 0x76, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x22, 0x0a, 0x10,
+ 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x54, 0x6f, 0x6f, 0x6c, 0x73, 0x55, 0x70, 0x52, 0x65, 0x71,
+ 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64,
+ 0x22, 0x31, 0x0a, 0x11, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x54, 0x6f, 0x6f, 0x6c, 0x73, 0x55,
0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x76, 0x65, 0x52, 0x04, 0x64,
- 0x61, 0x74, 0x61, 0x22, 0x3d, 0x0a, 0x0d, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x52, 0x69, 0x73,
- 0x65, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05,
- 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75,
- 0x6e, 0x74, 0x22, 0x2e, 0x0a, 0x0e, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x52, 0x69, 0x73, 0x65,
- 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x76, 0x65, 0x52, 0x04, 0x64, 0x61,
- 0x74, 0x61, 0x22, 0x22, 0x0a, 0x10, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x54, 0x6f, 0x6f, 0x6c,
- 0x73, 0x55, 0x70, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x22, 0x31, 0x0a, 0x11, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79,
- 0x54, 0x6f, 0x6f, 0x6c, 0x73, 0x55, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x04, 0x64,
- 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x44, 0x42, 0x53, 0x74,
- 0x6f, 0x76, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x16, 0x0a, 0x14, 0x53, 0x6d, 0x69,
- 0x74, 0x68, 0x79, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, 0x68, 0x6f, 0x70, 0x52, 0x65,
- 0x71, 0x22, 0x38, 0x0a, 0x15, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x52, 0x65, 0x66, 0x72, 0x65,
- 0x73, 0x68, 0x53, 0x68, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x64, 0x61,
- 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x42, 0x75, 0x73,
- 0x69, 0x6e, 0x65, 0x73, 0x73, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x39, 0x0a, 0x11, 0x53,
- 0x6d, 0x69, 0x74, 0x68, 0x79, 0x53, 0x65, 0x6c, 0x6c, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x71,
- 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64,
- 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
- 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x35, 0x0a, 0x12, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79,
- 0x53, 0x65, 0x6c, 0x6c, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04,
- 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x42,
- 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x39, 0x0a,
- 0x14, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64,
- 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x21, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x01,
- 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x6e,
- 0x67, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x22, 0x36, 0x0a, 0x15, 0x53, 0x6d, 0x69, 0x74,
- 0x68, 0x79, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73,
- 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x09, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61,
- 0x22, 0x14, 0x0a, 0x12, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77,
- 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x22, 0x34, 0x0a, 0x13, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79,
- 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a,
- 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42,
- 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x32, 0x0a, 0x14,
- 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x44, 0x65, 0x73, 0x6b, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4c,
- 0x76, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65,
- 0x22, 0x36, 0x0a, 0x15, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x44, 0x65, 0x73, 0x6b, 0x53, 0x6b,
- 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74,
- 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74,
- 0x68, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x17, 0x0a, 0x15, 0x53, 0x6d, 0x69, 0x74,
- 0x68, 0x79, 0x53, 0x74, 0x6f, 0x76, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x52, 0x65,
- 0x71, 0x22, 0x37, 0x0a, 0x16, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x53, 0x74, 0x6f, 0x76, 0x65,
- 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64,
+ 0x61, 0x74, 0x61, 0x22, 0x13, 0x0a, 0x11, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x43, 0x75, 0x73,
+ 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x71, 0x22, 0x36, 0x0a, 0x12, 0x53, 0x6d, 0x69, 0x74,
+ 0x68, 0x79, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x20,
+ 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20,
+ 0x03, 0x28, 0x05, 0x52, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49, 0x64, 0x73,
+ 0x22, 0x41, 0x0a, 0x0d, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x53, 0x65, 0x6c, 0x6c, 0x52, 0x65,
+ 0x71, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x03,
+ 0x69, 0x64, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49,
+ 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65,
+ 0x72, 0x49, 0x64, 0x22, 0x42, 0x0a, 0x0e, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x53, 0x65, 0x6c,
+ 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65,
+ 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f,
+ 0x6d, 0x65, 0x72, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03,
+ 0x28, 0x05, 0x52, 0x03, 0x69, 0x64, 0x73, 0x22, 0x39, 0x0a, 0x14, 0x53, 0x6d, 0x69, 0x74, 0x68,
+ 0x79, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12,
+ 0x21, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b,
+ 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x6e, 0x67, 0x52, 0x05, 0x6f, 0x72, 0x64,
+ 0x65, 0x72, 0x22, 0x36, 0x0a, 0x15, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x43, 0x72, 0x65, 0x61,
+ 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64,
0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x53, 0x6d,
- 0x69, 0x74, 0x68, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2e, 0x0a, 0x14, 0x53, 0x6d,
- 0x69, 0x74, 0x68, 0x79, 0x47, 0x65, 0x74, 0x52, 0x61, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52,
- 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x05, 0x52, 0x06, 0x70, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x22, 0x34, 0x0a, 0x15, 0x53, 0x6d,
- 0x69, 0x74, 0x68, 0x79, 0x47, 0x65, 0x74, 0x52, 0x61, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52,
- 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28,
- 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72,
- 0x22, 0x12, 0x0a, 0x10, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73,
- 0x74, 0x52, 0x65, 0x71, 0x22, 0x32, 0x0a, 0x11, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x47, 0x65,
- 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74,
- 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74,
- 0x68, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62,
- 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x69, 0x74, 0x68, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x14, 0x0a, 0x12, 0x53, 0x6d,
+ 0x69, 0x74, 0x68, 0x79, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71,
+ 0x22, 0x34, 0x0a, 0x13, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77,
+ 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79,
+ 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x32, 0x0a, 0x14, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79,
+ 0x44, 0x65, 0x73, 0x6b, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x52, 0x65, 0x71, 0x12, 0x1a,
+ 0x0a, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
+ 0x52, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x22, 0x36, 0x0a, 0x15, 0x53, 0x6d,
+ 0x69, 0x74, 0x68, 0x79, 0x44, 0x65, 0x73, 0x6b, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x52,
+ 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x52, 0x04, 0x64, 0x61,
+ 0x74, 0x61, 0x22, 0x17, 0x0a, 0x15, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x53, 0x74, 0x6f, 0x76,
+ 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x52, 0x65, 0x71, 0x22, 0x37, 0x0a, 0x16, 0x53,
+ 0x6d, 0x69, 0x74, 0x68, 0x79, 0x53, 0x74, 0x6f, 0x76, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4c,
+ 0x76, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x52, 0x04,
+ 0x64, 0x61, 0x74, 0x61, 0x22, 0x2e, 0x0a, 0x14, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x47, 0x65,
+ 0x74, 0x52, 0x61, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06,
+ 0x70, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x65,
+ 0x6f, 0x70, 0x6c, 0x65, 0x22, 0x34, 0x0a, 0x15, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x47, 0x65,
+ 0x74, 0x52, 0x61, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a,
+ 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42,
+ 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x12, 0x0a, 0x10, 0x53, 0x6d,
+ 0x69, 0x74, 0x68, 0x79, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x32,
+ 0x0a, 0x11, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52,
+ 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x52, 0x04, 0x64, 0x61,
+ 0x74, 0x61, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x33,
}
var (
@@ -1497,10 +1506,10 @@ var file_smithy_smithy_msg_proto_goTypes = []interface{}{
(*SmithyRiseResp)(nil), // 9: SmithyRiseResp
(*SmithyToolsUpReq)(nil), // 10: SmithyToolsUpReq
(*SmithyToolsUpResp)(nil), // 11: SmithyToolsUpResp
- (*SmithyRefreshShopReq)(nil), // 12: SmithyRefreshShopReq
- (*SmithyRefreshShopResp)(nil), // 13: SmithyRefreshShopResp
- (*SmithySellItemReq)(nil), // 14: SmithySellItemReq
- (*SmithySellItemResp)(nil), // 15: SmithySellItemResp
+ (*SmithyCustomerReq)(nil), // 12: SmithyCustomerReq
+ (*SmithyCustomerResp)(nil), // 13: SmithyCustomerResp
+ (*SmithySellReq)(nil), // 14: SmithySellReq
+ (*SmithySellResp)(nil), // 15: SmithySellResp
(*SmithyCreateOrderReq)(nil), // 16: SmithyCreateOrderReq
(*SmithyCreateOrderResp)(nil), // 17: SmithyCreateOrderResp
(*SmithyGetRewardReq)(nil), // 18: SmithyGetRewardReq
@@ -1514,10 +1523,9 @@ var file_smithy_smithy_msg_proto_goTypes = []interface{}{
(*SmithyGetListReq)(nil), // 26: SmithyGetListReq
(*SmithyGetListResp)(nil), // 27: SmithyGetListResp
(*DBStove)(nil), // 28: DBStove
- (*DBBusiness)(nil), // 29: DBBusiness
- (*OrderClang)(nil), // 30: OrderClang
- (*DBSmithy)(nil), // 31: DBSmithy
- (*DBUser)(nil), // 32: DBUser
+ (*OrderClang)(nil), // 29: OrderClang
+ (*DBSmithy)(nil), // 30: DBSmithy
+ (*DBUser)(nil), // 31: DBUser
}
var file_smithy_smithy_msg_proto_depIdxs = []int32{
28, // 0: SmithyGetStoveInfoResp.data:type_name -> DBStove
@@ -1526,20 +1534,18 @@ var file_smithy_smithy_msg_proto_depIdxs = []int32{
28, // 3: SmithyStoveUpResp.data:type_name -> DBStove
28, // 4: SmithyRiseResp.data:type_name -> DBStove
28, // 5: SmithyToolsUpResp.data:type_name -> DBStove
- 29, // 6: SmithyRefreshShopResp.data:type_name -> DBBusiness
- 29, // 7: SmithySellItemResp.data:type_name -> DBBusiness
- 30, // 8: SmithyCreateOrderReq.order:type_name -> OrderClang
- 31, // 9: SmithyCreateOrderResp.data:type_name -> DBSmithy
- 31, // 10: SmithyGetRewardResp.data:type_name -> DBSmithy
- 31, // 11: SmithyDeskSkillLvResp.data:type_name -> DBSmithy
- 31, // 12: SmithyStoveSkillLvResp.data:type_name -> DBSmithy
- 32, // 13: SmithyGetRandUserResp.user:type_name -> DBUser
- 31, // 14: SmithyGetListResp.data:type_name -> DBSmithy
- 15, // [15:15] is the sub-list for method output_type
- 15, // [15:15] is the sub-list for method input_type
- 15, // [15:15] is the sub-list for extension type_name
- 15, // [15:15] is the sub-list for extension extendee
- 0, // [0:15] is the sub-list for field type_name
+ 29, // 6: SmithyCreateOrderReq.order:type_name -> OrderClang
+ 30, // 7: SmithyCreateOrderResp.data:type_name -> DBSmithy
+ 30, // 8: SmithyGetRewardResp.data:type_name -> DBSmithy
+ 30, // 9: SmithyDeskSkillLvResp.data:type_name -> DBSmithy
+ 30, // 10: SmithyStoveSkillLvResp.data:type_name -> DBSmithy
+ 31, // 11: SmithyGetRandUserResp.user:type_name -> DBUser
+ 30, // 12: SmithyGetListResp.data:type_name -> DBSmithy
+ 13, // [13:13] is the sub-list for method output_type
+ 13, // [13:13] is the sub-list for method input_type
+ 13, // [13:13] is the sub-list for extension type_name
+ 13, // [13:13] is the sub-list for extension extendee
+ 0, // [0:13] is the sub-list for field type_name
}
func init() { file_smithy_smithy_msg_proto_init() }
@@ -1695,7 +1701,7 @@ func file_smithy_smithy_msg_proto_init() {
}
}
file_smithy_smithy_msg_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SmithyRefreshShopReq); i {
+ switch v := v.(*SmithyCustomerReq); i {
case 0:
return &v.state
case 1:
@@ -1707,7 +1713,7 @@ func file_smithy_smithy_msg_proto_init() {
}
}
file_smithy_smithy_msg_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SmithyRefreshShopResp); i {
+ switch v := v.(*SmithyCustomerResp); i {
case 0:
return &v.state
case 1:
@@ -1719,7 +1725,7 @@ func file_smithy_smithy_msg_proto_init() {
}
}
file_smithy_smithy_msg_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SmithySellItemReq); i {
+ switch v := v.(*SmithySellReq); i {
case 0:
return &v.state
case 1:
@@ -1731,7 +1737,7 @@ func file_smithy_smithy_msg_proto_init() {
}
}
file_smithy_smithy_msg_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SmithySellItemResp); i {
+ switch v := v.(*SmithySellResp); i {
case 0:
return &v.state
case 1:
diff --git a/sys/configure/structs/Game.NewSmithy.go b/sys/configure/structs/Game.NewSmithy.go
new file mode 100644
index 000000000..02cb87f30
--- /dev/null
+++ b/sys/configure/structs/Game.NewSmithy.go
@@ -0,0 +1,42 @@
+//------------------------------------------------------------------------------
+//