Esempio n. 1
0
 @Override
 public List<ResMenuShow> getResMenuList(int resId) {
   List<ResMenuShow> showList = new ArrayList<ResMenuShow>();
   Map<String, Object> params = new HashMap<String, Object>();
   ResShow resShow = null;
   if (resId > 0) {
     params.put("resId", resId);
     ResBean resBean = resDAO.getResById(params);
     resShow = ModelConvert.convert(resBean);
   }
   params.put("status", 0);
   List<ResMenuBean> resMenuBeanList = resMenuDAO.getResMenuList(params);
   if (null != resMenuBeanList) {
     showList = ModelConvert.convertResMenu(resMenuBeanList, resShow);
   }
   return showList;
 }
Esempio n. 2
0
 public List<ResMenuShow> getResMenuList() {
   List<ResMenuShow> showList = new ArrayList<ResMenuShow>();
   List<ResShow> result = new ArrayList<ResShow>();
   Map<String, Object> params = new HashMap<String, Object>();
   params.put("cityId", 1);
   params.put("areaId", 0);
   params.put("status", 0);
   List<ResBean> resList = resDAO.getResList(params);
   if (null != result) {
     result = ModelConvert.convert(resList);
     Map<String, Object> p = new HashMap<String, Object>();
     for (ResShow resShow : result) {
       p.put("status", 0);
       p.put("resId", resShow.getId());
       List<ResMenuBean> resMenuBeanList = resMenuDAO.getResMenuList(params);
       if (null != resMenuBeanList) {
         showList.addAll(ModelConvert.convertResMenu(resMenuBeanList, resShow));
       }
     }
   }
   return showList;
 }
Esempio n. 3
0
 @Override
 public int addResMenu(AddResMenuForm form) {
   ResMenuBean bean = ModelConvert.convert(form);
   int errorCode = resMenuDAO.addResMenu(bean);
   return errorCode;
 }