diff --git a/modules/plunder/api_getlist.go b/modules/plunder/api_getlist.go index b2d8c95a2..9697d7ecf 100644 --- a/modules/plunder/api_getlist.go +++ b/modules/plunder/api_getlist.go @@ -46,6 +46,13 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.PlunderGetListRe list.Landid = land.Id update["landid"] = land.Id } else { + if land, err = this.module.modelLand.getPlunderLandData(list.Landid); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Message: err.Error(), + } + return + } var uids []string etime := this.module.modelLand.GetEndTime() // 清理岛数据 @@ -74,13 +81,6 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.PlunderGetListRe update["etime"] = land.Etime } - if land, err = this.module.modelLand.getPlunderLandData(list.Landid); err != nil { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_DBError, - Message: err.Error(), - } - return - } } if len(list.Source) == 0 { list.Source, err = this.module.modelPlunder.refreshGoodsInfo()