========

1 parent 618f61dd
...@@ -98,15 +98,15 @@ public class WeCustomerController extends BaseController ...@@ -98,15 +98,15 @@ public class WeCustomerController extends BaseController
// return util.exportExcel(list, "customer"); // return util.exportExcel(list, "customer");
// } // }
/** // /**
* 获取企业微信客户详细信息 // * 获取企业微信客户详细信息
*/ // */
// @PreAuthorize("@ss.hasPermi('customerManage:customer:view')") // // @PreAuthorize("@ss.hasPermi('customerManage:customer:view')")
@GetMapping(value = "/{externalUserId}") // @GetMapping(value = "/{externalUserId}")
public AjaxResult getInfo(@PathVariable("externalUserId") String externalUserId) // public AjaxResult getInfo(@PathVariable("externalUserId") String externalUserId)
{ // {
return AjaxResult.success(weCustomerService.selectWeCustomerById(externalUserId)); // return AjaxResult.success(weCustomerService.selectWeCustomerById(externalUserId));
} // }
......
...@@ -27,7 +27,7 @@ public interface IWeCustomerService extends IService<WeCustomer> ...@@ -27,7 +27,7 @@ public interface IWeCustomerService extends IService<WeCustomer>
* @param externalUserId 企业微信客户ID * @param externalUserId 企业微信客户ID
* @return 企业微信客户 * @return 企业微信客户
*/ */
public WeCustomer selectWeCustomerById(String externalUserId); public WeCustomer selectWeCustomerById(String externalUserId,String userId);
// /** // /**
// * 新增/修改企业微信客户 // * 新增/修改企业微信客户
......
...@@ -83,11 +83,12 @@ public class WeCustomerServiceImpl extends ServiceImpl<WeCustomerMapper, WeCusto ...@@ -83,11 +83,12 @@ public class WeCustomerServiceImpl extends ServiceImpl<WeCustomerMapper, WeCusto
* 查询企业微信客户 * 查询企业微信客户
* *
* @param externalUserId 企业微信客户ID * @param externalUserId 企业微信客户ID
* @param userId 企业员工id
* @return 企业微信客户 * @return 企业微信客户
*/ */
@Override @Override
public WeCustomer selectWeCustomerById(String externalUserId) { public WeCustomer selectWeCustomerById(String externalUserId,String userId) {
return this.baseMapper.selectWeCustomerById(externalUserId); return this.baseMapper.selectWeCustomerById(externalUserId,userId);
} }
/** /**
......
...@@ -6,19 +6,14 @@ import com.linkwechat.common.utils.DateUtils; ...@@ -6,19 +6,14 @@ import com.linkwechat.common.utils.DateUtils;
import com.linkwechat.wecom.domain.WeCustomer; import com.linkwechat.wecom.domain.WeCustomer;
import com.linkwechat.wecom.domain.WeFlowerCustomerRel; import com.linkwechat.wecom.domain.WeFlowerCustomerRel;
import com.linkwechat.wecom.domain.WeFlowerCustomerTagRel; import com.linkwechat.wecom.domain.WeFlowerCustomerTagRel;
import com.linkwechat.wecom.mapper.WeCustomerMapper;
import com.linkwechat.wecom.mapper.WeCustomerTagRelMapper;
import com.linkwechat.wecom.mapper.WeFlowerCustomerRelMapper; import com.linkwechat.wecom.mapper.WeFlowerCustomerRelMapper;
import com.linkwechat.wecom.mapper.WeFlowerCustomerTagRelMapper; import com.linkwechat.wecom.mapper.WeFlowerCustomerTagRelMapper;
import com.linkwechat.wecom.service.IWeCustomerService; import com.linkwechat.wecom.service.IWeCustomerService;
import com.linkwechat.wecom.service.IWeCustomerTagRelService;
import com.linkwechat.wecom.service.IWeFlowerCustomerRelService; import com.linkwechat.wecom.service.IWeFlowerCustomerRelService;
import com.linkwechat.wecom.service.IWeFlowerCustomerTagRelService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy; import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.*; import java.util.*;
import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLong;
import java.util.stream.Collectors; import java.util.stream.Collectors;
......
...@@ -72,6 +72,7 @@ public class WeSensitiveActHitServiceImpl extends ServiceImpl<WeSensitiveActHitM ...@@ -72,6 +72,7 @@ public class WeSensitiveActHitServiceImpl extends ServiceImpl<WeSensitiveActHitM
String operatorTargetId = chatJson.getString("tolist"); String operatorTargetId = chatJson.getString("tolist");
weSensitiveActHit.setOperatorId(operatorId); weSensitiveActHit.setOperatorId(operatorId);
weSensitiveActHit.setOperateTargetId(operatorTargetId); weSensitiveActHit.setOperateTargetId(operatorTargetId);
setUserOrCustomerInfo(weSensitiveActHit); setUserOrCustomerInfo(weSensitiveActHit);
saveOrUpdate(weSensitiveActHit); saveOrUpdate(weSensitiveActHit);
} }
...@@ -102,6 +103,7 @@ public class WeSensitiveActHitServiceImpl extends ServiceImpl<WeSensitiveActHitM ...@@ -102,6 +103,7 @@ public class WeSensitiveActHitServiceImpl extends ServiceImpl<WeSensitiveActHitM
} }
private void setUserOrCustomerInfo(WeSensitiveActHit weSensitiveActHit) { private void setUserOrCustomerInfo(WeSensitiveActHit weSensitiveActHit) {
int operatorType = StringUtils.weCustomTypeJudgment(weSensitiveActHit.getOperatorId()); int operatorType = StringUtils.weCustomTypeJudgment(weSensitiveActHit.getOperatorId());
int operatorTargetType = StringUtils.weCustomTypeJudgment(weSensitiveActHit.getOperateTargetId()); int operatorTargetType = StringUtils.weCustomTypeJudgment(weSensitiveActHit.getOperateTargetId());
weSensitiveActHit.setOperator(getUserOrCustomerName(operatorType, weSensitiveActHit.getOperatorId())); weSensitiveActHit.setOperator(getUserOrCustomerName(operatorType, weSensitiveActHit.getOperatorId()));
...@@ -118,10 +120,15 @@ public class WeSensitiveActHitServiceImpl extends ServiceImpl<WeSensitiveActHitM ...@@ -118,10 +120,15 @@ public class WeSensitiveActHitServiceImpl extends ServiceImpl<WeSensitiveActHitM
} }
} else if (WeConstans.ID_TYPE_EX.equals(type)) { } else if (WeConstans.ID_TYPE_EX.equals(type)) {
//获取外部联系人信息 //获取外部联系人信息
WeCustomer weCustomer = weCustomerMapper.selectWeCustomerById(userId); // WeCustomer weCustomer = weCustomerMapper.selectWeCustomerById(userId);
if (weCustomer != null) { List<WeCustomer> weCustomers = weCustomerMapper.selectList(new LambdaQueryWrapper<WeCustomer>()
return weCustomer.getName(); .eq(WeCustomer::getExternalUserid, userId));
if(CollectionUtils.isNotEmpty(weCustomers)){
return weCustomers.stream().findFirst().get().getName();
} }
} else if (WeConstans.ID_TYPE_MACHINE.equals(type)) { } else if (WeConstans.ID_TYPE_MACHINE.equals(type)) {
//拉去机器人信息暂不处理 //拉去机器人信息暂不处理
} }
......
...@@ -301,8 +301,12 @@ public class WeTaskFissionServiceImpl extends ServiceImpl<WeTaskFissionMapper, W ...@@ -301,8 +301,12 @@ public class WeTaskFissionServiceImpl extends ServiceImpl<WeTaskFissionMapper, W
List<WeTaskFissionRecord> weTaskFissionRecords = weTaskFissionRecordService.list(new LambdaQueryWrapper<WeTaskFissionRecord>().eq(WeTaskFissionRecord::getTaskFissionId, fissionId)); List<WeTaskFissionRecord> weTaskFissionRecords = weTaskFissionRecordService.list(new LambdaQueryWrapper<WeTaskFissionRecord>().eq(WeTaskFissionRecord::getTaskFissionId, fissionId));
if(CollectionUtil.isNotEmpty(weTaskFissionRecords)){ if(CollectionUtil.isNotEmpty(weTaskFissionRecords)){
weTaskFissionRecords.forEach(record -> { weTaskFissionRecords.forEach(record -> {
WeCustomer weCustomer = weCustomerService.selectWeCustomerById(record.getCustomerId()); // WeCustomer weCustomer = weCustomerService.selectWeCustomerById(record.getCustomerId());
customerList.add(weCustomer); // customerList.add(weCustomer);
customerList.addAll(
weCustomerService.list(new LambdaQueryWrapper<WeCustomer>()
.eq(WeCustomer::getExternalUserid,record.getCustomerId()))
);
}); });
} }
} else { } else {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!