12345678910111213141516171819202122232425262728293031323334353637383940 |
- package com.tour.module.service.impl;
- import com.tour.module.domain.Agent;
- import com.tour.module.service.IAgentService;
- import org.springframework.stereotype.Service;
- import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
- import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
- import com.baomidou.mybatisplus.core.toolkit.Wrappers;
- import com.tour.module.mapper.MakeCardAllocationMapper;
- import com.tour.module.domain.MakeCardAllocation;
- import com.tour.module.service.IMakeCardAllocationService;
- import javax.annotation.Resource;
- import java.util.List;
- import java.util.Objects;
- /**
- * 制卡分配情况Service业务层处理
- *
- * @author zoe
- * @date 2023-06-02
- */
- @Service
- public class MakeCardAllocationServiceImpl extends ServiceImpl<MakeCardAllocationMapper, MakeCardAllocation> implements IMakeCardAllocationService {
- @Resource
- private IAgentService iAgentService;
- @Override
- public List<MakeCardAllocation> queryList(MakeCardAllocation makeCardAllocation) {
- List<MakeCardAllocation> list = baseMapper.queryList(makeCardAllocation);
- list.stream().forEach(make -> {
- Agent agent = iAgentService.getById(make.getAgentId());
- if (Objects.nonNull(agent)) {
- make.setAgentName(agent.getAgentName());
- }
- });
- return list;
- }
- }
|