Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
payment
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
payment
Commits
64294053
提交
64294053
authored
6月 08, 2023
作者:
张小凤
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
UserMessage
上级
b7448fbf
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
18 行增加
和
12 行删除
+18
-12
RepoCashServiceImpl.java
...ava/com/mmc/payment/service/Impl/RepoCashServiceImpl.java
+18
-12
没有找到文件。
src/main/java/com/mmc/payment/service/Impl/RepoCashServiceImpl.java
浏览文件 @
64294053
...
...
@@ -93,7 +93,7 @@ public class RepoCashServiceImpl implements RepoCashService {
}
}
ResponseEntity
<
String
>
responseEntity
=
UserId
(
cuser
.
getUserAccountId
());
ResponseEntity
<
String
>
responseEntity
=
UserId
(
cuser
.
getUserAccountId
()
,
cuser
.
getToken
()
);
UserAccountSimpleDTO
account
=
JSON
.
parseObject
(
responseEntity
.
getBody
(),
UserAccountSimpleDTO
.
class
);
list
.
stream
().
forEach
(
t
->
{
if
(
t
.
getCreateUser
().
equals
(
account
.
getId
()))
{
...
...
@@ -139,7 +139,7 @@ public class RepoCashServiceImpl implements RepoCashService {
/**
* 用户信息
*/
ResponseEntity
<
String
>
responseEntity
=
UserId
(
cash
.
getRepoAccountId
());
ResponseEntity
<
String
>
responseEntity
=
UserId
(
cash
.
getRepoAccountId
()
,
cuser
.
getToken
()
);
UserAccountSimpleDTO
account
=
JSON
.
parseObject
(
responseEntity
.
getBody
(),
UserAccountSimpleDTO
.
class
);
if
(
account
==
null
)
{
return
ResultBody
.
error
(
ResultEnum
.
FEIGN_REPOUSER_SERVLET_ERROR
);
...
...
@@ -200,7 +200,7 @@ public class RepoCashServiceImpl implements RepoCashService {
/**
* 用户信息
*/
ResponseEntity
<
String
>
responseEntity
=
UserId
(
repoAccountId
);
ResponseEntity
<
String
>
responseEntity
=
UserId
(
repoAccountId
,
cuser
.
getToken
()
);
UserAccountSimpleDTO
account
=
JSON
.
parseObject
(
responseEntity
.
getBody
(),
UserAccountSimpleDTO
.
class
);
if
(
account
==
null
)
{
return
ResultBody
.
error
(
ResultEnum
.
FEIGN_REPOUSER_SERVLET_ERROR
);
...
...
@@ -266,14 +266,20 @@ public class RepoCashServiceImpl implements RepoCashService {
return
null
;
}
private
ResponseEntity
<
String
>
UserId
(
Integer
repoAccountId
)
{
private
ResponseEntity
<
String
>
UserId
(
Integer
repoAccountId
,
String
token
)
{
// 用户信息
ResponseEntity
<
String
>
response
=
/*
ResponseEntity<String> response =
restTemplate.getForEntity(
userAppUrl
+ "user-account/feignGetUserSimpleInfo?userAccountId="
+ repoAccountId,
String
.
class
);
String.class);*/
HttpHeaders
headers
=
new
HttpHeaders
();
//封装请求头
headers
.
add
(
"token"
,
token
);
HttpEntity
<
MultiValueMap
<
String
,
Object
>>
formEntity
=
new
HttpEntity
<
MultiValueMap
<
String
,
Object
>>(
headers
);
ResponseEntity
<
String
>
response
=
restTemplate
.
exchange
(
userAppUrl
+
"user-account/feignGetUserSimpleInfo?userAccountId="
+
repoAccountId
,
HttpMethod
.
GET
,
formEntity
,
String
.
class
);
return
response
;
}
...
...
@@ -289,7 +295,7 @@ public class RepoCashServiceImpl implements RepoCashService {
return
body
;
}
// 用户信息
ResponseEntity
<
String
>
response
=
UserId
(
cash
.
getRepoAccountId
());
ResponseEntity
<
String
>
response
=
UserId
(
cash
.
getRepoAccountId
()
,
cuser
.
getToken
()
);
String
body1
=
response
.
getBody
();
UserAccountSimpleDTO
account
=
JSON
.
parseObject
(
body1
,
UserAccountSimpleDTO
.
class
);
if
(
account
==
null
)
{
...
...
@@ -495,14 +501,14 @@ public class RepoCashServiceImpl implements RepoCashService {
@Override
public
ResultBody
walletUsers
(
WalletUsersVO
walletUsersVO
)
{
ResponseEntity
<
String
>
response
=
UserId
(
walletUsersVO
.
getRepoAccountId
()
);
String
body1
=
response
.
getBody
();
UserAccountSimpleDTO
account
=
JSON
.
parseObject
(
body1
,
UserAccountSimpleDTO
.
class
);
if
(
account
==
null
)
{
// ResponseEntity<String> response = UserId(walletUsersVO.getRepoAccountId(),walletUsersVO.get
);
//
String body1 = response.getBody();
//
UserAccountSimpleDTO account = JSON.parseObject(body1, UserAccountSimpleDTO.class);
/*
if (account == null) {
return ResultBody.error(ResultEnum.FEIGN_REPOUSER_SERVLET_ERROR);
} else if (account.getPortType().equals(PortTypeEnum.ADMIN_ACCOUNTS.getCode())) {
return ResultBody.error(ResultEnum.NO_WALLET_FUNCTION);
}
}
*/
WalletUsersQO
properties
=
BeanCopyUtils
.
properties
(
walletUsersVO
,
new
WalletUsersQO
());
Integer
walletUsers
=
repoCashDao
.
findWalletUsers
(
properties
);
if
(
walletUsers
!=
null
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论