Compare commits
2 Commits
a90d952d07
...
e9df7fb286
Author | SHA1 | Date | |
---|---|---|---|
e9df7fb286 | |||
0852ca8f68 |
@ -10,7 +10,7 @@ import (
|
||||
"go.mongodb.org/mongo-driver/mongo"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
// 参数校验
|
||||
func (this *apiComp) LoginCheck(session comm.IUserSession, req *pb.UserLoginReq) (errdata *pb.ErrorData) {
|
||||
if req.Account == "" {
|
||||
errdata = &pb.ErrorData{
|
||||
@ -21,7 +21,7 @@ func (this *apiComp) LoginCheck(session comm.IUserSession, req *pb.UserLoginReq)
|
||||
return
|
||||
}
|
||||
|
||||
//登录
|
||||
// 登录
|
||||
func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (errdata *pb.ErrorData) {
|
||||
if errdata = this.LoginCheck(session, req); errdata != nil {
|
||||
return
|
||||
@ -129,6 +129,7 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (err
|
||||
if this.module.modelUser.isLoginFirst(lastLoginTime) {
|
||||
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.Rtype9, 1))
|
||||
this.module.modelExpand.updateLoginDay(user.Uid, lastLoginTime)
|
||||
// 清理点赞
|
||||
this.module.ModuleFriend.ResetFriend(user.Uid)
|
||||
@ -150,7 +151,7 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (err
|
||||
} else {
|
||||
rsp.Ex = expand
|
||||
}
|
||||
} else { //新号
|
||||
} else { //新号
|
||||
rsp.Ex = &pb.DBUserExpand{}
|
||||
this.module.modelSign.UserSign(session)
|
||||
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype8, 1))
|
||||
|
@ -536,10 +536,12 @@ func (this *User) change(session comm.IUserSession, attr string, add int32) (cha
|
||||
}
|
||||
return
|
||||
}
|
||||
} else {
|
||||
change.Ps += add
|
||||
if change.Ps > ggd.PsUl {
|
||||
} else {
|
||||
if change.Ps+add > ggd.PsUl {
|
||||
change.Ps = ggd.PsUl
|
||||
} else {
|
||||
change.Ps += add
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user