记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
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
董敬伟
liquidnet-bus-v1
Commits
86dfdc52
Commit
86dfdc52
authored
Nov 01, 2021
by
张国柄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下单操作ADAM调整;
parent
e83fc1bc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
22 deletions
+33
-22
OrderUtils.java
...in/java/com/liquidnet/service/order/utils/OrderUtils.java
+33
-22
No files found.
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/utils/OrderUtils.java
View file @
86dfdc52
...
...
@@ -12,6 +12,7 @@ import com.liquidnet.service.adam.constant.AdamRedisConst;
import
com.liquidnet.service.adam.dto.vo.AdamAddressesVo
;
import
com.liquidnet.service.adam.dto.vo.AdamEntersVo
;
import
com.liquidnet.service.adam.dto.vo.AdamUserMemberVo
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.candy.param.BackCouponParam
;
import
com.liquidnet.service.candy.vo.CandyUseResultVo
;
import
com.liquidnet.service.kylin.dto.param.SysDamaiParam
;
...
...
@@ -39,8 +40,8 @@ public class OrderUtils {
@Autowired
private
DataUtils
dataUtils
;
//
@Value("${liquidnet.adam.url}")
//
private String adamUrl;
@Value
(
"${liquidnet.adam.url}"
)
private
String
adamUrl
;
@Value
(
"${liquidnet.candy.url}"
)
private
String
candyUrl
;
@Autowired
...
...
@@ -147,35 +148,45 @@ public class OrderUtils {
}
public
AdamUserMemberVo
isMember
(
String
uid
)
{
// String resultData = HttpUtil.get("/adam/member/check/depth
?uid=" + uid, null);
// AdamUserMemberVo vo = JsonUtils.fromJson(resultData, AdamUserMemberVo.class);
String
rk
=
AdamRedisConst
.
INFO_USER_MEMBER
.
concat
(
uid
);
AdamUserMemberVo
vo
=
(
AdamUserMemberVo
)
redisUtil
.
get
(
rk
);
if
(
null
!=
vo
&&
vo
.
isActive
())
{
return
vo
;
}
else
{
String
resultData
=
HttpUtil
.
get
(
adamUrl
+
"/adam/member/check/depth/new
?uid="
+
uid
,
null
);
ResponseDto
<
AdamUserMemberVo
>
vo
=
JsonUtils
.
fromJson
(
resultData
,
new
TypeReference
<
ResponseDto
<
AdamUserMemberVo
>>()
{
});
//
String rk = AdamRedisConst.INFO_USER_MEMBER.concat(uid);
//
AdamUserMemberVo vo = (AdamUserMemberVo) redisUtil.get(rk);
if
(
null
!=
vo
.
getData
()
&&
null
!=
vo
.
getData
().
getUid
()
&&
vo
.
getData
().
isActive
())
{
return
vo
.
getData
()
;
}
else
{
return
null
;
}
}
public
AdamAddressesVo
getAddress
(
String
uid
,
String
addressesId
)
{
// String resultData = HttpUtil.get("/adam/addr/query/depth?uid=" + uid + "&addrId=" + addressesId, null);
// List<AdamAddressesVo> vos = JsonUtils.fromJson(resultData, new TypeReference<List<AdamAddressesVo>>() {
// });
String
rk
=
AdamRedisConst
.
INFO_ADDRESSES
.
concat
(
uid
);
List
<
AdamAddressesVo
>
vos
=
(
List
<
AdamAddressesVo
>)
redisUtil
.
get
(
rk
);
return
vos
.
stream
().
filter
(
r
->
r
.
getAddressesId
().
equals
(
addressesId
)).
findAny
().
orElse
(
null
);
String
resultData
=
HttpUtil
.
get
(
adamUrl
+
"/adam/addr/query/depth?uid="
+
uid
+
"&addrId="
+
addressesId
,
null
);
ResponseDto
<
AdamAddressesVo
>
vos
=
JsonUtils
.
fromJson
(
resultData
,
new
TypeReference
<
ResponseDto
<
AdamAddressesVo
>>()
{
});
// String rk = AdamRedisConst.INFO_ADDRESSES.concat(uid);
// List<AdamAddressesVo> vos = (List<AdamAddressesVo>) redisUtil.get(rk);
// return vos.stream().filter(r -> r.getAddressesId().equals(addressesId)).findAny().orElse(null);
if
(
null
!=
vos
.
getData
())
{
return
vos
.
getData
();
}
else
{
return
null
;
}
}
public
AdamEntersVo
getEnters
(
String
uid
,
String
entersId
)
{
// String resultData = HttpUtil.get("/adam/enters/query/depth?uid=" + uid + "&entersId=" + entersId, null);
// List<AdamEntersVo> vos = JsonUtils.fromJson(resultData, new TypeReference<List<AdamEntersVo>>() {
// });
String
rk
=
AdamRedisConst
.
INFO_ENTERS
.
concat
(
uid
);
List
<
AdamEntersVo
>
vos
=
(
List
<
AdamEntersVo
>)
redisUtil
.
get
(
rk
);
return
vos
.
stream
().
filter
(
r
->
r
.
getEntersId
().
equals
(
entersId
)).
findAny
().
orElse
(
null
);
String
resultData
=
HttpUtil
.
get
(
adamUrl
+
"/adam/enters/query/depth?uid="
+
uid
+
"&entersId="
+
entersId
,
null
);
ResponseDto
<
AdamEntersVo
>
vos
=
JsonUtils
.
fromJson
(
resultData
,
new
TypeReference
<
ResponseDto
<
AdamEntersVo
>>()
{
});
// String rk = AdamRedisConst.INFO_ENTERS.concat(uid);
// List<AdamEntersVo> vos = (List<AdamEntersVo>) redisUtil.get(rk);
// return vos.stream().filter(r -> r.getEntersId().equals(entersId)).findAny().orElse(null);
if
(
null
!=
vos
.
getData
())
{
return
vos
.
getData
();
}
else
{
return
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