作者 yangfu

用户中心修改

@@ -31,7 +31,7 @@ type RequestHeader struct { @@ -31,7 +31,7 @@ type RequestHeader struct {
31 31
32 /*Login */ 32 /*Login */
33 type LoginRequest struct { 33 type LoginRequest struct {
34 - Uid string `json:"cuid" valid:"Required;"` 34 + Uid int64 `json:"cuid" valid:"Required;"`
35 Token string `json:"credentials" valid:"Required;"` 35 Token string `json:"credentials" valid:"Required;"`
36 ClientId string `json:"clientId"` 36 ClientId string `json:"clientId"`
37 } 37 }
@@ -9,7 +9,6 @@ import ( @@ -9,7 +9,6 @@ import (
9 "net/http" 9 "net/http"
10 "opp/internal/utils" 10 "opp/internal/utils"
11 "opp/services/agg" 11 "opp/services/agg"
12 - "strconv"  
13 "time" 12 "time"
14 13
15 "gitlab.fjmaimaimai.com/mmm-go/gocomm/identity/uid" 14 "gitlab.fjmaimaimai.com/mmm-go/gocomm/identity/uid"
@@ -36,7 +35,7 @@ func Login(header *protocol.RequestHeader, request *protocol.LoginRequest) (rsp @@ -36,7 +35,7 @@ func Login(header *protocol.RequestHeader, request *protocol.LoginRequest) (rsp
36 var ( 35 var (
37 user *models.User 36 user *models.User
38 userAuth *models.UserAuth 37 userAuth *models.UserAuth
39 - id, _ = strconv.ParseInt(request.Uid, 10, 64) 38 + id = request.Uid
40 getUserRequest *protocol.UCenterServerLoginRequest = &protocol.UCenterServerLoginRequest{ 39 getUserRequest *protocol.UCenterServerLoginRequest = &protocol.UCenterServerLoginRequest{
41 Uid: id, 40 Uid: id,
42 Token: request.Token, 41 Token: request.Token,