package com.diagbot.facade;

import java.util.List;

import org.springframework.stereotype.Component;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.diagbot.dto.DisclaimerInformationDTO;
import com.diagbot.entity.DisclaimerInformation;
import com.diagbot.enums.IsDeleteEnum;
import com.diagbot.enums.StatusEnum;
import com.diagbot.service.impl.DisclaimerInformationServiceImpl;
import com.diagbot.util.BeanUtil;

/**
 * 
 * @author wangfeng
 * @Description: TODO
 * @date 2018年11月27日 下午3:36:14
 */
@Component
public class DisclaimerInformationFacade extends DisclaimerInformationServiceImpl {

	/**
	 * 
	 * @return
	 */
	public List<DisclaimerInformationDTO> getDisclaimerInformation() {

		QueryWrapper<DisclaimerInformation> disclaimerInformation = new QueryWrapper<>();
		disclaimerInformation.eq("is_deleted", IsDeleteEnum.N.getKey()).eq("STATUS", StatusEnum.Enable.getKey())
				.orderByAsc("order_no");
		List<DisclaimerInformation> data = list(disclaimerInformation);
		// getDisclaimerInformationAll();
		List<DisclaimerInformationDTO> datas = BeanUtil.listCopyTo(data, DisclaimerInformationDTO.class);
		return datas;
	}

}
