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

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 com.tmerclub.cloud.delivery.mapper.TranscityFreeMapper;
import com.tmerclub.cloud.delivery.model.TranscityFree;
import com.tmerclub.cloud.delivery.service.TranscityFreeService;
import com.tmerclub.cloud.delivery.vo.TranscityFreeVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 指定条件包邮城市项
 *
 * @author tmerclub
 * @date 2020-12-07 15:10:01
 */
@Service
public class TranscityFreeServiceImpl implements TranscityFreeService {

    @Autowired
    private TranscityFreeMapper transcityFreeMapper;

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

    @Override
    public TranscityFreeVO getByTranscityFreeId(Long transcityFreeId) {
        return transcityFreeMapper.getByTranscityFreeId(transcityFreeId);
    }

    @Override
    public void save(TranscityFree transcityFree) {
        transcityFreeMapper.save(transcityFree);
    }

    @Override
    public void update(TranscityFree transcityFree) {
        transcityFreeMapper.update(transcityFree);
    }

    @Override
    public void deleteById(Long transcityFreeId) {
        transcityFreeMapper.deleteById(transcityFreeId);
    }
}
