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
94cddc37
Commit
94cddc37
authored
Aug 12, 2022
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:收费
parent
b7f11349
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
13 deletions
+61
-13
MemberUnionRelateConsumer.java
...oban/manage/api/service/mq/MemberUnionRelateConsumer.java
+1
-0
HaobanQywxFeeApiServiceImpl.java
...ice/service/out/impl/fee/HaobanQywxFeeApiServiceImpl.java
+60
-13
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/mq/MemberUnionRelateConsumer.java
View file @
94cddc37
...
...
@@ -10,6 +10,7 @@ public interface MemberUnionRelateConsumer {
/**
* desc: 添加好友关系-存量会员新增
* "routerName": "addMemberUnionRelateMq"
*
* @param messageParam 消息参数
* @author : YongEn
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/fee/HaobanQywxFeeApiServiceImpl.java
View file @
94cddc37
...
...
@@ -133,7 +133,7 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService {
logger
.
error
(
"订单为空"
);
return
;
}
List
<
Map
<
String
,
String
>>
activeCodeList
=
new
ArrayList
<>();
for
(
String
orderId
:
orderIds
)
{
FeeOrderDeatilResponseDTO
order
=
qywxUserApiService
.
getOrder
(
corpid
,
serviceCorpid
,
orderId
);
if
(
order
.
getErrcode
()
!=
0
)
{
...
...
@@ -173,7 +173,13 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService {
logger
.
info
(
"订单账号列表报错:{}"
,
accountListResponseDTO
.
getErrmsg
());
break
;
}
addOrderAccount
(
wxEnterpriseId
,
serviceCorpid
,
corpid
,
orderId
,
accountListResponseDTO
.
getAccountList
());
for
(
AccountListDTO
accountListDTO
:
accountListResponseDTO
.
getAccountList
())
{
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"orderId"
,
orderId
);
map
.
put
(
"activeCode"
,
accountListDTO
.
getActiveCode
());
activeCodeList
.
add
(
map
);
}
Integer
hasMore
=
accountListResponseDTO
.
getHasMore
();
if
(
hasMore
==
0
)
{
...
...
@@ -183,10 +189,46 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService {
feeOrderListQDTO
.
setCursor
(
feeOrderListQDTO
.
getCursor
());
accountListResponseDTO
=
qywxUserApiService
.
listOrderAccount
(
corpid
,
serviceCorpid
,
feeOrderListQDTO
);
for
(
AccountListDTO
accountListDTO
:
accountListResponseDTO
.
getAccountList
())
{
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"orderId"
,
orderId
);
map
.
put
(
"activeCode"
,
accountListDTO
.
getActiveCode
());
activeCodeList
.
add
(
map
);
}
}
addOrderAccount
(
wxEnterpriseId
,
serviceCorpid
,
corpid
,
activeCodeList
);
List
<
String
>
userIdList
=
new
ArrayList
<>();
//企业账号
while
(
true
)
{
FeeOrderListQDTO
feeOrderListQDTO
=
new
FeeOrderListQDTO
();
feeOrderListQDTO
.
setCorpid
(
corpid
);
feeOrderListQDTO
.
setLimit
(
Manage3Constants
.
QW_LIMIT
);
AccountListResponseDTO
accountListResponseDTO
=
qywxUserApiService
.
listActivedAccount
(
corpid
,
serviceCorpid
,
feeOrderListQDTO
);
if
(
accountListResponseDTO
.
getErrcode
()
!=
0
)
{
logger
.
info
(
"订单账号列表报错:{}"
,
accountListResponseDTO
.
getErrmsg
());
break
;
}
addOrderAccount
(
wxEnterpriseId
,
serviceCorpid
,
corpid
,
orderId
,
accountListResponseDTO
.
getAccountList
());
List
<
AccountListDTO
>
accountList
=
accountListResponseDTO
.
getAccountList
();
for
(
AccountListDTO
accountListDTO
:
accountList
)
{
userIdList
.
add
(
accountListDTO
.
getUserid
());
}
Integer
hasMore
=
accountListResponseDTO
.
getHasMore
();
if
(
hasMore
==
0
)
{
logger
.
error
(
"无更多账号"
);
break
;
}
feeOrderListQDTO
.
setCursor
(
feeOrderListQDTO
.
getCursor
());
accountListResponseDTO
=
qywxUserApiService
.
listActivedAccount
(
corpid
,
serviceCorpid
,
feeOrderListQDTO
);
for
(
AccountListDTO
accountListDTO
:
accountListResponseDTO
.
getAccountList
())
{
userIdList
.
add
(
accountListDTO
.
getUserid
());
}
}
addAccountStaff
(
wxEnterpriseId
,
serviceCorpid
,
corpid
,
userIdList
);
//更新企微状态
wxEnterpriseService
.
updateAutoActiveFlagById
(
1
,
wxEnterpriseId
);
...
...
@@ -230,17 +272,14 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService {
}
}
private
void
addOrderAccount
(
String
wxEnterpriseId
,
String
serviceCorpid
,
String
corpid
,
String
orderId
,
List
<
AccountListDTO
>
account
List
)
{
if
(
CollectionUtils
.
isEmpty
(
ac
count
List
))
{
private
void
addOrderAccount
(
String
wxEnterpriseId
,
String
serviceCorpid
,
String
corpid
,
List
<
Map
<
String
,
String
>>
activeCode
List
)
{
if
(
CollectionUtils
.
isEmpty
(
ac
tiveCode
List
))
{
logger
.
error
(
"订单账号无激活码"
);
return
;
}
for
(
AccountListDTO
orderListAccount
:
accountList
)
{
String
activeCode
=
orderListAccount
.
getActiveCode
();
if
(
StringUtils
.
isBlank
(
activeCode
))
{
logger
.
error
(
"订单无激活码"
);
continue
;
}
for
(
Map
<
String
,
String
>
activeCodeMap
:
activeCodeList
)
{
String
activeCode
=
activeCodeMap
.
get
(
"activeCode"
);
String
orderId
=
activeCodeMap
.
get
(
"orderId"
);
ActiveInfoCodeResponseDTO
activeInfoCodeResponseDTO
=
qywxUserApiService
.
getActiveInfoByCode
(
corpid
,
serviceCorpid
,
activeCode
);
if
(
activeInfoCodeResponseDTO
.
getErrcode
()
!=
0
)
{
logger
.
error
(
"激活码详情报错:{}"
,
activeInfoCodeResponseDTO
.
getErrmsg
());
...
...
@@ -259,12 +298,20 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService {
tabHaobanQywxFeeOrderAccount
.
setExpireTime
(
DateUtil
.
date
(
activeInfoCodeResponseDTO
.
getExpireTime
()
*
1000
));
tabHaobanQywxFeeOrderAccount
.
setActiveTime
(
DateUtil
.
date
(
activeInfoCodeResponseDTO
.
getActiveTime
()
*
1000
));
haobanQywxFeeOrderAccountService
.
insert
(
tabHaobanQywxFeeOrderAccount
);
}
}
private
void
addAccountStaff
(
String
wxEnterpriseId
,
String
serviceCorpid
,
String
corpid
,
List
<
String
>
useridList
)
{
if
(
CollectionUtils
.
isEmpty
(
useridList
))
{
logger
.
error
(
"成员激活为空"
);
return
;
}
for
(
String
userid
:
useridList
)
{
//更新成员
ActiveInfoUserResponseDTO
activeInfoUserResponseDTO
=
qywxUserApiService
.
getActiveInfoByUser
(
corpid
,
serviceCorpid
,
userid
);
if
(
activeInfoUserResponseDTO
.
getErrcode
()
!=
0
)
{
logger
.
info
(
"成员激活详情报错:{}"
,
activeInfoUserResponseDTO
.
getErrmsg
());
break
;
return
;
}
List
<
AccountListDTO
>
activeInfoList
=
activeInfoUserResponseDTO
.
getActiveInfoList
();
Integer
activeStatus
=
activeInfoUserResponseDTO
.
getActiveStatus
();
...
...
@@ -282,7 +329,7 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService {
tabHaobanQywxFeeAccountStaff
.
setActiveCode
(
accountListDTO
.
getActiveCode
());
tabHaobanQywxFeeAccountStaff
.
setAccountType
(
accountListDTO
.
getType
());
tabHaobanQywxFeeAccountStaff
.
setExpireTime
(
DateUtil
.
date
(
accountListDTO
.
getExpireTime
()
*
1000
));
tabHaobanQywxFeeAccountStaff
.
setActiveTime
(
DateUtil
.
date
(
accountListDTO
.
getActiveTime
()*
1000
));
tabHaobanQywxFeeAccountStaff
.
setActiveTime
(
DateUtil
.
date
(
accountListDTO
.
getActiveTime
()
*
1000
));
haobanQywxFeeAccountStaffService
.
insert
(
tabHaobanQywxFeeAccountStaff
);
}
if
(
tabHaobanStaff
!=
null
)
{
...
...
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