Compare commits

..

2 Commits

Author SHA1 Message Date
junleea 420d652e6b Merge branch 'refs/heads/feat-user' 2024-10-21 13:02:45 +08:00
junleea fa0781c353 用户权限更新问题 2024-10-21 13:02:28 +08:00
1 changed files with 2 additions and 0 deletions

View File

@ -1,6 +1,7 @@
package service package service
import ( import (
"fmt"
"regexp" "regexp"
"videoplayer/dao" "videoplayer/dao"
"videoplayer/proto" "videoplayer/proto"
@ -44,6 +45,7 @@ func GetUserByNameLike(name string) []proto.User {
func UpdateUser(user_id int, req proto.UpdateUserInfoReq) (int, error) { func UpdateUser(user_id int, req proto.UpdateUserInfoReq) (int, error) {
cur_user := dao.FindUserByID2(user_id) cur_user := dao.FindUserByID2(user_id)
fmt.Println("cur_user:", cur_user, "req:", req)
if user_id == req.ID { if user_id == req.ID {
dao.UpdateUserByID2(user_id, req) dao.UpdateUserByID2(user_id, req)
return user_id, nil return user_id, nil