package cn.iocoder.yudao.module.system.controller.admin.devuce;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.system.controller.admin.devuce.vo.DevuceListVO;
import cn.iocoder.yudao.module.system.service.devuce.DevuceService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
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.RestController;

import javax.annotation.Resource;
import javax.annotation.security.PermitAll;

import java.util.List;

import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;


@Tag(name = "管理后台 - 设备")
@RestController
@RequestMapping("/t/devuce")
@Validated
@PermitAll
public class DevuceController {

    @Resource
    private DevuceService devuceService;

    @GetMapping("/get")
    @Operation(summary = "获取菜品剩余重量")
    public CommonResult<List<DevuceListVO>> get(Long storeId) {
        return success(devuceService.getList(storeId));
    }
}