苍穹外卖--菜品管理-删除功能实现
This commit is contained in:
@@ -11,6 +11,8 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@Slf4j
|
||||
@Api(tags = "菜品相关接口")
|
||||
@@ -40,4 +42,14 @@ public class DishController {
|
||||
|
||||
return Result.success(pageResult);
|
||||
}
|
||||
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation("菜品批量删除")
|
||||
public Result delete(@RequestParam List<Long> ids){ //@RequestParam:能够使用springmvc框架,对1,2,3 参数进行切割
|
||||
log.info("菜品批量删除:{}",ids);
|
||||
//调用业务层的菜品批量删除功能
|
||||
dishService.deleteBath(ids);
|
||||
return Result.success();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user