package com.fzm.mall.server.front.goods.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.fzm.mall.server.front.goods.model.Shop;
import com.fzm.mall.server.front.goods.mapper.ShopMapper;
import com.fzm.mall.server.front.goods.service.IShopService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 店铺中心-店铺 服务实现类
 * </p>
 *
 * @author fzm
 * @since 2021-05-13
 */
@Service
public class ShopServiceImpl extends ServiceImpl<ShopMapper, Shop> implements IShopService {

    @Override
    public Shop getByMerchantId(String merchantId) {
        QueryWrapper<Shop> q = new QueryWrapper<>();
        q.eq("merchant_id",merchantId);
        return getOne(q);
    }
}
