This commit is contained in:
wangjinlei
2024-05-21 16:54:36 +08:00
parent f246c8a0a9
commit 8cfb645798
4 changed files with 38 additions and 10 deletions

View File

@@ -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);
}
/**