(5);
map.put("index", index);
map.put("categoryId", courseCat.getCategoryId());
map.put("categoryName", courseCat.getCategoryName());
map.put("code", courseCat.getCode());
map.put("imgPath", courseCat.getImgPath());
if (StringUtils.isNotBlank(courseCat.getImgPath()) && !"null".equals(courseCat.getImgPath())) {
map.put("imgPathShade", courseCat.getImgPath().split("\\.")[0].concat("-shade.png"));
} else {
map.put("imgPathShade", courseCat.getImgPath());
}
lstMap.add(map);
}
}
lstMap.add(QBMap);
return lstMap;
}
/**
* APP2.0: ¿Î³Ì³¬ÊÐ ËùÓвéѯÌõ¼þ
* URL /org/courcecategory/courseCatContitionNew
*
* ·µ»ØÖµJSON´®:
*
*
* {
* "course":[
* {"code":"0QB","children":[],"index":1,"categoryName":"È«²¿","categoryId":"26","parentId":null},
* {"code":"1CKJR","children":[],"index":2,"categoryName":"²Æ»á½ðÈÚ","categoryId":"18","parentId":null},
* {"code":"2YYKS","children":[],"index":3,"categoryName":"ÓïÑÔ¿¼ÊÔ","categoryId":"19","parentId":null},
* {"code":"3YYL","children":[],"index":4,"categoryName":"Ò½Ò©Àà","categoryId":"20","parentId":null},
* {"code":"4JGL","children":[],"index":5,"categoryName":"½¨¹¤Àà","categoryId":"21","parentId":null},
* {"code":"5ZYKZ","children":null,"index":6,"categoryName":"Ö°Òµ¿¼Ö¤","categoryId":"22","parentId":null},
* {"code":"6XLJY","children":[
* {"code":null,"index":1,"categoryName":"¾¼Ãѧ","categoryId":"5","parentId":"23"},
* {"code":null,"index":2,"categoryName":"·¨Ñ§","categoryId":"6","parentId":"23"}
* ],"index":7,"categoryName":"ѧÀú½ÌÓý","categoryId":"23","parentId":null},
* {"code":"7ITJN","children":[],"index":8,"categoryName":"IT¼¼ÄÜ","categoryId":"24","parentId":null},
* {"code":"8QT","children":[],"index":9,"categoryName":"ÆäËû","categoryId":"25","parentId":null}
* ],
* "city":[{"name":"ÉîÛÚ","index":1,"code":"sz"},{"name":"¹ãÖÝ","index":2,"code":"gz"}],
* "sort":[{"name":"¼Û¸ñÓɵ͵½¸ß","index":1,"code":"PRICE_ASC"},{"name":"¼Û¸ñÓɸߵ½µÍ","index":2,"code":"PRICE_DESC"}]
* }
*
*
*
* @return
*/
@RequestMapping(value = "courseCatContitionNew", method = RequestMethod.GET)
public @ResponseBody Map getCourseCatContitionData() {
return categoryService.generateAllCourseCondition();
}
/**
* APP2.0: ¸Ã»ú¹¹ÏÂËùÓпγ̵ķÖÀàºÍ¿ÆÄ¿ URL: /org/courcecategory/courseCategoryNew
*
* @return
*/
@Deprecated
@RequestMapping(value = "courseCategoryNew", method = RequestMethod.GET)
public @ResponseBody List getCourseCategoryData() {
// 1. ²éѯ¸Ã»ú¹¹ÏÂËùÓеĿÆÄ¿
String hql = "select courseId,name,price,imgPath,courseCategoryId " + " from OrgCourse c where c.deleteFlag is false";
// 2. ²éѯ¸Ã»ú¹¹ÏÂËùÓеĿÆÄ¿¶ÔÓ¦µÄÀà±ð
String hql_type = "select distinct c.category.categoryId,c.category.categoryName from OrgCourse c where " + " c.deleteFlag is false order by c.createTime ";
List