Commit 7935abcc authored by 高滢's avatar 高滢

车企文件导入 添加日期格式验证

parent d24aa551
...@@ -25,6 +25,9 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -25,6 +25,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -228,6 +231,9 @@ public class ReviewEnterpriseArchiveServiceImpl extends ServiceImpl<ReviewEnterp ...@@ -228,6 +231,9 @@ public class ReviewEnterpriseArchiveServiceImpl extends ServiceImpl<ReviewEnterp
if (sum >0 ) { if (sum >0 ) {
throw new ServiceException("新增文件名称重复,请检查", HttpStatus.ERROR); throw new ServiceException("新增文件名称重复,请检查", HttpStatus.ERROR);
} }
if(vo.getFileName().isEmpty()){
throw new ServiceException("文件名称不能为空", HttpStatus.ERROR);
}
} }
reviewEnterpriseArchiveMapper.insertEnterprise(list); reviewEnterpriseArchiveMapper.insertEnterprise(list);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment