
package com.tmerclub.cloud.biz.service.impl;

import com.tmerclub.cloud.biz.mapper.NotifyTemplateShopMapper;
import com.tmerclub.cloud.biz.model.NotifyTemplateShop;
import com.tmerclub.cloud.biz.service.NotifyTemplateShopService;
import com.tmerclub.cloud.common.database.dto.PageDTO;
import com.tmerclub.cloud.common.database.util.PageUtil;
import com.tmerclub.cloud.common.database.vo.PageVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 *
 *
 * @author tmerclub
 * @date 2021-01-16 15:01:14
 */
@Service
public class NotifyTemplateShopServiceImpl implements NotifyTemplateShopService {

    @Autowired
    private NotifyTemplateShopMapper notifyTemplateShopMapper;

    @Override
    public PageVO<NotifyTemplateShop> page(PageDTO pageDTO) {
        return PageUtil.doPage(pageDTO, () -> notifyTemplateShopMapper.list());
    }

    @Override
    public NotifyTemplateShop getByNotifyShopId(Long notifyShopId) {
        return notifyTemplateShopMapper.getByNotifyShopId(notifyShopId);
    }

    @Override
    public void save(NotifyTemplateShop notifyTemplateShop) {
        notifyTemplateShopMapper.save(notifyTemplateShop);
    }

    @Override
    public void update(NotifyTemplateShop notifyTemplateShop) {
        notifyTemplateShopMapper.update(notifyTemplateShop);
    }

    @Override
    public void deleteById(Long notifyShopId) {
        notifyTemplateShopMapper.deleteById(notifyShopId);
    }
}
