|
@@ -19,7 +19,9 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
import javax.annotation.Resource;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
import java.util.function.BiFunction;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
import static com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PaymentCalenderStatusEnum.AUDITING;
|
|
|
import static com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PaymentCalenderStatusEnum.NO;
|
|
@@ -128,7 +130,19 @@ public class MusicGroupPaymentCalenderMemberServiceImpl extends BaseServiceImpl<
|
|
|
|
|
|
@Override
|
|
|
public List<MusicGroupPaymentCalenderMember> findByCalenderId(Long calenderId) {
|
|
|
- return musicGroupPaymentCalenderMemberDao.findByCalenderId(calenderId);
|
|
|
+ List<MusicGroupPaymentCalenderMember> calenderMembers = musicGroupPaymentCalenderMemberDao.findByCalenderId(calenderId);
|
|
|
+ if(CollectionUtils.isNotEmpty(calenderMembers)){
|
|
|
+ List<Integer> memberIds = calenderMembers.stream().map(MusicGroupPaymentCalenderMember::getMemberRankSettingId).collect(Collectors.toList());
|
|
|
+ List<MemberRankSetting> memberRankSettingList = memberRankSettingDao.selectBatchIds(memberIds);
|
|
|
+ Map<Integer, MemberRankSetting> memberRankSettingMap = memberRankSettingList.stream().collect(Collectors.toMap(MemberRankSetting::getId, e -> e));
|
|
|
+ calenderMembers.forEach(e -> {
|
|
|
+ MemberRankSetting memberRankSetting = memberRankSettingMap.get(e.getMemberRankSettingId());
|
|
|
+ if(memberRankSetting != null){
|
|
|
+ e.setIntro(memberRankSetting.getIntro());
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ return calenderMembers;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -145,6 +159,18 @@ public class MusicGroupPaymentCalenderMemberServiceImpl extends BaseServiceImpl<
|
|
|
|
|
|
@Override
|
|
|
public List<MusicGroupPaymentCalenderMember> findByIds(List<Long> calenderMemberIds) {
|
|
|
- return musicGroupPaymentCalenderMemberDao.findByIds(calenderMemberIds);
|
|
|
+ List<MusicGroupPaymentCalenderMember> calenderMembers = musicGroupPaymentCalenderMemberDao.findByIds(calenderMemberIds);
|
|
|
+ if(CollectionUtils.isNotEmpty(calenderMembers)){
|
|
|
+ List<Integer> memberIds = calenderMembers.stream().map(MusicGroupPaymentCalenderMember::getMemberRankSettingId).collect(Collectors.toList());
|
|
|
+ List<MemberRankSetting> memberRankSettingList = memberRankSettingDao.selectBatchIds(memberIds);
|
|
|
+ Map<Integer, MemberRankSetting> memberRankSettingMap = memberRankSettingList.stream().collect(Collectors.toMap(MemberRankSetting::getId, e -> e));
|
|
|
+ calenderMembers.forEach(e -> {
|
|
|
+ MemberRankSetting memberRankSetting = memberRankSettingMap.get(e.getMemberRankSettingId());
|
|
|
+ if(memberRankSetting != null){
|
|
|
+ e.setIntro(memberRankSetting.getIntro());
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ return calenderMembers;
|
|
|
}
|
|
|
}
|