Authored by tanling

按首次入驻时间排序

@@ -169,7 +169,6 @@ public class InviteServiceImpl implements IInviteService { @@ -169,7 +169,6 @@ public class InviteServiceImpl implements IInviteService {
169 LOGGER.warn("inviter has quit, showInviteCode is {}, uid is {}", showInviteCode, uid); 169 LOGGER.warn("inviter has quit, showInviteCode is {}, uid is {}", showInviteCode, uid);
170 throw new ServiceException(ServiceError.INVITE_CODE_INVALIDATE); 170 throw new ServiceException(ServiceError.INVITE_CODE_INVALIDATE);
171 } 171 }
172 -  
173 } 172 }
174 173
175 } 174 }
@@ -207,8 +206,8 @@ public class InviteServiceImpl implements IInviteService { @@ -207,8 +206,8 @@ public class InviteServiceImpl implements IInviteService {
207 Map<Integer, String> nickNameMap = userProxyService.getNickNameByUids(inviteeUidList); 206 Map<Integer, String> nickNameMap = userProxyService.getNickNameByUids(inviteeUidList);
208 207
209 // 批量查询入驻时间 208 // 批量查询入驻时间
210 - List<StoredSeller> storedSellerList = storedSellerService.batchGetStoredSeller(inviteeUidList);  
211 - Map<Integer, Long> storedSellerMap = storedSellerList.stream().collect(Collectors.toMap(StoredSeller::getUid, StoredSeller::getEnterTime)); 209 +// List<StoredSeller> storedSellerList = storedSellerService.batchGetStoredSeller(inviteeUidList);
  210 +// Map<Integer, Long> storedSellerMap = storedSellerList.stream().collect(Collectors.toMap(StoredSeller::getUid, StoredSeller::getEnterTime));
212 211
213 // 批量查询订单数目 212 // 批量查询订单数目
214 List<InviteSettlementItem> orderNumList = inviteSettlementItemMapper.selectOrderNumByInviterUid(uid); 213 List<InviteSettlementItem> orderNumList = inviteSettlementItemMapper.selectOrderNumByInviterUid(uid);
@@ -219,7 +218,7 @@ public class InviteServiceImpl implements IInviteService { @@ -219,7 +218,7 @@ public class InviteServiceImpl implements IInviteService {
219 .showInviteCode(showInviteCode) 218 .showInviteCode(showInviteCode)
220 .inviteeUidNum(inviteeUidList.size()) 219 .inviteeUidNum(inviteeUidList.size())
221 .finishedOrderNum(orderNumMap.values().stream().collect(Collectors.summingInt(Integer::intValue))) 220 .finishedOrderNum(orderNumMap.values().stream().collect(Collectors.summingInt(Integer::intValue)))
222 - .inviteRecordList(getInviteRecordList(inviteRecords, storedSellerMap, orderNumMap, nickNameMap)) 221 + .inviteRecordList(getInviteRecordList(inviteRecords, orderNumMap, nickNameMap))
223 .build(); 222 .build();
224 223
225 } 224 }
@@ -229,14 +228,13 @@ public class InviteServiceImpl implements IInviteService { @@ -229,14 +228,13 @@ public class InviteServiceImpl implements IInviteService {
229 } 228 }
230 229
231 private List<InviteInfoResp.InviteRecord> getInviteRecordList(List<InviteRecord> inviteRecords, 230 private List<InviteInfoResp.InviteRecord> getInviteRecordList(List<InviteRecord> inviteRecords,
232 - Map<Integer, Long> storedSellerMap,  
233 Map<Integer, Integer> orderNumMap, 231 Map<Integer, Integer> orderNumMap,
234 Map<Integer, String> nickNameMap) { 232 Map<Integer, String> nickNameMap) {
235 return inviteRecords.stream().map(x ->{ 233 return inviteRecords.stream().map(x ->{
236 return InviteInfoResp.InviteRecord.builder() 234 return InviteInfoResp.InviteRecord.builder()
237 .inviteeUid(x.getInviteeUid()) 235 .inviteeUid(x.getInviteeUid())
238 .nickName(Objects.isNull(nickNameMap.get(x.getInviteeUid())) ? "" : nickNameMap.get(x.getInviteeUid())) 236 .nickName(Objects.isNull(nickNameMap.get(x.getInviteeUid())) ? "" : nickNameMap.get(x.getInviteeUid()))
239 - .enterTime(storedSellerMap.get(x.getInviteeUid()) == null ? "" : DateUtil.formatYYMMddHHmmssPoint(storedSellerMap.get(x.getInviteeUid()).intValue())) 237 + .enterTime(DateUtil.formatYYMMddHHmmssPoint(x.getCreateTime()))
240 .orderNum(Objects.isNull(orderNumMap.get(x.getInviteeUid())) ? 0 : orderNumMap.get(x.getInviteeUid())) 238 .orderNum(Objects.isNull(orderNumMap.get(x.getInviteeUid())) ? 0 : orderNumMap.get(x.getInviteeUid()))
241 .build(); 239 .build();
242 }).collect(Collectors.toList()); 240 }).collect(Collectors.toList());