firstTag为空的时候空指针

pull/451/head
starrysky 2019-11-12 13:57:13 +08:00
parent 09ea9f1a84
commit 3dc36c5cb4
2 changed files with 8 additions and 1 deletions

View File

@ -47,6 +47,13 @@
<artifactId>quartz</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.6</version>
</dependency>
</dependencies>
<build>

View File

@ -86,7 +86,7 @@ public class CustomerInfoServiceImpl implements CustomerInfoService {
List<CustomerContact> customerContactList = new Gson().fromJson(customerContactJsonStr,new TypeToken<ArrayList<CustomerContact>>() {}.getType());
if(!CollectionUtils.isEmpty(customerContactList)){
for(CustomerContact customerContact : customerContactList){
if(customerContact.getFirstTag() == 1){
if(!StringUtils.isEmpty(customerContact.getFirstTag()) && customerContact.getFirstTag() == 1){
customerInfoDTO.setFirstContactMobile(customerContact.getMobile());
customerInfoDTO.setFirstContactName(customerContact.getName());
}