package com.czg.service.market.service.impl;

import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import com.czg.market.entity.ShopUserInvite;
import com.czg.market.service.ShopUserInviteService;
import com.czg.service.market.mapper.ShopUserInviteMapper;
import org.springframework.stereotype.Service;

/**
 * 邀请与上级关联表 服务层实现。
 *
 * @author ww
 * @since 2025-11-06
 */
@Service
public class ShopUserInviteServiceImpl extends ServiceImpl<ShopUserInviteMapper, ShopUserInvite> implements ShopUserInviteService {

    @Override
    public ShopUserInvite getOneByShopIdAndShopUserId(Long shopId, Long shopUserId) {
        return getOne(QueryWrapper.create()
                .eq(ShopUserInvite::getShopId, shopId)
                .eq(ShopUserInvite::getShopUserId, shopUserId));
    }
}
