|
@@ -24,18 +24,16 @@ import java.util.List;
|
|
|
*/
|
|
|
@RestController
|
|
|
@RequestMapping("/system/menuFood")
|
|
|
-public class MenuFoodController extends BaseController
|
|
|
-{
|
|
|
+public class MenuFoodController extends BaseController {
|
|
|
@Autowired
|
|
|
private IMenuFoodService menuFoodService;
|
|
|
|
|
|
-/**
|
|
|
- * 查询每日食谱列表
|
|
|
- */
|
|
|
-@PreAuthorize("@ss.hasPermi('system:menuFood:list')")
|
|
|
-@GetMapping("/list")
|
|
|
- public TableDataInfo list(MenuFood menuFood)
|
|
|
- {
|
|
|
+ /**
|
|
|
+ * 查询每日食谱列表
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:menuFood:list')")
|
|
|
+ @GetMapping("/list")
|
|
|
+ public TableDataInfo list(MenuFood menuFood) {
|
|
|
startPage();
|
|
|
List<MenuFood> list = menuFoodService.selectMenuFoodList(menuFood);
|
|
|
return getDataTable(list);
|
|
@@ -47,8 +45,7 @@ public class MenuFoodController extends BaseController
|
|
|
@PreAuthorize("@ss.hasPermi('system:menuFood:export')")
|
|
|
@Log(title = "每日食谱", businessType = BusinessType.EXPORT)
|
|
|
@PostMapping("/export")
|
|
|
- public void export(HttpServletResponse response, MenuFood menuFood)
|
|
|
- {
|
|
|
+ public void export(HttpServletResponse response, MenuFood menuFood) {
|
|
|
List<MenuFood> list = menuFoodService.selectMenuFoodList(menuFood);
|
|
|
ExcelUtil<MenuFood> util = new ExcelUtil<MenuFood>(MenuFood.class);
|
|
|
util.exportExcel(response, list, "每日食谱数据");
|
|
@@ -59,8 +56,7 @@ public class MenuFoodController extends BaseController
|
|
|
*/
|
|
|
@PreAuthorize("@ss.hasPermi('system:menuFood:query')")
|
|
|
@GetMapping(value = "/{menuFoodId}")
|
|
|
- public AjaxResult getInfo(@PathVariable("menuFoodId") Long menuFoodId)
|
|
|
- {
|
|
|
+ public AjaxResult getInfo(@PathVariable("menuFoodId") Long menuFoodId) {
|
|
|
return success(menuFoodService.selectMenuFoodByMenuFoodId(menuFoodId));
|
|
|
}
|
|
|
|
|
@@ -70,8 +66,7 @@ public class MenuFoodController extends BaseController
|
|
|
@PreAuthorize("@ss.hasPermi('system:menuFood:add')")
|
|
|
@Log(title = "每日食谱", businessType = BusinessType.INSERT)
|
|
|
@PostMapping
|
|
|
- public AjaxResult add(@RequestBody MenuFoodVo menuFoodVo)
|
|
|
- {
|
|
|
+ public AjaxResult add(@RequestBody MenuFoodVo menuFoodVo) {
|
|
|
return toAjax(menuFoodService.batchMenuFoodVo(menuFoodVo));
|
|
|
}
|
|
|
|
|
@@ -81,8 +76,7 @@ public class MenuFoodController extends BaseController
|
|
|
@PreAuthorize("@ss.hasPermi('system:menuFood:edit')")
|
|
|
@Log(title = "每日食谱", businessType = BusinessType.UPDATE)
|
|
|
@PostMapping("/put")
|
|
|
- public AjaxResult edit(@RequestBody MenuFood menuFood)
|
|
|
- {
|
|
|
+ public AjaxResult edit(@RequestBody MenuFood menuFood) {
|
|
|
return toAjax(menuFoodService.updateMenuFood(menuFood));
|
|
|
}
|
|
|
|
|
@@ -92,8 +86,7 @@ public class MenuFoodController extends BaseController
|
|
|
@PreAuthorize("@ss.hasPermi('system:menuFood:remove')")
|
|
|
@Log(title = "每日食谱", businessType = BusinessType.DELETE)
|
|
|
@GetMapping("/delete/{menuFoodIds}")
|
|
|
- public AjaxResult remove(@PathVariable Long[] menuFoodIds)
|
|
|
- {
|
|
|
+ public AjaxResult remove(@PathVariable Long[] menuFoodIds) {
|
|
|
return toAjax(menuFoodService.deleteMenuFoodByMenuFoodIds(menuFoodIds));
|
|
|
}
|
|
|
}
|