修复工会活跃的bug
This commit is contained in:
parent
8dd12dd6d3
commit
6921950914
@ -356,6 +356,8 @@ const ( //Rpc
|
||||
|
||||
Rpc_ModuleBuriedTrigger core.Rpc_Key = "Rpc_ModuleBuriedTrigger" //埋点跨服触发通知
|
||||
Rpc_OpendCond core.Rpc_Key = "Rpc_OpendCond"
|
||||
|
||||
Rpc_ModuleWarorderSettlement core.Rpc_Key = "Rpc_ModuleWarorderSettlement" //战令结算
|
||||
)
|
||||
|
||||
// 事件类型定义处
|
||||
|
@ -68,7 +68,10 @@ func (this *apiComp) Activityreceive(session comm.IUserSession, req *pb.SociatyA
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 发放个人奖励
|
||||
if errdata = this.module.DispenseRes(session, conf.Reward, true); errdata != nil {
|
||||
return
|
||||
}
|
||||
// 活跃度领取
|
||||
if err := this.module.modelSociatyTask.activityReceive(req.Id, sociaty.Id, uid); err != nil {
|
||||
this.module.Error("活跃度领取", log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "params", Value: req.String()})
|
||||
|
@ -1,6 +1,7 @@
|
||||
package sociaty
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
"go_dreamfactory/pb"
|
||||
@ -78,6 +79,13 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.SociatyReceiveRe
|
||||
log.Field{Key: "taskId", Value: req.TaskId},
|
||||
)
|
||||
}
|
||||
} else {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ConfigNoFound,
|
||||
Title: pb.ErrorCode_ConfigNoFound.ToString(),
|
||||
Message: fmt.Sprintf("no found task conf:%d", req.TaskId),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 更新公会经验和活跃度
|
||||
|
@ -115,13 +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
|
||||
}
|
||||
|
||||
// 更新任务列表
|
||||
|
Loading…
Reference in New Issue
Block a user