|
|
@ -180,7 +180,7 @@ func GetUserWorkMoments(c *gin.Context) {
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req)
|
|
|
|
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req)
|
|
|
|
ok, userID := token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
|
|
|
|
ok, opUserID := token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
|
|
|
|
if !ok {
|
|
|
|
if !ok {
|
|
|
|
log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token"))
|
|
|
|
log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token"))
|
|
|
|
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"})
|
|
|
|
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"})
|
|
|
@ -191,7 +191,8 @@ func GetUserWorkMoments(c *gin.Context) {
|
|
|
|
PageNumber: req.PageNumber,
|
|
|
|
PageNumber: req.PageNumber,
|
|
|
|
ShowNumber: req.ShowNumber,
|
|
|
|
ShowNumber: req.ShowNumber,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
reqPb.UserID = userID
|
|
|
|
reqPb.OpUserID = opUserID
|
|
|
|
|
|
|
|
reqPb.UserID = req.UserID
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName)
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName)
|
|
|
|
client := pbOffice.NewOfficeServiceClient(etcdConn)
|
|
|
|
client := pbOffice.NewOfficeServiceClient(etcdConn)
|
|
|
|
respPb, err := client.GetUserWorkMoments(context.Background(), &reqPb)
|
|
|
|
respPb, err := client.GetUserWorkMoments(context.Background(), &reqPb)
|
|
|
|