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
ff59d076
Commit
ff59d076
authored
Jan 17, 2023
by
徐高华
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/获取用户敏感信息' into 'developer'
激活账号 See merge request
!881
parents
4d1e57be
ade9c229
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
5 deletions
+17
-5
StaffServiceImpl.java
.../haoban/manage/service/service/impl/StaffServiceImpl.java
+16
-4
TabHaobanQywxFeeAccountStaffMapper.xml
...sources/mapper/fee/TabHaobanQywxFeeAccountStaffMapper.xml
+1
-1
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StaffServiceImpl.java
View file @
ff59d076
...
...
@@ -28,7 +28,9 @@ import com.gic.haoban.manage.service.service.StaffService;
import
com.gic.haoban.manage.service.service.fee.HaobanQywxFeeAccountStaffService
;
import
com.gic.wechat.api.dto.qywx.fee.AccountListDTO
;
import
com.gic.wechat.api.dto.qywx.fee.AccountListResponseDTO
;
import
com.gic.wechat.api.dto.qywx.fee.ActiveInfoUserResponseDTO
;
import
com.gic.wechat.api.service.qywx.QywxOrderApiService
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
...
...
@@ -49,6 +51,8 @@ public class StaffServiceImpl implements StaffService {
private
Config
config
;
@Autowired
private
HaobanQywxFeeAccountStaffService
haobanQywxFeeAccountStaffService
;
@Autowired
private
QywxUserApiService
qywxUserApiService
;
@Override
public
TabHaobanStaff
selectById
(
String
id
)
{
...
...
@@ -214,7 +218,7 @@ public class StaffServiceImpl implements StaffService {
AccountListResponseDTO
dto
=
resp
.
getResult
()
;
List
<
AccountListDTO
>
list
=
dto
.
getAccountList
()
;
log
.
info
(
"查询激活账号,size={},wxeid={}"
,
list
.
size
(),
wxEnterpriseId
);
this
.
updateAccount
(
wxEnterpriseId
,
list
);
this
.
updateAccount
(
wxEnterpriseId
,
openCorpid
,
list
);
cursor
=
dto
.
getNextCursor
()
;
Integer
hasMore
=
dto
.
getHasMore
()
;
// 从企微拉取下一批数据
...
...
@@ -224,10 +228,9 @@ public class StaffServiceImpl implements StaffService {
}
}
private
void
updateAccount
(
String
wxEnterpriseId
,
List
<
AccountListDTO
>
list
)
{
private
void
updateAccount
(
String
wxEnterpriseId
,
String
openCorpid
,
List
<
AccountListDTO
>
list
)
{
for
(
AccountListDTO
item
:
list
)
{
String
userId
=
item
.
getUserid
()
;
String
activeCode
=
item
.
getActiveCode
()
;
Date
start
=
new
Date
(
item
.
getActiveTime
()*
1000L
)
;
Date
end
=
new
Date
(
item
.
getExpireTime
()*
1000L
)
;
TabHaobanStaff
staff
=
this
.
mapper
.
selectByUserIdAndEnterpriseId
(
userId
,
wxEnterpriseId
)
;
...
...
@@ -240,7 +243,16 @@ public class StaffServiceImpl implements StaffService {
TabHaobanQywxFeeAccountStaff
accountStaff
=
new
TabHaobanQywxFeeAccountStaff
();
accountStaff
.
setFeeAccountStaffId
(
UniqueIdUtils
.
uniqueLong
());
accountStaff
.
setWxEnterpriseId
(
wxEnterpriseId
);
accountStaff
.
setActiveCode
(
activeCode
);
accountStaff
.
setCorpId
(
openCorpid
);
ActiveInfoUserResponseDTO
activeInfoUserResponseDTO
=
qywxUserApiService
.
getActiveInfoByUser
(
openCorpid
,
config
.
getCorpid
(),
userId
);
log
.
info
(
"查询激活详情={},{}"
,
JSON
.
toJSONString
(
activeInfoUserResponseDTO
),
userId
);
if
(
activeInfoUserResponseDTO
.
getErrcode
()
==
0
)
{
for
(
AccountListDTO
dto
:
activeInfoUserResponseDTO
.
getActiveInfoList
())
{
if
(
dto
.
getType
()==
2
)
{
accountStaff
.
setActiveCode
(
dto
.
getActiveCode
());
}
}
}
accountStaff
.
setStaffId
(
staff
.
getStaffId
());
accountStaff
.
setAccountType
(
item
.
getType
());
accountStaff
.
setExpireTime
(
DateUtil
.
date
(
item
.
getExpireTime
()
*
1000
));
...
...
haoban-manage3-service/src/main/resources/mapper/fee/TabHaobanQywxFeeAccountStaffMapper.xml
View file @
ff59d076
...
...
@@ -28,7 +28,7 @@
</select>
<!--新增所有列-->
<insert
id=
"insert"
keyProperty=
"feeAccountId"
useGeneratedKeys=
"true"
>
<insert
id=
"insert"
>
insert into tab_haoban_qywx_fee_account_staff(fee_account_staff_id, order_id, corp_id, wx_enterprise_id,
staff_id, active_code, account_type, expire_time, active_time)
values (#{feeAccountStaffId}, #{orderId}, #{corpId}, #{wxEnterpriseId}, #{staffId}, #{activeCode},
...
...
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