|
|
|
@ -297,17 +297,17 @@ public class QWMailListManageService {
|
|
|
|
|
customers = new ArrayList<>();
|
|
|
|
|
for (String customerStr:customerStrs){
|
|
|
|
|
//查询该客户id的关系是否存在
|
|
|
|
|
QueryWrapper<OpCustomer> customerQueryWrapper = new QueryWrapper<>();
|
|
|
|
|
customerQueryWrapper.eq("external_userid",customerStr).last("limit 1");
|
|
|
|
|
OpCustomer opCustomer = opCustomerDOMapper.selectOne(customerQueryWrapper);
|
|
|
|
|
//客户都不存在则直接下一步
|
|
|
|
|
if (opCustomer != null){
|
|
|
|
|
Long relationId = opSellerCustomerRelationDOMapper.selectSellerCustomerRelation(opCustomer.getId(), privilageCpUserDO.getId(), storeId);
|
|
|
|
|
//关系存在则不查询明细
|
|
|
|
|
if (relationId != null){
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// QueryWrapper<OpCustomer> customerQueryWrapper = new QueryWrapper<>();
|
|
|
|
|
// customerQueryWrapper.eq("external_userid",customerStr).last("limit 1");
|
|
|
|
|
// OpCustomer opCustomer = opCustomerDOMapper.selectOne(customerQueryWrapper);
|
|
|
|
|
// //客户都不存在则直接下一步
|
|
|
|
|
// if (opCustomer != null){
|
|
|
|
|
// Long relationId = opSellerCustomerRelationDOMapper.selectSellerCustomerRelation(opCustomer.getId(), privilageCpUserDO.getId(), storeId);
|
|
|
|
|
// //关系存在则不查询明细
|
|
|
|
|
// if (relationId != null){
|
|
|
|
|
// continue;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
try{
|
|
|
|
|
WxCpUserExternalContactInfo contactDetail = externalContactService.getContactDetail(customerStr);
|
|
|
|
|
customers.add(contactDetail);
|
|
|
|
|