Compare commits
2 Commits
6545dc72ac
...
420d652e6b
| Author | SHA1 | Date |
|---|---|---|
|
|
420d652e6b | |
|
|
fa0781c353 |
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue