Commit dfe11eb4c0cbf75af2aabe063a089d1fe9e23a6d
1 parent
1121c21c
fix: [CRM-客户统计]增加times[]时间范围校验
Showing
1 changed file
with
2 additions
and
4 deletions
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/statistics/vo/customer/CrmStatisticsCustomerReqVO.java
| ... | ... | @@ -4,6 +4,7 @@ import cn.iocoder.yudao.framework.common.enums.DateIntervalEnum; |
| 4 | 4 | import cn.iocoder.yudao.framework.common.validation.InEnum; |
| 5 | 5 | import io.swagger.v3.oas.annotations.media.Schema; |
| 6 | 6 | import jakarta.validation.constraints.NotNull; |
| 7 | +import jakarta.validation.constraints.Size; | |
| 7 | 8 | import lombok.Data; |
| 8 | 9 | import org.springframework.format.annotation.DateTimeFormat; |
| 9 | 10 | |
| ... | ... | @@ -37,12 +38,9 @@ public class CrmStatisticsCustomerReqVO { |
| 37 | 38 | @InEnum(value = DateIntervalEnum.class, message = "时间间隔类型,必须是 {value}") |
| 38 | 39 | private Integer interval; |
| 39 | 40 | |
| 40 | - /** | |
| 41 | - * 前端如果选择自定义时间, 那么前端传递起始-终止时间, 如果选择其他时间间隔类型, 则由后台计算起始-终止时间 | |
| 42 | - * 并作为参数传递给Mapper | |
| 43 | - */ | |
| 44 | 41 | @Schema(description = "时间范围", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| 45 | 42 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 43 | + @Size(min = 2, max = 2, message = "请选择时间范围") | |
| 46 | 44 | private LocalDateTime[] times; |
| 47 | 45 | |
| 48 | 46 | } | ... | ... |