diff --git a/modules/hunting/model_hunting.go b/modules/hunting/model_hunting.go index b25d35e93..f610a87ed 100644 --- a/modules/hunting/model_hunting.go +++ b/modules/hunting/model_hunting.go @@ -3,7 +3,6 @@ package hunting import ( "go_dreamfactory/comm" "go_dreamfactory/lego/core" - "go_dreamfactory/lego/sys/mgo" "go_dreamfactory/modules" "go_dreamfactory/pb" @@ -34,7 +33,7 @@ func (this *modelHunting) modifyHuntingDataByObjId(uid string, data map[string]i // 获取列表信息 func (this *modelHunting) getHuntingList(uid string) (result *pb.DBHunting, err error) { result = &pb.DBHunting{} - if err = this.Get(uid, result); err != nil && mgo.MongodbNil != err { + if err = this.Get(uid, result); err != nil { return } diff --git a/modules/sociaty/model_sociaty.go b/modules/sociaty/model_sociaty.go index 4dc4b8323..d445f577e 100644 --- a/modules/sociaty/model_sociaty.go +++ b/modules/sociaty/model_sociaty.go @@ -352,9 +352,10 @@ func (this *ModelSociaty) updateSociaty(sociatyId string, update map[string]inte // 退出公会 func (this *ModelSociaty) quit(uid string, sociaty *pb.DBSociaty) error { - for i, m := range sociaty.Members { - if m.Uid == uid { + for i:=0;i