对委托项目名称、标段名称、标段编号增加新的非法字符校验
This commit is contained in:
@ -9,20 +9,23 @@ import com.chinaunicom.mall.ebtp.project.projectentrust.entity.ebpentity.PurpImp
|
||||
import com.chinaunicom.mall.ebtp.project.projectrecord.entity.ProjectRecord;
|
||||
import com.chinaunicom.mall.ebtp.project.projectsection.entity.ProjectSection;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@Slf4j
|
||||
@Service
|
||||
public class CheckUtil {
|
||||
|
||||
private static String checkValue[] = {"\t","\n","\r","<",">","|","\\","?",":","*","\""};//"/",
|
||||
|
||||
private static int checkBdNameLengh = 200;
|
||||
@Value("${check.porject.value}")
|
||||
private static String checkValue[];//"= {"\t","\n","\r","<",">","|","\\","?",":","*","\""}
|
||||
@Value("${check.porject.length}") // = 200;
|
||||
private static int checkLengh;
|
||||
//zhqbin 20220428 update 增加对委托项目名称\t\r\n字符校验
|
||||
public static void checkEntrust(PurpImplementSendVO implementSendVO) {
|
||||
log.error("------------------------校验非法字符----------------------------");
|
||||
log.error("---------对"+checkValue+"..等---------------校验非法字符----------------------------");
|
||||
if(implementSendVO.getPurpImplementName()!=null){
|
||||
log.error("------------------------校验非法字符----------------------------项目名称:"+implementSendVO.getPurpImplementName());
|
||||
check(implementSendVO.getPurpImplementName());
|
||||
@ -72,8 +75,9 @@ public class CheckUtil {
|
||||
}
|
||||
|
||||
public static void checkBdNameLengh(String name,String value) {
|
||||
log.info("-----长度限制"+checkLengh+"-----对"+name+"进行校验--------");
|
||||
CommonExceptionEnum.FRAME_EXCEPTION_COMMON_DATA_OTHER_ERROR.customValidName("该委托,"+name+"长度过长",
|
||||
getLength(value)>checkBdNameLengh) ;
|
||||
getLength(value)>checkLengh) ;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user