错误信息输出
This commit is contained in:
parent
12909167e9
commit
0960ffa71d
@ -80,7 +80,9 @@ func (this *modelLand) createPlunderLandData(uid string) (land *pb.DBPlunderLand
|
||||
}
|
||||
}
|
||||
}
|
||||
info, _ = this.module.modelPlunder.queryPlunderInfos(uids, land.Id)
|
||||
if info, err = this.module.modelPlunder.queryPlunderInfos(uids, land.Id); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
for _, v := range info {
|
||||
if v.Landid != "" { // 过滤
|
||||
|
@ -128,19 +128,19 @@ func (this *modelPlunder) queryPlunderInfos(uids []string, landid string) (data
|
||||
var (
|
||||
mp map[string]struct{} // 没找到的数据
|
||||
results []*pb.DBPlunder
|
||||
onfound []string
|
||||
//onfound []string
|
||||
newdata map[string]interface{} = make(map[string]interface{})
|
||||
unfound []string
|
||||
)
|
||||
results = make([]*pb.DBPlunder, 0)
|
||||
mp = make(map[string]struct{})
|
||||
|
||||
if onfound, err = this.Gets(uids, &results); err != nil {
|
||||
if _, err = this.Gets(uids, &results); err != nil {
|
||||
this.module.Errorln(err)
|
||||
return
|
||||
}
|
||||
for _, v := range onfound {
|
||||
mp[v] = struct{}{}
|
||||
for _, v := range results {
|
||||
mp[v.Uid] = struct{}{}
|
||||
}
|
||||
for _, v := range uids {
|
||||
if _, ok := mp[v]; !ok {
|
||||
@ -167,10 +167,11 @@ func (this *modelPlunder) queryPlunderInfos(uids []string, landid string) (data
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if err = this.Adds(newdata); err != nil {
|
||||
this.module.Errorln(err)
|
||||
return
|
||||
if len(newdata) > 0 {
|
||||
if err = this.Adds(newdata); err != nil {
|
||||
this.module.Errorln(err)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
for _, v := range results {
|
||||
|
Loading…
Reference in New Issue
Block a user