@controller feature

 

When a controller in the controller is called by another controller, the called will only return the string without jumping, that is, it will only be downgraded to the ordinary method, but the model can be set, and the jump is still the same.

in the main method

 

@RequestMapping(value="/system/opmUser/list")

public String getUserByMarkId(OpmUserVo opmUser,HttpServletRequest request,Model modle) {

PageInfo<OpmUser> list= new PageInfo<>();

Map<String,Object> param = new HashMap<String,Object>();

param.put("pageNum", opmUser.getPageNum()+"");

param.put("pageSize", opmUser.getPageSize()+"");

Subject currentUser = SecurityUtils.getSubject();

Session session = currentUser.getSession();

OpmUser user =(OpmUser) session.getAttribute("currentUser");

TbCusMark tbCusMark = new TbCusMark();

tbCusMark.setMarketKey(BigDecimal.valueOf(Long.valueOf(user.getOrganid())));

tbCusMark = tbCusMarkService.getMark(tbCusMark);

Map<String,Object> param1 = new HashMap<String,Object>();

param1.put("marketId", tbCusMark.getMarketId());

param1.put("checkStatus", "B");

List<TbCusMarkVo> mars= tbCusMarkService.getMarketByCode(param1);

Set<TbCusMarkVo> marsk= new HashSet<TbCusMarkVo>(); 

for(TbCusMarkVo mar: mars){

marsk.add(mar);

if(mar.getTbCusMarkVo()!=null){

for(TbCusMarkVo ma: mar.getTbCusMarkVo()){

marsk.add (ma);

}

 

}

}

if(marsk!=null&&marsk.size()==1){

//list = getUserListUI(param, user);

//modle.addAttribute("list", list);

//modle.addAttribute("marks", marsk);

opmUser.setOrganid(user.getOrganid());

return listUi(opmUser,request,modle);//////////controller方法

 

}else{

param.put("organid", opmUser.getOrganid());

modle.addAttribute("marks", marsk);

return "/system/opmUser/list";

}

 

}

 

    controller method

@RequestMapping(value="/system/opmUser/listUi")

public String listUi(OpmUserVo opmUser,HttpServletRequest request,Model modle) {

PageInfo<OpmUser> list= new PageInfo<>();

Map<String,Object> param = new HashMap<String,Object>();

param.put("pageNum", opmUser.getPageNum()+"");

param.put("pageSize", opmUser.getPageSize()+"");

OpmUser op = new OpmUser ();

op.setOrganid(opmUser.getOrganid());

list = getUserListUI(param, op);

modle.addAttribute("list", list);

modle.addAttribute ("organid", opmUser.getOrganid ());

return "/system/opmUser/listUi";

 

}

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326574716&siteId=291194637