This commit is contained in:
meixiongfeng 2022-07-05 12:04:21 +08:00
commit 4588c8378c
16 changed files with 253 additions and 203 deletions

View File

@ -40,6 +40,7 @@ const (
ModuleForum core.M_Modules = "forum" //论坛模块
ModuleItems core.M_Modules = "items" //道具模块
ModuleShop core.M_Modules = "shop" //商店模块
ModuleTask core.M_Modules = "task" //任务模块
)
//RPC服务接口定义处

View File

@ -209,7 +209,7 @@ func (this *MCompModel) ChangeList(uid string, _id string, data map[string]inter
//读取全部数据
func (this *MCompModel) Get(uid string, data interface{}) (err error) {
if err = this.Redis.HGetAll(this.ukey(uid), data); err != nil {
if err = this.Redis.HGetAll(this.ukey(uid), data); err != nil && err != redis.RedisNil {
return
}
if err == redis.RedisNil {

View File

@ -3,6 +3,7 @@ package hero
import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/modules"
"go_dreamfactory/pb"
)
@ -46,6 +47,11 @@ func (this *Hero) CreateHero(uid string, heroCfgId ...int32) error {
//消耗英雄卡
func (this *Hero) ConsumeCard(uId string, heroCfgId int32, count int32) (code pb.ErrorCode) {
if count <= 0 {
log.Errorf("attr no changed,uid: %s heroCfgId: %s count: %d", uId, heroCfgId, count)
code = pb.ErrorCode_ReqParameterError
return
}
heroes := this.GetHeroList(uId)
var curList []*pb.DBHero
for _, v := range heroes {

View File

@ -39,7 +39,7 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.ShopBuyReq) (code pb
shopitem = &pb.DBShopItem{
Id: primitive.NewObjectID().Hex(),
Uid: session.GetUserId(),
GoodsId: req.GoodsId,
GoodsId: conf.Key,
BuyNum: 0,
LastBuyTime: 0,
}

View File

@ -55,23 +55,23 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ShopGetListReq)
switch req.SType {
case pb.ShopType_GoldShop:
sdata = shopData.GoldShop
filed = "goldshop"
filed = "goldShop"
break
case pb.ShopType_DiamondShop:
sdata = shopData.DiamondShop
filed = "diamondshop"
filed = "diamondShop"
break
case pb.ShopType_PVPShop:
sdata = shopData.PVPShop
filed = "pvpshop"
sdata = shopData.PveShop
filed = "pvpShop"
break
case pb.ShopType_PVEShop:
sdata = shopData.PVEShop
filed = "pveshop"
sdata = shopData.PveShop
filed = "pveShop"
break
case pb.ShopType_AllianceShop:
sdata = shopData.AllianceShop
filed = "allianceshop"
filed = "allianceShop"
break
}
if sdata == nil {
@ -99,8 +99,7 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ShopGetListReq)
}
var _items []*cfg.Game_shopitemData
for _, v := range shopconf.Shopitem {
if _items, err = this.module.configure.GetShopItemsConfigureByGroups(v, udata); err != nil {
if _items, err = this.module.configure.GetShopItemsConfigureByGroups(v, udata); err != nil || len(_items) == 0 {
code = pb.ErrorCode_SystemError
return
}
@ -117,7 +116,7 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ShopGetListReq)
if tdata > ltime { //达到刷新时间 可以刷新商品列表
var _items []*cfg.Game_shopitemData
for _, v := range shopconf.Shopitem {
if _items, err = this.module.configure.GetShopItemsConfigureByGroups(v, udata); err != nil {
if _items, err = this.module.configure.GetShopItemsConfigureByGroups(v, udata); err != nil || len(_items) == 0 {
code = pb.ErrorCode_SystemError
return
}

View File

@ -52,7 +52,7 @@ func (this *configureComp) GetShopItemsConfigure(key int32) (result *cfg.Game_sh
v interface{}
ok bool
)
if v, err = this.GetConfigure(game_shop); err != nil {
if v, err = this.GetConfigure(game_shopitem); err != nil {
log.Errorf("err:%v", err)
return
} else {
@ -71,9 +71,8 @@ func (this *configureComp) GetShopItemsConfigureByGroups(groupid int32, user *pb
var (
v interface{}
table *cfg.Game_shopitem
item *cfg.Game_shopitemData
)
if v, err = this.GetConfigure(game_shop); err != nil {
if v, err = this.GetConfigure(game_shopitem); err != nil {
log.Errorf("err:%v", err)
return
} else {
@ -83,7 +82,7 @@ func (this *configureComp) GetShopItemsConfigureByGroups(groupid int32, user *pb
user.Lv >= v.Lvmin &&
user.Lv <= v.Lvmax &&
v.Vip >= v.Vip {
result = append(result, item)
result = append(result, v)
}
}
}
@ -99,7 +98,7 @@ func (this *configureComp) GetShopItemsConfigureByIds(keys ...int32) (result []*
item *cfg.Game_shopitemData
ok bool
)
if v, err = this.GetConfigure(game_shop); err != nil {
if v, err = this.GetConfigure(game_shopitem); err != nil {
log.Errorf("err:%v", err)
return
} else {

View File

@ -53,7 +53,7 @@ func transGoods(goods []*cfg.Game_shopitemData, ushoputem map[int32]*pb.DBShopIt
}
result[i].Consume = make([]*pb.UserAssets, len(v.Need))
for i1, v1 := range v.Need {
result[i].Items[i1] = &pb.UserAssets{
result[i].Consume[i1] = &pb.UserAssets{
A: v1.A,
T: v1.T,
N: v1.N,

View File

@ -1,13 +1,19 @@
package shop_test
import (
"context"
"fmt"
"go_dreamfactory/comm"
"go_dreamfactory/lego"
"go_dreamfactory/lego/base/rpcx"
"go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/modules/equipment"
"go_dreamfactory/modules/hero"
"go_dreamfactory/modules/items"
"go_dreamfactory/modules/shop"
"go_dreamfactory/modules/user"
"go_dreamfactory/pb"
"go_dreamfactory/services"
"go_dreamfactory/sys/cache"
"go_dreamfactory/sys/configure"
@ -15,6 +21,8 @@ import (
"os"
"testing"
"time"
"github.com/golang/protobuf/ptypes"
)
func newService(ops ...rpcx.Option) core.IService {
@ -41,7 +49,7 @@ func (this *TestService) InitSys() {
} else {
log.Infof("init sys.db success!")
}
if err := configure.OnInit(this.GetSettings().Sys["configure"]); err != nil {
if err := configure.OnInit(this.GetSettings().Sys["configure"], configure.SetConfigPath("F:/work/go/go_dreamfactory/bin/json")); err != nil {
panic(fmt.Sprintf("init sys.configure err: %s", err.Error()))
} else {
log.Infof("init sys.configure success!")
@ -64,12 +72,28 @@ func TestMain(m *testing.M) {
go func() {
lego.Run(service, //运行模块
module,
hero.NewModule(),
user.NewModule(),
items.NewModule(),
equipment.NewModule(),
)
}()
time.Sleep(time.Second * 3)
defer os.Exit(m.Run())
}
func Test_Module(t *testing.T) {
//测试api_getlist
func Test_Module_APIGetList(t *testing.T) {
data, _ := ptypes.MarshalAny(&pb.ShopGetListReq{SType: pb.ShopType_GoldShop, IsManualRefresh: false})
reply := &pb.RPCMessageReply{}
s_gateComp.ReceiveMsg(context.Background(), &pb.AgentMessage{UserId: "0_62b16dda909b2f8faeff788d", MainType: "shop", SubType: "getlist", Message: data}, reply)
log.Debugf("reply:%v", reply)
}
//测试api_buy
func Test_Module_APIBuy(t *testing.T) {
data, _ := ptypes.MarshalAny(&pb.ShopBuyReq{GoodsId: 7})
reply := &pb.RPCMessageReply{}
s_gateComp.ReceiveMsg(context.Background(), &pb.AgentMessage{UserId: "0_62b16dda909b2f8faeff788d", MainType: "shop", SubType: "buy", Message: data}, reply)
log.Debugf("reply:%v", reply)
}

11
modules/task/api.go Normal file
View File

@ -0,0 +1,11 @@
package task
import (
"go_dreamfactory/lego/base"
"go_dreamfactory/modules"
)
type apiComp struct {
modules.MCompGate
service base.IRPCXService
}

View File

@ -0,0 +1,20 @@
package task
import (
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
)
const ( //Redis
TableTask core.SqlTable = "task" //任务表
)
type ModelTask struct {
modules.MCompModel
}
func (this *ModelTask) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
err = this.MCompModel.Init(service, module, comp, options)
this.TableName = string(TableTask)
return
}

48
modules/task/module.go Normal file
View File

@ -0,0 +1,48 @@
package task
import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
"time"
)
type TaskModule struct {
modules.ModuleBase
modelTask *ModelTask
api *apiComp
}
func NewModule() core.IModule {
return &TaskModule{}
}
func (this *TaskModule) GetType() core.M_Modules {
return comm.ModuleTask
}
func (this *TaskModule) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
err = this.ModuleBase.Init(service, module, options)
go func() {
tickC := time.NewTicker(time.Second * 1)
for {
select {
case tc := <-tickC.C:
this.update(tc)
}
}
}()
return
}
func (this *TaskModule) OnInstallComp() {
this.ModuleBase.OnInstallComp()
this.api = this.RegisterComp(new(apiComp)).(*apiComp)
this.modelTask = this.RegisterComp(new(ModelTask)).(*ModelTask)
}
func (this *TaskModule) update(t time.Time) {
}

View File

@ -6,6 +6,7 @@ import (
"go_dreamfactory/pb"
"go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/log"
)
func NewModule() core.IModule {
@ -74,12 +75,35 @@ func (this *User) QueryAttributeValue(uid string, attr string) (value int32) {
//用户资源
func (this *User) AddAttributeValue(uid string, attr string, add int32) (code pb.ErrorCode) {
if add == 0 {
log.Errorf("attr no changed,uid: %s attr: %s add: %d", uid, attr, add)
code = pb.ErrorCode_ReqParameterError
return
}
user := this.GetUser(uid)
if user == nil {
code = pb.ErrorCode_UserSessionNobeing
return
}
update := make(map[string]interface{})
switch attr {
case comm.ResGold:
update[comm.ResGold] = add
if add < 0 {
if user.Gold+add < 0 {
code = pb.ErrorCode_GoldNoEnough
return
}
}
update[comm.ResGold] = user.Gold + add
case comm.ResExp:
update[comm.ResExp] = add
if add < 0 {
if user.Exp+add < 0 {
code = pb.ErrorCode_ResNoEnough
return
}
}
update[comm.ResExp] = user.Gold + add
}
if err := this.modelUser.updateUserAttr(uid, update); err != nil {

View File

@ -19,17 +19,17 @@ message UserShopData {
message DBShop {
string id = 1; //@go_tags(`bson:"_id"`) id
string uid = 2; //@go_tags(`bson:"uid"`) id
UserShopData GoldShop = 3; //
UserShopData DiamondShop = 4; //
UserShopData PVPShop = 5; //
UserShopData PVEShop = 6; //
UserShopData AllianceShop = 7; //
UserShopData goldShop = 3; //@go_tags(`bson:"goldShop"`)
UserShopData diamondShop = 4; //@go_tags(`bson:"diamondShop"`)
UserShopData pvpShop = 5; //@go_tags(`bson:"pvpShop"`)
UserShopData pveShop = 6; //@go_tags(`bson:"pveShop"`)
UserShopData allianceShop = 7; //@go_tags(`bson:"allianceShop"`)
}
message DBShopItem {
string id = 1; //@go_tags(`bson:"_id"`) id
string uid = 2; //@go_tags(`bson:"uid"`) id
int32 GoodsId = 3; //Id
int32 BuyNum = 4; //
int64 LastBuyTime = 5; //
int32 goodsId = 3; //@go_tags(`bson:"goodsId"`)Id
int32 buyNum = 4; //@go_tags(`bson:"buyNum"`)
int64 lastBuyTime = 5; //@go_tags(`bson:"lastBuyTime"`)
}

View File

@ -148,11 +148,11 @@ type DBShop struct {
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
GoldShop *UserShopData `protobuf:"bytes,3,opt,name=GoldShop,proto3" json:"GoldShop"` //金币商店数据
DiamondShop *UserShopData `protobuf:"bytes,4,opt,name=DiamondShop,proto3" json:"DiamondShop"` //金币商店数据
PVPShop *UserShopData `protobuf:"bytes,5,opt,name=PVPShop,proto3" json:"PVPShop"` //金币商店数据
PVEShop *UserShopData `protobuf:"bytes,6,opt,name=PVEShop,proto3" json:"PVEShop"` //金币商店数据
AllianceShop *UserShopData `protobuf:"bytes,7,opt,name=AllianceShop,proto3" json:"AllianceShop"` //金币商店数据
GoldShop *UserShopData `protobuf:"bytes,3,opt,name=goldShop,proto3" json:"goldShop"` //@go_tags(`bson:"goldShop"`)金币商店数据
DiamondShop *UserShopData `protobuf:"bytes,4,opt,name=diamondShop,proto3" json:"diamondShop"` //@go_tags(`bson:"diamondShop"`)金币商店数据
PvpShop *UserShopData `protobuf:"bytes,5,opt,name=pvpShop,proto3" json:"pvpShop"` //@go_tags(`bson:"pvpShop"`)金币商店数据
PveShop *UserShopData `protobuf:"bytes,6,opt,name=pveShop,proto3" json:"pveShop"` //@go_tags(`bson:"pveShop"`)金币商店数据
AllianceShop *UserShopData `protobuf:"bytes,7,opt,name=allianceShop,proto3" json:"allianceShop"` //@go_tags(`bson:"allianceShop"`)金币商店数据
}
func (x *DBShop) Reset() {
@ -215,16 +215,16 @@ func (x *DBShop) GetDiamondShop() *UserShopData {
return nil
}
func (x *DBShop) GetPVPShop() *UserShopData {
func (x *DBShop) GetPvpShop() *UserShopData {
if x != nil {
return x.PVPShop
return x.PvpShop
}
return nil
}
func (x *DBShop) GetPVEShop() *UserShopData {
func (x *DBShop) GetPveShop() *UserShopData {
if x != nil {
return x.PVEShop
return x.PveShop
}
return nil
}
@ -243,9 +243,9 @@ type DBShopItem struct {
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
GoodsId int32 `protobuf:"varint,3,opt,name=GoodsId,proto3" json:"GoodsId"` //商品Id
BuyNum int32 `protobuf:"varint,4,opt,name=BuyNum,proto3" json:"BuyNum"` //购买数量
LastBuyTime int64 `protobuf:"varint,5,opt,name=LastBuyTime,proto3" json:"LastBuyTime"` //最后一次购买的时间
GoodsId int32 `protobuf:"varint,3,opt,name=goodsId,proto3" json:"goodsId"` //@go_tags(`bson:"goodsId"`)商品Id
BuyNum int32 `protobuf:"varint,4,opt,name=buyNum,proto3" json:"buyNum"` //@go_tags(`bson:"buyNum"`)购买数量
LastBuyTime int64 `protobuf:"varint,5,opt,name=lastBuyTime,proto3" json:"lastBuyTime"` //@go_tags(`bson:"lastBuyTime"`)最后一次购买的时间
}
func (x *DBShopItem) Reset() {
@ -330,28 +330,28 @@ var file_shop_shop_db_proto_rawDesc = []byte{
0x22, 0x8b, 0x02, 0x0a, 0x06, 0x44, 0x42, 0x53, 0x68, 0x6f, 0x70, 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, 0x29, 0x0a,
0x08, 0x47, 0x6f, 0x6c, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x08, 0x67, 0x6f, 0x6c, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08,
0x47, 0x6f, 0x6c, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x2f, 0x0a, 0x0b, 0x44, 0x69, 0x61, 0x6d,
0x67, 0x6f, 0x6c, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x2f, 0x0a, 0x0b, 0x64, 0x69, 0x61, 0x6d,
0x6f, 0x6e, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e,
0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0b, 0x44, 0x69,
0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x27, 0x0a, 0x07, 0x50, 0x56, 0x50,
0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0b, 0x64, 0x69,
0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x27, 0x0a, 0x07, 0x70, 0x76, 0x70,
0x53, 0x68, 0x6f, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x55, 0x73, 0x65,
0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x50, 0x56, 0x50, 0x53, 0x68,
0x6f, 0x70, 0x12, 0x27, 0x0a, 0x07, 0x50, 0x56, 0x45, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x06, 0x20,
0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x70, 0x76, 0x70, 0x53, 0x68,
0x6f, 0x70, 0x12, 0x27, 0x0a, 0x07, 0x70, 0x76, 0x65, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x06, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61,
0x74, 0x61, 0x52, 0x07, 0x50, 0x56, 0x45, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x31, 0x0a, 0x0c, 0x41,
0x74, 0x61, 0x52, 0x07, 0x70, 0x76, 0x65, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x31, 0x0a, 0x0c, 0x61,
0x6c, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61,
0x52, 0x0c, 0x41, 0x6c, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x68, 0x6f, 0x70, 0x22, 0x82,
0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x68, 0x6f, 0x70, 0x22, 0x82,
0x01, 0x0a, 0x0a, 0x44, 0x42, 0x53, 0x68, 0x6f, 0x70, 0x49, 0x74, 0x65, 0x6d, 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,
0x18, 0x0a, 0x07, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05,
0x52, 0x07, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x42, 0x75, 0x79,
0x4e, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x42, 0x75, 0x79, 0x4e, 0x75,
0x6d, 0x12, 0x20, 0x0a, 0x0b, 0x4c, 0x61, 0x73, 0x74, 0x42, 0x75, 0x79, 0x54, 0x69, 0x6d, 0x65,
0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x4c, 0x61, 0x73, 0x74, 0x42, 0x75, 0x79, 0x54,
0x18, 0x0a, 0x07, 0x67, 0x6f, 0x6f, 0x64, 0x73, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05,
0x52, 0x07, 0x67, 0x6f, 0x6f, 0x64, 0x73, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x79,
0x4e, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x62, 0x75, 0x79, 0x4e, 0x75,
0x6d, 0x12, 0x20, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x75, 0x79, 0x54, 0x69, 0x6d, 0x65,
0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x75, 0x79, 0x54,
0x69, 0x6d, 0x65, 0x2a, 0x5f, 0x0a, 0x08, 0x53, 0x68, 0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12,
0x08, 0x0a, 0x04, 0x4e, 0x75, 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x47, 0x6f, 0x6c,
0x64, 0x53, 0x68, 0x6f, 0x70, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x44, 0x69, 0x61, 0x6d, 0x6f,
@ -383,11 +383,11 @@ var file_shop_shop_db_proto_goTypes = []interface{}{
(*DBShopItem)(nil), // 3: DBShopItem
}
var file_shop_shop_db_proto_depIdxs = []int32{
1, // 0: DBShop.GoldShop:type_name -> UserShopData
1, // 1: DBShop.DiamondShop:type_name -> UserShopData
1, // 2: DBShop.PVPShop:type_name -> UserShopData
1, // 3: DBShop.PVEShop:type_name -> UserShopData
1, // 4: DBShop.AllianceShop:type_name -> UserShopData
1, // 0: DBShop.goldShop:type_name -> UserShopData
1, // 1: DBShop.diamondShop:type_name -> UserShopData
1, // 2: DBShop.pvpShop:type_name -> UserShopData
1, // 3: DBShop.pveShop:type_name -> UserShopData
1, // 4: DBShop.allianceShop:type_name -> UserShopData
5, // [5:5] is the sub-list for method output_type
5, // [5:5] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name

View File

@ -20,70 +20,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
//资源对象
type Resource struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ResourceType string `protobuf:"bytes,1,opt,name=ResourceType,proto3" json:"ResourceType"` //资源类型
ResourceId string `protobuf:"bytes,2,opt,name=ResourceId,proto3" json:"ResourceId"` //资源Id
Amount int32 `protobuf:"varint,3,opt,name=Amount,proto3" json:"Amount"` //数量
}
func (x *Resource) Reset() {
*x = Resource{}
if protoimpl.UnsafeEnabled {
mi := &file_shop_shop_msg_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Resource) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Resource) ProtoMessage() {}
func (x *Resource) ProtoReflect() protoreflect.Message {
mi := &file_shop_shop_msg_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 Resource.ProtoReflect.Descriptor instead.
func (*Resource) Descriptor() ([]byte, []int) {
return file_shop_shop_msg_proto_rawDescGZIP(), []int{0}
}
func (x *Resource) GetResourceType() string {
if x != nil {
return x.ResourceType
}
return ""
}
func (x *Resource) GetResourceId() string {
if x != nil {
return x.ResourceId
}
return ""
}
func (x *Resource) GetAmount() int32 {
if x != nil {
return x.Amount
}
return 0
}
//商品对象数据
type ShopItem struct {
state protoimpl.MessageState
@ -100,7 +36,7 @@ type ShopItem struct {
func (x *ShopItem) Reset() {
*x = ShopItem{}
if protoimpl.UnsafeEnabled {
mi := &file_shop_shop_msg_proto_msgTypes[1]
mi := &file_shop_shop_msg_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -113,7 +49,7 @@ func (x *ShopItem) String() string {
func (*ShopItem) ProtoMessage() {}
func (x *ShopItem) ProtoReflect() protoreflect.Message {
mi := &file_shop_shop_msg_proto_msgTypes[1]
mi := &file_shop_shop_msg_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -126,7 +62,7 @@ func (x *ShopItem) ProtoReflect() protoreflect.Message {
// Deprecated: Use ShopItem.ProtoReflect.Descriptor instead.
func (*ShopItem) Descriptor() ([]byte, []int) {
return file_shop_shop_msg_proto_rawDescGZIP(), []int{1}
return file_shop_shop_msg_proto_rawDescGZIP(), []int{0}
}
func (x *ShopItem) GetGoodsId() int32 {
@ -177,7 +113,7 @@ type ShopGetListReq struct {
func (x *ShopGetListReq) Reset() {
*x = ShopGetListReq{}
if protoimpl.UnsafeEnabled {
mi := &file_shop_shop_msg_proto_msgTypes[2]
mi := &file_shop_shop_msg_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -190,7 +126,7 @@ func (x *ShopGetListReq) String() string {
func (*ShopGetListReq) ProtoMessage() {}
func (x *ShopGetListReq) ProtoReflect() protoreflect.Message {
mi := &file_shop_shop_msg_proto_msgTypes[2]
mi := &file_shop_shop_msg_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -203,7 +139,7 @@ func (x *ShopGetListReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use ShopGetListReq.ProtoReflect.Descriptor instead.
func (*ShopGetListReq) Descriptor() ([]byte, []int) {
return file_shop_shop_msg_proto_rawDescGZIP(), []int{2}
return file_shop_shop_msg_proto_rawDescGZIP(), []int{1}
}
func (x *ShopGetListReq) GetSType() ShopType {
@ -232,7 +168,7 @@ type ShopGetListResp struct {
func (x *ShopGetListResp) Reset() {
*x = ShopGetListResp{}
if protoimpl.UnsafeEnabled {
mi := &file_shop_shop_msg_proto_msgTypes[3]
mi := &file_shop_shop_msg_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -245,7 +181,7 @@ func (x *ShopGetListResp) String() string {
func (*ShopGetListResp) ProtoMessage() {}
func (x *ShopGetListResp) ProtoReflect() protoreflect.Message {
mi := &file_shop_shop_msg_proto_msgTypes[3]
mi := &file_shop_shop_msg_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -258,7 +194,7 @@ func (x *ShopGetListResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use ShopGetListResp.ProtoReflect.Descriptor instead.
func (*ShopGetListResp) Descriptor() ([]byte, []int) {
return file_shop_shop_msg_proto_rawDescGZIP(), []int{3}
return file_shop_shop_msg_proto_rawDescGZIP(), []int{2}
}
func (x *ShopGetListResp) GetGoods() []*ShopItem {
@ -280,7 +216,7 @@ type ShopBuyReq struct {
func (x *ShopBuyReq) Reset() {
*x = ShopBuyReq{}
if protoimpl.UnsafeEnabled {
mi := &file_shop_shop_msg_proto_msgTypes[4]
mi := &file_shop_shop_msg_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -293,7 +229,7 @@ func (x *ShopBuyReq) String() string {
func (*ShopBuyReq) ProtoMessage() {}
func (x *ShopBuyReq) ProtoReflect() protoreflect.Message {
mi := &file_shop_shop_msg_proto_msgTypes[4]
mi := &file_shop_shop_msg_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -306,7 +242,7 @@ func (x *ShopBuyReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use ShopBuyReq.ProtoReflect.Descriptor instead.
func (*ShopBuyReq) Descriptor() ([]byte, []int) {
return file_shop_shop_msg_proto_rawDescGZIP(), []int{4}
return file_shop_shop_msg_proto_rawDescGZIP(), []int{3}
}
func (x *ShopBuyReq) GetGoodsId() int32 {
@ -328,7 +264,7 @@ type ShopBuyResp struct {
func (x *ShopBuyResp) Reset() {
*x = ShopBuyResp{}
if protoimpl.UnsafeEnabled {
mi := &file_shop_shop_msg_proto_msgTypes[5]
mi := &file_shop_shop_msg_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -341,7 +277,7 @@ func (x *ShopBuyResp) String() string {
func (*ShopBuyResp) ProtoMessage() {}
func (x *ShopBuyResp) ProtoReflect() protoreflect.Message {
mi := &file_shop_shop_msg_proto_msgTypes[5]
mi := &file_shop_shop_msg_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -354,7 +290,7 @@ func (x *ShopBuyResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use ShopBuyResp.ProtoReflect.Descriptor instead.
func (*ShopBuyResp) Descriptor() ([]byte, []int) {
return file_shop_shop_msg_proto_rawDescGZIP(), []int{5}
return file_shop_shop_msg_proto_rawDescGZIP(), []int{4}
}
func (x *ShopBuyResp) GetIsSucc() bool {
@ -370,39 +306,32 @@ var file_shop_shop_msg_proto_rawDesc = []byte{
0x0a, 0x13, 0x73, 0x68, 0x6f, 0x70, 0x2f, 0x73, 0x68, 0x6f, 0x70, 0x5f, 0x6d, 0x73, 0x67, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x73, 0x68, 0x6f, 0x70, 0x2f, 0x73, 0x68, 0x6f, 0x70,
0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x66, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
0x65, 0x12, 0x22, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x52, 0x65, 0x73, 0x6f, 0x75,
0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18,
0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xa2, 0x01,
0x0a, 0x08, 0x53, 0x68, 0x6f, 0x70, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x47, 0x6f,
0x6f, 0x64, 0x73, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x47, 0x6f, 0x6f,
0x64, 0x73, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73,
0x52, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x25, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x73, 0x75,
0x6d, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41,
0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x07, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x12, 0x12,
0x0a, 0x04, 0x53, 0x61, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x61,
0x6c, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x4c, 0x65, 0x66, 0x74, 0x42, 0x75, 0x79, 0x4e, 0x75, 0x6d,
0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x4c, 0x65, 0x66, 0x74, 0x42, 0x75, 0x79, 0x4e,
0x75, 0x6d, 0x22, 0x5b, 0x0a, 0x0e, 0x53, 0x68, 0x6f, 0x70, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73,
0x74, 0x52, 0x65, 0x71, 0x12, 0x1f, 0x0a, 0x05, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x53, 0x68, 0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05,
0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x49, 0x73, 0x4d, 0x61, 0x6e, 0x75, 0x61,
0x6c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f,
0x49, 0x73, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x22,
0x32, 0x0a, 0x0f, 0x53, 0x68, 0x6f, 0x70, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
0x73, 0x70, 0x12, 0x1f, 0x0a, 0x05, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x09, 0x2e, 0x53, 0x68, 0x6f, 0x70, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x47, 0x6f,
0x6f, 0x64, 0x73, 0x22, 0x26, 0x0a, 0x0a, 0x53, 0x68, 0x6f, 0x70, 0x42, 0x75, 0x79, 0x52, 0x65,
0x71, 0x12, 0x18, 0x0a, 0x07, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x05, 0x52, 0x07, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x49, 0x64, 0x22, 0x25, 0x0a, 0x0b, 0x53,
0x68, 0x6f, 0x70, 0x42, 0x75, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x73,
0x53, 0x75, 0x63, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x49, 0x73, 0x53, 0x75,
0x63, 0x63, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa2, 0x01, 0x0a, 0x08, 0x53, 0x68, 0x6f, 0x70, 0x49, 0x74,
0x65, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x49, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x05, 0x52, 0x07, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x05,
0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73,
0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12,
0x25, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x07, 0x43,
0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x61, 0x6c, 0x65, 0x18, 0x04,
0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x61, 0x6c, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x4c, 0x65,
0x66, 0x74, 0x42, 0x75, 0x79, 0x4e, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a,
0x4c, 0x65, 0x66, 0x74, 0x42, 0x75, 0x79, 0x4e, 0x75, 0x6d, 0x22, 0x5b, 0x0a, 0x0e, 0x53, 0x68,
0x6f, 0x70, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1f, 0x0a, 0x05,
0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x53, 0x68,
0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a,
0x0f, 0x49, 0x73, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68,
0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x49, 0x73, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c,
0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x22, 0x32, 0x0a, 0x0f, 0x53, 0x68, 0x6f, 0x70, 0x47,
0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x05, 0x47, 0x6f,
0x6f, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x53, 0x68, 0x6f, 0x70,
0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x22, 0x26, 0x0a, 0x0a, 0x53,
0x68, 0x6f, 0x70, 0x42, 0x75, 0x79, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x47, 0x6f, 0x6f,
0x64, 0x73, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x47, 0x6f, 0x6f, 0x64,
0x73, 0x49, 0x64, 0x22, 0x25, 0x0a, 0x0b, 0x53, 0x68, 0x6f, 0x70, 0x42, 0x75, 0x79, 0x52, 0x65,
0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x73, 0x53, 0x75, 0x63, 0x63, 0x18, 0x01, 0x20, 0x01,
0x28, 0x08, 0x52, 0x06, 0x49, 0x73, 0x53, 0x75, 0x63, 0x63, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b,
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -417,22 +346,21 @@ func file_shop_shop_msg_proto_rawDescGZIP() []byte {
return file_shop_shop_msg_proto_rawDescData
}
var file_shop_shop_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_shop_shop_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_shop_shop_msg_proto_goTypes = []interface{}{
(*Resource)(nil), // 0: Resource
(*ShopItem)(nil), // 1: ShopItem
(*ShopGetListReq)(nil), // 2: ShopGetListReq
(*ShopGetListResp)(nil), // 3: ShopGetListResp
(*ShopBuyReq)(nil), // 4: ShopBuyReq
(*ShopBuyResp)(nil), // 5: ShopBuyResp
(*UserAssets)(nil), // 6: UserAssets
(ShopType)(0), // 7: ShopType
(*ShopItem)(nil), // 0: ShopItem
(*ShopGetListReq)(nil), // 1: ShopGetListReq
(*ShopGetListResp)(nil), // 2: ShopGetListResp
(*ShopBuyReq)(nil), // 3: ShopBuyReq
(*ShopBuyResp)(nil), // 4: ShopBuyResp
(*UserAssets)(nil), // 5: UserAssets
(ShopType)(0), // 6: ShopType
}
var file_shop_shop_msg_proto_depIdxs = []int32{
6, // 0: ShopItem.Items:type_name -> UserAssets
6, // 1: ShopItem.Consume:type_name -> UserAssets
7, // 2: ShopGetListReq.sType:type_name -> ShopType
1, // 3: ShopGetListResp.Goods:type_name -> ShopItem
5, // 0: ShopItem.Items:type_name -> UserAssets
5, // 1: ShopItem.Consume:type_name -> UserAssets
6, // 2: ShopGetListReq.sType:type_name -> ShopType
0, // 3: ShopGetListResp.Goods:type_name -> ShopItem
4, // [4:4] is the sub-list for method output_type
4, // [4:4] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
@ -449,18 +377,6 @@ func file_shop_shop_msg_proto_init() {
file_comm_proto_init()
if !protoimpl.UnsafeEnabled {
file_shop_shop_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Resource); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_shop_shop_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ShopItem); i {
case 0:
return &v.state
@ -472,7 +388,7 @@ func file_shop_shop_msg_proto_init() {
return nil
}
}
file_shop_shop_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
file_shop_shop_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ShopGetListReq); i {
case 0:
return &v.state
@ -484,7 +400,7 @@ func file_shop_shop_msg_proto_init() {
return nil
}
}
file_shop_shop_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
file_shop_shop_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ShopGetListResp); i {
case 0:
return &v.state
@ -496,7 +412,7 @@ func file_shop_shop_msg_proto_init() {
return nil
}
}
file_shop_shop_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
file_shop_shop_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ShopBuyReq); i {
case 0:
return &v.state
@ -508,7 +424,7 @@ func file_shop_shop_msg_proto_init() {
return nil
}
}
file_shop_shop_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
file_shop_shop_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ShopBuyResp); i {
case 0:
return &v.state
@ -527,7 +443,7 @@ func file_shop_shop_msg_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_shop_shop_msg_proto_rawDesc,
NumEnums: 0,
NumMessages: 6,
NumMessages: 5,
NumExtensions: 0,
NumServices: 0,
},

View File

@ -8,6 +8,7 @@ import (
"go_dreamfactory/modules/hero"
"go_dreamfactory/modules/items"
"go_dreamfactory/modules/mail"
"go_dreamfactory/modules/task"
"go_dreamfactory/modules/user"
"go_dreamfactory/services"
"go_dreamfactory/sys/cache"
@ -44,6 +45,7 @@ func main() {
friend.NewModule(),
hero.NewModule(),
equipment.NewModule(),
task.NewModule(),
)
}