套餐相关接口
This commit is contained in:
@@ -70,8 +70,35 @@ public class SetmealController {
|
||||
@GetMapping("/{id}")
|
||||
@ApiOperation("根据id查询套餐")
|
||||
public Result<SetmealVO> getById(@PathVariable Long id){
|
||||
log.info("根据id查询套餐");
|
||||
log.info("根据id查询套餐: {}",id);
|
||||
SetmealVO setmealVO = setmealService.getByIdWithSetmealDishes(id);
|
||||
return Result.success(setmealVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改套餐
|
||||
* @param setmealDTO
|
||||
* @return
|
||||
*/
|
||||
@PutMapping
|
||||
@ApiOperation("修改套餐")
|
||||
public Result update(@RequestBody SetmealDTO setmealDTO){
|
||||
log.info("修改套餐: {}",setmealDTO);
|
||||
setmealService.updateWithSetmealDishes(setmealDTO);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 套餐起售停售
|
||||
* @param status
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/status/{status}")
|
||||
@ApiOperation("套餐起售停售")
|
||||
public Result startOrStop(@PathVariable Integer status,Long id){
|
||||
log.info("套餐起售停售: 状态:{},ID:{}",status,id);
|
||||
setmealService.startOrStop(status,id);
|
||||
return Result.success();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user