修复没有历史记录时sql查询出错的问题

dev-active
lensfrex 2 years ago
parent 5bbf9113c8
commit e53862b226
Signed by: lensfrex
GPG Key ID: 0F69A0A2FBEE98A0
  1. 5
      src/main/java/net/lensfrex/dscape/dao/service/impl/PatientDataServiceImpl.java

@ -11,12 +11,17 @@ import net.lensfrex.dscape.dao.mapper.PatientDataMapper;
import net.lensfrex.dscape.dao.service.PatientDataService; import net.lensfrex.dscape.dao.service.PatientDataService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List; import java.util.List;
@Service @Service
public class PatientDataServiceImpl extends ServiceImpl<PatientDataMapper, PatientData> implements PatientDataService { public class PatientDataServiceImpl extends ServiceImpl<PatientDataMapper, PatientData> implements PatientDataService {
@Override @Override
public List<PatientData> getData(List<Long> ids) { public List<PatientData> getData(List<Long> ids) {
if (ids == null || ids.isEmpty()) {
return new ArrayList<>();
}
QueryWrapper<PatientData> wrapper = new QueryWrapper<>(); QueryWrapper<PatientData> wrapper = new QueryWrapper<>();
wrapper.lambda() wrapper.lambda()
.in(PatientData::getId, ids) .in(PatientData::getId, ids)

Loading…
Cancel
Save