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
f4012a24
Commit
f4012a24
authored
Jul 08, 2024
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
服务到期退出登录
parent
01df5ee5
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
62 additions
and
0 deletions
+62
-0
HaobanTimerApiService.java
.../gic/haoban/manage/api/service/HaobanTimerApiService.java
+5
-0
OpenStaffMapper.java
...gic/haoban/manage/service/dao/mapper/OpenStaffMapper.java
+3
-0
OpenStaffService.java
...m/gic/haoban/manage/service/service/OpenStaffService.java
+2
-0
OpenStaffServiceImpl.java
...ban/manage/service/service/impl/OpenStaffServiceImpl.java
+42
-0
HaobanTimerApiServiceImpl.java
...e/service/service/out/impl/HaobanTimerApiServiceImpl.java
+5
-0
OpenStaffMapper.xml
...ge3-service/src/main/resources/mapper/OpenStaffMapper.xml
+5
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/HaobanTimerApiService.java
View file @
f4012a24
...
@@ -128,5 +128,10 @@ public interface HaobanTimerApiService {
...
@@ -128,5 +128,10 @@ public interface HaobanTimerApiService {
*/
*/
void
openStaffTimer
(
String
params
)
;
void
openStaffTimer
(
String
params
)
;
/**
* 托管服务到期
* @param params
*/
void
openStaffServiceTimer
(
String
params
)
;
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/OpenStaffMapper.java
View file @
f4012a24
...
@@ -56,4 +56,6 @@ public interface OpenStaffMapper {
...
@@ -56,4 +56,6 @@ public interface OpenStaffMapper {
int
updateByAutoLogin
(
@Param
(
"id"
)
Long
openStaffId
,
@Param
(
"uuid"
)
String
uuid
)
;
int
updateByAutoLogin
(
@Param
(
"id"
)
Long
openStaffId
,
@Param
(
"uuid"
)
String
uuid
)
;
List
<
TabOpenStaff
>
listAllOnlineEnterprise
()
;
}
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/OpenStaffService.java
View file @
f4012a24
...
@@ -30,4 +30,6 @@ public interface OpenStaffService {
...
@@ -30,4 +30,6 @@ public interface OpenStaffService {
String
autoLogin
(
Long
openStaffId
,
Long
qwUserId
)
;
String
autoLogin
(
Long
openStaffId
,
Long
qwUserId
)
;
void
openStaffTimer
();
void
openStaffTimer
();
void
openStaffServiceTimer
();
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/OpenStaffServiceImpl.java
View file @
f4012a24
...
@@ -8,8 +8,10 @@ import com.gic.clerk.api.dto.ClerkDTO;
...
@@ -8,8 +8,10 @@ import com.gic.clerk.api.dto.ClerkDTO;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.commons.util.PageHelperUtils
;
import
com.gic.commons.util.PageHelperUtils
;
import
com.gic.commons.util.UniqueIdUtils
;
import
com.gic.commons.util.UniqueIdUtils
;
import
com.gic.enterprise.api.dto.EnterpriseUsingPermissionDto
;
import
com.gic.enterprise.api.dto.StoreDTO
;
import
com.gic.enterprise.api.dto.StoreDTO
;
import
com.gic.enterprise.api.dto.StoreSearchDTO
;
import
com.gic.enterprise.api.dto.StoreSearchDTO
;
import
com.gic.enterprise.api.service.EnterpriseUseForbidService
;
import
com.gic.enterprise.api.service.StoreGroupService
;
import
com.gic.enterprise.api.service.StoreGroupService
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.haoban.manage.api.dto.OpenStaffListDTO
;
import
com.gic.haoban.manage.api.dto.OpenStaffListDTO
;
...
@@ -58,6 +60,8 @@ public class OpenStaffServiceImpl implements OpenStaffService {
...
@@ -58,6 +60,8 @@ public class OpenStaffServiceImpl implements OpenStaffService {
private
NoticeMessageApiService
noticeMessageApiService
;
private
NoticeMessageApiService
noticeMessageApiService
;
@Autowired
@Autowired
private
StaffMapper
staffMapper
;
private
StaffMapper
staffMapper
;
@Autowired
private
EnterpriseUseForbidService
enterpriseUseForbidService
;
@Override
@Override
public
TabOpenStaff
save
(
TabOpenStaff
tab
)
{
public
TabOpenStaff
save
(
TabOpenStaff
tab
)
{
...
@@ -251,4 +255,42 @@ public class OpenStaffServiceImpl implements OpenStaffService {
...
@@ -251,4 +255,42 @@ public class OpenStaffServiceImpl implements OpenStaffService {
}
}
}
}
}
}
@Override
public
void
openStaffServiceTimer
()
{
log
.
info
(
"托管服务到期"
);
List
<
TabOpenStaff
>
list
=
this
.
openStaffMapper
.
listAllOnlineEnterprise
();
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
for
(
TabOpenStaff
item
:
list
)
{
String
wxEnterpriseId
=
item
.
getWxEnterpriseId
()
;
String
enterpriseId
=
item
.
getEnterpriseId
()
;
boolean
isValid
=
this
.
isValid
(
wxEnterpriseId
,
enterpriseId
)
;
log
.
info
(
"是否有效={},{},{}"
,
isValid
,
wxEnterpriseId
,
enterpriseId
);
if
(!
isValid
)
{
List
<
TabOpenStaff
>
staffList
=
this
.
openStaffMapper
.
listAllOnline
(
wxEnterpriseId
,
enterpriseId
);
if
(
CollectionUtils
.
isNotEmpty
(
staffList
))
{
staffList
.
forEach
(
o
->{
this
.
logout
(
o
.
getUuid
(),
"服务过期"
,
0
,
null
);
});
}
}
}
}
}
private
boolean
isValid
(
String
wxEnterpriseId
,
String
enterpriseId
)
{
ServiceResponse
<
EnterpriseUsingPermissionDto
>
resp
=
this
.
enterpriseUseForbidService
.
getWxEnterpriseService
(
enterpriseId
,
wxEnterpriseId
);
log
.
info
(
"托管许可={}"
,
JSONObject
.
toJSONString
(
resp
));
if
(
resp
.
isSuccess
())
{
EnterpriseUsingPermissionDto
dto
=
resp
.
getResult
();
if
(
null
==
dto
)
{
return
false
;
}
else
{
if
(
dto
.
getServiceEndDate
().
before
(
new
Date
()))
{
return
false
;
}
}
}
return
true
;
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/HaobanTimerApiServiceImpl.java
View file @
f4012a24
...
@@ -181,4 +181,9 @@ public class HaobanTimerApiServiceImpl implements HaobanTimerApiService {
...
@@ -181,4 +181,9 @@ public class HaobanTimerApiServiceImpl implements HaobanTimerApiService {
public
void
openStaffTimer
(
String
params
)
{
public
void
openStaffTimer
(
String
params
)
{
this
.
openStaffService
.
openStaffTimer
()
;
this
.
openStaffService
.
openStaffTimer
()
;
}
}
@Override
public
void
openStaffServiceTimer
(
String
params
)
{
this
.
openStaffService
.
openStaffServiceTimer
()
;
}
}
}
haoban-manage3-service/src/main/resources/mapper/OpenStaffMapper.xml
View file @
f4012a24
...
@@ -244,6 +244,11 @@
...
@@ -244,6 +244,11 @@
</if>
</if>
</select>
</select>
<select
id=
"listAllOnlineEnterprise"
resultMap=
"BaseResultMap"
>
select wx_enterprise_id,enterprise_id from tab_haoban_open_staff where
status_flag = 1 and delete_flag = 0 group by wx_enterprise_id , enterprise_id
</select>
<select
id=
"listOpenStoreId"
resultType=
"java.lang.String"
>
<select
id=
"listOpenStoreId"
resultType=
"java.lang.String"
>
select a.store_id from tab_haoban_staff_clerk_relation a left join tab_haoban_open_staff b on a.staff_id = b.staff_id
select a.store_id from tab_haoban_staff_clerk_relation a left join tab_haoban_open_staff b on a.staff_id = b.staff_id
where a.wx_enterprise_id = #{wxEnterpriseId} and a.enterprise_id=#{enterpriseId} and a.status_flag = 1
where a.wx_enterprise_id = #{wxEnterpriseId} and a.enterprise_id=#{enterpriseId} and a.status_flag = 1
...
...
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