package com.sqx.modules.sys.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sqx.modules.datacentre.entity.SysUserShop;
import com.sqx.modules.sys.dao.SysUserShopDao;
import com.sqx.modules.sys.service.SysUserShopService;
import org.springframework.stereotype.Service;

@Service
public class SysUserShopServiceImpl extends ServiceImpl<SysUserShopDao, SysUserShop> implements SysUserShopService {

    @Override
    public SysUserShop getByUserId(Long userId) {
        LambdaQueryWrapper<SysUserShop> queryWrapper = Wrappers.lambdaQuery();
        queryWrapper.eq(SysUserShop::getUserId, userId);
        return this.getOne(queryWrapper);
    }
}
