Commit 386189f1 by jianan

判断经纪人是否为团队长

parent a55a189b
...@@ -332,10 +332,14 @@ public class ScheduleTrackServiceImpl implements ScheduleTrackService { ...@@ -332,10 +332,14 @@ public class ScheduleTrackServiceImpl implements ScheduleTrackService {
} }
private List<Long> getPractitionerIdList(Long practitionerId) { private List<Long> getPractitionerIdList(Long practitionerId) {
List<Long> practitionerIdList1 = scheduleTrackMapper.queryTeamAllPractitionerId(practitionerId); List<Long> practitionerIdList1 = scheduleTrackMapper.queryMentoredByPractitionerId(practitionerId);
List<Long> practitionerIdList2 = scheduleTrackMapper.queryMentoredByPractitionerId(practitionerId);
practitionerIdList1.addAll(practitionerIdList2); // 判断当前经纪人是否为团队长
int count = scheduleTrackMapper.isTeamLeader(practitionerId);
if (count > 0) {
List<Long> practitionerIdList2 = scheduleTrackMapper.queryTeamAllPractitionerId(practitionerId);
practitionerIdList1.addAll(practitionerIdList2);
}
return practitionerIdList1; return practitionerIdList1;
} }
......
...@@ -33,5 +33,7 @@ public interface ScheduleTrackMapper { ...@@ -33,5 +33,7 @@ public interface ScheduleTrackMapper {
@Param("taskTimeFrom")String taskTimeFrom, @Param("taskTimeEnd")String taskTimeEnd); @Param("taskTimeFrom")String taskTimeFrom, @Param("taskTimeEnd")String taskTimeEnd);
List<Long> queryMentoredByPractitionerId(Long practitionerId); List<Long> queryMentoredByPractitionerId(Long practitionerId);
int isTeamLeader(Long practitionerId);
} }
...@@ -262,4 +262,8 @@ ...@@ -262,4 +262,8 @@
CALL proc_queryMentoredByPractitionerId(#{practitionerId,jdbcType=BIGINT}); CALL proc_queryMentoredByPractitionerId(#{practitionerId,jdbcType=BIGINT});
</select> </select>
<select id="isTeamLeader" resultType="java.lang.Integer">
select count(1) from ag_acl_practitioner_subordinate_system where owner_practitioner_id = #{practitionerId,jdbcType=BIGINT}
</select>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment