diff --git a/modules/practice/module.go b/modules/practice/module.go index 4a9168695..cbd61ed69 100644 --- a/modules/practice/module.go +++ b/modules/practice/module.go @@ -211,18 +211,22 @@ func (this *Practice) OpenCmdNotice(uid string, keys ...string) { ) if !this.IsCross() { for _, v := range keys { - err := this.service.AcrossClusterRpcCall(context.Background(), this.GetCrossTag(), - comm.Service_Worker, string(comm.RPC_ModulePracticeUnLockPillar), - &pb.RPCGeneralReqA2{Param1: uid, Param2: v}, &pb.EmptyResp{}) - if err != nil { - this.Errorln(err) - return + if v == "practice_ pillar1" || v == "practice_ pillar2" || v == "practice_ pillar3" { + err := this.service.AcrossClusterRpcCall(context.Background(), this.GetCrossTag(), + comm.Service_Worker, string(comm.RPC_ModulePracticeUnLockPillar), + &pb.RPCGeneralReqA2{Param1: uid, Param2: v}, &pb.EmptyResp{}) + if err != nil { + this.Errorln(err) + return + } } } } else { for _, v := range keys { - this.RPC_ModulePracticeUnLockPillar(context.Background(), &pb.RPCGeneralReqA2{Param1: uid, Param2: v}, &pb.EmptyResp{}) + if v == "practice_ pillar1" || v == "practice_ pillar2" || v == "practice_ pillar3" { + this.RPC_ModulePracticeUnLockPillar(context.Background(), &pb.RPCGeneralReqA2{Param1: uid, Param2: v}, &pb.EmptyResp{}) + } } } } @@ -383,7 +387,10 @@ func (this *Practice) RPC_ModulePracticeUnLockPillar(ctx context.Context, args * }) this.atlas.CheckActivatePandaAtlasCollect(args.Param1, "100001") break + default: + return } + _session, _ := this.GetUserSession(args.Param1) go this.ModuleBuried.TriggerBuried(_session, comm.GetBuriedParam(comm.Rtype152, 1)) return diff --git a/modules/user/model_session.go b/modules/user/model_session.go index 26a895462..d051af33a 100644 --- a/modules/user/model_session.go +++ b/modules/user/model_session.go @@ -33,7 +33,9 @@ func (this *ModelSession) Start() (err error) { // 获取用户 func (this *ModelSession) getUserSession(uid string) (user *pb.CacheUser) { - user = &pb.CacheUser{} + user = &pb.CacheUser{ + Uid: uid, + } if err := this.GetListObj(comm.RDS_EMPTY, uid, user); err != nil { if err != mongo.ErrNoDocuments { this.module.Errorln(err)