update rtype9埋点

This commit is contained in:
wh_zcy 2023-06-29 11:14:52 +08:00
parent 5347cca64e
commit 0852ca8f68
2 changed files with 8 additions and 5 deletions

View File

@ -10,7 +10,7 @@ import (
"go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo"
) )
//参数校验 // 参数校验
func (this *apiComp) LoginCheck(session comm.IUserSession, req *pb.UserLoginReq) (errdata *pb.ErrorData) { func (this *apiComp) LoginCheck(session comm.IUserSession, req *pb.UserLoginReq) (errdata *pb.ErrorData) {
if req.Account == "" { if req.Account == "" {
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
@ -21,7 +21,7 @@ func (this *apiComp) LoginCheck(session comm.IUserSession, req *pb.UserLoginReq)
return return
} }
//登录 // 登录
func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (errdata *pb.ErrorData) { func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (errdata *pb.ErrorData) {
if errdata = this.LoginCheck(session, req); errdata != nil { if errdata = this.LoginCheck(session, req); errdata != nil {
return return
@ -129,6 +129,7 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (err
if this.module.modelUser.isLoginFirst(lastLoginTime) { if this.module.modelUser.isLoginFirst(lastLoginTime) {
this.module.ModuleHero.NoLoginDay(user.Uid, int32(utils.DiffDays(lastLoginTime, configure.Now().Unix()))) this.module.ModuleHero.NoLoginDay(user.Uid, int32(utils.DiffDays(lastLoginTime, configure.Now().Unix())))
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype8, 1)) go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype8, 1))
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype9, 1))
this.module.modelExpand.updateLoginDay(user.Uid, lastLoginTime) this.module.modelExpand.updateLoginDay(user.Uid, lastLoginTime)
// 清理点赞 // 清理点赞
this.module.ModuleFriend.ResetFriend(user.Uid) this.module.ModuleFriend.ResetFriend(user.Uid)
@ -150,7 +151,7 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (err
} else { } else {
rsp.Ex = expand rsp.Ex = expand
} }
} else { //新号 } else { //新号
rsp.Ex = &pb.DBUserExpand{} rsp.Ex = &pb.DBUserExpand{}
this.module.modelSign.UserSign(session) this.module.modelSign.UserSign(session)
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype8, 1)) go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype8, 1))

View File

@ -536,10 +536,12 @@ func (this *User) change(session comm.IUserSession, attr string, add int32) (cha
} }
return return
} }
} else {
change.Ps += add change.Ps += add
if change.Ps > ggd.PsUl { } else {
if change.Ps+add > ggd.PsUl {
change.Ps = ggd.PsUl change.Ps = ggd.PsUl
} else {
change.Ps += add
} }
} }