-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat($Validation): support Date and LocalDateTime range validation
- Loading branch information
1 parent
778e152
commit f9898be
Showing
4 changed files
with
28 additions
and
9 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
...enter/src/main/java/com/jmsoftware/maf/authcenter/user/entity/GetUserPageListPayload.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,28 @@ | ||
package com.jmsoftware.maf.authcenter.user.entity; | ||
|
||
import com.jmsoftware.maf.common.bean.PaginationBase; | ||
import com.jmsoftware.maf.springcloudstarter.validation.annotation.DateTimeRangeConstraints; | ||
import com.jmsoftware.maf.springcloudstarter.validation.annotation.DateTimeRangeGroup; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
import static com.jmsoftware.maf.springcloudstarter.validation.annotation.DateTimeRangeType.END_TIME; | ||
import static com.jmsoftware.maf.springcloudstarter.validation.annotation.DateTimeRangeType.START_TIME; | ||
|
||
/** | ||
* Description: GetUserPageList, change description here. | ||
* | ||
* @author Johnny Miller (锺俊), email: johnnysviva@outlook.com, date: 6/27/2021 4:32 PM | ||
**/ | ||
@Data | ||
@DateTimeRangeConstraints | ||
@EqualsAndHashCode(callSuper = true) | ||
public class GetUserPageListPayload extends PaginationBase { | ||
private String username; | ||
@DateTimeRangeGroup(type = START_TIME) | ||
private LocalDateTime startTime; | ||
@DateTimeRangeGroup(type = END_TIME) | ||
private LocalDateTime endTime; | ||
} |
2 changes: 1 addition & 1 deletion
2
...udstarter/constant/UniversalDateTime.java → ...af/common/constant/UniversalDateTime.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters