Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lingxi-lxy-yanshou
Project
Project
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
后端-黄柯铭
lingxi-lxy-yanshou
Commits
3bbe8915
Commit
3bbe8915
authored
Sep 22, 2021
by
后端-谢晨辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[修复] 数据修复增加支付资金账户
parent
7914d5cc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
0 deletions
+64
-0
TestController.java
...lingxi/member/merchant/controller/web/TestController.java
+30
-0
IMemberOAuth2Service.java
...gxi/member/merchant/service/web/IMemberOAuth2Service.java
+6
-0
MemberOAuth2ServiceImpl.java
...ber/merchant/serviceimpl/web/MemberOAuth2ServiceImpl.java
+28
-0
No files found.
merchant-member-service/src/main/java/com/ssy/lingxi/member/merchant/controller/web/TestController.java
0 → 100644
View file @
3bbe8915
package
com
.
ssy
.
lingxi
.
member
.
merchant
.
controller
.
web
;
import
com.ssy.lingxi.common.response.PageData
;
import
com.ssy.lingxi.common.response.Wrapper
;
import
com.ssy.lingxi.member.merchant.model.vo.basic.response.RoleManageVO
;
import
com.ssy.lingxi.member.merchant.service.web.IMemberOAuth2Service
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* Description:白名单修复数据后门接口
*
* @Author xiechenhui
* @Date:2021/9/22 16:35
*/
@RestController
@RequestMapping
(
"/member/test"
)
public
class
TestController
{
@Autowired
private
IMemberOAuth2Service
memberOAuth2Service
;
@RequestMapping
(
value
=
"/createMemberAssetAccount"
,
method
=
RequestMethod
.
GET
)
public
Wrapper
<
Void
>
createMemberAssetAccount
(
Long
memberId
){
memberOAuth2Service
.
createMemberAssetAccount
(
memberId
);
return
Wrapper
.
success
();
}
}
merchant-member-service/src/main/java/com/ssy/lingxi/member/merchant/service/web/IMemberOAuth2Service.java
View file @
3bbe8915
...
...
@@ -67,4 +67,10 @@ public interface IMemberOAuth2Service {
* @return
*/
HttpResponse
getLuFileStream
(
String
url
)
throws
UnsupportedEncodingException
;
/**
* 增加支付资金账户
* @param memberId
*/
void
createMemberAssetAccount
(
Long
memberId
);
}
merchant-member-service/src/main/java/com/ssy/lingxi/member/merchant/serviceimpl/web/MemberOAuth2ServiceImpl.java
View file @
3bbe8915
package
com
.
ssy
.
lingxi
.
member
.
merchant
.
serviceimpl
.
web
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.http.HttpRequest
;
import
cn.hutool.http.HttpResponse
;
import
cn.hutool.json.JSONArray
;
...
...
@@ -11,10 +12,14 @@ import com.ssy.lingxi.common.exception.BusinessException;
import
com.ssy.lingxi.common.response.ResponseCode
;
import
com.ssy.lingxi.member.merchant.api.model.vo.inner.response.MemberFeignUserProjectsVO
;
import
com.ssy.lingxi.member.merchant.config.LuOAuth2Config
;
import
com.ssy.lingxi.member.merchant.entity.MemberRelationDO
;
import
com.ssy.lingxi.member.merchant.model.vo.oauth2.request.MemberOAuth2VO
;
import
com.ssy.lingxi.member.merchant.model.vo.oauth2.response.MemberEnterpriseInfoVO
;
import
com.ssy.lingxi.member.merchant.model.vo.oauth2.response.MemberUserProjectsVO
;
import
com.ssy.lingxi.member.merchant.model.vo.oauth2.response.MemberUserRelatedInfoVO
;
import
com.ssy.lingxi.member.merchant.repository.MemberRelationAuthRepository
;
import
com.ssy.lingxi.member.merchant.repository.MemberRelationRepository
;
import
com.ssy.lingxi.member.merchant.service.feign.IPayFeignService
;
import
com.ssy.lingxi.member.merchant.service.web.IMemberOAuth2Service
;
import
com.ssy.lingxi.member.merchant.utils.HttpClientUtil
;
import
lombok.AllArgsConstructor
;
...
...
@@ -24,6 +29,7 @@ import org.apache.commons.lang.time.DateUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.io.UnsupportedEncodingException
;
import
java.nio.charset.StandardCharsets
;
import
java.util.*
;
...
...
@@ -42,6 +48,12 @@ public class MemberOAuth2ServiceImpl implements IMemberOAuth2Service {
@Autowired
private
LuOAuth2Config
oAuth2Config
;
@Resource
private
IPayFeignService
payFeignService
;
@Autowired
private
MemberRelationRepository
memberRelationRepository
;
/**
* 根据授权码获取accessToken
* @param oAuth2VO 参数
...
...
@@ -232,4 +244,19 @@ public class MemberOAuth2ServiceImpl implements IMemberOAuth2Service {
HttpResponse
response
=
request
.
execute
();
return
response
;
}
/**
* 增加支付资金账户
* @param memberId
*/
@Override
public
void
createMemberAssetAccount
(
Long
memberId
)
{
List
<
MemberRelationDO
>
relationDOList
=
memberRelationRepository
.
findBySubMemberId
(
memberId
);
if
(
CollectionUtil
.
isNotEmpty
(
relationDOList
)){
for
(
MemberRelationDO
relationDO
:
relationDOList
)
{
payFeignService
.
notifyAfterValidatePass
(
relationDO
.
getMemberId
(),
relationDO
.
getRoleId
(),
relationDO
.
getSubMemberId
(),
relationDO
.
getSubRoleId
());
payFeignService
.
notifyMemberAssetAccount
(
relationDO
.
getMemberId
(),
relationDO
.
getMember
().
getName
(),
relationDO
.
getRoleId
(),
relationDO
.
getRole
().
getRoleName
(),
relationDO
.
getSubMemberId
(),
relationDO
.
getSubMember
().
getName
(),
relationDO
.
getSubRoleId
(),
relationDO
.
getSubRoleName
(),
relationDO
.
getSubMemberLevelTypeEnum
(),
relationDO
.
getSubRole
().
getMemberType
().
getTypeEnum
(),
relationDO
.
getStatus
());
}
}
}
}
\ No newline at end of file
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