Compare commits

..

No commits in common. "0c7db6d312209996665e08fd3c38641d8d5d5649" and "71e504afc5bd804df16e9187e8eb351af6d785bd" have entirely different histories.

2 changed files with 4 additions and 12 deletions

View File

@ -9,7 +9,6 @@ package ws
import (
"context"
"encoding/json"
"fmt"
"fonchain-fiee/api/account"
"fonchain-fiee/api/accountFiee"
"fonchain-fiee/pkg/config"
@ -48,7 +47,7 @@ func AuthorizationVerify(sourceData []byte) (userInfo *accountFiee.ChatUserData,
accountInfo.OriginId = int64(fieeJwtInfo.ID)
accountInfo.Account = fieeJwtInfo.Account
accountInfo.NickName = fieeJwtInfo.NickName
case e.ErpDomain:
case "fontree":
//erp token校验
msg.Content.Auth, err = secret.GetJwtFromStr(msg.Content.Auth)
if err != nil {
@ -76,25 +75,19 @@ func AuthorizationVerify(sourceData []byte) (userInfo *accountFiee.ChatUserData,
if err != nil || chatUserQuery.Total == 0 {
//注册客服
var createUserRes *accountFiee.CreateChatUserResp
var createChatUserReq = &accountFiee.ChatUserData{
createUserRes, err = service.AccountFieeProvider.CreateChatUser(ctx, &accountFiee.ChatUserData{
NickName: accountInfo.NickName,
Account: accountInfo.Account,
Role: 1,
Role: 2,
Origin: msg.Content.Domain,
OriginId: int64(accountInfo.ID),
}
if msg.Content.Domain == e.ErpDomain {
createChatUserReq.Role = 2
}
fmt.Printf("注册聊天用户:%#v\n", createChatUserReq)
createUserRes, err = service.AccountFieeProvider.CreateChatUser(ctx, createChatUserReq)
})
if err != nil {
return
}
userInfo = createUserRes.GetData()
} else {
userInfo = chatUserQuery.List[0]
fmt.Printf("获取聊天用户:%#v\n", userInfo)
}
ok = true
return

View File

@ -13,7 +13,6 @@ const (
const (
DomainAdmin = "blockchain"
ErpDomain = "fontree"
)
const (