Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
b62451fc35
@ -195,7 +195,7 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ShopGetListReq)
|
||||
|
||||
var _items []*cfg.GameShopitemData
|
||||
for _, v := range shopconf.Shopitem {
|
||||
if _items, err = this.module.configure.GetShopItemsConfigureByGroups(v, udata); err != nil || len(_items) == 0 {
|
||||
if _items, err = this.module.configure.GetShopItemsConfigureByGroups(v, udata); err != nil {
|
||||
this.module.Error("no founf shopgroup", log.Field{Key: "gid", Value: v})
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_SystemError,
|
||||
|
@ -75,7 +75,7 @@ func (this *configureComp) GetShopItemsConfigure(key int32) (result *cfg.GameSho
|
||||
|
||||
// 读取商品组
|
||||
func (this *configureComp) GetShopItemsConfigureByGroups(groupid int32, user *pb.DBUser) (result []*cfg.GameShopitemData, err error) {
|
||||
result = make([]*cfg.GameShopitemData, 0, 10)
|
||||
result = make([]*cfg.GameShopitemData, 0)
|
||||
var (
|
||||
v interface{}
|
||||
table *cfg.GameShopitem
|
||||
@ -94,6 +94,9 @@ func (this *configureComp) GetShopItemsConfigureByGroups(groupid int32, user *pb
|
||||
result = append(result, v)
|
||||
}
|
||||
}
|
||||
if len(result) == 0 {
|
||||
err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_shopitem, groupid)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user