修改食材,菜品删除逻辑

This commit is contained in:
huangdeliang
2021-03-25 16:42:05 +08:00
parent 6d1fa36021
commit b4e66b2cda
14 changed files with 119 additions and 103 deletions

View File

@ -116,8 +116,8 @@ public class SysDishesController extends BaseController {
*/
@PreAuthorize("@ss.hasPermi('custom:dishes:remove')")
@Log(title = "菜品", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(sysDishesService.deleteSysDishesByIds(ids));
@DeleteMapping("/{id}")
public AjaxResult remove(@PathVariable Long id) {
return toAjax(sysDishesService.deleteSysDishesById(id));
}
}

View File

@ -98,9 +98,9 @@ public class SysIngredientController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('custom:ingredient:remove')")
@Log(title = "食材", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
@DeleteMapping("/{id}")
public AjaxResult remove(@PathVariable Long id)
{
return toAjax(sysIngredientService.deleteSysIngredientByIds(ids));
return toAjax(sysIngredientService.deleteSysIngredientById(id));
}
}

View File

@ -11,6 +11,10 @@ import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@RestController
@RequestMapping("/wap")
public class SysWapController extends BaseController {
@ -69,11 +73,17 @@ public class SysWapController extends BaseController {
/**
* 获取完整食谱
*
* @param id
* @return
*/
@GetMapping(value = "recipes/{id}")
@GetMapping(value = "/recipes/{id}")
public AjaxResult recipesDetail(@PathVariable Long id) {
return AjaxResult.success(iSysRecipesService.selectSysRecipesByRecipesId(id));
}
// @GetMapping(value = "/qrcode")
// public void qrcodeRediredt(String group, HttpServletRequest request, HttpServletResponse response) throws IOException {
// response.sendRedirect("https://weibo.com/u/1913360251");
// }
}