Home > Back-end >  For why null pointer
For why null pointer

Time:02-04

@ Override
Public BaseResponse & gt; Page (@ NotNull SpongeProjectListReqDTO dto) {
Page Page=new Page<& gt; (a);
Page. SetPageNum (dto. GetPageNum ());
Page. SetPageSize (dto. GetPageSize ());
SpongeProBaseInfoExample example=new SpongeProBaseInfoExample ();
SpongeProBaseInfoExample. The Criteria the Criteria=example. CreateCriteria ();
//query condition
Desc example. SetOrderByClause (" id ");
If (StringUtils. IsNotEmpty (dto. GetProjectName ())) {
List ProjectIds=spongeProBaseInfoService. GetProjectIdByName (dto. GetProjectName ());
{if (CollectionUtils. IsEmpty (projectIds))
Return BaseResponse. BuildSuccessResponse (). The result (page);
}
Criteria. AndIdIn (projectIds);
}
If (StringUtils. IsNotEmpty (dto. GetProjectCategory ())) {
Criteria. AndProjectCategoryLike (" % "+ dto. GetProjectCategory () +" % ");
}
If (StringUtils. IsNotEmpty (dto. GetStatus ())) {
Criteria. AndStatusEqualTo (dto. GetStatus ());
}
If (StringUtils. IsNotEmpty (dto. GetProjectprogress ())) {
Criteria. AndStatusEqualTo (dto. GetProjectprogress ());
}
If (StringUtils. IsNotEmpty (dto. GetProjectconstrct ())) {
Criteria. AndStatusEqualTo (dto. GetProjectconstrct ());
}

//different types of queries (hint null pointer)
The switch (dto getSpongeType ()) {
Case "important_project" :
Criteria. AndConstructTypeNotLike (" % 4% ");
break;
Case "award_project" :
Criteria. AndAwardEqualTo (true);
break;
Default:
break;
}
Criteria. AndDeletedEqualTo (CommonConstants. UN_DELETED);
Com. Making. Pagehelper. Page StartPage=PageHelper. StartPage (dto. GetPageNum (), dto. GetPageSize ());
//query list
Optional & gt; SpongeProBaseInfos=spongeProBaseInfoService. QueryByExample (example);
If (CollectionUtils. IsNotEmpty (spongeProBaseInfos. OrElse (null))) {
//processing records
List The response=spongeProBaseInfos. The get (). The stream (). The map (spongeProBaseInfo - & gt; {
SpongeProjectDetailRespDTO respDTO=new SpongeProjectDetailRespDTO ();
BeanUtils. CopyProperties (spongeProBaseInfo respDTO);

//determine button shows the

Return respDTO;
}). Collect (Collectors. ToList ());
Page. SetResults (response);
Page. SetTotal (startPage. GetTotal ());
}
Return BaseResponse. BuildSuccessResponse (). The result (page);
}

CodePudding user response:

That what,, the error log code is confidential content,,,, don't make mistake ourselves ran out...

CodePudding user response:

I think both of the above sentence empty is empty inside, you can put it out and see, incoming perhaps only the page number, when the data into the best print once received a log data

CodePudding user response:

reference 1/f, Francis. The Sun's reply: ,
that what, error log code is confidential content,,,, don't make mistake ourselves ran out...

I didn't read the blog wow this is a service layer so I print the object attribute are empty what reason be?
  • Related