!60 修复通俗重量

Merge pull request !60 from 德仔/develop
This commit is contained in:
德仔
2021-02-09 10:27:08 +08:00
committed by Gitee
27 changed files with 1942 additions and 744 deletions

View File

@ -1,16 +1,11 @@
package com.stdiet.web.controller.custom;
import java.util.List;
import com.github.pagehelper.PageHelper;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import com.stdiet.common.annotation.Log;
import com.stdiet.common.core.controller.BaseController;
import com.stdiet.common.core.domain.AjaxResult;
@ -38,7 +33,7 @@ public class SysIngredientController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('custom:ingredient:list')")
@PostMapping("/list")
public TableDataInfo list(@RequestBody SysIngredient sysIngredient)
public TableDataInfo list(@RequestParam Integer pageSize, @RequestParam Integer pageNum, @RequestBody SysIngredient sysIngredient)
{
startPage();
List<SysIngredient> list = sysIngredientService.selectSysIngredientList(sysIngredient);

View File

@ -0,0 +1,23 @@
package com.stdiet.web.controller.custom;
import com.stdiet.common.core.controller.BaseController;
import com.stdiet.common.core.domain.AjaxResult;
import com.stdiet.custom.service.ISysRecipesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/recipes")
public class SysRecipesController extends BaseController {
@Autowired
private ISysRecipesService sysRecipesService;
@GetMapping(value = "/{resipesId}")
public AjaxResult getInfo(@PathVariable("resipesId") Long resipesId) {
return AjaxResult.success(sysRecipesService.selectSysRecipesByRecipesId(resipesId));
}
}