Browse Source

update

master
DengBiao 1 year ago
parent
commit
971836b827
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      internal/business/app/user_app.go

+ 7
- 0
internal/business/app/user_app.go View File

@@ -2,6 +2,7 @@ package app

import (
"context"
"gim/internal/business/comm/utils"
"gim/internal/business/domain/user/repo"
"gim/pkg/pb"
"time"
@@ -17,6 +18,12 @@ func (*userApp) Get(ctx context.Context, userId int64) (*pb.User, error) {
}

func (*userApp) Update(ctx context.Context, userId int64, req *pb.UpdateUserReq) error {
utils.FilePutContents("update_info", utils.SerializeStr(map[string]interface{}{
"user_id": userId,
"nickname": req.Nickname,
"args": req,
"time": time.Now().Format("2006-01-02 15:04:05"),
}))
u, err := repo.UserRepo.Get(userId)
if err != nil {
return err


Loading…
Cancel
Save