You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
package com.supervision.police.vo ;
import cn.hutool.core.util.StrUtil ;
import lombok.Data ;
import lombok.extern.slf4j.Slf4j ;
@Slf4j
@Data
public class TaskInfoReqVO {
/**
* 案件名称
*/
private String caseName ;
/**
* 任务状态
*/
private String taskStatus ;
/**
* 创建时间排序 默认降序
*/
private String createTimeSorted = "asc" ;
/**
* 取消时间排序 默认降序
*/
private String cancelTimeSorted = "asc" ;
/**
* 校验排序值, 防止sql注入
*/
public void checkSorted ( ) {
if ( ! StrUtil . equalsAnyIgnoreCase ( createTimeSorted , "desc" , "asc" ) ) {
log . warn ( "checkSorted:createTimeSorted参数校验失败, 输入值:{},已重置为默认值:{}" , createTimeSorted , "desc" ) ;
this . cancelTimeSorted = "desc" ;
}
if ( ! StrUtil . equalsAnyIgnoreCase ( cancelTimeSorted , "desc" , "asc" ) ) {
log . warn ( "checkSorted:cancelTimeSorted参数校验失败, 输入值:{},已重置为默认值:{}" , cancelTimeSorted , "desc" ) ;
this . cancelTimeSorted = "desc" ;
}
}
}