提交 ee446909 作者: han

Merge branch 'develop' of http://git.mmcuav.cn/iuav/cms into develop

# Conflicts:
#	csm-service/cms-service-user/src/main/resources/mapper/dronepilot/PilotCertificationDao.xml
流水线 #7730 已失败 于阶段
in 19 秒
......@@ -113,4 +113,8 @@ public class PilotCertificationDTO {
private String flyingTeam;
@ApiModelProperty(value = "飞手团队对应的后台id")
private Integer backUserId;
@ApiModelProperty(value = "是否是管理员")
private int isAdmin;
}
......@@ -117,7 +117,6 @@ public class PilotCertificationDO {
@ApiModelProperty(value = "飞手头像", example = "http://")
private String userImg;
public PilotCertificationDO(PilotCertificationVO pilotCertificationVO, Integer userAccountId) {
this.id = pilotCertificationVO.getId();
this.licenseType = pilotCertificationVO.getLicenseType();
......
......@@ -34,6 +34,7 @@ import com.mmc.iuav.user.model.vo.userpoints.UserPointsVO;
import com.mmc.iuav.user.service.WxService;
import com.mmc.iuav.user.service.dronepilot.PilotCertificationService;
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.Value;
import org.springframework.data.redis.core.StringRedisTemplate;
......@@ -156,7 +157,17 @@ public class PilotCertificationServiceImpl implements PilotCertificationService
}
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(Collectors.toList());
......@@ -210,6 +221,13 @@ public class PilotCertificationServiceImpl implements PilotCertificationService
certificationDO.setAge(getAgeByBirth(certificationDO.getBirthday()));
PilotCertificationDTO pilotCertificationDTO = certificationDO.buildPilotCertificationDTO();
//展示每个飞手所属团队名称
FlyingTeam flyingTeam = certificationDao.selectCompanyNameByFlyingUserId(pilotCertificationDTO .getUserAccountId());
if(flyingTeam != null){
pilotCertificationDTO.setFlyingTeam(flyingTeam.getCompanyName());
pilotCertificationDTO.setBackUserId(flyingTeam.getBackUserId());
}
return pilotCertificationDTO;
}
......@@ -254,9 +272,13 @@ public class PilotCertificationServiceImpl implements PilotCertificationService
List<PilotCertificationDTO> collects = pilotList.stream().map(PilotCertificationDO::buildPilotCertificationDTO).collect(Collectors.toList());
for (PilotCertificationDTO certificationDTO:collects) {
Integer userAccountId = certificationDTO.getUserAccountId();
if (certificationDao.selectCompanyByUserId(userAccountId) < 1) {
continue;
}else {
//说明飞手是有团队的
if (certificationDao.selectCompanyByUserId(userAccountId) > 1) {
TeamMessageDO teamMessageDO = certificationDao.selectPilotTeam(userAccountId);
//判断飞手是不是管理员
if (Objects.equals(teamMessageDO.getPilotMessageId(), userAccountId)){
certificationDTO.setIsAdmin(1);
}
FlyingTeam flyingTeam = certificationDao.selectCompanyNameByFlyingUserId(userAccountId);
certificationDTO.setFlyingTeam(flyingTeam.getCompanyName());
certificationDTO.setBackUserId(flyingTeam.getBackUserId());
......
......@@ -18,4 +18,4 @@ patches:
images:
- name: REGISTRY/NAMESPACE/IMAGE:TAG
newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/cms
newTag: 894d7be623eced6509af2c43ce3cee0eb3485a5b
newTag: b4858cb8f232c1842a590fa36eb04930a8733de1
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论