Esempio n. 1
0
 private void calculateAdverMp(Map<String, String> adverMp, List<Map<String, String>> appList) {
   String appId = adverMp.get("appID");
   String isMutiApp = getPropVal(appId, appList, "isMutiApp");
   String nodeUid = getPropVal(appId, appList, "nodeUid");
   String apphref = getPropVal(appId, appList, "apphref");
   adverMp.put("isMutiApp", StringUtil.trim(isMutiApp));
   adverMp.put("nodeUid", StringUtil.trim(nodeUid));
   adverMp.put("apphref", StringUtil.trim(apphref));
 }
Esempio n. 2
0
 private String getPropVal(String advAppId, List<Map<String, String>> appList, String propName) {
   if (appList != null) {
     for (Map<String, String> appMp : appList) {
       String appId = appMp.get("appID");
       if (StringUtil.trim(appId).equals(StringUtil.trim(advAppId))) {
         return appMp.get(propName);
       }
     }
   }
   return null;
 }
Esempio n. 3
0
 private int getProdMonth(String offerCode, Map<String, String> map) {
   String threeOfferCode = StringUtil.trim(map.get("threeOfferCode"));
   String sixOfferCode = StringUtil.trim(map.get("sixOfferCode"));
   String twelveOfferCode = StringUtil.trim(map.get("twelveOfferCode"));
   offerCode = StringUtil.trim(offerCode);
   if (threeOfferCode.equals(offerCode)) {
     return 3;
   } else if (sixOfferCode.equals(offerCode)) {
     return 6;
   } else if (twelveOfferCode.equals(offerCode)) {
     return 12;
   } else {
     return 0;
   }
 }
Esempio n. 4
0
 private List<Map<String, String>> getMenuApps(
     String menuId, List<Map<String, String>> apps, int type) {
   List<Map<String, String>> menuapps = new ArrayList<Map<String, String>>();
   for (Map<String, String> app : apps) {
     if (StringUtil.trim(menuId).equals(StringUtil.trim(app.get("secMenu")))) { // 判断是否是指定二级菜单下
       if (type == 1 && isTeacher(StringUtil.trim(app.get("domain")))) {
         menuapps.add(app);
       } else if (type == 2 && isStudent(StringUtil.trim(app.get("domain")))) {
         menuapps.add(app);
       } else if (type == 3 && isActived(StringUtil.trim(app.get("isActive")))) {
         menuapps.add(app);
       }
     }
   }
   return menuapps;
 }
Esempio n. 5
0
 private List<Map<String, String>> getsubMenu(List<Map<String, String>> appList, int type) {
   List<Map<String, String>> rtnls = new ArrayList<Map<String, String>>();
   for (Map<String, String> app : appList) {
     String commonUse = StringUtil.trim(app.get("commonUse"));
     if (commonUse.indexOf(String.valueOf(type)) > -1) rtnls.add(app);
   }
   return rtnls;
 }