This commit is contained in:
wangjinlei
2024-05-22 14:10:28 +08:00
parent 2280276a58
commit 689d241310
6 changed files with 31 additions and 8 deletions

View File

@@ -50,7 +50,7 @@ public class CourseMedicineMarketController {
@RequestMapping("/addSociologyMarket")
public R addSociologyMarket(@RequestBody CourseMedicineMarketEntity courseMedicineMarketEntity){
marketService.save(courseMedicineMarketEntity);
return R.ok().put("market",courseMedicineMarketEntity);
return R.ok().put("result",courseMedicineMarketEntity);
}
@RequestMapping("/editSociologyMarket")
@@ -70,7 +70,7 @@ public class CourseMedicineMarketController {
}
}
marketService.updateById(courseMedicineMarketEntity);
return R.ok().put("market",courseMedicineMarketEntity);
return R.ok().put("result",courseMedicineMarketEntity);
}
@RequestMapping(path = "/delMarket")
@@ -105,6 +105,14 @@ public class CourseMedicineMarketController {
return R.ok().put("list",courseByMarketId);
}
@RequestMapping("/editMarketSort")
public R editMarketSort(@RequestBody Map<String,Integer> map){
CourseToMedicineMarketEntity info = toMarketService.getOne(new LambdaQueryWrapper<CourseToMedicineMarketEntity>().eq(CourseToMedicineMarketEntity::getCourseId, map.get("courseId")).eq(CourseToMedicineMarketEntity::getMedicineMarketId, map.get("marketId")),false);
info.setSort(map.get("sort"));
toMarketService.updateById(info);
return R.ok().put("result",info);
}
/**
* 获取未关联课程列表
*/

View File

@@ -97,6 +97,16 @@ public class CourseSociologyMarketController {
}
}
@RequestMapping("/editMarketSort")
public R editMarketSort(@RequestBody Map<String,Integer> map){
CourseToSociologyMarketEntity info = toMarketService.getOne(new LambdaQueryWrapper<CourseToSociologyMarketEntity>()
.eq(CourseToSociologyMarketEntity::getSociologyMarketId, map.get("marketId"))
.eq(CourseToSociologyMarketEntity::getCourseId, map.get("courseId")), false);
info.setSort(map.get("sort"));
toMarketService.updateById(info);
return R.ok().put("result",info);
}
@RequestMapping("/getCourseListByMarketId")
public R getCourseListByMarketId(@RequestBody Map<String,Integer> map){
List<CourseEntity> marketId = toMarketService.getCourseListByMarketId(map.get("marketId"));