bug
This commit is contained in:
@@ -121,16 +121,24 @@ public class CourseMedicineMarketController {
|
||||
/**
|
||||
* 获取营销标签下课程
|
||||
*/
|
||||
// @RequestMapping(path = "/getCourseByMarketId")
|
||||
// public R getCourseByMarket(@RequestBody Map<String, Object> params) {
|
||||
// MPJLambdaWrapper<CourseToMedicineMarketEntity> wrapper = new MPJLambdaWrapper();
|
||||
// wrapper.leftJoin(CourseEntity.class,CourseEntity::getId, CourseToMedicineMarketEntity::getCourseId);
|
||||
// wrapper.selectAll(CourseEntity.class);
|
||||
// wrapper.like(CourseEntity::getTitle,params.get("title"));
|
||||
// wrapper.eq(CourseToMedicineMarketEntity::getMedicineMarketId,params.get("marketId"));
|
||||
// Page res = toMarketService.pageMaps(new Page<>(
|
||||
// Long.parseLong(params.get("current").toString()), Long.parseLong(params.get("limit").toString())), wrapper);
|
||||
// return R.ok().put("result", res);
|
||||
// }
|
||||
|
||||
|
||||
@RequestMapping(path = "/getCourseByMarketId")
|
||||
public R getCourseByMarket(@RequestBody Map<String, Object> params) {
|
||||
MPJLambdaWrapper<CourseToMedicineMarketEntity> wrapper = new MPJLambdaWrapper();
|
||||
wrapper.leftJoin(CourseEntity.class,CourseEntity::getId, CourseToMedicineMarketEntity::getCourseId);
|
||||
wrapper.selectAll(CourseEntity.class);
|
||||
wrapper.like(CourseEntity::getTitle,params.get("title"));
|
||||
wrapper.eq(CourseToMedicineMarketEntity::getMedicineMarketId,params.get("marketId"));
|
||||
Page res = toMarketService.pageMaps(new Page<>(
|
||||
Long.parseLong(params.get("current").toString()), Long.parseLong(params.get("limit").toString())), wrapper);
|
||||
return R.ok().put("result", res);
|
||||
public R getCourseByMarketId(@RequestBody Map<String,Integer> map){
|
||||
int marketId = map.get("marketId");
|
||||
List<CourseEntity> courseByMarketId = toMarketService.getCourseByMarketId(marketId);
|
||||
return R.ok().put("list",courseByMarketId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user