/** 批量删除 */ @RequestMapping(value = "/deleteAllU") @ResponseBody public Object deleteAllU() { PageData pd = new PageData(); Map<String, Object> map = new HashMap<String, Object>(); try { pd = this.getPageData(); List<PageData> pdList = new ArrayList<PageData>(); String USER_IDS = pd.getString("USER_IDS"); if (null != USER_IDS && !"".equals(USER_IDS)) { String ArrayUSER_IDS[] = USER_IDS.split(","); if (Jurisdiction.buttonJurisdiction(menuUrl, "del")) { userService.deleteAllU(ArrayUSER_IDS); } pd.put("msg", "ok"); } else { pd.put("msg", "no"); } pdList.add(pd); map.put("list", pdList); } catch (Exception e) { logger.error(e.toString(), e); } finally { logAfter(logger); } return AppUtil.returnObject(pd, map); }
/** 判断用户名是否存在 */ @RequestMapping(value = "/hasU") @ResponseBody public Object hasU() { Map<String, String> map = new HashMap<String, String>(); String errInfo = "success"; PageData pd = new PageData(); try { pd = this.getPageData(); if (userService.findByUId(pd) != null) { errInfo = "error"; } } catch (Exception e) { logger.error(e.toString(), e); } map.put("result", errInfo); // 返回结果 return AppUtil.returnObject(new PageData(), map); }
/** 删除用户 */ @RequestMapping(value = "/del") @ResponseBody public Object del() { Map<String, String> map = new HashMap<String, String>(); PageData pd = new PageData(); String errInfo = ""; try { pd = this.getPageData(); if (Integer.parseInt(dictionariesService.findCount(pd).get("ZS").toString()) != 0) { errInfo = "false"; } else { dictionariesService.delete(pd); errInfo = "success"; } } catch (Exception e) { logger.error(e.toString(), e); } map.put("result", errInfo); return AppUtil.returnObject(new PageData(), map); }