Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit da27f010
authored
Dec 08, 2020
by
水库浪子
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改分页bug等
1 parent
9929bbe5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
7 deletions
linkwe-wecom/src/main/java/com/linkwechat/wecom/client/WeCustomerClient.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/dto/customer/ExternalUserDetail.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeGroupServiceImpl.java
linkwe-wecom/src/main/resources/mapper/wecom/WeCustomerMapper.xml
linkwe-wecom/src/main/java/com/linkwechat/wecom/client/WeCustomerClient.java
View file @
da27f01
...
@@ -83,4 +83,15 @@ public interface WeCustomerClient {
...
@@ -83,4 +83,15 @@ public interface WeCustomerClient {
type
=
"POST"
)
type
=
"POST"
)
WeResultDto
sendWelcomeMsg
(
@DataObject
WeWelcomeMsg
wxCpWelcomeMsg
);
WeResultDto
sendWelcomeMsg
(
@DataObject
WeWelcomeMsg
wxCpWelcomeMsg
);
/**
* unionid转换external_userid
* @return
*/
@Request
(
url
=
"/externalcontact/unionid_to_external_userid"
,
type
=
"POST"
)
ExternalUserDetail
unionidToExternalUserid
(
@DataObject
ExternalUserDetail
.
ExternalContact
unionid
);
}
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/dto/customer/ExternalUserDetail.java
View file @
da27f01
...
@@ -23,9 +23,11 @@ public class ExternalUserDetail extends WeResultDto {
...
@@ -23,9 +23,11 @@ public class ExternalUserDetail extends WeResultDto {
private
FollowInfo
follow_info
;
private
FollowInfo
follow_info
;
private
String
external_userid
;
@Data
@Data
public
class
ExternalContact
{
public
static
class
ExternalContact
{
/** 外部联系人userId */
/** 外部联系人userId */
private
String
external_userid
;
private
String
external_userid
;
/** 外部联系人名称 */
/** 外部联系人名称 */
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeGroupServiceImpl.java
View file @
da27f01
...
@@ -2,18 +2,19 @@ package com.linkwechat.wecom.service.impl;
...
@@ -2,18 +2,19 @@ package com.linkwechat.wecom.service.impl;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.util.ArrayUtil
;
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.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.linkwechat.common.constant.WeConstans
;
import
com.linkwechat.common.constant.WeConstans
;
import
com.linkwechat.wecom.client.WeCustomerClient
;
import
com.linkwechat.wecom.client.WeCustomerGroupClient
;
import
com.linkwechat.wecom.client.WeCustomerGroupClient
;
import
com.linkwechat.wecom.client.WeUserClient
;
import
com.linkwechat.wecom.client.WeUserClient
;
import
com.linkwechat.wecom.domain.WeAllocateGroup
;
import
com.linkwechat.wecom.domain.WeAllocateGroup
;
import
com.linkwechat.wecom.domain.WeGroup
;
import
com.linkwechat.wecom.domain.WeGroup
;
import
com.linkwechat.wecom.domain.WeGroupMember
;
import
com.linkwechat.wecom.domain.WeGroupMember
;
import
com.linkwechat.wecom.domain.dto.AllocateWeGroupDto
;
import
com.linkwechat.wecom.domain.dto.AllocateWeGroupDto
;
import
com.linkwechat.wecom.domain.dto.customer.CustomerGroupDetail
;
import
com.linkwechat.wecom.domain.dto.customer.*
;
import
com.linkwechat.wecom.domain.dto.customer.CustomerGroupList
;
import
com.linkwechat.wecom.domain.dto.customer.CustomerGroupMember
;
import
com.linkwechat.wecom.domain.vo.WeLeaveUserInfoAllocateVo
;
import
com.linkwechat.wecom.domain.vo.WeLeaveUserInfoAllocateVo
;
import
com.linkwechat.wecom.mapper.WeGroupMapper
;
import
com.linkwechat.wecom.mapper.WeGroupMapper
;
import
com.linkwechat.wecom.service.*
;
import
com.linkwechat.wecom.service.*
;
...
@@ -58,6 +59,10 @@ public class WeGroupServiceImpl extends ServiceImpl<WeGroupMapper,WeGroup> imple
...
@@ -58,6 +59,10 @@ public class WeGroupServiceImpl extends ServiceImpl<WeGroupMapper,WeGroup> imple
private
WeUserClient
weUserClient
;
private
WeUserClient
weUserClient
;
@Autowired
private
WeCustomerClient
weCustomerClient
;
public
List
<
WeGroup
>
selectWeGroupList
(
WeGroup
weGroup
)
{
public
List
<
WeGroup
>
selectWeGroupList
(
WeGroup
weGroup
)
{
return
this
.
baseMapper
.
selectWeGroupList
(
weGroup
);
return
this
.
baseMapper
.
selectWeGroupList
(
weGroup
);
}
}
...
@@ -144,6 +149,30 @@ public class WeGroupServiceImpl extends ServiceImpl<WeGroupMapper,WeGroup> imple
...
@@ -144,6 +149,30 @@ public class WeGroupServiceImpl extends ServiceImpl<WeGroupMapper,WeGroup> imple
if
(
CollectionUtil
.
isNotEmpty
(
memberLists
)){
if
(
CollectionUtil
.
isNotEmpty
(
memberLists
)){
memberLists
.
stream
().
forEach
(
member
->{
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
(
weGroupMembers
.
add
(
WeGroupMember
.
builder
()
WeGroupMember
.
builder
()
.
chatId
(
kk
.
getChat_id
())
.
chatId
(
kk
.
getChat_id
())
...
...
linkwe-wecom/src/main/resources/mapper/wecom/WeCustomerMapper.xml
View file @
da27f01
...
@@ -66,15 +66,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -66,15 +66,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
wu.user_name,
wu.user_name,
wfcrf.flower_customer_rel_id,
wfcrf.flower_customer_rel_id,
wt.tag_id,
wt.tag_id,
wt.create_time,
wt.`name` as tagName,
wt.`name` as tagName,
(SELECT GROUP_CONCAT(wd.`name`) FROM we_department wd WHERE wd.id=wu.department) as department
(SELECT GROUP_CONCAT(wd.`name`) FROM we_department wd WHERE wd.id=wu.department) as department
FROM
FROM
we_customer wc
we_customer wc
LEFT JOIN we_flower_customer_rel wfcr ON wc.external_userid=wfcr.external_userid
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_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_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
INNER
JOIN we_tag wt ON wt.tag_id = wfcrf.tag_id
<where>
<where>
<if
test=
"name != null and name !=''"
>
<if
test=
"name != null and name !=''"
>
AND wc.name like concat('%', #{name}, '%')
AND wc.name like concat('%', #{name}, '%')
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment