package com.jwipc.tender.logic.impl;

import com.jwipc.tender.convert.TenderTypeConvert;
import com.jwipc.tender.dto.TenderTypeBaseDTO;
import com.jwipc.tender.entity.TenderType;
import com.jwipc.tender.logic.TenderTypeLogic;
import com.jwipc.tender.service.ITenderTypeService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * <p> </p>
 *
 * @author BOGON
 * @version 1.0
 * @since JDK 1.8
 */
@Service
@RequiredArgsConstructor
public class TenderTypeLogicImpl implements TenderTypeLogic {
    private final ITenderTypeService tenderTypeService;
    private final TenderTypeConvert tenderTypeConvert;

    /**
     * 获取所有
     *
     * @return
     */
    @Override
    public List<TenderTypeBaseDTO> getListAll() {
        final List<TenderType> list = tenderTypeService.list();
        return tenderTypeConvert.entities2Dtos(list);
    }
}