Bladeren bron

bug修改

limin 7 jaren geleden
bovenliggende
commit
1f8bd98dec
1 gewijzigde bestanden met toevoegingen van 6 en 2 verwijderingen
  1. 6 2
      src/main/java/com/goafanti/common/controller/WebpageController.java

+ 6 - 2
src/main/java/com/goafanti/common/controller/WebpageController.java

@@ -20,6 +20,7 @@ import org.springframework.web.servlet.ModelAndView;
 
 import com.goafanti.achievement.service.AchievementInterestService;
 import com.goafanti.achievement.service.AchievementService;
+import com.goafanti.admin.bo.AdminVideoBo;
 import com.goafanti.admin.service.AdminVideoService;
 import com.goafanti.app.bo.ExpertsListBo;
 import com.goafanti.banners.service.BannersService;
@@ -868,8 +869,11 @@ public class WebpageController extends BaseController {
 			modelview.addObject("bannerlist", blist);
 		}
 		//视频
-		String url = adminVideoService.getIndexVideo("首页").getUrl();
-		modelview.addObject("vurl", url);
+		AdminVideoBo video =  adminVideoService.getIndexVideo("首页");
+		if(null != video ){
+			String url = video.getUrl();
+			modelview.addObject("vurl", url);
+		}
 		// List<AchievementObject>
 		// achievementObjects=achievementService.getHotAchievements(9, url,
 		// "web_index");