package cn.com.poc.law.rest.impl;	

import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Component;
import cn.com.poc.law.rest.BizAiLawyerWritingTemplateTypeRest;
import cn.com.poc.law.service.BizAiLawyerWritingTemplateTypeService;
import cn.com.poc.law.dto.BizAiLawyerWritingTemplateTypeDto;
import cn.com.poc.law.entity.BizAiLawyerWritingTemplateTypeEntity;
import cn.com.yict.framemax.data.model.PagingInfo;
import cn.com.poc.law.convert.BizAiLawyerWritingTemplateTypeConvert;
import java.util.stream.Collectors;
import org.springframework.util.Assert;

@Component
public class BizAiLawyerWritingTemplateTypeRestImpl implements BizAiLawyerWritingTemplateTypeRest {
   
   	@Resource
    private BizAiLawyerWritingTemplateTypeService service;

   	public List<BizAiLawyerWritingTemplateTypeDto> getList(BizAiLawyerWritingTemplateTypeDto dto,PagingInfo pagingInfo) throws Exception{
       	return service
		        .findByExample(BizAiLawyerWritingTemplateTypeConvert.dtoToEntity(dto),pagingInfo)
		        .stream()
				.map(BizAiLawyerWritingTemplateTypeConvert::entityToDto)
				.collect(Collectors.toList());
   	}

}