Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
f4f04e51
Commit
f4f04e51
authored
Dec 26, 2022
by
zhangyingbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改坐席登录接口
parent
bbb7337e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
4 deletions
+21
-4
CtiController.java
...in/amos/boot/module/tzs/biz/controller/CtiController.java
+5
-0
CtiServiceImpl.java
...amos/boot/module/tzs/biz/service/impl/CtiServiceImpl.java
+16
-4
No files found.
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/CtiController.java
View file @
f4f04e51
...
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.CtiDto
;
import
com.yeejoin.amos.boot.module.tzs.api.service.ICtiService
;
import
com.yeejoin.amos.boot.module.tzs.biz.utils.HttpUtils
;
...
...
@@ -18,6 +19,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
...
...
@@ -55,6 +57,9 @@ public class CtiController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取坐席登陆信息"
,
notes
=
"获取坐席登陆信息"
)
public
ResponseModel
<
JSONObject
>
getCtiInfo
()
{
JSONObject
loginData
=
ctiService
.
getLoginInfo
();
if
(
ValidationUtil
.
isEmpty
(
loginData
)){
return
CommonResponseUtil
.
failure
(
"当前用户不是坐席人员!"
);
}
return
ResponseHelper
.
buildResponse
(
loginData
);
}
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/CtiServiceImpl.java
View file @
f4f04e51
...
...
@@ -2,8 +2,10 @@ package com.yeejoin.amos.boot.module.tzs.biz.service.impl;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.TzsCitInfo
;
import
com.yeejoin.amos.boot.module.tzs.api.service.ICtiService
;
import
com.yeejoin.amos.boot.module.tzs.biz.utils.HttpUtils
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
...
...
@@ -16,6 +18,7 @@ import org.springframework.mock.web.MockMultipartFile;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.security.MessageDigest
;
...
...
@@ -34,6 +37,9 @@ public class CtiServiceImpl implements ICtiService {
@Autowired
RedisUtils
redisUtils
;
@Autowired
TzsCitInfoServiceImpl
ctiInfoService
;
/**
* token 过期时间, cti 系统为7200 ,tzs 系统小于7200 防止获取到无效token
*/
...
...
@@ -86,11 +92,17 @@ public class CtiServiceImpl implements ICtiService {
@Override
public
JSONObject
getLoginInfo
()
{
String
token
=
this
.
getAccessToken
();
// gid code extphone 目前写死 后面根据用户获取
String
gid
=
"61,默认,0"
;
// gid code extphone 根据用户获取
AgencyUserModel
me
=
Privilege
.
agencyUserClient
.
getme
().
getResult
();
String
code
=
"1001"
;
String
extphone
=
"10001001"
;
LambdaQueryWrapper
<
TzsCitInfo
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
TzsCitInfo:
:
getCtiUserId
,
me
.
getUserId
());
TzsCitInfo
citInfo
=
ctiInfoService
.
getOne
(
wrapper
);
if
(
ValidationUtil
.
isEmpty
(
citInfo
)){
return
null
;
}
String
gid
=
citInfo
.
getGid
();
String
code
=
citInfo
.
getCode
();
String
extphone
=
citInfo
.
getExtphone
();
String
loginUrl
=
ctiUrl
+
"/cti/login"
+
"?accessToken="
+
token
;
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"accessToken"
,
token
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment