Commit 45f514f9 authored by liwei's avatar liwei

修改了excel导入bug

parent adf1ab38
......@@ -247,6 +247,14 @@ public class CmsPriceClickServiceImpl extends ServiceImpl<CmsPriceClickRepositor
Pattern pattern = Pattern.compile("[0-9]*");
//行数
Integer sum = 0;
//去除cmsPriceClicksDTOList里属性为null的数据
cmsPriceClicksDTOList = cmsPriceClicksDTOList.stream().filter(cmsPriceClickDTO -> {
if (cmsPriceClickDTO.getUserName() != null && cmsPriceClickDTO.getPhone() != null && cmsPriceClickDTO.getIdCard() != null && cmsPriceClickDTO.getBankCard() != null) {
return true;
}
return false;
}).collect(Collectors.toList());
//添加前先遍历一下那些数据有问题
for (CmsPriceClickDTO cmsPriceClickDTO : cmsPriceClicksDTOList) {
sum++;
......
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