记得上下班打卡 | 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
1f06baf4
Commit
1f06baf4
authored
Jul 04, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
87578e1e
6733fcb0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
AdamEntersParam.java
.../java/com/liquidnet/service/adam/dto/AdamEntersParam.java
+2
-1
AdamEntersController.java
...quidnet/service/adam/controller/AdamEntersController.java
+14
-0
No files found.
liquidnet-bus-api/liquidnet-service-adam-api/src/main/java/com/liquidnet/service/adam/dto/AdamEntersParam.java
View file @
1f06baf4
...
@@ -14,7 +14,8 @@ public class AdamEntersParam implements java.io.Serializable {
...
@@ -14,7 +14,8 @@ public class AdamEntersParam implements java.io.Serializable {
@ApiModelProperty
(
position
=
10
,
required
=
false
,
value
=
"入场人ID,编辑时必传[50]"
)
@ApiModelProperty
(
position
=
10
,
required
=
false
,
value
=
"入场人ID,编辑时必传[50]"
)
private
String
entersId
;
private
String
entersId
;
@ApiModelProperty
(
position
=
11
,
required
=
true
,
value
=
"入场人姓名[50]"
,
example
=
"测试"
)
@ApiModelProperty
(
position
=
11
,
required
=
true
,
value
=
"入场人姓名[50]"
,
example
=
"测试"
)
@Pattern
(
regexp
=
LnsRegex
.
Valid
.
CHINESE_HANZI
,
message
=
"姓名必须为2~20位汉字"
)
// @Pattern(regexp = LnsRegex.Valid.CHINESE_HANZI, message = "姓名必须为2~20位汉字")
@Size
(
min
=
1
,
max
=
30
)
private
String
name
;
private
String
name
;
@ApiModelProperty
(
position
=
12
,
required
=
true
,
value
=
"入场人手机号[11]"
,
example
=
"13100000000"
)
@ApiModelProperty
(
position
=
12
,
required
=
true
,
value
=
"入场人手机号[11]"
,
example
=
"13100000000"
)
@Pattern
(
regexp
=
"\\d{11}"
,
message
=
"手机号格式有误"
)
@Pattern
(
regexp
=
"\\d{11}"
,
message
=
"手机号格式有误"
)
...
...
liquidnet-bus-service/liquidnet-service-adam/liquidnet-service-adam-impl/src/main/java/com/liquidnet/service/adam/controller/AdamEntersController.java
View file @
1f06baf4
...
@@ -2,6 +2,8 @@ package com.liquidnet.service.adam.controller;
...
@@ -2,6 +2,8 @@ package com.liquidnet.service.adam.controller;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
com.github.xiaoymin.knife4j.annotations.ApiSupport
;
import
com.github.xiaoymin.knife4j.annotations.ApiSupport
;
import
com.liquidnet.common.exception.constant.ErrorCode
;
import
com.liquidnet.commons.lang.constant.LnsRegex
;
import
com.liquidnet.commons.lang.util.CurrentUtil
;
import
com.liquidnet.commons.lang.util.CurrentUtil
;
import
com.liquidnet.commons.lang.util.SensitizeUtil
;
import
com.liquidnet.commons.lang.util.SensitizeUtil
;
import
com.liquidnet.service.adam.dto.AdamEntersParam
;
import
com.liquidnet.service.adam.dto.AdamEntersParam
;
...
@@ -23,6 +25,7 @@ import javax.validation.Valid;
...
@@ -23,6 +25,7 @@ import javax.validation.Valid;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotBlank
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Optional
;
import
java.util.Optional
;
import
java.util.regex.Pattern
;
/**
/**
* <p>
* <p>
...
@@ -48,6 +51,12 @@ public class AdamEntersController {
...
@@ -48,6 +51,12 @@ public class AdamEntersController {
@ApiOperation
(
value
=
"添加入场人"
)
@ApiOperation
(
value
=
"添加入场人"
)
@PostMapping
(
"add"
)
@PostMapping
(
"add"
)
public
ResponseDto
<
String
>
add
(
@RequestBody
@Valid
AdamEntersParam
parameter
)
{
public
ResponseDto
<
String
>
add
(
@RequestBody
@Valid
AdamEntersParam
parameter
)
{
if
(
1
==
parameter
.
getType
())
{
if
(!
Pattern
.
matches
(
LnsRegex
.
Valid
.
CHINESE_HANZI
,
parameter
.
getName
()))
{
return
ResponseDto
.
failure
(
ErrorCode
.
HTTP_PARAM_ERROR
.
getCode
(),
"姓名必须为2~20位汉字"
);
}
}
List
<
AdamEntersVo
>
vos
=
adamRdmService
.
getEntersVoByUid
(
CurrentUtil
.
getCurrentUid
());
List
<
AdamEntersVo
>
vos
=
adamRdmService
.
getEntersVoByUid
(
CurrentUtil
.
getCurrentUid
());
Optional
<
AdamEntersVo
>
any
=
vos
.
stream
().
filter
(
r
->
(
r
.
getIdCard
().
equals
(
parameter
.
getIdCard
()))
&&
r
.
getType
().
equals
(
parameter
.
getType
())).
findAny
();
Optional
<
AdamEntersVo
>
any
=
vos
.
stream
().
filter
(
r
->
(
r
.
getIdCard
().
equals
(
parameter
.
getIdCard
()))
&&
r
.
getType
().
equals
(
parameter
.
getType
())).
findAny
();
...
@@ -93,6 +102,11 @@ public class AdamEntersController {
...
@@ -93,6 +102,11 @@ public class AdamEntersController {
@ApiOperation
(
value
=
"编辑入场人"
)
@ApiOperation
(
value
=
"编辑入场人"
)
@PostMapping
(
"edit"
)
@PostMapping
(
"edit"
)
public
ResponseDto
<
Object
>
edit
(
@RequestBody
@Valid
AdamEntersParam
parameter
)
{
public
ResponseDto
<
Object
>
edit
(
@RequestBody
@Valid
AdamEntersParam
parameter
)
{
if
(
1
==
parameter
.
getType
())
{
if
(!
Pattern
.
matches
(
LnsRegex
.
Valid
.
CHINESE_HANZI
,
parameter
.
getName
()))
{
return
ResponseDto
.
failure
(
ErrorCode
.
HTTP_PARAM_ERROR
.
getCode
(),
"姓名必须为2~20位汉字"
);
}
}
if
(
StringUtils
.
isBlank
(
parameter
.
getEntersId
()))
{
if
(
StringUtils
.
isBlank
(
parameter
.
getEntersId
()))
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"10015"
));
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"10015"
));
}
}
...
...
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