Commit b541b2d8 by wangli

MybatisPlus to JPA

1 parent 4c834af9
...@@ -28,10 +28,10 @@ public class OrderServiceListServiceImpl implements OrderServiceListService { ...@@ -28,10 +28,10 @@ public class OrderServiceListServiceImpl implements OrderServiceListService {
private OrderInfoMPDao orderInfoMPDao; private OrderInfoMPDao orderInfoMPDao;
@Autowired @Autowired
private EngineerInfoMPDao engineerInfoMPDao; private EngineerInfoDao engineerInfoDao;
@Autowired @Autowired
private OrgBranchMPDao orgBranchMPDao; private OrgBranchDao orgBranchDao;
@Transactional @Transactional
@Override @Override
...@@ -167,8 +167,8 @@ public class OrderServiceListServiceImpl implements OrderServiceListService { ...@@ -167,8 +167,8 @@ public class OrderServiceListServiceImpl implements OrderServiceListService {
if(engineerCodes.isEmpty()){ if(engineerCodes.isEmpty()){
return new HashMap<>(); return new HashMap<>();
} }
List<EngineerInfo> engineers = engineerInfoMPDao.selectByEngineerCodes(new ArrayList<>(engineerCodes)); List<EngineerInfoEntity> engineers = engineerInfoDao.findByEngineerCodeIn(new ArrayList<>(engineerCodes));
return engineers.stream().collect(Collectors.toMap(EngineerInfo::getEngineerCode, EngineerInfo::getName)); return engineers.stream().collect(Collectors.toMap(EngineerInfoEntity::getEngineerCode, EngineerInfoEntity::getName));
} }
private Map<String, String> getBranchNames(List<OrderInfo> orders){ private Map<String, String> getBranchNames(List<OrderInfo> orders){
...@@ -182,10 +182,8 @@ public class OrderServiceListServiceImpl implements OrderServiceListService { ...@@ -182,10 +182,8 @@ public class OrderServiceListServiceImpl implements OrderServiceListService {
if(branches.isEmpty()){ if(branches.isEmpty()){
return new HashMap<>(); return new HashMap<>();
} }
LambdaQueryWrapper<OrgBranch> lqw = new LambdaQueryWrapper<>(); List<OrgBranchEntity> records = orgBranchDao.findByBranchIdIn(new ArrayList<>(branches));
lqw.in(OrgBranch::getBranchId, new ArrayList<>(branches)); return records.stream().collect(Collectors.toMap(OrgBranchEntity::getBranchId, OrgBranchEntity::getBranchName));
List<OrgBranch> records = orgBranchMPDao.selectList(lqw);
return records.stream().collect(Collectors.toMap(OrgBranch::getBranchId, OrgBranch::getBranchName));
} }
private List<String> getOrderEngineerNames(String engineerCode, String engineerCodeSub, Map<String,String> engineerNames){ private List<String> getOrderEngineerNames(String engineerCode, String engineerCodeSub, Map<String,String> engineerNames){
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!