不是lits的泛型
不是lits的泛型
public <T> T getUserNum(Map<String,Object> param);
代码的一个分层概念,controller组装,数据返回数据,总的逻辑分支
@RequestMapping(value = "/addUser")
public String addUser(Model model,TbCusUserBeanVo tbCusUserBeanVo, @RequestParam(value="rolesKey") String rolesKey,@RequestParam(value="pz") String[] pz,HttpServletRequest request, HttpSession session) throws Exception {
if(tbCusUserBeanVo==null){
return null;
}
tbCusUserBeanVo.setCustomerKey(BigDecimal.valueOf(Long.valueOf(customerKey)));
try{
Map<String,Object> param =new HashMap<String,Object>();
param.put("CUSTOMER_KEY", tbCusUserBeanVo.getCustomerKey());
Map userNum =accountService.getUserNum(param);
if(userNum==null){
accountService.addOperateUser(tbCusUserBeanVo, rolesKey, pz);
}else{
int i =((BigDecimal)userNum.get("COUNT")).intValue();
if(((BigDecimal)userNum.get("SET_USER_NUM")).intValue()<i+1){
throw new Exception("最多允许添加:"+((BigDecimal)userNum.get("SET_USER_NUM")).intValue()+"个子账户");
}else{
accountService.addOperateUser(tbCusUserBeanVo, rolesKey, pz);
}
}
}catch(Exception e){
e.printStackTrace();
return null;
}
return "";
}
下一篇: ps不使用液化瘦脸的方法