|
@@ -27,12 +27,12 @@ public class EasEduCategoryController {
|
|
EasEduCategoryService easEduCategoryService;
|
|
EasEduCategoryService easEduCategoryService;
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 添加
|
|
|
|
|
|
+ * 添加类别
|
|
* @param easEduCategory
|
|
* @param easEduCategory
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@PostMapping(value = "/addEasEduCategory")
|
|
@PostMapping(value = "/addEasEduCategory")
|
|
- @Operation(summary = "添加课程" , description = "用于 添加课程")
|
|
|
|
|
|
+ @Operation(summary = "添加课程类别" , description = "用于添加课程类别")
|
|
public JsonResult addEasEduCategory(@RequestBody EasEduCategory easEduCategory ){
|
|
public JsonResult addEasEduCategory(@RequestBody EasEduCategory easEduCategory ){
|
|
int add = easEduCategoryService.addEasEduCategory( easEduCategory );
|
|
int add = easEduCategoryService.addEasEduCategory( easEduCategory );
|
|
System.out.println( add );
|
|
System.out.println( add );
|
|
@@ -45,7 +45,7 @@ public class EasEduCategoryController {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@PostMapping(value = "/updateEasEduCategory")
|
|
@PostMapping(value = "/updateEasEduCategory")
|
|
- @Operation(summary = "课程更新" , description = "用于 课程更新")
|
|
|
|
|
|
+ @Operation(summary = "课程类别更新" , description = "用于课程类别更新")
|
|
public JsonResult updateEasEduCategory(@RequestBody EasEduCategory easEduCategory){
|
|
public JsonResult updateEasEduCategory(@RequestBody EasEduCategory easEduCategory){
|
|
int i = easEduCategoryService.updateEasEduCategory( easEduCategory );
|
|
int i = easEduCategoryService.updateEasEduCategory( easEduCategory );
|
|
if (i > 0){
|
|
if (i > 0){
|
|
@@ -61,7 +61,7 @@ public class EasEduCategoryController {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@DeleteMapping(value = "/deleteById/{id}")
|
|
@DeleteMapping(value = "/deleteById/{id}")
|
|
- @Operation(summary = "根据Id删除课程" , description = "用于 根据Id删除课程")
|
|
|
|
|
|
+ @Operation(summary = "根据Id删除课程类别" , description = "用于根据Id删除课程类别")
|
|
public JsonResult deleteById(@PathVariable Integer id){
|
|
public JsonResult deleteById(@PathVariable Integer id){
|
|
int i = easEduCategoryService.deleteById(id);
|
|
int i = easEduCategoryService.deleteById(id);
|
|
if (i > 0){
|
|
if (i > 0){
|
|
@@ -77,16 +77,12 @@ public class EasEduCategoryController {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@GetMapping(value = "/selectById")
|
|
@GetMapping(value = "/selectById")
|
|
- @Operation(summary = "根据Id查询对应课程" , description = "用于 根据Id查询课程")
|
|
|
|
|
|
+ @Operation(summary = "根据Id查询对应课程类别" , description = "用于根据Id查询课程类别")
|
|
public JsonResult selectById(Integer id){
|
|
public JsonResult selectById(Integer id){
|
|
EasEduCategory easEduCategory = easEduCategoryService.selectById(id);
|
|
EasEduCategory easEduCategory = easEduCategoryService.selectById(id);
|
|
-
|
|
|
|
-
|
|
|
|
System.out.println(
|
|
System.out.println(
|
|
Disabled.valueOf(easEduCategory.getDisabled())
|
|
Disabled.valueOf(easEduCategory.getDisabled())
|
|
);
|
|
);
|
|
-
|
|
|
|
-
|
|
|
|
return JsonResult.data( easEduCategory );
|
|
return JsonResult.data( easEduCategory );
|
|
}
|
|
}
|
|
|
|
|
|
@@ -95,7 +91,7 @@ public class EasEduCategoryController {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@GetMapping(value = "/selectAll")
|
|
@GetMapping(value = "/selectAll")
|
|
- @Operation(summary = "查询全部课程" , description = "用于 查询全部课程")
|
|
|
|
|
|
+ @Operation(summary = "查询全部课程类别" , description = "用于查询全部课程类别")
|
|
public JsonResult selectAll(){
|
|
public JsonResult selectAll(){
|
|
List<EasEduCategory> easEduCategories = easEduCategoryService.selectAll();
|
|
List<EasEduCategory> easEduCategories = easEduCategoryService.selectAll();
|
|
return JsonResult.data( easEduCategories );
|
|
return JsonResult.data( easEduCategories );
|
|
@@ -109,7 +105,7 @@ public class EasEduCategoryController {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@PostMapping(value = "/selectByCondition")
|
|
@PostMapping(value = "/selectByCondition")
|
|
- @Operation(summary = "根据条件进行查询", description = "用于根据条件查询课程")
|
|
|
|
|
|
+ @Operation(summary = "根据条件进行查询课程类别", description = "用于根据条件查询课程类别")
|
|
public JsonPageResult selectByCondition(@RequestBody EasEduCategory easEduCategory,
|
|
public JsonPageResult selectByCondition(@RequestBody EasEduCategory easEduCategory,
|
|
@RequestParam Integer pageNum, @RequestParam Integer pageSize) {
|
|
@RequestParam Integer pageNum, @RequestParam Integer pageSize) {
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
PageHelper.startPage(pageNum, pageSize);
|