|
@@ -6,14 +6,23 @@ import com.fdkankan.manage.common.PageInfo;
|
|
|
import com.fdkankan.manage.common.ResultCode;
|
|
|
import com.fdkankan.manage.entity.AgentAudit;
|
|
|
import com.fdkankan.manage.entity.RtkInfo;
|
|
|
+import com.fdkankan.manage.entity.SysUser;
|
|
|
import com.fdkankan.manage.exception.BusinessException;
|
|
|
import com.fdkankan.manage.mapper.IRtkInfoMapper;
|
|
|
import com.fdkankan.manage.service.IRtkInfoService;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.fdkankan.manage.service.ISysUserService;
|
|
|
import com.fdkankan.manage.vo.request.RtkInfoParam;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.HashSet;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Set;
|
|
|
+import java.util.stream.Collectors;
|
|
|
+
|
|
|
/**
|
|
|
* <p>
|
|
|
* 服务实现类
|
|
@@ -25,6 +34,10 @@ import org.springframework.stereotype.Service;
|
|
|
@Service
|
|
|
public class RtkInfoServiceImpl extends ServiceImpl<IRtkInfoMapper, RtkInfo> implements IRtkInfoService {
|
|
|
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ ISysUserService sysUserService;
|
|
|
+
|
|
|
@Override
|
|
|
public RtkInfo getByRtkSnCode(String rtkSnCode) {
|
|
|
LambdaQueryWrapper<RtkInfo> wrapper = new LambdaQueryWrapper<>();
|
|
@@ -50,6 +63,15 @@ public class RtkInfoServiceImpl extends ServiceImpl<IRtkInfoMapper, RtkInfo> imp
|
|
|
wrapper.orderByDesc(RtkInfo::getCreateTime);
|
|
|
wrapper.orderByDesc(RtkInfo::getId);
|
|
|
Page<RtkInfo> page = this.page(new Page<>(param.getPageNum(), param.getPageSize()), wrapper);
|
|
|
+ Set<Long> createUserIds = page.getRecords().stream().map(RtkInfo::getCreateUserId).collect(Collectors.toSet());
|
|
|
+ HashMap<Long, SysUser> byIds = sysUserService.getByIds(createUserIds);
|
|
|
+ for (RtkInfo record : page.getRecords()) {
|
|
|
+ SysUser sysUser = byIds.get(record.getCreateUserId());
|
|
|
+ if(sysUser != null){
|
|
|
+ record.setCreateUserName(sysUser.getUserName());
|
|
|
+ record.setCreateNickName(sysUser.getNickName());
|
|
|
+ }
|
|
|
+ }
|
|
|
return PageInfo.PageInfo(page);
|
|
|
}
|
|
|
|