Bladeren bron

PC网站维权页面,顾问页面BUG处理

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

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

@@ -1430,10 +1430,11 @@ public class WebpageController extends BaseController {
 	@RequestMapping(value = "/portal/service/safeguarding", method = RequestMethod.GET)
 	public ModelAndView portalServiceSafeguarding(HttpServletRequest request, ModelAndView modelview){
 		//获得法律顾问列表数据
-		String id = TokenManager.getUserId();
-		if(null != id){
-			modelview.addObject("userType", userService.selectByPrimaryKey(id).getType());
+		User u = userService.selectByPrimaryKey(TokenManager.getUserId());
+		if(null != u&&u.getType()!=null){
+			modelview.addObject("userType",u.getType() );
 		}
+		
 		modelview.addObject("slist", userIdentityService.consultantList( null, 1,  4,  null, null, null,  0,  12).getList());
 		modelview.setViewName("/portal/service/safeguarding");
 		return modelview;
@@ -1482,9 +1483,9 @@ public class WebpageController extends BaseController {
 	@RequestMapping(value = "/portal/adviser", method = RequestMethod.GET)
 	public ModelAndView portalAdviser(ModelAndView modelview){
 		modelview.setViewName("/portal/adviser");
-		String id = TokenManager.getUserId();
-		if(null != id){
-			modelview.addObject("userType", userService.selectByPrimaryKey(id).getType());
+		User u = userService.selectByPrimaryKey(TokenManager.getUserId());
+		if(null != u&&u.getType()!=null){
+			modelview.addObject("userType",u.getType() );
 		}
 		return modelview;
 	}