记得上下班打卡 | 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
6f6ca89f
Commit
6f6ca89f
authored
Jun 08, 2021
by
张国柄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix标签校验;
parent
0fa9c836
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
14 deletions
+33
-14
RestControllerAdviceHandler.java
...quidnet/common/exception/RestControllerAdviceHandler.java
+2
-1
AdamUserController.java
...liquidnet/service/adam/controller/AdamUserController.java
+24
-7
KylinStationController.java
...dnet/service/kylin/controller/KylinStationController.java
+7
-6
No files found.
liquidnet-bus-common/liquidnet-common-exception/liquidnet-common-exception-handler-service/src/main/java/com/liquidnet/common/exception/RestControllerAdviceHandler.java
View file @
6f6ca89f
...
...
@@ -39,7 +39,7 @@ public class RestControllerAdviceHandler {
@ExceptionHandler
(
value
=
Exception
.
class
)
@ResponseBody
public
ResponseEntity
<
Error
>
serviceExceptionHandler
(
Exception
rex
,
HttpServletRequest
req
)
{
logger
.
error
(
"
Handler.RestControllerEx
:{},ex:{},request:{},param:{}"
,
logger
.
error
(
"
Ex.Handler.RestController
:{},ex:{},request:{},param:{}"
,
rex
.
getClass
().
getSimpleName
(),
rex
.
getLocalizedMessage
(),
req
.
getRequestURI
(),
JSON
.
toJSONString
(
req
.
getParameterMap
()));
if
(
rex
instanceof
MissingServletRequestParameterException
)
{
MissingServletRequestParameterException
ygex
=
((
MissingServletRequestParameterException
)
rex
);
...
...
@@ -73,6 +73,7 @@ public class RestControllerAdviceHandler {
message
=
message
==
null
?
ygex
.
errorCode
().
getMessage
()
:
message
;
return
new
ResponseEntity
<
Error
>(
new
Error
(
errorCode
,
message
),
HttpStatus
.
OK
);
}
else
{
logger
.
error
(
"Unprocessed exception"
,
rex
);
return
new
ResponseEntity
<
Error
>(
new
Error
(
ErrorCode
.
HTTP_SYSTEM_ERROR
.
getCode
(),
ErrorCode
.
HTTP_SYSTEM_ERROR
.
getMessage
()),
HttpStatus
.
OK
);
}
}
...
...
liquidnet-bus-service/liquidnet-service-adam/liquidnet-service-adam-impl/src/main/java/com/liquidnet/service/adam/controller/AdamUserController.java
View file @
6f6ca89f
...
...
@@ -62,26 +62,43 @@ public class AdamUserController {
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"10011"
));
}
List
<
AdamTagVo
>
sexList
=
this
.
getTagsForSex
().
getData
();
Optional
<
AdamTagVo
>
adamTagVo
=
sexList
.
stream
().
findFirst
().
filter
(
r
->
r
.
getVal
().
equals
(
sex
.
getVal
()
));
if
(
!
adamTagVo
.
isPresent
(
))
{
List
<
AdamTagVo
>
existSexVoList
=
sexList
.
stream
().
filter
(
r
->
r
.
getVal
().
equals
(
sex
.
getVal
())).
collect
(
Collectors
.
toList
(
));
if
(
CollectionUtils
.
isEmpty
(
existSexVoList
))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"10011"
));
}
List
<
AdamTagParentVo
>
tagMe
=
parameter
.
getTagMe
();
if
(
null
==
tagMe
)
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"10012"
));
}
List
<
AdamTagParentVo
>
tagMeVoList
=
this
.
getTagsForMusic
().
getData
(
);
List
<
String
>
tagMeParentValList
=
tagMe
.
stream
().
map
(
AdamTagParentVo:
:
getVal
).
collect
(
Collectors
.
toList
());
List
<
AdamTagParentVo
>
existParent
=
tagMeVoList
.
stream
().
filter
(
r
->
t
agMeParentValList
.
contains
(
r
.
getVal
())).
collect
(
Collectors
.
toList
());
if
(
tagMeParentValList
.
size
()
!=
existParen
t
.
size
())
{
List
<
String
>
chooseTagMeParentValList
=
tagMe
.
stream
().
map
(
AdamTagParentVo:
:
getVal
).
collect
(
Collectors
.
toList
()
);
List
<
AdamTagParentVo
>
existParentVoList
=
this
.
getTagsForMusic
().
getData
()
.
stream
().
filter
(
r
->
chooseT
agMeParentValList
.
contains
(
r
.
getVal
())).
collect
(
Collectors
.
toList
());
if
(
chooseTagMeParentValList
.
size
()
!=
existParentVoLis
t
.
size
())
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"10012"
));
}
for
(
AdamTagParentVo
parentVo
:
existParentVoList
)
{
List
<
AdamTagVo
>
tagVos
=
parentVo
.
getTagVos
();
List
<
AdamTagVo
>
chooseTagVos
=
tagMe
.
stream
().
filter
(
r
->
r
.
getVal
().
equals
(
parentVo
.
getVal
())).
collect
(
Collectors
.
toList
()).
get
(
0
).
getTagVos
();
if
(
tagVos
.
size
()
<
chooseTagVos
.
size
())
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"10012"
));
}
List
<
String
>
chooseTagVoVals
=
chooseTagVos
.
stream
().
map
(
AdamTagVo:
:
getVal
).
collect
(
Collectors
.
toList
());
List
<
AdamTagVo
>
existTagVos
=
tagVos
.
stream
().
filter
(
r
->
chooseTagVoVals
.
contains
(
r
.
getVal
())).
collect
(
Collectors
.
toList
());
if
(
chooseTagVoVals
.
size
()
!=
existTagVos
.
size
())
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"10012"
));
}
}
AdamUserInfoVo
editUserInfoVo
=
adamRdmService
.
getUserInfoVoByUid
(
CurrentUtil
.
getCurrentUid
());
editUserInfoVo
.
setAvatar
(
parameter
.
getAvatar
());
editUserInfoVo
.
setBackground
(
parameter
.
getBackground
());
editUserInfoVo
.
setNickname
(
parameter
.
getNickname
());
editUserInfoVo
.
setSex
(
adamTagVo
.
get
(
));
editUserInfoVo
.
setSex
(
existSexVoList
.
get
(
0
));
editUserInfoVo
.
setBirthday
(
parameter
.
getBirthday
());
editUserInfoVo
.
setArea
(
parameter
.
getArea
());
editUserInfoVo
.
setSignature
(
parameter
.
getSignature
());
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/controller/KylinStationController.java
View file @
6f6ca89f
...
...
@@ -268,11 +268,12 @@ public class KylinStationController {
if
(
null
==
checkUserRelationVo
||
CollectionUtils
.
isEmpty
(
relationParams
=
checkUserRelationVo
.
getRelationParams
()))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20606"
));
}
Optional
<
CheckPerformanceRelationParam
>
optional
=
relationParams
.
stream
().
findFirst
().
filter
(
r
->
r
.
getPerformanceId
().
equals
(
performanceId
));
if
(!
optional
.
isPresent
())
{
List
<
CheckPerformanceRelationParam
>
performanceRelationParams
=
relationParams
.
stream
().
filter
(
r
->
r
.
getPerformanceId
().
equals
(
performanceId
)).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
performanceRelationParams
))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20607"
));
}
CheckPerformanceRelationParam
relationParam
=
optional
.
get
(
);
CheckPerformanceRelationParam
relationParam
=
performanceRelationParams
.
get
(
0
);
LocalDateTime
canDownDt
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
relationParam
.
getCanDownTime
());
if
(
canDownDt
.
isAfter
(
LocalDateTime
.
now
()))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20608"
));
...
...
@@ -358,11 +359,11 @@ public class KylinStationController {
if
(
null
==
checkUserRelationVo
||
CollectionUtils
.
isEmpty
(
relationParams
=
checkUserRelationVo
.
getRelationParams
()))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20606"
));
}
Optional
<
CheckPerformanceRelationParam
>
optional
=
relationParams
.
stream
().
findFirst
().
filter
(
r
->
r
.
getPerformanceId
().
equals
(
performanceId
));
if
(
!
optional
.
isPresent
(
))
{
List
<
CheckPerformanceRelationParam
>
performanceRelationParamList
=
relationParams
.
stream
().
filter
(
r
->
r
.
getPerformanceId
().
equals
(
performanceId
)).
collect
(
Collectors
.
toList
(
));
if
(
CollectionUtils
.
isEmpty
(
performanceRelationParamList
))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20607"
));
}
CheckPerformanceRelationParam
relationParam
=
optional
.
get
(
);
CheckPerformanceRelationParam
relationParam
=
performanceRelationParamList
.
get
(
0
);
LocalDateTime
canDownDt
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
relationParam
.
getCanDownTime
());
if
(
canDownDt
.
isAfter
(
LocalDateTime
.
now
()))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20608"
));
...
...
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