Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
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
haoban3.0
haoban-manage3.0
Commits
2c87140f
Commit
2c87140f
authored
Jun 07, 2024
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
企微托管账号
parent
13910bf4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
5 deletions
+36
-5
OpenStaffApiService.java
...om/gic/haoban/manage/api/service/OpenStaffApiService.java
+8
-0
OpenStaffApiServiceImpl.java
...age/service/service/out/impl/OpenStaffApiServiceImpl.java
+10
-1
OpenUtils.java
...in/java/com/gic/haoban/manage/service/util/OpenUtils.java
+18
-4
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/OpenStaffApiService.java
View file @
2c87140f
...
@@ -47,6 +47,14 @@ public interface OpenStaffApiService {
...
@@ -47,6 +47,14 @@ public interface OpenStaffApiService {
public
ServiceResponse
<
Void
>
logout
(
String
uuid
)
;
public
ServiceResponse
<
Void
>
logout
(
String
uuid
)
;
/**
/**
* 校验验证码
* @param openStaffId
* @param validCode
* @return
*/
public
ServiceResponse
<
Void
>
checkCode
(
Long
openStaffId
,
String
validCode
)
;
/**
*
*
* @param uuid
* @param uuid
* @param loginStatus
* @param loginStatus
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/OpenStaffApiServiceImpl.java
View file @
2c87140f
...
@@ -65,7 +65,7 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService {
...
@@ -65,7 +65,7 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService {
}
}
String
wxEnterpriseId
=
openStaff
.
getWxEnterpriseId
()
;
String
wxEnterpriseId
=
openStaff
.
getWxEnterpriseId
()
;
List
<
String
>
backWxEnterpriseIdList
=
this
.
wxEnterpriseService
.
getWxEnterpriseIdByName
(
corpName
)
;
List
<
String
>
backWxEnterpriseIdList
=
this
.
wxEnterpriseService
.
getWxEnterpriseIdByName
(
corpName
)
;
if
(
CollectionUtils
.
is
Not
Empty
(
backWxEnterpriseIdList
)
||
backWxEnterpriseIdList
.
size
()>
1
||
!
backWxEnterpriseIdList
.
get
(
0
).
equals
(
wxEnterpriseId
))
{
if
(
CollectionUtils
.
isEmpty
(
backWxEnterpriseIdList
)
||
backWxEnterpriseIdList
.
size
()>
1
||
!
backWxEnterpriseIdList
.
get
(
0
).
equals
(
wxEnterpriseId
))
{
OpenUtils
.
logout
(
uuid
);
OpenUtils
.
logout
(
uuid
);
log
.
info
(
"登录的企业不对={},{}"
,
uuid
,
corpName
);
log
.
info
(
"登录的企业不对={},{}"
,
uuid
,
corpName
);
return
ServiceResponse
.
failure
(
"9999"
,
"登录错误"
)
;
return
ServiceResponse
.
failure
(
"9999"
,
"登录错误"
)
;
...
@@ -87,6 +87,15 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService {
...
@@ -87,6 +87,15 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService {
}
}
@Override
@Override
public
ServiceResponse
<
Void
>
checkCode
(
Long
openStaffId
,
String
validCode
)
{
TabOpenStaff
tab
=
this
.
openStaffMapper
.
getById
(
openStaffId
)
;
if
(
null
==
tab
)
{
return
ServiceResponse
.
failure
(
"9999"
,
"记录不存在"
)
;
}
return
OpenUtils
.
checkCode
(
tab
.
getUuid
(),
tab
.
getKey1
(),
validCode
)
;
}
@Override
public
ServiceResponse
<
OpenStaffDTO
>
getById
(
Long
openStaffId
)
{
public
ServiceResponse
<
OpenStaffDTO
>
getById
(
Long
openStaffId
)
{
TabOpenStaff
openStaff
=
this
.
openStaffMapper
.
getById
(
openStaffId
)
;
TabOpenStaff
openStaff
=
this
.
openStaffMapper
.
getById
(
openStaffId
)
;
if
(
null
==
openStaff
)
{
if
(
null
==
openStaff
)
{
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/util/OpenUtils.java
View file @
2c87140f
...
@@ -43,19 +43,33 @@ public class OpenUtils {
...
@@ -43,19 +43,33 @@ public class OpenUtils {
return
ServiceResponse
.
success
(
initBO
)
;
return
ServiceResponse
.
success
(
initBO
)
;
}
}
public
static
ServiceResponse
<
Void
>
checkCode
(
String
uuid
,
String
qrcodeKey
,
String
validCode
)
{
JSONObject
json
=
new
JSONObject
()
;
json
.
put
(
"uuid"
,
uuid
)
;
json
.
put
(
"qrcodeKey"
,
qrcodeKey
)
;
json
.
put
(
"code"
,
validCode
)
;
String
backJson
=
HttpClient
.
sendPostJSON
(
String
.
format
(
openHost
,
"CheckCode"
),
json
.
toJSONString
(),
"utf-8"
)
;
logger
.
info
(
"校验验证码={},uuid={}"
,
backJson
,
uuid
);
QwOpenResultBO
bo
=
result
(
backJson
)
;
if
(!
bo
.
isOk
())
{
return
ServiceResponse
.
failure
(
"9999"
,
bo
.
getErrmsg
())
;
}
return
ServiceResponse
.
success
()
;
}
public
static
void
logout
(
String
uuid
)
{
public
static
void
logout
(
String
uuid
)
{
JSONObject
json
=
new
JSONObject
()
;
JSONObject
json
=
new
JSONObject
()
;
json
.
put
(
"uuid"
,
uuid
)
;
json
.
put
(
"uuid"
,
uuid
)
;
String
call
backJson
=
HttpClient
.
sendPostJSON
(
String
.
format
(
openHost
,
"LoginOut"
),
json
.
toJSONString
(),
"utf-8"
)
;
String
backJson
=
HttpClient
.
sendPostJSON
(
String
.
format
(
openHost
,
"LoginOut"
),
json
.
toJSONString
(),
"utf-8"
)
;
logger
.
info
(
"退出={},uuid={}"
,
call
backJson
,
uuid
);
logger
.
info
(
"退出={},uuid={}"
,
backJson
,
uuid
);
}
}
private
static
void
setCallback
(
String
uuid
)
{
private
static
void
setCallback
(
String
uuid
)
{
JSONObject
json
=
new
JSONObject
()
;
JSONObject
json
=
new
JSONObject
()
;
json
.
put
(
"uuid"
,
uuid
)
;
json
.
put
(
"uuid"
,
uuid
)
;
json
.
put
(
"url"
,
gicCallbackHost
)
;
json
.
put
(
"url"
,
gicCallbackHost
)
;
String
call
backJson
=
HttpClient
.
sendPostJSON
(
String
.
format
(
openHost
,
"SetCallbackUrl"
),
json
.
toJSONString
(),
"utf-8"
)
;
String
backJson
=
HttpClient
.
sendPostJSON
(
String
.
format
(
openHost
,
"SetCallbackUrl"
),
json
.
toJSONString
(),
"utf-8"
)
;
logger
.
info
(
"设置回调={},uuid={}"
,
call
backJson
,
uuid
);
logger
.
info
(
"设置回调={},uuid={}"
,
backJson
,
uuid
);
}
}
private
static
ServiceResponse
<
QwOpenResultInitBO
>
getQrcode
(
String
uuid
,
QwOpenResultInitBO
initBO
)
{
private
static
ServiceResponse
<
QwOpenResultInitBO
>
getQrcode
(
String
uuid
,
QwOpenResultInitBO
initBO
)
{
...
...
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