批量删除套餐、菜品起售停售(TODO)
This commit is contained in:
@@ -159,7 +159,26 @@ public class DishServiceImpl implements DishService {
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Dish> selectByCategoryId(String categoryId) {
|
||||
public List<Dish> selectByCategoryId(Long categoryId) {
|
||||
return dishMapper.selectByCategoryId(categoryId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 菜品起售停售
|
||||
* @param status
|
||||
* @param id
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
//TODO 菜品关联套餐状态
|
||||
public void startOrStop(Integer status, Long id) {
|
||||
//更新菜品状态
|
||||
Dish dish = Dish.builder()
|
||||
.id(id)
|
||||
.status(status)
|
||||
.build();
|
||||
dishMapper.update(dish);
|
||||
//更新菜品所关联套餐的状态
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user