Commit d7c8078c by 谢海旭

空判断处理

1 parent f20a0e94
...@@ -5,6 +5,7 @@ import com.alibaba.excel.annotation.ExcelIgnore; ...@@ -5,6 +5,7 @@ import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import java.util.Date; import java.util.Date;
import java.util.Objects;
/** /**
* *
...@@ -75,6 +76,10 @@ public class SopCustomerExcelDTO { ...@@ -75,6 +76,10 @@ public class SopCustomerExcelDTO {
} }
public int getSopJourneyDays() { public int getSopJourneyDays() {
if (Objects.isNull(sopJourneyEnterTime)) {
return 0;
}
Date now = new Date(); Date now = new Date();
long nowTime = now.getTime(); long nowTime = now.getTime();
long enterTime = sopJourneyEnterTime.getTime(); long enterTime = sopJourneyEnterTime.getTime();
...@@ -103,7 +108,10 @@ public class SopCustomerExcelDTO { ...@@ -103,7 +108,10 @@ public class SopCustomerExcelDTO {
} }
public int getSopJourneyStageDays() { public int getSopJourneyStageDays() {
// TODO 注意空指针 if (Objects.isNull(sopJourneyStageEnterTime)) {
return 0;
}
Date now = new Date(); Date now = new Date();
long nowTime = now.getTime(); long nowTime = now.getTime();
long enterTime = sopJourneyStageEnterTime.getTime(); long enterTime = sopJourneyStageEnterTime.getTime();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!