Search in sources :

Example 1 with BorrowerAttachVO

use of com.atguigu.srb.core.pojo.Vo.BorrowerAttachVO in project finacialpotal by f117-sercet.

the class BorrowerAttachServiceImpl method selectBorrowerAttachVoList.

@Override
public List<BorrowerAttachVO> selectBorrowerAttachVoList(Long borrowerId) {
    QueryWrapper<BorrowerAttach> borrowerAttachQueryWrapper = new QueryWrapper<>();
    borrowerAttachQueryWrapper.eq("borrower_id", borrowerId);
    List<BorrowerAttach> borrowerAttachList = baseMapper.selectList(borrowerAttachQueryWrapper);
    List<BorrowerAttachVO> borrowerAttachVOList = new ArrayList<>();
    borrowerAttachList.forEach(borrowerAttach -> {
        BorrowerAttachVO borrowerAttachVO = new BorrowerAttachVO();
        borrowerAttachVO.setImageType(borrowerAttach.getImageType());
        borrowerAttachVO.setImageUrl(borrowerAttach.getImageUrl());
        borrowerAttachVOList.add(borrowerAttachVO);
    });
    return borrowerAttachVOList;
}
Also used : QueryWrapper(com.baomidou.mybatisplus.core.conditions.query.QueryWrapper) ArrayList(java.util.ArrayList) BorrowerAttachVO(com.atguigu.srb.core.pojo.Vo.BorrowerAttachVO) BorrowerAttach(com.atguigu.srb.core.pojo.entity.BorrowerAttach)

Aggregations

BorrowerAttachVO (com.atguigu.srb.core.pojo.Vo.BorrowerAttachVO)1 BorrowerAttach (com.atguigu.srb.core.pojo.entity.BorrowerAttach)1 QueryWrapper (com.baomidou.mybatisplus.core.conditions.query.QueryWrapper)1 ArrayList (java.util.ArrayList)1