add judgment of project == null

This commit is contained in:
nigel 2016-04-19 16:11:57 +08:00
parent 9cc5eefbf6
commit 82453c216b
1 changed files with 6 additions and 1 deletions

View File

@ -61,7 +61,12 @@ public class MergeProjectsByHomepageOnly {
}
//获取当前的项目
GatherProjectsModel project = gatherDao.selectGPMById(sourceTableName, startId1);
if(project == null){
//表示项目不存在
logger.info("项目:" + startId1 + " 不存在");
dbSource.updatePointer(pointerTableName, sourceTableName, targetTableName, startId1 + 1);
continue;
}
//获取当前项目相同homepage的GatherProject
//提取项目的homepage
String homepage = project.getHomepage();