Commit 342c6371 by 王祖波

空兼容

parent b2a7d937
......@@ -91,6 +91,9 @@ public class ContactFollowServiceImpl implements ContactFollowService {
@Override
public Map<String, ContactFollowDTO> mapMemberLastFollow(String enterpriseId, String clerkId,List<String> memberIdList) {
if (CollectionUtils.isEmpty(memberIdList)) {
return new HashMap<>();
}
List<TabContactFollow> list = contactFollowMapper.lastFollowByMemberId(enterpriseId, clerkId, memberIdList);
List<ContactFollowDTO> followDTOList = convertExtInfo(list);
Map<String, ContactFollowDTO> map = followDTOList.stream().collect(Collectors.toMap(ContactFollowDTO::getMemberId, v -> v,
......
......@@ -37,10 +37,7 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
/**
......@@ -113,6 +110,9 @@ public class InteractRecordApiServiceImpl implements InteractRecordApiService {
@Override
public ServiceResponse<Map<String, InteractRecordInfoDTO>> mapInteractRecord(String enterpriseId, String clerkId, List<MemberLastInteractDTO> list) {
if (CollectionUtils.isEmpty(list)) {
return ServiceResponse.success(new HashMap<>());
}
List<InteractRecordBO> recordBOS = interactRecordService.lastInteractRecord(enterpriseId, clerkId, EntityUtil.changeEntityListByJSON(MemberLastInteractBO.class, list));
List<InteractRecordInfoDTO> recordInfos = recordBOS
.stream()
......
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