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

import cn.ysk.cashier.enums.TableStateEnum;
import cn.ysk.cashier.mybatis.mapper.MpShopTableMapper;
import cn.ysk.cashier.mybatis.mapper.TbShopUserMapper;
import cn.ysk.cashier.mybatis.service.MpShopTableService;
import cn.ysk.cashier.mybatis.service.MpShopUserService;
import cn.ysk.cashier.pojo.shop.TbShopTable;
import cn.ysk.cashier.pojo.shop.TbShopUser;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

@Service
public class MpShopUserServiceImpl extends ServiceImpl<TbShopUserMapper, TbShopUser> implements MpShopUserService {
    @Override
    public TbShopUser selectByUserIdAndShopId(Integer userId, Integer shopId) {
        return getOne(new LambdaQueryWrapper<TbShopUser>()
                .eq(TbShopUser::getUserId, userId)
                .eq(TbShopUser::getShopId, shopId));
    }
}
