修改bug

1 parent 1f8f5258
...@@ -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));
} // }
......
...@@ -21,13 +21,13 @@ import java.util.List; ...@@ -21,13 +21,13 @@ import java.util.List;
*/ */
public interface IWeCustomerService extends IService<WeCustomer> public interface IWeCustomerService extends IService<WeCustomer>
{ {
/** // /**
* 查询企业微信客户 // * 查询企业微信客户
* // *
* @param externalUserId 企业微信客户ID // * @param externalUserId 企业微信客户ID
* @return 企业微信客户 // * @return 企业微信客户
*/ // */
public WeCustomer selectWeCustomerById(String externalUserId); // public WeCustomer selectWeCustomerById(String externalUserId);
// /** // /**
// * 新增/修改企业微信客户 // * 新增/修改企业微信客户
......
...@@ -79,16 +79,16 @@ public class WeCustomerServiceImpl extends ServiceImpl<WeCustomerMapper, WeCusto ...@@ -79,16 +79,16 @@ public class WeCustomerServiceImpl extends ServiceImpl<WeCustomerMapper, WeCusto
/** // /**
* 查询企业微信客户 // * 查询企业微信客户
* // *
* @param externalUserId 企业微信客户ID // * @param externalUserId 企业微信客户ID
* @return 企业微信客户 // * @return 企业微信客户
*/ // */
@Override // @Override
public WeCustomer selectWeCustomerById(String externalUserId) { // public WeCustomer selectWeCustomerById(String externalUserId) {
return this.baseMapper.selectWeCustomerById(externalUserId); // return this.baseMapper.selectWeCustomerById(externalUserId);
} // }
/** /**
* 查询企业微信客户列表 * 查询企业微信客户列表
......
...@@ -6,14 +6,10 @@ import com.linkwechat.common.utils.DateUtils; ...@@ -6,14 +6,10 @@ 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;
......
...@@ -118,10 +118,15 @@ public class WeSensitiveActHitServiceImpl extends ServiceImpl<WeSensitiveActHitM ...@@ -118,10 +118,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();
}
// if (weCustomer != null) {
// return weCustomer.getName();
// }
} else if (WeConstans.ID_TYPE_MACHINE.equals(type)) { } else if (WeConstans.ID_TYPE_MACHINE.equals(type)) {
//拉去机器人信息暂不处理 //拉去机器人信息暂不处理
} }
......
...@@ -301,8 +301,13 @@ public class WeTaskFissionServiceImpl extends ServiceImpl<WeTaskFissionMapper, W ...@@ -301,8 +301,13 @@ 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!