同步工会bug
This commit is contained in:
parent
1c070e2646
commit
f97e1ac79a
@ -43,7 +43,20 @@ func (this *apiComp) Refuse(session comm.IUserSession, req *pb.SociatyRefuseReq)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 判断改用户是否在申请记录中
|
||||
var flag bool
|
||||
for _, r := range sociaty.GetApplyRecord() {
|
||||
if r.Uid == req.Uid {
|
||||
flag = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !flag {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_SociatyApplyCancel,
|
||||
Title: pb.ErrorCode_SociatyApplyCancel.ToString(),
|
||||
}
|
||||
}
|
||||
// 已是公会成员
|
||||
if this.module.modelSociaty.isMember(uid, sociaty) {
|
||||
errdata = &pb.ErrorData{
|
||||
|
@ -115,14 +115,14 @@ func (this *ModelSociatyTask) activityReceive(id int32, sociatyId, uid string) e
|
||||
break
|
||||
}
|
||||
}
|
||||
if isUpdate {
|
||||
if !isUpdate {
|
||||
sociatyTask.ActivityList = append(sociatyTask.ActivityList, &pb.SociatyActivity{Id: id, Status: 1})
|
||||
}
|
||||
update := map[string]interface{}{
|
||||
"activityList": sociatyTask.ActivityList,
|
||||
}
|
||||
return this.ChangeList(sociatyId, uid, update)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// 更新任务列表
|
||||
func (this *ModelSociatyTask) updateTaskList(sociatyId, uid string, taskList []*pb.SociatyTask) error {
|
||||
|
Loading…
Reference in New Issue
Block a user