(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