修改sql

上级 24edb7c0
...@@ -54,6 +54,7 @@ public interface PilotCertificationDao { ...@@ -54,6 +54,7 @@ public interface PilotCertificationDao {
* @return {@link String} * @return {@link String}
*/ */
FlyingTeam selectCompanyNameByFlyingUserId(Integer userId); FlyingTeam selectCompanyNameByFlyingUserId(Integer userId);
Integer getPilotAuditSum(Integer status); Integer getPilotAuditSum(Integer status);
List<PilotAbilityVO> selectAbilityList(Integer pilotCertificationId); List<PilotAbilityVO> selectAbilityList(Integer pilotCertificationId);
......
...@@ -291,7 +291,6 @@ public class PilotCertificationServiceImpl implements PilotCertificationService ...@@ -291,7 +291,6 @@ 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();
......
...@@ -511,10 +511,10 @@ ...@@ -511,10 +511,10 @@
select ci.company_name, select ci.company_name,
cbu.back_user_account_id as backUserId, cbu.back_user_account_id as backUserId,
cm.user_account_id as messageId cm.user_account_id as messageId
from company_info ci from pilot_join_team pjt
inner join company_back_user cbu on ci.id = cbu.company_info_id left join company_back_user cbu on cbu.back_user_account_id = pjt.back_user_id
inner join pilot_join_team pjt on cbu.back_user_account_id = pjt.back_user_id left join company_info ci on ci.id = cbu.company_info_id
inner join company_member cm on ci.id = cm.company_info_id left join company_member cm on ci.id = cm.company_info_id
where pjt.pilot_user_id = #{userId} and cm.is_leader = 1 where pjt.pilot_user_id = #{userId} and cm.is_leader = 1
</select> </select>
<select id="selectPilotIdList" resultType="java.lang.Integer"> <select id="selectPilotIdList" resultType="java.lang.Integer">
...@@ -593,6 +593,17 @@ ...@@ -593,6 +593,17 @@
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>
</select> </select>
<select id="selectCompanyNameByFlyingUserIdOnlyOne"
resultType="com.mmc.iuav.user.model.dto.dronepilot.FlyingTeam">
select ci.company_name,
cbu.back_user_account_id as backUserId,
cm.user_account_id as messageId
from company_info ci
inner join company_back_user cbu on ci.id = cbu.company_info_id
inner join pilot_join_team pjt on cbu.back_user_account_id = pjt.back_user_id
inner join company_member cm on ci.id = cm.company_info_id
where pjt.pilot_user_id = #{userId} and cm.is_leader = 1
</select>
</mapper> </mapper>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论