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
35fadfeb
Commit
35fadfeb
authored
Aug 26, 2024
by
徐高华
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/xgh/240820' into 'developer'
Feature/xgh/240820 See merge request
!2124
parents
4f0fe973
3108b3a5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
7 deletions
+25
-7
OpenStaffService.java
...m/gic/haoban/manage/service/service/OpenStaffService.java
+3
-1
OpenStaffServiceImpl.java
...ban/manage/service/service/impl/OpenStaffServiceImpl.java
+13
-3
OpenStaffApiServiceImpl.java
...age/service/service/out/impl/OpenStaffApiServiceImpl.java
+2
-2
CustomSwitcher.java
...va/com/gic/haoban/manage/service/util/CustomSwitcher.java
+3
-0
OpenUtils.java
...in/java/com/gic/haoban/manage/service/util/OpenUtils.java
+4
-1
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/OpenStaffService.java
View file @
35fadfeb
...
...
@@ -27,9 +27,11 @@ public interface OpenStaffService {
* @param qwUserId
* @return
*/
String
autoLogin
(
Long
openStaffId
,
Long
qwUserId
)
;
String
autoLogin
(
Long
openStaffId
,
Long
qwUserId
,
String
wxEnterpriseId
)
;
void
openStaffTimer
();
void
openStaffServiceTimer
();
String
getDeverType
(
String
wxEnterpriseId
)
;
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/OpenStaffServiceImpl.java
View file @
35fadfeb
...
...
@@ -30,6 +30,7 @@ import com.gic.haoban.manage.service.entity.TabOpenStaff;
import
com.gic.haoban.manage.service.pojo.QwOpenResultInitBO
;
import
com.gic.haoban.manage.service.service.OpenStaffService
;
import
com.gic.haoban.manage.service.service.StaffClerkRelationService
;
import
com.gic.haoban.manage.service.util.CustomSwitcher
;
import
com.gic.haoban.manage.service.util.OpenUtils
;
import
com.gic.redis.data.util.RedisUtil
;
import
com.github.pagehelper.PageHelper
;
...
...
@@ -223,8 +224,8 @@ public class OpenStaffServiceImpl implements OpenStaffService {
}
@Override
public
String
autoLogin
(
Long
openStaffId
,
Long
qwUserId
)
{
ServiceResponse
<
QwOpenResultInitBO
>
initResp
=
OpenUtils
.
init
(
qwUserId
,
false
);
public
String
autoLogin
(
Long
openStaffId
,
Long
qwUserId
,
String
wxEnterpriseId
)
{
ServiceResponse
<
QwOpenResultInitBO
>
initResp
=
OpenUtils
.
init
(
qwUserId
,
false
,
this
.
getDeverType
(
wxEnterpriseId
)
);
log
.
info
(
"自动登录-初始化={},{}"
,
qwUserId
,
JSONObject
.
toJSONString
(
initResp
));
if
(
initResp
.
isSuccess
()
&&
StringUtils
.
isNotBlank
(
initResp
.
getResult
().
getUuid
()))
{
QwOpenResultInitBO
bo
=
initResp
.
getResult
();
...
...
@@ -268,7 +269,7 @@ public class OpenStaffServiceImpl implements OpenStaffService {
boolean
isLogin
=
OpenUtils
.
isLogin
(
uuid
);
// 未登录
if
(!
isLogin
)
{
String
autLogin
=
this
.
autoLogin
(
item
.
getOpenStaffId
(),
item
.
getQwUserId
());
String
autLogin
=
this
.
autoLogin
(
item
.
getOpenStaffId
(),
item
.
getQwUserId
()
,
item
.
getWxEnterpriseId
()
);
if
(
null
==
autLogin
)
{
this
.
logout
(
uuid
,
"定时检查异"
,
0
,
OpenStaffOfflineEnum
.
OFFLINE2
.
getDesc
());
}
...
...
@@ -320,4 +321,13 @@ public class OpenStaffServiceImpl implements OpenStaffService {
}
return
true
;
}
@Override
public
String
getDeverType
(
String
wxEnterpriseId
)
{
if
(
StringUtils
.
isBlank
(
wxEnterpriseId
))
{
return
null
;
}
return
CustomSwitcher
.
qywx_open_type
.
get
(
wxEnterpriseId
)
;
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/OpenStaffApiServiceImpl.java
View file @
35fadfeb
...
...
@@ -214,7 +214,7 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService {
log
.
info
(
"重新初始化"
);
this
.
openStaffService
.
logout
(
openStaff
.
getUuid
(),
"重新初始化"
,
0
,
null
);
// 自动登录
String
newUuid
=
this
.
openStaffService
.
autoLogin
(
openStaff
.
getOpenStaffId
(),
openStaff
.
getQwUserId
())
;
String
newUuid
=
this
.
openStaffService
.
autoLogin
(
openStaff
.
getOpenStaffId
(),
openStaff
.
getQwUserId
()
,
openStaff
.
getWxEnterpriseId
()
)
;
if
(
null
!=
newUuid
)
{
log
.
info
(
"自动登录成功"
);
openStaff
.
setAuthTime
(
new
Date
());
...
...
@@ -246,7 +246,7 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService {
openStaff
=
this
.
openStaffService
.
save
(
openStaff
);
return
ServiceResponse
.
success
(
null
);
}
ServiceResponse
<
QwOpenResultInitBO
>
resp
=
OpenUtils
.
init
(
qwUserId
,
true
);
ServiceResponse
<
QwOpenResultInitBO
>
resp
=
OpenUtils
.
init
(
qwUserId
,
true
,
this
.
openStaffService
.
getDeverType
(
qdto
.
getWxEnterpriseId
())
);
log
.
info
(
"resp={}"
,
JSONObject
.
toJSONString
(
resp
));
QwOpenResultInitBO
init
=
resp
.
getResult
();
openStaff
.
setUuid
(
init
.
getUuid
());
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/util/CustomSwitcher.java
View file @
35fadfeb
...
...
@@ -8,6 +8,9 @@ import java.util.Map;
@SwitcherNamespace
(
"BUZ.qywx.open"
)
public
class
CustomSwitcher
{
@Switcher
public
static
Map
<
String
,
String
>
qywx_open_type
;
/**
* 积分触不通知会员名单
*/
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/util/OpenUtils.java
View file @
35fadfeb
...
...
@@ -23,11 +23,14 @@ public class OpenUtils {
return
CustomSwitcher
.
qywx_open_host
;
}
public
static
ServiceResponse
<
QwOpenResultInitBO
>
init
(
Long
qwUserId
,
boolean
qrcodeFlag
)
{
public
static
ServiceResponse
<
QwOpenResultInitBO
>
init
(
Long
qwUserId
,
boolean
qrcodeFlag
,
String
deverType
)
{
JSONObject
initJson
=
new
JSONObject
();
if
(
null
!=
qwUserId
)
{
initJson
.
put
(
"vid"
,
qwUserId
);
}
if
(
null
!=
deverType
)
{
initJson
.
put
(
"deverType"
,
deverType
)
;
}
String
initStr
=
HttpClient
.
sendPostJSON
(
String
.
format
(
getHost
(),
"init"
),
initJson
.
toJSONString
(),
"utf-8"
);
logger
.
info
(
"企微初始化,req={},{}"
,
initJson
.
toJSONString
(),
initStr
);
QwOpenResultBO
initResult
=
result
(
initStr
);
...
...
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