Commit df2faa4e authored by neo's avatar neo

[bugfix] get project import type validate periods isEmpty

parent 35532248
...@@ -53,7 +53,8 @@ public class ProjectInfoServiceImpl implements ProjectInfoService { ...@@ -53,7 +53,8 @@ public class ProjectInfoServiceImpl implements ProjectInfoService {
@Override @Override
public OperationResultDto<List<PeriodInfo>> getProjectImportType(String projectId, List<Integer> periods, Integer serviceTypeId, String id) { public OperationResultDto<List<PeriodInfo>> getProjectImportType(String projectId, List<Integer> periods, Integer serviceTypeId, String id) {
PeriodInfoExample example = new PeriodInfoExample(); PeriodInfoExample example = new PeriodInfoExample();
example.createCriteria().andProjectIDEqualTo(projectId).andPeriodIn(periods); if (!periods.isEmpty()) example.createCriteria().andProjectIDEqualTo(projectId).andPeriodIn(periods);
else example.createCriteria().andProjectIDEqualTo(projectId);
List<PeriodInfo> existed = periodInfoMapper.selectByExample(example); List<PeriodInfo> existed = periodInfoMapper.selectByExample(example);
periods.forEach(m -> { periods.forEach(m -> {
......
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