英雄列表空处理
This commit is contained in:
parent
06ae1ca510
commit
71ef2821f2
@ -5,6 +5,7 @@ import (
|
|||||||
"go_dreamfactory/comm"
|
"go_dreamfactory/comm"
|
||||||
"go_dreamfactory/lego/core"
|
"go_dreamfactory/lego/core"
|
||||||
"go_dreamfactory/lego/sys/log"
|
"go_dreamfactory/lego/sys/log"
|
||||||
|
"go_dreamfactory/lego/sys/redis"
|
||||||
"go_dreamfactory/modules"
|
"go_dreamfactory/modules"
|
||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
"math"
|
"math"
|
||||||
@ -96,6 +97,9 @@ func (this *ModelHero) getHeroList(uid string) ([]*pb.DB_HeroData, error) {
|
|||||||
herokeys := make(map[string]string)
|
herokeys := make(map[string]string)
|
||||||
err := this.Get(uid, herokeys)
|
err := this.Get(uid, herokeys)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if err == redis.RedisNil {
|
||||||
|
return make([]*pb.DB_HeroData, 0), nil
|
||||||
|
}
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user