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
10bb0c1f
Commit
10bb0c1f
authored
May 12, 2023
by
徐高华
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/自建应用验证' into 'master'
激活码 See merge request
!1250
parents
8cb0df03
4c8b9d09
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
17 deletions
+13
-17
HaobanQywxFeeApiServiceImpl.java
...ice/service/out/impl/fee/HaobanQywxFeeApiServiceImpl.java
+13
-17
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/fee/HaobanQywxFeeApiServiceImpl.java
View file @
10bb0c1f
...
...
@@ -25,7 +25,6 @@ import com.gic.haoban.common.utils.PageUtil;
import
com.gic.haoban.manage.api.constants.Manage3Constants
;
import
com.gic.haoban.manage.api.dto.AlertMessageDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseQwDTO
;
import
com.gic.haoban.manage.api.dto.fee.HaobanQywxFeeAccountInterceptLogDTO
;
import
com.gic.haoban.manage.api.dto.fee.HaobanQywxFeeDTO
;
import
com.gic.haoban.manage.api.dto.fee.HaobanQywxFeeDetailDTO
;
...
...
@@ -162,8 +161,8 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService {
}
String
serviceCorpid
=
config
.
getCorpid
();
WxEnterpriseDTO
wxEnterpriseDTO
=
wxEnterpriseService
.
selectById
(
wxEnterpriseId
);
if
(
wxEnterpriseDTO
.
getWxSecurityType
()
<=
0
)
{
logger
.
info
(
"WxSecurityType=0,wxEnterpriseId={}"
,
wxEnterpriseId
);
if
(
wxEnterpriseDTO
.
getWxSecurityType
()
<=
0
||
wxEnterpriseDTO
.
getWxSecurityType
()==
5
)
{
logger
.
info
(
"WxSecurityType=0
/5
,wxEnterpriseId={}"
,
wxEnterpriseId
);
return
;
}
String
corpid
=
wxEnterpriseDTO
.
getOpenCorpid
();
...
...
@@ -227,11 +226,7 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService {
// 成员的激活码信息
this
.
staffService
.
activedAccountTimer
(
wxEnterpriseId
);
// 更新企业的激活数量统计
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterpriseId
)
;
if
(!
qwDTO
.
isSelf
())
{
this
.
wxEnterpriseActiveDataService
.
saveOrUpdate
(
wxEnterpriseId
);
}
this
.
wxEnterpriseActiveDataService
.
saveOrUpdate
(
wxEnterpriseId
);
// 统计 haobanQywxFeeDetailDTO 30天内最新过期的时间和人数
HaobanQywxFeeDetailDTO
haobanQywxFeeDetailDTO
=
haobanQywxFeeAccountStaffService
.
feeIntercept
(
wxEnterpriseId
);
...
...
@@ -254,8 +249,9 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService {
tabHaobanQywxFee
.
setInterceptFlag
(
0
);
haobanQywxFeeService
.
insert
(
tabHaobanQywxFee
);
// 判断今天是否是本月最后一天
if
(
DateUtil
.
isSameDay
(
DateUtil
.
endOfMonth
(
new
Date
()),
new
Date
())
||
"ca66a01b79474c40b3e7c7f93daf1a3b"
.
equals
(
wxEnterpriseId
))
{
int
monthWillInterceptNum
=
haobanQywxFeeDetailDTO
.
getInterceptUserNum
()
;
if
(
DateUtil
.
isSameDay
(
DateUtil
.
endOfMonth
(
new
Date
()),
new
Date
())
||
"ca66a01b79474c40b3e7c7f93daf1a3b"
.
equals
(
wxEnterpriseId
))
{
int
monthWillInterceptNum
=
haobanQywxFeeDetailDTO
.
getInterceptUserNum
();
String
content
=
"30天将有"
+
monthWillInterceptNum
+
"个接口许可证即将过期,您总共还剩余"
+
permissionUserNum
+
"个可用的接口许可证,请保证数量充足,如需增加请及时联系相关人员续费,避免影响使用"
;
messageAlert
(
wxEnterpriseId
,
corpName
,
corpid
,
AlertTypeEnum
.
FEE_ALARM
.
getName
(),
content
);
...
...
@@ -300,13 +296,13 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService {
TabHaobanQywxFeeOrderAccount
activeAccount
=
new
TabHaobanQywxFeeOrderAccount
();
// 查询激活码的详情
List
<
ActiveInfoCodeResponseDTO
>
respList
=
qywxUserApiService
.
getActiveInfoByCodeList
(
corpid
,
serviceCorpid
,
codeList
);
if
(
CollectionUtils
.
isNotEmpty
(
respList
))
{
List
<
List
<
ActiveInfoCodeResponseDTO
>>
list
=
Lists
.
partition
(
respList
,
800
);
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
List
<
ActiveInfoCodeResponseDTO
>
subList
=
list
.
get
(
i
);
for
(
ActiveInfoCodeResponseDTO
activeDetail
:
sub
List
)
{
List
<
List
<
String
>>
list
=
Lists
.
partition
(
codeList
,
1000
);
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
List
<
String
>
subCodeList
=
list
.
get
(
i
);
List
<
ActiveInfoCodeResponseDTO
>
respList
=
qywxUserApiService
.
getActiveInfoByCodeList
(
corpid
,
serviceCorpid
,
subCodeList
);
if
(
CollectionUtils
.
isNotEmpty
(
respList
))
{
for
(
ActiveInfoCodeResponseDTO
activeDetail
:
resp
List
)
{
String
userid
=
activeDetail
.
getUserid
();
String
activeCode
=
activeDetail
.
getActiveCode
();
activeAccount
.
setWxUserId
(
userid
);
...
...
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