记得上下班打卡 | 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
a2bc79f3
Commit
a2bc79f3
authored
Apr 13, 2022
by
GaoHu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改预约逻辑
parent
b00b3ca1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
12 deletions
+14
-12
GoblinGoodsAnticipateMgServiceImpl.java
...rvice/impl/manage/GoblinGoodsAnticipateMgServiceImpl.java
+4
-4
GoblinAnticipateUtils.java
.../liquidnet/service/goblin/util/GoblinAnticipateUtils.java
+8
-4
GoblinRedisUtils.java
...a/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
+2
-4
No files found.
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/manage/GoblinGoodsAnticipateMgServiceImpl.java
View file @
a2bc79f3
...
@@ -153,18 +153,18 @@ public class GoblinGoodsAnticipateMgServiceImpl implements IGoblinGoodsAnticipat
...
@@ -153,18 +153,18 @@ public class GoblinGoodsAnticipateMgServiceImpl implements IGoblinGoodsAnticipat
return
ResponseDto
.
success
(
pageInfo
);
return
ResponseDto
.
success
(
pageInfo
);
}
}
private
Integer
setState
(
LocalDateTime
StartDate
,
LocalDateTime
E
ndDate
)
{
private
Integer
setState
(
LocalDateTime
startDate
,
LocalDateTime
e
ndDate
)
{
LocalDateTime
now
=
LocalDateTime
.
now
();
LocalDateTime
now
=
LocalDateTime
.
now
();
if
(
S
tartDate
.
isAfter
(
now
))
{
if
(
s
tartDate
.
isAfter
(
now
))
{
//未开始 0
//未开始 0
return
0
;
return
0
;
}
}
if
(
StartDate
.
isBefore
(
now
)
&&
E
ndDate
.
isAfter
(
now
))
{
if
(
startDate
.
isBefore
(
now
)
&&
e
ndDate
.
isAfter
(
now
))
{
//预约中 1
//预约中 1
return
1
;
return
1
;
}
}
if
(
E
ndDate
.
isBefore
(
now
))
{
if
(
e
ndDate
.
isBefore
(
now
))
{
//已结束 2
//已结束 2
return
2
;
return
2
;
}
}
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinAnticipateUtils.java
View file @
a2bc79f3
...
@@ -22,7 +22,9 @@ public class GoblinAnticipateUtils {
...
@@ -22,7 +22,9 @@ public class GoblinAnticipateUtils {
@Value
(
"${liquidnet.service.adam.url}"
)
@Value
(
"${liquidnet.service.adam.url}"
)
private
String
adamUrl
;
private
String
adamUrl
;
public
AdamUserProfileVo
getUserInfo
()
{
private
final
String
avatar
=
""
;
public
String
getUserInfo
()
{
try
{
try
{
MultiValueMap
<
String
,
String
>
header
=
CollectionUtil
.
linkedMultiValueMapStringString
();
MultiValueMap
<
String
,
String
>
header
=
CollectionUtil
.
linkedMultiValueMapStringString
();
header
.
add
(
"Authorization"
,
"Bearer "
+
CurrentUtil
.
getToken
());
header
.
add
(
"Authorization"
,
"Bearer "
+
CurrentUtil
.
getToken
());
...
@@ -31,11 +33,13 @@ public class GoblinAnticipateUtils {
...
@@ -31,11 +33,13 @@ public class GoblinAnticipateUtils {
String
returnData
=
HttpUtil
.
post
(
adamUrl
+
" /adam/user/info"
,
header
);
String
returnData
=
HttpUtil
.
post
(
adamUrl
+
" /adam/user/info"
,
header
);
ResponseDto
<
AdamUserProfileVo
>
innerReturnVo
=
JsonUtils
.
fromJson
(
returnData
,
new
TypeReference
<
ResponseDto
<
AdamUserProfileVo
>>()
{
ResponseDto
<
AdamUserProfileVo
>
innerReturnVo
=
JsonUtils
.
fromJson
(
returnData
,
new
TypeReference
<
ResponseDto
<
AdamUserProfileVo
>>()
{
});
});
if
(
innerReturnVo
.
getData
()!=
null
){
return
innerReturnVo
.
getData
();
return
innerReturnVo
.
getData
().
getUserInfo
().
getAvatar
();
}
return
avatar
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"获取用户头像失败"
,
e
);
log
.
error
(
"获取用户头像失败"
,
e
);
return
AdamUserProfileVo
.
getNew
()
;
return
avatar
;
}
}
}
}
}
}
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
View file @
a2bc79f3
...
@@ -128,10 +128,8 @@ public class GoblinRedisUtils {
...
@@ -128,10 +128,8 @@ public class GoblinRedisUtils {
List
<
String
>
list
=
(
List
)
redisUtil
.
get
(
GoblinRedisConst
.
ANTICIPATE_SKUID_AVATAR
.
concat
(
skuId
));
List
<
String
>
list
=
(
List
)
redisUtil
.
get
(
GoblinRedisConst
.
ANTICIPATE_SKUID_AVATAR
.
concat
(
skuId
));
List
<
String
>
urlList
=
list
!=
null
?
list
:
new
ArrayList
<
String
>();
List
<
String
>
urlList
=
list
!=
null
?
list
:
new
ArrayList
<
String
>();
if
(
urlList
.
size
()<=
2
){
if
(
urlList
.
size
()<=
2
){
GoblinAnticipateUtils
goblinOrderUtils
=
new
GoblinAnticipateUtils
();
GoblinAnticipateUtils
goblinAnticipateUtils
=
new
GoblinAnticipateUtils
();
AdamUserProfileVo
userInfo
=
goblinOrderUtils
.
getUserInfo
();
urlList
.
add
(
goblinAnticipateUtils
.
getUserInfo
());
String
avatar
=
userInfo
.
getUserInfo
().
getAvatar
();
urlList
.
add
(
avatar
);
redisUtil
.
set
(
GoblinRedisConst
.
ANTICIPATE_SKUID_AVATAR
.
concat
(
skuId
),
urlList
);
redisUtil
.
set
(
GoblinRedisConst
.
ANTICIPATE_SKUID_AVATAR
.
concat
(
skuId
),
urlList
);
}
}
}
}
...
...
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