package cn.ysk.cashier.mybatis.service.impl;

import cn.ysk.cashier.mybatis.entity.TbFreeDineConfig;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.ysk.cashier.mybatis.service.TbFreeDineConfigService;
import cn.ysk.cashier.mybatis.mapper.TbFreeDineConfigMapper;
import org.springframework.stereotype.Service;

/**
* @author Administrator
* @description 针对表【tb_free_dine_config(霸王餐配置信息表)】的数据库操作Service实现
* @createDate 2024-10-22 14:49:18
*/
@Service
public class TbFreeDineConfigServiceImpl extends ServiceImpl<TbFreeDineConfigMapper, TbFreeDineConfig>
    implements TbFreeDineConfigService{
    @Override
    public TbFreeDineConfig getByShopId(Integer shopId) {
        return getOne(new LambdaQueryWrapper<TbFreeDineConfig>()
                .eq(TbFreeDineConfig::getShopId, shopId));
    }

    @Override
    public TbFreeDineConfig getByIdAndShopId(Integer id, Integer shopId) {
        return getOne(new LambdaQueryWrapper<TbFreeDineConfig>()
                .eq(TbFreeDineConfig::getId, id)
                .eq(TbFreeDineConfig::getShopId, shopId));
    }
}




