package com.willalp.canteen.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.willalp.canteen.domain.HsCanteenMenuRegister;
import com.willalp.canteen.domain.resp.CuisineListResp;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 菜单登记Mapper接口
 *
 * @author songyu
 * @date 2021-11-29
 */
public interface HsCanteenMenuRegisterMapper extends BaseMapper<HsCanteenMenuRegister> {
    /**
     * 查询菜单登记
     *
     * @param registerId 菜单登记主键
     * @return 菜单登记
     */
    public HsCanteenMenuRegister selectHsCanteenMenuRegisterByRegisterId(String registerId);

    /**
     * 查询菜单登记列表
     *
     * @param hsCanteenMenuRegister 菜单登记
     * @return 菜单登记集合
     */
    public List<HsCanteenMenuRegister> selectHsCanteenMenuRegisterList(HsCanteenMenuRegister hsCanteenMenuRegister);

    /**
     * 查询菜单登记列表(包含下单数量)
     *
     * @param hsCanteenMenuRegister 菜单登记
     * @return 菜单登记集合(包含下单数量)
     */
    public List<HsCanteenMenuRegister> selectRegisterStockList(HsCanteenMenuRegister hsCanteenMenuRegister);


    /**
     * 获取菜品加图片
     *
     * @param hsCanteenMenuRegister 菜单登记
     * @param page
     * @param size
     * @return 菜单登记集合
     */
    List<CuisineListResp> selectCuisineList(@Param("hsCanteenMenuRegister") HsCanteenMenuRegister hsCanteenMenuRegister,
                                            @Param("page") Integer page,
                                            @Param("size") Integer size);

    /**
     * 总大小
     *
     * @param hsCanteenMenuRegister
     * @return 菜单登记集合
     */
    Integer selectCuisineCount(@Param("hsCanteenMenuRegister") HsCanteenMenuRegister hsCanteenMenuRegister);
}
