Commit da27f010 by 水库浪子

修改分页bug等

1 parent 9929bbe5
......@@ -83,4 +83,15 @@ public interface WeCustomerClient {
type = "POST")
WeResultDto sendWelcomeMsg(@DataObject WeWelcomeMsg wxCpWelcomeMsg);
/**
* unionid转换external_userid
* @return
*/
@Request(url = "/externalcontact/unionid_to_external_userid",
type = "POST")
ExternalUserDetail unionidToExternalUserid(@DataObject ExternalUserDetail.ExternalContact unionid);
}
......@@ -23,9 +23,11 @@ public class ExternalUserDetail extends WeResultDto {
private FollowInfo follow_info;
private String external_userid;
@Data
public class ExternalContact{
public static class ExternalContact{
/** 外部联系人userId */
private String external_userid;
/** 外部联系人名称 */
......
......@@ -2,18 +2,19 @@ package com.linkwechat.wecom.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.linkwechat.common.constant.WeConstans;
import com.linkwechat.wecom.client.WeCustomerClient;
import com.linkwechat.wecom.client.WeCustomerGroupClient;
import com.linkwechat.wecom.client.WeUserClient;
import com.linkwechat.wecom.domain.WeAllocateGroup;
import com.linkwechat.wecom.domain.WeGroup;
import com.linkwechat.wecom.domain.WeGroupMember;
import com.linkwechat.wecom.domain.dto.AllocateWeGroupDto;
import com.linkwechat.wecom.domain.dto.customer.CustomerGroupDetail;
import com.linkwechat.wecom.domain.dto.customer.CustomerGroupList;
import com.linkwechat.wecom.domain.dto.customer.CustomerGroupMember;
import com.linkwechat.wecom.domain.dto.customer.*;
import com.linkwechat.wecom.domain.vo.WeLeaveUserInfoAllocateVo;
import com.linkwechat.wecom.mapper.WeGroupMapper;
import com.linkwechat.wecom.service.*;
......@@ -58,6 +59,10 @@ public class WeGroupServiceImpl extends ServiceImpl<WeGroupMapper,WeGroup> imple
private WeUserClient weUserClient;
@Autowired
private WeCustomerClient weCustomerClient;
public List<WeGroup> selectWeGroupList(WeGroup weGroup) {
return this.baseMapper.selectWeGroupList(weGroup);
}
......@@ -144,6 +149,30 @@ public class WeGroupServiceImpl extends ServiceImpl<WeGroupMapper,WeGroup> imple
if(CollectionUtil.isNotEmpty(memberLists)){
memberLists.stream().forEach(member->{
//unionid不为空,获取非好友客户相关消息
// if(StrUtil.isNotBlank(member.getUnionid())){
// ExternalUserDetail.ExternalContact externalContact1 = new ExternalUserDetail.ExternalContact();
// externalContact1.setUnionid(member.getUnionid());
//
// ExternalUserDetail externalContact
// = weCustomerClient.unionidToExternalUserid(externalContact1);
//
// if(externalContact.getErrcode().equals(WeConstans.WE_SUCCESS_CODE)
// && StrUtil.isNotBlank(externalContact.getExternal_userid())){
//
//
//
// ExternalUserDetail externalUserDetail = weCustomerClient.get(member.getUnionid());
// System.out.println("===========START====================");
// System.out.println(JSONUtil.toJsonStr(externalUserDetail));
// System.out.println("===========END====================");
//
// }
//
// }
weGroupMembers.add(
WeGroupMember.builder()
.chatId(kk.getChat_id())
......
......@@ -66,15 +66,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
wu.user_name,
wfcrf.flower_customer_rel_id,
wt.tag_id,
wt.create_time,
wt.`name` as tagName,
(SELECT GROUP_CONCAT(wd.`name`) FROM we_department wd WHERE wd.id=wu.department) as department
FROM
we_customer wc
LEFT JOIN we_flower_customer_rel wfcr ON wc.external_userid=wfcr.external_userid
LEFT JOIN we_user wu ON wu.user_id=wfcr.user_id
LEFT JOIN we_flower_customer_tag_rel wfcrf ON wfcrf.flower_customer_rel_id = wfcr.id
LEFT JOIN we_tag wt ON wt.tag_id = wfcrf.tag_id
LEFT JOIN we_flower_customer_tag_rel wfcrf ON wfcrf.flower_customer_rel_id = wfcr.id
INNER JOIN we_tag wt ON wt.tag_id = wfcrf.tag_id
<where>
<if test="name != null and name !=''">
AND wc.name like concat('%', #{name}, '%')
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!