package cn.newfeifan.mall.sale.api.shop;

import cn.newfeifan.mall.framework.common.util.object.BeanUtils;
import cn.newfeifan.mall.module.api.shop.ShopApi;
import cn.newfeifan.mall.module.api.shop.dto.ShopDTO;
import cn.newfeifan.mall.sale.service.shop.ShopService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class ShopApiImpl implements ShopApi {

    @Resource
    private ShopService shopService;

    @Override
    public ShopDTO getShop(Long id) {
        return BeanUtils.toBean(shopService.getShop(id), ShopDTO.class);
    }
}
