Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
legobackend
/
lego-manage
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
2d1006f4
authored
2025-04-23 20:49:49 +0800
by
chentao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
no message
1 parent
3e7af24d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
lego-core/src/main/java/com/lego/core/annotation/AtLeastOneNonNull.java
lego-core/src/main/java/com/lego/core/annotation/AtLeastOneNonNullValidator.java
lego-core/src/main/java/com/lego/core/annotation/AtLeastOneNonNull.java
View file @
2d1006f
...
...
@@ -15,7 +15,7 @@ import java.lang.annotation.Target;
@Target
({
ElementType
.
TYPE
})
@Retention
(
RetentionPolicy
.
RUNTIME
)
public
@interface
AtLeastOneNonNull
{
String
message
()
default
"2D
和3D不能都
为空"
;
String
message
()
default
"2D
/3D不能
为空"
;
Class
<?>[]
groups
()
default
{};
Class
<?
extends
Payload
>[]
payload
()
default
{};
String
[]
fields
();
// 指定需要校验的字段名数组
...
...
lego-core/src/main/java/com/lego/core/annotation/AtLeastOneNonNullValidator.java
View file @
2d1006f
...
...
@@ -44,7 +44,7 @@ public class AtLeastOneNonNullValidator implements ConstraintValidator<AtLeastOn
return
false
;
}
}
else
if
(
object
.
getType
().
equals
(
"2D
,3D"
)
||
object
.
getType
().
equals
(
"3D,
2D"
)){
else
if
(
object
.
getType
().
equals
(
"2D
、3D"
)
||
object
.
getType
().
equals
(
"3D、
2D"
)){
if
(
StringUtils
.
isBlank
(
object
.
getTwoDimensionalType
())
||
StringUtils
.
isBlank
(
object
.
getThreeDimensionalType
())){
return
false
;
}
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment