提交 21411479 作者: 刘明祎-运维用途

飞手团队展示管理员

上级 a02ed772
...@@ -113,4 +113,6 @@ public class PilotCertificationDTO { ...@@ -113,4 +113,6 @@ public class PilotCertificationDTO {
private String flyingTeam; private String flyingTeam;
@ApiModelProperty(value = "飞手团队对应的后台id") @ApiModelProperty(value = "飞手团队对应的后台id")
private Integer backUserId; private Integer backUserId;
} }
...@@ -117,7 +117,6 @@ public class PilotCertificationDO { ...@@ -117,7 +117,6 @@ public class PilotCertificationDO {
@ApiModelProperty(value = "飞手头像", example = "http://") @ApiModelProperty(value = "飞手头像", example = "http://")
private String userImg; private String userImg;
public PilotCertificationDO(PilotCertificationVO pilotCertificationVO, Integer userAccountId) { public PilotCertificationDO(PilotCertificationVO pilotCertificationVO, Integer userAccountId) {
this.id = pilotCertificationVO.getId(); this.id = pilotCertificationVO.getId();
this.licenseType = pilotCertificationVO.getLicenseType(); this.licenseType = pilotCertificationVO.getLicenseType();
......
...@@ -33,6 +33,7 @@ import com.mmc.iuav.user.model.vo.userpoints.UserPointsVO; ...@@ -33,6 +33,7 @@ import com.mmc.iuav.user.model.vo.userpoints.UserPointsVO;
import com.mmc.iuav.user.service.WxService; import com.mmc.iuav.user.service.WxService;
import com.mmc.iuav.user.service.dronepilot.PilotCertificationService; import com.mmc.iuav.user.service.dronepilot.PilotCertificationService;
import com.mmc.iuav.user.util.SmsUtil; import com.mmc.iuav.user.util.SmsUtil;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.data.redis.core.StringRedisTemplate;
...@@ -155,7 +156,17 @@ public class PilotCertificationServiceImpl implements PilotCertificationService ...@@ -155,7 +156,17 @@ public class PilotCertificationServiceImpl implements PilotCertificationService
} }
pilotList = pilotList.stream().filter(t -> t.getPilotAbility() != null).collect(Collectors.toList()); pilotList = pilotList.stream().filter(t -> t.getPilotAbility() != null).collect(Collectors.toList());
} }
List<PilotCertificationDTO> collect = pilotList.stream().map(PilotCertificationDO::buildPilotCertificationDTO).collect(Collectors.toList()); List<PilotCertificationDTO> collect = pilotList.stream().map(PilotCertificationDO::buildPilotCertificationDTO).
map(pilotCertificationDTO -> {
//展示每个飞手所属团队名称
FlyingTeam flyingTeam = certificationDao.selectCompanyNameByFlyingUserId(pilotCertificationDTO .getUserAccountId());
if(flyingTeam != null){
pilotCertificationDTO.setFlyingTeam(flyingTeam.getCompanyName());
pilotCertificationDTO.setBackUserId(flyingTeam.getBackUserId());
}
return pilotCertificationDTO;
})
.collect(Collectors.toList());
collect = collect.stream().skip((pageNo - 1) * param.getPageSize()).limit(param.getPageSize()). collect = collect.stream().skip((pageNo - 1) * param.getPageSize()).limit(param.getPageSize()).
collect(Collectors.toList()); collect(Collectors.toList());
...@@ -257,6 +268,9 @@ public class PilotCertificationServiceImpl implements PilotCertificationService ...@@ -257,6 +268,9 @@ public class PilotCertificationServiceImpl implements PilotCertificationService
continue; continue;
}else { }else {
FlyingTeam flyingTeam = certificationDao.selectCompanyNameByFlyingUserId(userAccountId); FlyingTeam flyingTeam = certificationDao.selectCompanyNameByFlyingUserId(userAccountId);
if(flyingTeam == null){
continue;
}
certificationDTO.setFlyingTeam(flyingTeam.getCompanyName()); certificationDTO.setFlyingTeam(flyingTeam.getCompanyName());
certificationDTO.setBackUserId(flyingTeam.getBackUserId()); certificationDTO.setBackUserId(flyingTeam.getBackUserId());
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论