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

返回用户对应的后台id

上级 bb9f27b0
流水线 #7776 已通过 于阶段
in 2 分 22 秒
...@@ -93,6 +93,7 @@ public class UserAccountVO implements Serializable { ...@@ -93,6 +93,7 @@ public class UserAccountVO implements Serializable {
@ApiModelProperty(value = "飞手所属的飞手团队信息") @ApiModelProperty(value = "飞手所属的飞手团队信息")
private CompanyInfoVO companyInfoVO; private CompanyInfoVO companyInfoVO;
@ApiModelProperty(value = "用户对应的后台用户id")
private Integer backUserId;
} }
...@@ -150,6 +150,12 @@ public interface PilotCertificationDao { ...@@ -150,6 +150,12 @@ public interface PilotCertificationDao {
/** /**
* 根据小程序的用户id查找对应的后台id
* @param userId
* @return {@link Integer}
*/
Integer selectBackUserIdByUserId(Integer userId);
/**
* 获取审核通过飞手的电话号码 * 获取审核通过飞手的电话号码
* @param pilotId 飞手表id * @param pilotId 飞手表id
* @return {@link String} * @return {@link String}
......
...@@ -283,6 +283,7 @@ public class PilotCertificationServiceImpl implements PilotCertificationService ...@@ -283,6 +283,7 @@ public class PilotCertificationServiceImpl implements PilotCertificationService
FlyingTeam flyingTeam = certificationDao.selectCompanyNameByFlyingUserId(userAccountId); FlyingTeam flyingTeam = certificationDao.selectCompanyNameByFlyingUserId(userAccountId);
certificationDTO.setFlyingTeam(flyingTeam.getCompanyName()); certificationDTO.setFlyingTeam(flyingTeam.getCompanyName());
certificationDTO.setBackUserId(flyingTeam.getBackUserId()); certificationDTO.setBackUserId(flyingTeam.getBackUserId());
} }
} }
Integer backUserId = param.getBackUserId(); Integer backUserId = param.getBackUserId();
......
...@@ -149,6 +149,7 @@ public class UserAccountServiceImpl implements UserAccountService { ...@@ -149,6 +149,7 @@ public class UserAccountServiceImpl implements UserAccountService {
CompanyInfoVO companyInfoVO = companyInfoDO.buildCompanyInfoVO(); CompanyInfoVO companyInfoVO = companyInfoDO.buildCompanyInfoVO();
userAccountVO.setCompanyInfoVO(companyInfoVO); userAccountVO.setCompanyInfoVO(companyInfoVO);
} }
userAccountVO.setBackUserId(certificationDao.selectBackUserIdByUserId(userAccountId));
return userAccountVO; return userAccountVO;
} }
......
...@@ -195,9 +195,9 @@ ...@@ -195,9 +195,9 @@
<if test="backUserId != null"> <if test="backUserId != null">
and pjt.back_user_id = #{backUserId} and pjt.pilot_status = 1 and pjt.back_user_id = #{backUserId} and pjt.pilot_status = 1
</if> </if>
<if test="isTeam = 1"> <!-- <if test="isTeam = 1">-->
and pjt.back_user_id is not null and pjt.pilot_status = 1 <!-- and pjt.back_user_id is not null and pjt.pilot_status = 1-->
</if> <!-- </if>-->
order by pc.update_time desc, pc.create_time desc order by pc.update_time desc, pc.create_time desc
limit #{pageNo}, #{pageSize} limit #{pageNo}, #{pageSize}
</select> </select>
...@@ -509,7 +509,7 @@ ...@@ -509,7 +509,7 @@
<select id="selectCompanyNameByFlyingUserId" <select id="selectCompanyNameByFlyingUserId"
resultType="com.mmc.iuav.user.model.dto.dronepilot.FlyingTeam"> resultType="com.mmc.iuav.user.model.dto.dronepilot.FlyingTeam">
select ci.company_name, select ci.company_name,
cbu.back_user_account_id, cbu.back_user_account_id as backUserId,
cm.user_account_id as messageId cm.user_account_id as messageId
from company_info ci from company_info ci
inner join company_back_user cbu on ci.id = cbu.company_info_id inner join company_back_user cbu on ci.id = cbu.company_info_id
...@@ -551,5 +551,10 @@ ...@@ -551,5 +551,10 @@
from user_account from user_account
where id = #{userAccountId} where id = #{userAccountId}
</select> </select>
<select id="selectBackUserIdByUserId" resultType="java.lang.Integer">
select back_user_account_id from company_back_user
inner join company_member on company_member.company_info_id = company_back_user.company_info_id
where company_member.user_account_id = #{userId}
</select>
</mapper> </mapper>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论