预炸品加字段
This commit is contained in:
@@ -2,8 +2,10 @@ package com.cool.store.service.impl;
|
||||
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.dao.EnterpriseUserDAO;
|
||||
import com.cool.store.dao.PreFryApprovalRecordsDAO;
|
||||
import com.cool.store.dao.PreFryQualificationApplyDAO;
|
||||
import com.cool.store.dao.RegionDao;
|
||||
import com.cool.store.dto.pre.fry.*;
|
||||
import com.cool.store.entity.PreFryApprovalRecordsDO;
|
||||
import com.cool.store.entity.PreFryQualificationApplyDO;
|
||||
@@ -17,16 +19,15 @@ import com.cool.store.utils.CoolDateUtils;
|
||||
import com.cool.store.vo.PartnerUserInfoVO;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
@@ -40,6 +41,10 @@ public class PreFryQualificationApplyServiceImpl implements PreFryQualificationA
|
||||
private PreFryQualificationApplyDAO preFryQualificationApplyDAO;
|
||||
@Resource
|
||||
private PreFryApprovalRecordsDAO preFryApprovalRecordsDAO;
|
||||
@Resource
|
||||
private EnterpriseUserDAO enterpriseUserDAO;
|
||||
@Resource
|
||||
private RegionDao regionDao;
|
||||
|
||||
|
||||
@Override
|
||||
@@ -125,6 +130,16 @@ public class PreFryQualificationApplyServiceImpl implements PreFryQualificationA
|
||||
public PageInfo<ApplyManagementDTO> queryApplyManagementList(ApplyManagementQueryDTO query) {
|
||||
PageHelper.startPage(query.getPageNum(), query.getPageSize());
|
||||
List<ApplyManagementDTO> applyManagementDTOS = preFryQualificationApplyDAO.selectApplyManagementList(query);
|
||||
if (CollectionUtils.isNotEmpty(applyManagementDTOS)){
|
||||
Set<String> userIds = applyManagementDTOS.stream().map(ApplyManagementDTO::getInvestmentManagerId).collect(Collectors.toSet());
|
||||
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(new ArrayList<>(userIds));
|
||||
Set<Long> regionIds = applyManagementDTOS.stream().map(ApplyManagementDTO::getRegionId).collect(Collectors.toSet());
|
||||
Map<Long, String> regionNameMap = regionDao.getRegionNameMap(new ArrayList<>(regionIds));
|
||||
for (ApplyManagementDTO applyManagementDTO:applyManagementDTOS){
|
||||
applyManagementDTO.setInvestmentManagerName(userNameMap.getOrDefault(applyManagementDTO.getInvestmentManagerId(), ""));
|
||||
applyManagementDTO.setRegionName(regionNameMap.getOrDefault(applyManagementDTO.getRegionId(), ""));
|
||||
}
|
||||
}
|
||||
return new PageInfo<>(applyManagementDTOS);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user