This commit is contained in:
meixiongfeng 2023-10-08 16:14:38 +08:00
commit 5b60d088b8
3 changed files with 3 additions and 2 deletions

View File

@ -126,7 +126,7 @@ func (this *UserSession) SendMsg(mainType, subType string, msg proto.Message) (e
// 关闭用户连接对象
func (this *UserSession) Close() (err error) {
reply := &pb.RPCMessageReply{}
if err := this.service.RpcCall(context.Background(), fmt.Sprintf("%s/%s", Service_Gateway, this.GatewayServiceId), string(Rpc_GatewayAgentClose), &pb.AgentCloseeReq{
if err = this.service.RpcCall(context.Background(), fmt.Sprintf("%s/%s", Service_Gateway, this.GatewayServiceId), string(Rpc_GatewayAgentClose), &pb.AgentCloseeReq{
UserSessionId: this.SessionId,
}, reply); err != nil {
log.Errorf("Close UserSession:%s UserId:%s err:%v", this.SessionId, this.UserId, err)

View File

@ -81,7 +81,7 @@ func (this *ModelUser) User_Create(user *pb.DBUser) (err error) {
user.Ctime = now
user.Logintime = now
if _, err = this.DB.InsertOne(comm.TableUser, user); err != nil {
this.module.Errorln("创建用户", log.Field{Key: "sid", Value: user.Sid}, log.Field{Key: "account", Value: user.Binduid}, log.Field{Key: "err", Value: err.Error()})
this.module.Error("创建用户", log.Field{Key: "sid", Value: user.Sid}, log.Field{Key: "account", Value: user.Binduid}, log.Field{Key: "err", Value: err.Error()})
return
}
key := fmt.Sprintf("%s:%s", this.TableName, user.Uid)

View File

@ -438,6 +438,7 @@ func (this *User) change(session comm.IUserSession, attrs map[string]int32) (atn
Merchantmoney: user.Merchantmoney,
Integral: user.Integral,
Profit: user.Profit,
Deposit: user.Deposit,
}
atno = make([]*pb.UserAtno, 0, len(attrs))
for attr, add := range attrs {