|
@@ -2,6 +2,7 @@ package app |
|
|
|
|
|
|
|
|
import ( |
|
|
import ( |
|
|
"context" |
|
|
"context" |
|
|
|
|
|
"gim/internal/business/comm/utils" |
|
|
"gim/internal/business/domain/user/repo" |
|
|
"gim/internal/business/domain/user/repo" |
|
|
"gim/pkg/pb" |
|
|
"gim/pkg/pb" |
|
|
"time" |
|
|
"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 { |
|
|
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) |
|
|
u, err := repo.UserRepo.Get(userId) |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
return err |
|
|
return err |
|
|