Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
仟微科技
Link Wechat
提交
7b9ac956
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,发现更多精彩内容 >>
提交
7b9ac956
编写于
10月 28, 2020
作者:
水
水库浪子
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改离职分配相关bug
上级
89d2b0cd
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
174 addition
and
14 deletion
+174
-14
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeUserController.java
...com/linkwechat/web/controller/wecom/WeUserController.java
+29
-0
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/vo/WeAllocateCustomersVo.java
...com/linkwechat/wecom/domain/vo/WeAllocateCustomersVo.java
+8
-2
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/vo/WeAllocateGroupsVo.java
...va/com/linkwechat/wecom/domain/vo/WeAllocateGroupsVo.java
+37
-0
linkwe-wecom/src/main/java/com/linkwechat/wecom/mapper/WeUserMapper.java
...c/main/java/com/linkwechat/wecom/mapper/WeUserMapper.java
+19
-0
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeUserService.java
...ain/java/com/linkwechat/wecom/service/IWeUserService.java
+18
-0
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeUserServiceImpl.java
.../com/linkwechat/wecom/service/impl/WeUserServiceImpl.java
+24
-0
linkwe-wecom/src/main/resources/mapper/wecom/WeUserMapper.xml
...we-wecom/src/main/resources/mapper/wecom/WeUserMapper.xml
+39
-12
未找到文件。
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeUserController.java
浏览文件 @
7b9ac956
...
...
@@ -7,6 +7,8 @@ import com.linkwechat.common.core.domain.AjaxResult;
import
com.linkwechat.common.core.page.TableDataInfo
;
import
com.linkwechat.common.enums.BusinessType
;
import
com.linkwechat.wecom.domain.WeUser
;
import
com.linkwechat.wecom.domain.vo.WeAllocateCustomersVo
;
import
com.linkwechat.wecom.domain.vo.WeAllocateGroupsVo
;
import
com.linkwechat.wecom.domain.vo.WeLeaveUserInfoAllocateVo
;
import
com.linkwechat.wecom.domain.vo.WeLeaveUserVo
;
import
com.linkwechat.wecom.service.IWeCustomerService
;
...
...
@@ -184,6 +186,33 @@ public class WeUserController extends BaseController {
}
/**
* 获取历史分配记录的成员
* @param weAllocateCustomersVo
* @return
*/
@PreAuthorize
(
"@ss.hasPermi('wecom:user:getAllocateCustomers')"
)
@GetMapping
({
"/getAllocateCustomers"
})
public
TableDataInfo
getAllocateCustomers
(
WeAllocateCustomersVo
weAllocateCustomersVo
){
startPage
();
List
<
WeAllocateCustomersVo
>
list
=
weUserService
.
getAllocateCustomers
(
weAllocateCustomersVo
);
return
getDataTable
(
list
);
}
/**
* 获取历史分配记录的群
* @param weAllocateGroupsVo
* @return
*/
@PreAuthorize
(
"@ss.hasPermi('wecom:user:getAllocateGroups')"
)
@GetMapping
({
"/getAllocateGroups"
})
public
TableDataInfo
getAllocateGroups
(
WeAllocateGroupsVo
weAllocateGroupsVo
){
startPage
();
List
<
WeAllocateGroupsVo
>
list
=
weUserService
.
getAllocateGroups
(
weAllocateGroupsVo
);
return
getDataTable
(
list
);
}
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/vo/WeAllocateCustomersVo.java
浏览文件 @
7b9ac956
package
com.linkwechat.wecom.domain.vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.linkwechat.common.core.domain.BaseEntity
;
import
lombok.Data
;
import
java.util.Date
;
/**
* @description: 已分配
员工
信息
* @description: 已分配
客户
信息
* @author: HaoN
* @create: 2020-10-28 00:13
**/
@Data
public
class
WeAllocateCustomersVo
{
public
class
WeAllocateCustomersVo
extends
BaseEntity
{
/**客户名称*/
private
String
customerName
;
...
...
@@ -18,8 +20,12 @@ public class WeAllocateCustomersVo {
private
String
takeUserName
;
/**分配时间*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
allocateTime
;
/**接替人所在部门*/
private
String
department
;
/**原拥有着*/
private
String
handoverUserId
;
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/vo/WeAllocateGroupsVo.java
0 → 100644
浏览文件 @
7b9ac956
package
com.linkwechat.wecom.domain.vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.linkwechat.common.core.domain.BaseEntity
;
import
lombok.Data
;
import
java.util.Date
;
/**
* @description: 已分配群信息
* @author: HaoN
* @create: 2020-10-28 00:13
**/
@Data
public
class
WeAllocateGroupsVo
extends
BaseEntity
{
/**群id*/
private
String
chatId
;
/**群名称*/
private
String
groupName
;
/**群客户数量*/
private
Integer
memberNum
;
/**群主所在部门*/
private
String
department
;
/**分配时间*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
allocateTime
;
/**新群主名称*/
private
String
newOwnerName
;
/**原群主id*/
private
String
oldOwner
;
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/mapper/WeUserMapper.java
浏览文件 @
7b9ac956
...
...
@@ -2,6 +2,8 @@ package com.linkwechat.wecom.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.linkwechat.wecom.domain.WeUser
;
import
com.linkwechat.wecom.domain.vo.WeAllocateCustomersVo
;
import
com.linkwechat.wecom.domain.vo.WeAllocateGroupsVo
;
import
com.linkwechat.wecom.domain.vo.WeLeaveUserVo
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -78,4 +80,21 @@ public interface WeUserMapper extends BaseMapper<WeUser>
* @return
*/
public
int
batchInsertWeUser
(
@Param
(
"weUsers"
)
List
<
WeUser
>
weUsers
);
/**
* 获取历史分配记录的成员
* @param weAllocateCustomersVo
* @return
*/
public
List
<
WeAllocateCustomersVo
>
getAllocateCustomers
(
WeAllocateCustomersVo
weAllocateCustomersVo
);
/**
* 获取历史分配群
* @param weAllocateGroupsVo
* @return
*/
public
List
<
WeAllocateGroupsVo
>
getAllocateGroups
(
WeAllocateGroupsVo
weAllocateGroupsVo
);
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeUserService.java
浏览文件 @
7b9ac956
...
...
@@ -2,6 +2,8 @@ package com.linkwechat.wecom.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.linkwechat.wecom.domain.WeUser
;
import
com.linkwechat.wecom.domain.vo.WeAllocateCustomersVo
;
import
com.linkwechat.wecom.domain.vo.WeAllocateGroupsVo
;
import
com.linkwechat.wecom.domain.vo.WeLeaveUserInfoAllocateVo
;
import
com.linkwechat.wecom.domain.vo.WeLeaveUserVo
;
...
...
@@ -90,4 +92,20 @@ public interface IWeUserService extends IService<WeUser>
*/
void
deleteUser
(
String
[]
ids
);
/**
* 获取历史分配记录的成员
* @param weAllocateCustomersVo
* @return
*/
List
<
WeAllocateCustomersVo
>
getAllocateCustomers
(
WeAllocateCustomersVo
weAllocateCustomersVo
);
/**
* 获取历史分配群
* @param weAllocateGroupsVo
* @return
*/
List
<
WeAllocateGroupsVo
>
getAllocateGroups
(
WeAllocateGroupsVo
weAllocateGroupsVo
);
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeUserServiceImpl.java
浏览文件 @
7b9ac956
...
...
@@ -14,6 +14,8 @@ import com.linkwechat.wecom.domain.dto.LeaveWeUserListsDto;
import
com.linkwechat.wecom.domain.dto.WeDepartMentDto
;
import
com.linkwechat.wecom.domain.dto.WeUserDto
;
import
com.linkwechat.wecom.domain.dto.WeUserListDto
;
import
com.linkwechat.wecom.domain.vo.WeAllocateCustomersVo
;
import
com.linkwechat.wecom.domain.vo.WeAllocateGroupsVo
;
import
com.linkwechat.wecom.domain.vo.WeLeaveUserInfoAllocateVo
;
import
com.linkwechat.wecom.domain.vo.WeLeaveUserVo
;
import
com.linkwechat.wecom.mapper.WeUserMapper
;
...
...
@@ -232,4 +234,26 @@ public class WeUserServiceImpl extends ServiceImpl<WeUserMapper,WeUser> implemen
}
/**
* 获取历史分配记录的成员
* @param weAllocateCustomersVo
* @return
*/
@Override
public
List
<
WeAllocateCustomersVo
>
getAllocateCustomers
(
WeAllocateCustomersVo
weAllocateCustomersVo
)
{
return
this
.
baseMapper
.
getAllocateCustomers
(
weAllocateCustomersVo
);
}
/**
* 获取历史分配群
* @param weAllocateGroupsVo
* @return
*/
@Override
public
List
<
WeAllocateGroupsVo
>
getAllocateGroups
(
WeAllocateGroupsVo
weAllocateGroupsVo
)
{
return
this
.
baseMapper
.
getAllocateGroups
(
weAllocateGroupsVo
);
}
}
linkwe-wecom/src/main/resources/mapper/wecom/WeUserMapper.xml
浏览文件 @
7b9ac956
...
...
@@ -217,18 +217,45 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!-- <select id="getAllocateCustomers">-->
<!-- SELECT-->
<!-- wc.`name`,-->
<!-- wu.user_name,-->
<!-- wac.allocate_time,-->
<!-- (SELECT GROUP_CONCAT(wd.`name`) FROM we_department wd WHERE wd.id=wu.department) as department-->
<!--FROM-->
<!-- we_allocate_customer wac-->
<!--LEFT JOIN we_customer wc ON wac.external_userid=wc.external_userid-->
<!--LEFT JOIN we_user wu ON wu.user_id=wac.takeover_userid-->
<!-- -->
<!-- </select>-->
<select
id=
"getAllocateCustomers"
parameterType=
"WeAllocateCustomersVo"
resultType=
"com.linkwechat.wecom.domain.vo.WeAllocateCustomersVo"
>
SELECT
wc.`name` as customerName,
wu.user_name as takeUserName,
wac.allocate_time,
(SELECT GROUP_CONCAT(wd.`name`) FROM we_department wd WHERE wd.id=wu.department) as department
FROM
we_allocate_customer wac
LEFT JOIN we_customer wc ON wac.external_userid=wc.external_userid
LEFT JOIN we_user wu ON wu.user_id=wac.takeover_userid
<where>
<if
test=
"handoverUserId != null and handoverUserId !=''"
>
and wac.handover_userid=#{handoverUserId}
</if>
<if
test=
"beginTime != null and beginTime !='' and endTime != null and endTime !=''"
>
DATE_FORMAT(wu.dimission_time,'%Y-%m-%d') BETWEEN #{beginTime} AND #{endTime}
</if>
</where>
</select>
<select
id=
"getAllocateGroups"
parameterType=
"WeAllocateGroupsVo"
resultType=
"com.linkwechat.wecom.domain.vo.WeAllocateGroupsVo"
>
SELECT
wu.user_name as newOwnerName,
wg.chat_id,
wg.group_name,
(SELECT count(*) FROM we_group_member wgm WHERE wgm.chat_id=wg.chat_id) as memberNum,
(SELECT GROUP_CONCAT(wd.`name`) FROM we_department wd WHERE wd.id=wu.department) as department,
wag.allocate_time
FROM
we_allocate_group wag
LEFT JOIN we_group wg ON wag.chat_id=wg.chat_id
LEFT JOIN we_user wu ON wu.user_id=wag.new_owner
<where>
<if
test=
"oldOwner != null and oldOwner !=''"
>
and wag.old_owner=#{oldOwner}
</if>
<if
test=
"beginTime != null and beginTime !='' and endTime != null and endTime !=''"
>
DATE_FORMAT(wu.dimission_time,'%Y-%m-%d') BETWEEN #{beginTime} AND #{endTime}
</if>
</where>
</select>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录