Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
仟微科技
Link Wechat
提交
d4197c7e
Link Wechat
项目概览
仟微科技
/
Link Wechat
通知
48
Star
3
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Link Wechat
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d4197c7e
编写于
10月 20, 2020
作者:
水
水库浪子
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
上传客户同步相关接口
上级
02153871
变更
33
隐藏空白更改
内联
并排
Showing
33 changed file
with
386 addition
and
285 deletion
+386
-285
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeCorpAccountController.java
...kwechat/web/controller/wecom/WeCorpAccountController.java
+1
-1
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeCustomerController.java
...linkwechat/web/controller/wecom/WeCustomerController.java
+10
-10
linkwe-common/src/main/java/com/linkwechat/common/constant/WeConstans.java
.../main/java/com/linkwechat/common/constant/WeConstans.java
+6
-0
linkwe-wecom/src/main/java/com/linkwechat/wecom/client/WeCropTagClient.java
...ain/java/com/linkwechat/wecom/client/WeCropTagClient.java
+0
-1
linkwe-wecom/src/main/java/com/linkwechat/wecom/client/WeCustomerClient.java
...in/java/com/linkwechat/wecom/client/WeCustomerClient.java
+6
-4
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/WeCustomer.java
...src/main/java/com/linkwechat/wecom/domain/WeCustomer.java
+8
-4
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/WeDepartment.java
...c/main/java/com/linkwechat/wecom/domain/WeDepartment.java
+2
-0
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/WeFlowerCustomerRel.java
...java/com/linkwechat/wecom/domain/WeFlowerCustomerRel.java
+16
-4
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/WeUser.java
...com/src/main/java/com/linkwechat/wecom/domain/WeUser.java
+3
-0
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/dto/WeCropGroupTagDto111.java
...com/linkwechat/wecom/domain/dto/WeCropGroupTagDto111.java
+0
-46
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/dto/WeCustomerDto.java
...n/java/com/linkwechat/wecom/domain/dto/WeCustomerDto.java
+26
-26
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/dto/WeFollowUserDto.java
...java/com/linkwechat/wecom/domain/dto/WeFollowUserDto.java
+0
-46
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/dto/customer/ExternalUserDetail.java
...kwechat/wecom/domain/dto/customer/ExternalUserDetail.java
+71
-0
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/dto/customer/ExternalUserList.java
...inkwechat/wecom/domain/dto/customer/ExternalUserList.java
+14
-0
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/dto/customer/ExternalUserTag.java
...linkwechat/wecom/domain/dto/customer/ExternalUserTag.java
+20
-0
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/dto/customer/FollowUserList.java
.../linkwechat/wecom/domain/dto/customer/FollowUserList.java
+15
-0
linkwe-wecom/src/main/java/com/linkwechat/wecom/interceptor/WeAccessTokenInterceptor.java
...inkwechat/wecom/interceptor/WeAccessTokenInterceptor.java
+2
-1
linkwe-wecom/src/main/java/com/linkwechat/wecom/mapper/WeCorpAccountMapper.java
...java/com/linkwechat/wecom/mapper/WeCorpAccountMapper.java
+1
-1
linkwe-wecom/src/main/java/com/linkwechat/wecom/mapper/WeCustomerMapper.java
...in/java/com/linkwechat/wecom/mapper/WeCustomerMapper.java
+3
-1
linkwe-wecom/src/main/java/com/linkwechat/wecom/mapper/WeDepartmentMapper.java
.../java/com/linkwechat/wecom/mapper/WeDepartmentMapper.java
+3
-1
linkwe-wecom/src/main/java/com/linkwechat/wecom/mapper/WeFlowerCustomerRelMapper.java
...om/linkwechat/wecom/mapper/WeFlowerCustomerRelMapper.java
+3
-1
linkwe-wecom/src/main/java/com/linkwechat/wecom/mapper/WeUserMapper.java
...c/main/java/com/linkwechat/wecom/mapper/WeUserMapper.java
+2
-1
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeCorpAccountService.java
...a/com/linkwechat/wecom/service/IWeCorpAccountService.java
+1
-1
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeCustomerService.java
...java/com/linkwechat/wecom/service/IWeCustomerService.java
+34
-32
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeDepartmentService.java
...va/com/linkwechat/wecom/service/IWeDepartmentService.java
+3
-1
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeFlowerCustomerRelService.java
...linkwechat/wecom/service/IWeFlowerCustomerRelService.java
+3
-1
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeUserService.java
...ain/java/com/linkwechat/wecom/service/IWeUserService.java
+2
-1
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeCorpAccountServiceImpl.java
...nkwechat/wecom/service/impl/WeCorpAccountServiceImpl.java
+1
-1
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeCustomerServiceImpl.java
.../linkwechat/wecom/service/impl/WeCustomerServiceImpl.java
+122
-96
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeDepartmentServiceImpl.java
...inkwechat/wecom/service/impl/WeDepartmentServiceImpl.java
+2
-1
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeFlowerCustomerRelServiceImpl.java
...at/wecom/service/impl/WeFlowerCustomerRelServiceImpl.java
+3
-1
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeUserServiceImpl.java
.../com/linkwechat/wecom/service/impl/WeUserServiceImpl.java
+2
-1
linkwe-wecom/src/main/resources/mapper/wecom/WeCorpAccountMapper.xml
...m/src/main/resources/mapper/wecom/WeCorpAccountMapper.xml
+1
-1
未找到文件。
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeCorpAccountController.java
浏览文件 @
d4197c7e
...
...
@@ -78,7 +78,7 @@ public class WeCorpAccountController extends BaseController
@PreAuthorize
(
"@ss.hasPermi('wechat:corp:startVailWeCorpAccount')"
)
@Log
(
title
=
"启用有效企业微信账号"
,
businessType
=
BusinessType
.
DELETE
)
@PutMapping
(
"/startVailWeCorpAccount/{corpId}"
)
public
AjaxResult
startWeCorpAccount
(
@PathVariable
Lo
ng
corpId
)
public
AjaxResult
startWeCorpAccount
(
@PathVariable
Stri
ng
corpId
)
{
return
toAjax
(
weCorpAccountService
.
startVailWeCorpAccount
(
corpId
));
}
...
...
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeCustomerController.java
浏览文件 @
d4197c7e
...
...
@@ -72,16 +72,16 @@ public class WeCustomerController extends BaseController
/**
* 修改企业微信客户
*/
@PreAuthorize
(
"@ss.hasPermi('wecom:customer:edit')"
)
@Log
(
title
=
"企业微信客户"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
WeCustomer
weCustomer
)
{
return
toAjax
(
weCustomerService
.
updateWeCustomer
(
weCustomer
));
}
//
/**
//
* 修改企业微信客户
//
*/
//
@PreAuthorize("@ss.hasPermi('wecom:customer:edit')")
//
@Log(title = "企业微信客户", businessType = BusinessType.UPDATE)
//
@PutMapping
//
public AjaxResult edit(@RequestBody WeCustomer weCustomer)
//
{
//
return toAjax(weCustomerService.updateWeCustomer(weCustomer));
//
}
/**
...
...
linkwe-common/src/main/java/com/linkwechat/common/constant/WeConstans.java
浏览文件 @
d4197c7e
...
...
@@ -132,6 +132,12 @@ public class WeConstans {
public
static
final
Integer
NO_IS_ACTIVATE
=
2
;
/**
* 不存在外部联系人的关系
*/
public
static
final
Integer
NOT_EXIST_CONTACT
=
84061
;
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/client/WeCropTagClient.java
浏览文件 @
d4197c7e
...
...
@@ -2,7 +2,6 @@ package com.linkwechat.wecom.client;
import
com.dtflys.forest.annotation.DataObject
;
import
com.dtflys.forest.annotation.Request
;
import
com.linkwechat.wecom.domain.dto.WeCropGroupTagDto111
;
import
com.linkwechat.wecom.domain.dto.WeResultDto
;
import
com.linkwechat.wecom.domain.dto.tag.*
;
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/client/WeCustomerClient.java
浏览文件 @
d4197c7e
...
...
@@ -4,8 +4,10 @@ import com.dtflys.forest.annotation.DataObject;
import
com.dtflys.forest.annotation.Query
;
import
com.dtflys.forest.annotation.Request
;
import
com.linkwechat.wecom.domain.dto.WeCustomerDto
;
import
com.linkwechat.wecom.domain.dto.WeFollowUserDto
;
import
com.linkwechat.wecom.domain.dto.WeResultDto
;
import
com.linkwechat.wecom.domain.dto.customer.ExternalUserDetail
;
import
com.linkwechat.wecom.domain.dto.customer.ExternalUserList
;
import
com.linkwechat.wecom.domain.dto.customer.FollowUserList
;
/**
* @description: 获取配置客户联系人功能的成员
...
...
@@ -19,7 +21,7 @@ public interface WeCustomerClient {
* @return
*/
@Request
(
url
=
"/externalcontact/get_follow_user_list"
)
WeFollowUserDto
getFollowUserList
();
FollowUserList
getFollowUserList
();
/**
...
...
@@ -28,7 +30,7 @@ public interface WeCustomerClient {
* @return
*/
@Request
(
url
=
"/externalcontact/list"
)
WeCustomerDto
list
(
@Query
(
"userid"
)
String
userId
);
ExternalUserList
list
(
@Query
(
"userid"
)
String
userId
);
/**
...
...
@@ -37,7 +39,7 @@ public interface WeCustomerClient {
* @return
*/
@Request
(
url
=
"/externalcontact/get"
)
WeCustomerDto
get
(
@Query
(
"external_userid"
)
String
externalUserid
);
ExternalUserDetail
get
(
@Query
(
"external_userid"
)
String
externalUserid
);
/**
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/WeCustomer.java
浏览文件 @
d4197c7e
...
...
@@ -3,6 +3,9 @@ package com.linkwechat.wecom.domain;
import
java.util.Date
;
import
java.util.List
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.linkwechat.common.core.domain.BaseEntity
;
import
com.linkwechat.common.utils.SnowFlakeUtil
;
...
...
@@ -23,14 +26,14 @@ import org.apache.commons.lang3.builder.ToStringStyle;
@Builder
@AllArgsConstructor
@NoArgsConstructor
public
class
WeCustomer
extends
BaseEntity
@TableName
(
"we_customer"
)
public
class
WeCustomer
{
private
static
final
long
serialVersionUID
=
1L
;
/** $column.columnComment */
private
Long
id
=
SnowFlakeUtil
.
nextId
();
/** 外部联系人的userid */
@TableId
private
String
externalUserid
;
/** 外部联系人名称 */
...
...
@@ -63,7 +66,8 @@ public class WeCustomer extends BaseEntity
private
String
position
;
/** 添加人员 */
List
<
WeFlowerCustomerRel
>
weFlowerCustomerRels
;
@TableField
(
exist
=
false
)
private
List
<
WeFlowerCustomerRel
>
weFlowerCustomerRels
;
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/WeDepartment.java
浏览文件 @
d4197c7e
package
com.linkwechat.wecom.domain
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.linkwechat.common.core.domain.BaseEntity
;
import
com.linkwechat.common.utils.SnowFlakeUtil
;
import
com.linkwechat.common.utils.bean.BeanUtils
;
...
...
@@ -23,6 +24,7 @@ import javax.validation.constraints.NotNull;
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName
(
"we_department"
)
public
class
WeDepartment
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/WeFlowerCustomerRel.java
浏览文件 @
d4197c7e
package
com.linkwechat.wecom.domain
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.linkwechat.common.core.domain.BaseEntity
;
import
com.linkwechat.common.utils.SnowFlakeUtil
;
import
lombok.AllArgsConstructor
;
...
...
@@ -7,6 +10,7 @@ import lombok.Builder;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.Date
;
import
java.util.List
;
/**
...
...
@@ -19,17 +23,18 @@ import java.util.List;
@Builder
@AllArgsConstructor
@NoArgsConstructor
public
class
WeFlowerCustomerRel
extends
BaseEntity
@TableName
(
"we_flower_customer_rel"
)
public
class
WeFlowerCustomerRel
{
private
static
final
long
serialVersionUID
=
1L
;
/** $column.columnComment */
private
Long
id
=
SnowFlakeUtil
.
nextId
();
/** 添加了此外部联系人的企业成员userid */
@TableId
private
String
userId
;
/** 外部联系人名称 */
@TableField
(
exist
=
false
)
private
String
userName
;
...
...
@@ -46,7 +51,7 @@ public class WeFlowerCustomerRel extends BaseEntity
private
String
operUserid
;
/** 该成员添加此客户的来源, */
private
String
addWay
;
private
Integer
addWay
;
/** 企业自定义的state参数,用于区分客户具体是通过哪个「联系我」添加,由企业通过创建「联系我」方式指定 */
private
String
state
;
...
...
@@ -54,8 +59,15 @@ public class WeFlowerCustomerRel extends BaseEntity
/** 客户id */
private
Long
customerId
;
/** 状态(0正常 1删除) */
private
String
status
;
/** 创建时间 */
private
Date
createTime
;
/** 微信用户添加的标签 */
@TableField
(
exist
=
false
)
private
List
<
WeFlowerCustomerTagRel
>
weFlowerCustomerTagRels
;
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/WeUser.java
浏览文件 @
d4197c7e
package
com.linkwechat.wecom.domain
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.databind.annotation.JsonDeserialize
;
import
com.linkwechat.common.config.jackson.StringArrayDeserialize
;
...
...
@@ -24,6 +26,7 @@ import java.util.Date;
*/
@Data
@ApiModel
(
"通讯录用户"
)
@TableName
(
"we_user"
)
public
class
WeUser
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/dto/WeCropGroupTagDto111.java
已删除
100644 → 0
浏览文件 @
02153871
package
com.linkwechat.wecom.domain.dto
;
import
lombok.Data
;
import
java.util.List
;
/**
* @description: 标签组
* @author: HaoN
* @create: 2020-10-17 11:02
**/
@Data
public
class
WeCropGroupTagDto111
extends
WeResultDto
{
private
List
<
WeCropGroupTagDto111
>
tag_group
;
// public static WeCropGroupTagDto.WeCropGroupTag createWeCropGroupTag(WeTagGroup weTagGroup){
// WeCropGroupTag weCropGroupTag=new WeCropGroupTag();
// if(null != weTagGroup){
// weCropGroupTag.setGroup_id(weTagGroup.getId().toString());
// weCropGroupTag.setGroup_name(weTagGroup.getGourpName());
//
// List<WeTag> weTags = weTagGroup.getWeTags();
// if(CollectionUtil.isNotEmpty(weTags)){
// List<WeCropTag> weCropTags=new ArrayList<>();
// weTags.stream().forEach(k->{
// WeCropTag weCropTag = new WeCropTag();
// weCropTag.setName(k.getName());
// weCropTags.add(
// weCropTag
// );
// });
// weCropGroupTag.setTag(weCropTags);
// }
//
//
// }
//
// return weCropGroupTag;
// }
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/dto/WeCustomerDto.java
浏览文件 @
d4197c7e
...
...
@@ -25,8 +25,8 @@ public class WeCustomerDto extends WeResultDto{
/** 客户详情 */
private
ExternalContact
external_contact
;
/** 客户联系人 */
private
List
<
WeFollowUserDto
>
follow_user
;
//
/** 客户联系人 */
//
private List<WeFollowUserDto> follow_user;
@Data
...
...
@@ -64,30 +64,30 @@ public class WeCustomerDto extends WeResultDto{
}
public
WeCustomer
transformWeCustomer
(){
WeCustomer
weCustomer
=
new
WeCustomer
();
if
(
null
!=
external_contact
){
BeanUtils
.
copyPropertiesignoreOther
(
external_contact
,
weCustomer
);
}
if
(
CollectionUtil
.
isNotEmpty
(
follow_user
)){
List
<
WeFlowerCustomerRel
>
weFlowerCustomerRels
=
new
ArrayList
<>();
List
<
WeTagDto
>
weTagDtos
=
new
ArrayList
<>();
follow_user
.
stream
().
forEach
(
k
->{
WeFlowerCustomerRel
weFlowerCustomerRel
=
new
WeFlowerCustomerRel
();
BeanUtils
.
copyPropertiesignoreOther
(
k
,
weFlowerCustomerRel
);
weFlowerCustomerRels
.
add
(
weFlowerCustomerRel
);
if
(
CollectionUtil
.
isNotEmpty
(
k
.
getTags
())){
k
.
getTags
().
stream
().
forEach
(
v
->
v
.
setFlower_customer_rel_id
(
k
.
getId
()));
weTagDtos
.
addAll
(
k
.
getTags
());
}
});
}
return
weCustomer
;
}
//
public WeCustomer transformWeCustomer(){
//
WeCustomer weCustomer=new WeCustomer();
//
//
if(null != external_contact){
//
BeanUtils.copyPropertiesignoreOther(external_contact,weCustomer);
//
}
//
//
if(CollectionUtil.isNotEmpty(follow_user)){
//
List<WeFlowerCustomerRel> weFlowerCustomerRels=new ArrayList<>();
//
List<WeTagDto> weTagDtos=new ArrayList<>();
//
follow_user.stream().forEach(k->{
//
WeFlowerCustomerRel weFlowerCustomerRel=new WeFlowerCustomerRel();
//
BeanUtils.copyPropertiesignoreOther(k,weFlowerCustomerRel);
//
weFlowerCustomerRels.add(weFlowerCustomerRel);
//
if(CollectionUtil.isNotEmpty(k.getTags())){
//
k.getTags().stream().forEach(v->v.setFlower_customer_rel_id(k.getId()));
//
weTagDtos.addAll(k.getTags());
//
}
//
});
//
//
}
//
//
return weCustomer;
//
}
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/dto/WeFollowUserDto.java
已删除
100644 → 0
浏览文件 @
02153871
package
com.linkwechat.wecom.domain.dto
;
import
lombok.Data
;
import
java.util.List
;
/**
* @description: 企业服务人员数据传输实体(配置客户联系功能的成员)
* @author: HaoN
* @create: 2020-09-15 14:08
**/
@Data
public
class
WeFollowUserDto
extends
WeResultDto
{
/** 拥有通讯录功能的企业成员id集合 */
private
String
[]
follow_user
;
/** 拥有通讯录功能的企业成员id */
private
String
userid
;
/** 外部联系人的备注 */
private
String
remark
;
/** 外部联系人描述 */
private
String
description
;
/** 外部联系人创建时间 */
private
Long
createtime
;
/** 添加外部联系人所打的标签 */
private
List
<
WeTagDto
>
tags
;
/** 客户备注的企业名称 */
private
String
remark_corp_name
;
/** 客户备注的手机号码 */
private
String
[]
remark_mobiles
;
/** 该成员添加此客户的来源 */
private
Integer
add_way
;
/** 发起添加的userid,如果成员主动添加,为成员的userid;如果是客户主动添加,则为客户的外部联系人userid;如果是内部成员共享/管理员分配,则为对应的成员/管理员userid */
private
String
oper_userid
;
/** 企业自定义的state参数,用于区分客户具体是通过哪个「联系我」添加 */
private
Integer
state
;
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/dto/customer/ExternalUserDetail.java
0 → 100644
浏览文件 @
d4197c7e
package
com.linkwechat.wecom.domain.dto.customer
;
import
com.linkwechat.wecom.domain.dto.WeResultDto
;
import
lombok.Data
;
import
java.util.Date
;
import
java.util.List
;
/**
* @description: 获取客户详情
* @author: HaoN
* @create: 2020-10-19 22:33
**/
@Data
public
class
ExternalUserDetail
extends
WeResultDto
{
/** 客户详情 */
private
ExternalContact
external_contact
;
/** 客户联系人 */
private
List
<
FollowUser
>
follow_user
;
@Data
public
class
ExternalContact
{
/** 外部联系人userId */
private
String
external_userid
;
/** 外部联系人名称 */
private
String
name
;
/** 外部联系人职位 */
private
String
position
;
/** 外部联系人头像 */
private
String
avatar
;
/** 外部联系人所在企业简称 */
private
String
corp_name
;
/** 外部联系人所在企业全称 */
private
String
corp_full_name
;
/** 外部联系人的类型,1表示该外部联系人是微信用户,2表示该外部联系人是企业微信用户 */
private
Integer
type
;
/** 外部联系人性别 0-未知 1-男性 2-女性 */
private
Integer
gender
;
/** 外部联系人在微信开放平台的唯一身份标识(微信unionid),通过此字段企业可将外部联系人与公众号/小程序用户关联起来。 */
private
String
unionid
;
}
@Data
public
class
FollowUser
{
/**添加了此外部联系人的企业成员userid*/
private
String
userid
;
/**该成员对此外部联系人的备注*/
private
String
remark
;
/**该成员对此外部联系人的描述*/
private
String
description
;
/**该成员添加此外部联系人的时间*/
private
Date
createtime
;
/**该成员对此客户备注的企业名称*/
private
String
remark_company
;
/**该成员对此客户备注的手机号码*/
private
String
[]
remark_mobiles
;
/**该成员添加此客户的来源*/
private
Integer
add_way
;
/**发起添加的userid,如果成员主动添加,为成员的userid;如果是客户主动添加,则为客户的外部联系人userid;如果是内部成员共享/管理员分配,则为对应的成员/管理员userid*/
private
String
oper_userid
;
/**标签**/
private
List
<
ExternalUserTag
>
tags
;
}
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/dto/customer/ExternalUserList.java
0 → 100644
浏览文件 @
d4197c7e
package
com.linkwechat.wecom.domain.dto.customer
;
import
com.linkwechat.wecom.domain.dto.WeResultDto
;
import
lombok.Data
;
/**
* @description: 客户列表
* @author: HaoN
* @create: 2020-10-19 22:14
**/
@Data
public
class
ExternalUserList
extends
WeResultDto
{
private
String
[]
external_userid
;
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/dto/customer/ExternalUserTag.java
0 → 100644
浏览文件 @
d4197c7e
package
com.linkwechat.wecom.domain.dto.customer
;
import
lombok.Data
;
/**
* @description: 外部联系人标签
* @author: HaoN
* @create: 2020-10-19 23:35
**/
@Data
public
class
ExternalUserTag
{
/**该成员添加此外部联系人所打标签的分组名称*/
private
String
group_name
;
/**该成员添加此外部联系人所打标签名称*/
private
String
tag_name
;
/** 该成员添加此外部联系人所打标签类型, 1-企业设置, 2-用户自定义*/
private
Integer
type
;
/** 该成员添加此外部联系人所打企业标签的id,仅企业设置(type为1)的标签返回*/
private
String
tag_id
;
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/dto/customer/FollowUserList.java
0 → 100644
浏览文件 @
d4197c7e
package
com.linkwechat.wecom.domain.dto.customer
;
import
com.linkwechat.wecom.domain.dto.WeResultDto
;
import
lombok.Data
;
/**
* @description: 获取配置了客户联系功能的成员列表
* @author: HaoN
* @create: 2020-10-19 22:08
**/
@Data
public
class
FollowUserList
extends
WeResultDto
{
private
String
[]
follow_user
;
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/interceptor/WeAccessTokenInterceptor.java
浏览文件 @
d4197c7e
...
...
@@ -9,6 +9,7 @@ import com.dtflys.forest.interceptor.Interceptor;
import
com.dtflys.forest.utils.ForestDataType
;
import
com.linkwechat.common.annotation.Log
;
import
com.linkwechat.common.config.WeComeConfig
;
import
com.linkwechat.common.constant.WeConstans
;
import
com.linkwechat.common.exception.wecom.WeComException
;
import
com.linkwechat.framework.web.domain.server.Sys
;
import
com.linkwechat.wecom.domain.dto.WeResultDto
;
...
...
@@ -94,7 +95,7 @@ public class WeAccessTokenInterceptor implements Interceptor{
WeResultDto
weResultDto
=
JSONUtil
.
toBean
(
forestResponse
.
getContent
(),
WeResultDto
.
class
);
if
(
null
!=
weResultDto
.
getErrcode
()
&&
weResultDto
.
getErrcode
()
!=
0
){
if
(
null
!=
weResultDto
.
getErrcode
()
&&
!
weResultDto
.
getErrcode
().
equals
(
WeConstans
.
WE_SUCCESS_CODE
)&&
!
weResultDto
.
getErrcode
().
equals
(
WeConstans
.
NOT_EXIST_CONTACT
)
){
throw
new
ForestRuntimeException
(
forestResponse
.
getContent
());
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/mapper/WeCorpAccountMapper.java
浏览文件 @
d4197c7e
...
...
@@ -58,5 +58,5 @@ public interface WeCorpAccountMapper
* @param corpId
* @return
*/
public
int
startVailWeCorpAccount
(
@Param
(
"corpId"
)
Lo
ng
corpId
);
public
int
startVailWeCorpAccount
(
@Param
(
"corpId"
)
Stri
ng
corpId
);
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/mapper/WeCustomerMapper.java
浏览文件 @
d4197c7e
package
com.linkwechat.wecom.mapper
;
import
java.util.List
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.linkwechat.wecom.domain.WeCustomer
;
/**
...
...
@@ -9,7 +11,7 @@ import com.linkwechat.wecom.domain.WeCustomer;
* @author ruoyi
* @date 2020-09-13
*/
public
interface
WeCustomerMapper
public
interface
WeCustomerMapper
extends
BaseMapper
<
WeCustomer
>
{
/**
* 查询企业微信客户
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/mapper/WeDepartmentMapper.java
浏览文件 @
d4197c7e
package
com.linkwechat.wecom.mapper
;
import
java.util.List
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.linkwechat.wecom.domain.WeDepartment
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -10,7 +12,7 @@ import org.apache.ibatis.annotations.Param;
* @author ruoyi
* @date 2020-09-01
*/
public
interface
WeDepartmentMapper
public
interface
WeDepartmentMapper
extends
BaseMapper
<
WeDepartment
>
{
/**
* 查询企业微信组织架构相关
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/mapper/WeFlowerCustomerRelMapper.java
浏览文件 @
d4197c7e
package
com.linkwechat.wecom.mapper
;
import
java.util.List
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.linkwechat.wecom.domain.WeFlowerCustomerRel
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -10,7 +12,7 @@ import org.apache.ibatis.annotations.Param;
* @author ruoyi
* @date 2020-09-19
*/
public
interface
WeFlowerCustomerRelMapper
public
interface
WeFlowerCustomerRelMapper
extends
BaseMapper
<
WeFlowerCustomerRel
>
{
/**
* 查询具有外部联系人功能企业员工也客户的关系
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/mapper/WeUserMapper.java
浏览文件 @
d4197c7e
package
com.linkwechat.wecom.mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.linkwechat.wecom.domain.WeUser
;
import
com.linkwechat.wecom.domain.vo.WeLeaveUserVo
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -12,7 +13,7 @@ import java.util.List;
* @author ruoyi
* @date 2020-08-31
*/
public
interface
WeUserMapper
public
interface
WeUserMapper
extends
BaseMapper
<
WeUser
>
{
/**
* 查询通讯录相关客户
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeCorpAccountService.java
浏览文件 @
d4197c7e
...
...
@@ -58,6 +58,6 @@ public interface IWeCorpAccountService
* 启用有效的企业微信账号
* @param corpId
*/
public
int
startVailWeCorpAccount
(
Lo
ng
corpId
);
public
int
startVailWeCorpAccount
(
Stri
ng
corpId
);
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeCustomerService.java
浏览文件 @
d4197c7e
package
com.linkwechat.wecom.service
;
import
java.util.List
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.linkwechat.wecom.domain.WeCustomer
;
import
com.linkwechat.wecom.domain.vo.WeLeaveUserInfoAllocateVo
;
...
...
@@ -10,7 +12,7 @@ import com.linkwechat.wecom.domain.vo.WeLeaveUserInfoAllocateVo;
* @author ruoyi
* @date 2020-09-13
*/
public
interface
IWeCustomerService
public
interface
IWeCustomerService
extends
IService
<
WeCustomer
>
{
/**
* 查询企业微信客户
...
...
@@ -28,37 +30,37 @@ public interface IWeCustomerService
*/
public
List
<
WeCustomer
>
selectWeCustomerList
(
WeCustomer
weCustomer
);
/**
* 新增企业微信客户
*
* @param weCustomer 企业微信客户
* @return 结果
*/
public
int
insertWeCustomer
(
WeCustomer
weCustomer
);
/**
* 修改企业微信客户
*
* @param weCustomer 企业微信客户
* @return 结果
*/
public
int
updateWeCustomer
(
WeCustomer
weCustomer
);
/**
* 批量删除企业微信客户
*
* @param ids 需要删除的企业微信客户ID
* @return 结果
*/
public
int
deleteWeCustomerByIds
(
Long
[]
ids
);
/**
* 删除企业微信客户信息
*
* @param id 企业微信客户ID
* @return 结果
*/
public
int
deleteWeCustomerById
(
Long
id
);
//
/**
//
* 新增企业微信客户
// *
//
* @param weCustomer 企业微信客户
//
* @return 结果
//
*/
//
public int insertWeCustomer(WeCustomer weCustomer);
//
//
/**
//
* 修改企业微信客户
// *
//
* @param weCustomer 企业微信客户
//
* @return 结果
//
*/
//
public int updateWeCustomer(WeCustomer weCustomer);
//
//
/**
//
* 批量删除企业微信客户
// *
//
* @param ids 需要删除的企业微信客户ID
//
* @return 结果
//
*/
//
public int deleteWeCustomerByIds(Long[] ids);
//
//
/**
//
* 删除企业微信客户信息
// *
//
* @param id 企业微信客户ID
//
* @return 结果
//
*/
//
public int deleteWeCustomerById(Long id);
/**
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeDepartmentService.java
浏览文件 @
d4197c7e
package
com.linkwechat.wecom.service
;
import
java.util.List
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.linkwechat.wecom.domain.WeDepartment
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -10,7 +12,7 @@ import org.apache.ibatis.annotations.Param;
* @author ruoyi
* @date 2020-09-01
*/
public
interface
IWeDepartmentService
public
interface
IWeDepartmentService
extends
IService
<
WeDepartment
>
{
/**
* 查询企业微信组织架构相关
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeFlowerCustomerRelService.java
浏览文件 @
d4197c7e
package
com.linkwechat.wecom.service
;
import
java.util.List
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.linkwechat.wecom.domain.WeFlowerCustomerRel
;
/**
...
...
@@ -9,7 +11,7 @@ import com.linkwechat.wecom.domain.WeFlowerCustomerRel;
* @author ruoyi
* @date 2020-09-19
*/
public
interface
IWeFlowerCustomerRelService
public
interface
IWeFlowerCustomerRelService
extends
IService
<
WeFlowerCustomerRel
>
{
/**
* 查询具有外部联系人功能企业员工也客户的关系
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeUserService.java
浏览文件 @
d4197c7e
package
com.linkwechat.wecom.service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.linkwechat.wecom.domain.WeUser
;
import
com.linkwechat.wecom.domain.vo.WeLeaveUserInfoAllocateVo
;
import
com.linkwechat.wecom.domain.vo.WeLeaveUserVo
;
...
...
@@ -12,7 +13,7 @@ import java.util.List;
* @author ruoyi
* @date 2020-08-31
*/
public
interface
IWeUserService
public
interface
IWeUserService
extends
IService
<
WeUser
>
{
/**
* 查询通讯录相关客户
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeCorpAccountServiceImpl.java
浏览文件 @
d4197c7e
...
...
@@ -91,7 +91,7 @@ public class WeCorpAccountServiceImpl implements IWeCorpAccountService {
* @param corpId
*/
@Override
public
int
startVailWeCorpAccount
(
Lo
ng
corpId
)
{
public
int
startVailWeCorpAccount
(
Stri
ng
corpId
)
{
return
weCorpAccountMapper
.
startVailWeCorpAccount
(
corpId
);
}
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeCustomerServiceImpl.java
浏览文件 @
d4197c7e
package
com.linkwechat.wecom.service.impl
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.util.ArrayUtil
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.linkwechat.common.constant.WeConstans
;
import
com.linkwechat.common.utils.DateUtils
;
import
com.linkwechat.common.utils.SnowFlakeUtil
;
import
com.linkwechat.common.utils.bean.BeanUtils
;
import
com.linkwechat.framework.web.domain.server.Sys
;
import
com.linkwechat.wecom.client.WeCustomerClient
;
import
com.linkwechat.wecom.
client.WeUserClient
;
import
com.linkwechat.wecom.
domain.WeCustomer
;
import
com.linkwechat.wecom.domain.WeFlowerCustomerRel
;
import
com.linkwechat.wecom.domain.dto.
WeCustomerDto
;
import
com.linkwechat.wecom.domain.dto.
WeFollowUserDto
;
import
com.linkwechat.wecom.domain.dto.
WeUserDto
;
import
com.linkwechat.wecom.domain.dto.
customer.ExternalUserDetail
;
import
com.linkwechat.wecom.domain.dto.
customer.ExternalUserList
;
import
com.linkwechat.wecom.domain.dto.
customer.FollowUserList
;
import
com.linkwechat.wecom.domain.vo.WeLeaveUserInfoAllocateVo
;
import
com.linkwechat.wecom.mapper.WeCustomerMapper
;
import
com.linkwechat.wecom.service.IWeCustomerService
;
import
com.linkwechat.wecom.service.IWeFlowerCustomerRelService
;
import
com.linkwechat.wecom.service.IWeFlowerCustomerTagRelService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.linkwechat.wecom.mapper.WeCustomerMapper
;
import
com.linkwechat.wecom.domain.WeCustomer
;
import
com.linkwechat.wecom.service.IWeCustomerService
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* 企业微信客户Service业务层处理
*
...
...
@@ -32,7 +33,7 @@ import org.springframework.transaction.annotation.Transactional;
* @date 2020-09-13
*/
@Service
public
class
WeCustomerServiceImpl
implements
IWeCustomerService
public
class
WeCustomerServiceImpl
extends
ServiceImpl
<
WeCustomerMapper
,
WeCustomer
>
implements
IWeCustomerService
{
@Autowired
private
WeCustomerMapper
weCustomerMapper
;
...
...
@@ -43,14 +44,16 @@ public class WeCustomerServiceImpl implements IWeCustomerService
@Autowired
private
WeUserClient
weUserClient
;
private
IWeFlowerCustomerRelService
iWeFlowerCustomerRelService
;
// @Autowired
// private WeUserClient weUserClient;
@Autowired
private
IWeFlowerCustomerRelService
iWeFlowerCustomerRelService
;
/**
* 查询企业微信客户
...
...
@@ -76,54 +79,53 @@ public class WeCustomerServiceImpl implements IWeCustomerService
return
weCustomerMapper
.
selectWeCustomerList
(
weCustomer
);
}
/**
* 新增企业微信客户
*
* @param weCustomer 企业微信客户
* @return 结果
*/
@Override
public
int
insertWeCustomer
(
WeCustomer
weCustomer
)
{
weCustomer
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
weCustomerMapper
.
insertWeCustomer
(
weCustomer
);
}
/**
* 修改企业微信客户
*
* @param weCustomer 企业微信客户
* @return 结果
*/
@Override
public
int
updateWeCustomer
(
WeCustomer
weCustomer
)
{
return
weCustomerMapper
.
updateWeCustomer
(
weCustomer
);
}
/**
* 批量删除企业微信客户
*
* @param ids 需要删除的企业微信客户ID
* @return 结果
*/
@Override
public
int
deleteWeCustomerByIds
(
Long
[]
ids
)
{
return
weCustomerMapper
.
deleteWeCustomerByIds
(
ids
);
}
/**
* 删除企业微信客户信息
*
* @param id 企业微信客户ID
* @return 结果
*/
@Override
public
int
deleteWeCustomerById
(
Long
id
)
{
return
weCustomerMapper
.
deleteWeCustomerById
(
id
);
}
// /**
// * 新增企业微信客户
// *
// * @param weCustomer 企业微信客户
// * @return 结果
// */
// @Override
// public int insertWeCustomer(WeCustomer weCustomer)
// {
// return weCustomerMapper.insertWeCustomer(weCustomer);
// }
//
// /**
// * 修改企业微信客户
// *
// * @param weCustomer 企业微信客户
// * @return 结果
// */
// @Override
// public int updateWeCustomer(WeCustomer weCustomer)
// {
// return weCustomerMapper.updateWeCustomer(weCustomer);
// }
//
// /**
// * 批量删除企业微信客户
// *
// * @param ids 需要删除的企业微信客户ID
// * @return 结果
// */
// @Override
// public int deleteWeCustomerByIds(Long[] ids)
// {
// return weCustomerMapper.deleteWeCustomerByIds(ids);
// }
//
// /**
// * 删除企业微信客户信息
// *
// * @param id 企业微信客户ID
// * @return 结果
// */
// @Override
// public int deleteWeCustomerById(Long id)
// {
// return weCustomerMapper.deleteWeCustomerById(id);
// }
/**
...
...
@@ -131,48 +133,72 @@ public class WeCustomerServiceImpl implements IWeCustomerService
* @return
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
synchWeCustomer
()
{
WeFollowUserDto
weFollowUserDto
=
weFollowUserClient
.
getFollowUserList
();
FollowUserList
followUserList
=
weFollowUserClient
.
getFollowUserList
();
if
(
WeConstans
.
WE_SUCCESS_CODE
.
equals
(
weFollowUserDto
.
getErrcode
())
&&
ArrayUtil
.
isNotEmpty
(
weFollowUserDto
.
getFollow_user
())){
if
(
WeConstans
.
WE_SUCCESS_CODE
.
equals
(
followUserList
.
getErrcode
())
&&
ArrayUtil
.
isNotEmpty
(
followUserList
.
getFollow_user
())){
Arrays
.
asList
(
weFollowUserDto
.
getFollow_user
())
Arrays
.
asList
(
followUserList
.
getFollow_user
())
.
stream
().
forEach
(
k
->{
//获取指定联系人对应的客户
WeCustomerDto
externalUserid
=
weFollowUserClient
.
list
(
k
);
if
(
WeConstans
.
WE_SUCCESS_CODE
.
equals
(
externalUserid
.
getErrcode
())
&&
ArrayUtil
.
isNotEmpty
(
externalUser
id
.
getExternal_userid
())){
ExternalUserList
externalUsers
=
weFollowUserClient
.
list
(
k
);
if
(
WeConstans
.
WE_SUCCESS_CODE
.
equals
(
externalUsers
.
getErrcode
())
||
WeConstans
.
NOT_EXIST_CONTACT
.
equals
(
externalUsers
.
getErrcode
())
&&
ArrayUtil
.
isNotEmpty
(
externalUser
s
.
getExternal_userid
())){
Arrays
.
asList
(
externalUser
id
.
getExternal_userid
()).
forEach
(
v
->{
Arrays
.
asList
(
externalUser
s
.
getExternal_userid
()).
forEach
(
v
->{
//获取指定客户的详情
WeCustomerDto
externalContact
=
weFollowUserClient
.
get
(
v
);
if
(
WeConstans
.
WE_SUCCESS_CODE
.
equals
(
externalContact
.
getErrcode
())){
WeCustomer
weCustomer
=
externalContact
.
transformWeCustomer
();
ExternalUserDetail
externalUserDetail
=
weFollowUserClient
.
get
(
v
);
if
(
null
!=
weCustomer
){
if
(
WeConstans
.
WE_SUCCESS_CODE
.
equals
(
externalUserDetail
.
getErrcode
())){
//客户入库
WeCustomer
weCustomer
=
new
WeCustomer
();
BeanUtils
.
copyPropertiesignoreOther
(
externalUserDetail
.
getExternal_contact
(),
weCustomer
);
this
.
saveOrUpdate
(
weCustomer
);
this
.
insertWeCustomer
(
weCustomer
);
//客户与通讯录客户关系
List
<
WeFlowerCustomerRel
>
weFlowerCustomerRel
=
new
ArrayList
<>();
externalUserDetail
.
getFollow_user
().
stream
().
forEach
(
kk
->{
WeFlowerCustomerRel
weFlowerCustomerRelOne
=
new
WeFlowerCustomerRel
();
BeanUtils
.
copyPropertiesignoreOther
(
kk
,
weFlowerCustomerRelOne
);
weFlowerCustomerRel
.
add
(
weFlowerCustomerRelOne
);
});
iWeFlowerCustomerRelService
.
saveOrUpdateBatch
(
weFlowerCustomerRel
);
if
(
CollectionUtil
.
isNotEmpty
(
weCustomer
.
getWeFlowerCustomerRels
())){
iWeFlowerCustomerRelService
.
batchInsetWeFlowerCustomerRel
(
weCustomer
.
getWeFlowerCustomerRels
());
//设置标签跟客户关系,根据标签id获取到标签组,saveOrUpdate标签,建立标签与添加人关系
}
}
}
// if(WeConstans.WE_SUCCESS_CODE.equals(externalContact.getErrcode())){
//
// WeCustomer weCustomer
// = externalContact.transformWeCustomer();
//
// if(null != weCustomer){
//
// this.insertWeCustomer(weCustomer);
//
// if(CollectionUtil.isNotEmpty(weCustomer.getWeFlowerCustomerRels())){
//
// iWeFlowerCustomerRelService.batchInsetWeFlowerCustomerRel(weCustomer.getWeFlowerCustomerRels());
//
//
//
// }
//
// }
//
//
// }
}
});
}
...
...
@@ -199,14 +225,14 @@ public class WeCustomerServiceImpl implements IWeCustomerService
.
build
());
if
(
CollectionUtil
.
isNotEmpty
(
weFlowerCustomerRels
)){
//删除原有的
iWeFlowerCustomerRelService
.
batchLogicDeleteByIds
(
weFlowerCustomerRels
.
stream
().
map
(
WeFlowerCustomerRel:
:
getId
).
collect
(
Collectors
.
toList
()));
//保存新的
weFlowerCustomerRels
.
stream
().
forEach
(
k
->{
k
.
setId
(
SnowFlakeUtil
.
nextId
());
k
.
setUserId
(
weLeaveUserInfoAllocateVo
.
getTakeoverUserid
());
});
//保存新
iWeFlowerCustomerRelService
.
batchInsetWeFlowerCustomerRel
(
weFlowerCustomerRels
);
//
iWeFlowerCustomerRelService.batchLogicDeleteByIds(weFlowerCustomerRels.stream().map(WeFlowerCustomerRel::getId).collect(Collectors.toList()));
//
//保存新的
//
weFlowerCustomerRels.stream().forEach(k->{
////
k.setId(SnowFlakeUtil.nextId());
//
k.setUserId(weLeaveUserInfoAllocateVo.getTakeoverUserid());
//
});
//
//保存新
//
iWeFlowerCustomerRelService.batchInsetWeFlowerCustomerRel(weFlowerCustomerRels);
}
}
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeDepartmentServiceImpl.java
浏览文件 @
d4197c7e
...
...
@@ -2,6 +2,7 @@ package com.linkwechat.wecom.service.impl;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.collection.ListUtil
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.linkwechat.common.constant.HttpStatus
;
import
com.linkwechat.common.constant.WeConstans
;
import
com.linkwechat.common.exception.wecom.WeComException
;
...
...
@@ -28,7 +29,7 @@ import java.util.List;
* @date 2020-09-01
*/
@Service
public
class
WeDepartmentServiceImpl
implements
IWeDepartmentService
public
class
WeDepartmentServiceImpl
extends
ServiceImpl
<
WeDepartmentMapper
,
WeDepartment
>
implements
IWeDepartmentService
{
@Autowired
private
WeDepartmentMapper
weDepartmentMapper
;
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeFlowerCustomerRelServiceImpl.java
浏览文件 @
d4197c7e
package
com.linkwechat.wecom.service.impl
;
import
java.util.List
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.linkwechat.common.utils.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -15,7 +17,7 @@ import com.linkwechat.wecom.service.IWeFlowerCustomerRelService;
* @date 2020-09-19
*/
@Service
public
class
WeFlowerCustomerRelServiceImpl
implements
IWeFlowerCustomerRelService
public
class
WeFlowerCustomerRelServiceImpl
extends
ServiceImpl
<
WeFlowerCustomerRelMapper
,
WeFlowerCustomerRel
>
implements
IWeFlowerCustomerRelService
{
@Autowired
private
WeFlowerCustomerRelMapper
weFlowerCustomerRelMapper
;
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeUserServiceImpl.java
浏览文件 @
d4197c7e
package
com.linkwechat.wecom.service.impl
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.linkwechat.common.constant.WeConstans
;
import
com.linkwechat.common.exception.wecom.WeComException
;
import
com.linkwechat.framework.web.domain.server.Sys
;
...
...
@@ -33,7 +34,7 @@ import java.util.List;
* @date 2020-08-31
*/
@Service
public
class
WeUserServiceImpl
implements
IWeUserService
public
class
WeUserServiceImpl
extends
ServiceImpl
<
WeUserMapper
,
WeUser
>
implements
IWeUserService
{
@Autowired
private
WeUserMapper
weUserMapper
;
...
...
linkwe-wecom/src/main/resources/mapper/wecom/WeCorpAccountMapper.xml
浏览文件 @
d4197c7e
...
...
@@ -94,7 +94,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update
id=
"startVailWeCorpAccount"
>
UPDATE we_corp_account
SET `status` = (CASE WHEN id = #{corpId} THEN 0 ELSE 1 END)
SET `status` = (CASE WHEN
corp_
id = #{corpId} THEN 0 ELSE 1 END)
</update>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录