LinsRuis.HW1 2 months ago
parent
commit
4182cc08ae
  1. 6
      webs/sys/routehb/user.go

6
webs/sys/routehb/user.go

@ -9,13 +9,14 @@ import (
"GoClouds/service" "GoClouds/service"
"GoClouds/service/userService" "GoClouds/service/userService"
"fmt" "fmt"
"strings"
"time"
hbtp "github.com/mgr9525/HyperByte-Transfer-Protocol" hbtp "github.com/mgr9525/HyperByte-Transfer-Protocol"
gocloud "github.com/mgr9525/go-cloud" gocloud "github.com/mgr9525/go-cloud"
ruisUtil "github.com/mgr9525/go-ruisutil" ruisUtil "github.com/mgr9525/go-ruisutil"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
"go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/bson/primitive"
"strings"
"time"
) )
type UserRPC struct{} type UserRPC struct{}
@ -101,6 +102,7 @@ func (UserRPC) Login(c *hbtp.Context, m *sysBean.LoginReq) {
ret.Xid = usr.Xid ret.Xid = usr.Xid
ret.Name = usr.Name ret.Name = usr.Name
ret.SetHash(usr.Pass) ret.SetHash(usr.Pass)
gocloud.CacheSets(fmt.Sprintf("uinfo:%s", usr.Xid), nil)
c.ResJson(hbtp.ResStatusOk, ret) c.ResJson(hbtp.ResStatusOk, ret)
} }
func (UserRPC) Reg(c *hbtp.Context, m *sysBean.RegReq) { func (UserRPC) Reg(c *hbtp.Context, m *sysBean.RegReq) {

Loading…
Cancel
Save