后厨 页面 按台桌查看 按商品查看
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
package com.czg.controller.kitchen;
|
||||
|
||||
import com.czg.annotation.SaAdminCheckPermission;
|
||||
import com.czg.order.vo.KitchenFoodVO;
|
||||
import com.czg.order.vo.KitchenTableFoodVO;
|
||||
import com.czg.order.vo.KitchenTableVO;
|
||||
import com.czg.resp.CzgResult;
|
||||
import com.czg.sa.StpKit;
|
||||
import com.czg.service.order.mapper.KitchenDetailMapper;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 后厨:台桌/菜单
|
||||
*
|
||||
* @author tankaikai
|
||||
* @since 2025-03-07 15:25
|
||||
*/
|
||||
@RestController
|
||||
//@RequestMapping("/admin/kitchen")
|
||||
@RequestMapping("/notify/kitchen")
|
||||
public class TableController {
|
||||
|
||||
@Resource
|
||||
private KitchenDetailMapper kitchenDetailMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 按台桌查看
|
||||
*/
|
||||
@GetMapping("getKitchenTable")
|
||||
@SaAdminCheckPermission(value = "kitchen:table", name = "后厨-按台桌查看")
|
||||
public CzgResult<List<KitchenTableVO>> getKitchenTable(@RequestParam String tableName, @RequestParam Long areaId) {
|
||||
Long shopId = StpKit.USER.getShopId();
|
||||
List<KitchenTableVO> kitchenTables = kitchenDetailMapper.getKitchenTable(shopId, tableName, areaId);
|
||||
return CzgResult.success(kitchenTables);
|
||||
}
|
||||
|
||||
/**
|
||||
* 按台桌查看 商品内容
|
||||
*/
|
||||
@GetMapping("getKitchenTableFoods")
|
||||
@SaAdminCheckPermission(value = "kitchen:tableFood", name = "后厨-按台桌查看商品内容")
|
||||
public CzgResult<List<KitchenTableFoodVO>> getKitchenTableFoods(@RequestParam(required = false) Long orderId,
|
||||
@RequestParam(required = false) String tableCode,
|
||||
@RequestParam(required = false) Long isNoTable) {
|
||||
Long shopId = StpKit.USER.getShopId();
|
||||
if (isNoTable != null) {
|
||||
tableCode = null;
|
||||
}
|
||||
List<KitchenTableFoodVO> kitchenFood = kitchenDetailMapper.getKitchenTableFoods(shopId, orderId, tableCode, isNoTable);
|
||||
return CzgResult.success(kitchenFood);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 按商品查看
|
||||
*/
|
||||
@GetMapping("getKitchenFood")
|
||||
@SaAdminCheckPermission(value = "kitchen:table", name = "后厨-按台桌查看")
|
||||
public CzgResult<List<KitchenFoodVO>> getKitchenFood(@RequestParam String productName) {
|
||||
Long shopId = StpKit.USER.getShopId();
|
||||
List<KitchenFoodVO> kitchenFood = kitchenDetailMapper.getKitchenFood(shopId, productName);
|
||||
return CzgResult.success(kitchenFood);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user