package com.gkhy.labRiskManage.api.controller.account.converter; import com.gkhy.labRiskManage.api.controller.account.dto.resp.UserIdentityApiDTO; import com.gkhy.labRiskManage.application.account.dto.respDto.UserIndentityAppDTO; import com.gkhy.labRiskManage.commons.utils.BeanCopyUtils; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; import java.util.ArrayList; import java.util.List; /** * @email 1603559716@qq.com * @author: zf * @date: 2023/5/4 * @time: 13:44 */ @Component public class UserIdentityApiConverter { public List toApiDtoList(List list) { List respList = new ArrayList<>(); if(!CollectionUtils.isEmpty(list)){ respList = BeanCopyUtils.copyBeanList(list,UserIdentityApiDTO.class); } return respList; } }