Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
仟微科技
Link Wechat
提交
beb4e67a
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,发现更多精彩内容 >>
提交
beb4e67a
编写于
10月 28, 2020
作者:
[
[zmy2771345724]
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
https://gitee.com/LinkWeChat/link-wechat
上级
3092a12b
26139dee
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
112 addition
and
231 deletion
+112
-231
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeDepartmentController.java
...nkwechat/web/controller/wecom/WeDepartmentController.java
+3
-2
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeUserController.java
...com/linkwechat/web/controller/wecom/WeUserController.java
+3
-3
linkwe-ui/src/assets/image/vote-code.png
linkwe-ui/src/assets/image/vote-code.png
+0
-0
linkwe-ui/src/views/contacts/organization.vue
linkwe-ui/src/views/contacts/organization.vue
+2
-2
linkwe-ui/src/views/customerManage/groupDetail.vue
linkwe-ui/src/views/customerManage/groupDetail.vue
+3
-3
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/WeMaterial.java
...src/main/java/com/linkwechat/wecom/domain/WeMaterial.java
+0
-20
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/vo/WeAllocateCustomersVo.java
...com/linkwechat/wecom/domain/vo/WeAllocateCustomersVo.java
+25
-0
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/vo/WeMaterialFileVO.java
...java/com/linkwechat/wecom/domain/vo/WeMaterialFileVO.java
+0
-10
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeDepartmentService.java
...va/com/linkwechat/wecom/service/IWeDepartmentService.java
+7
-21
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeDepartmentServiceImpl.java
...inkwechat/wecom/service/impl/WeDepartmentServiceImpl.java
+37
-43
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeMaterialServiceImpl.java
.../linkwechat/wecom/service/impl/WeMaterialServiceImpl.java
+1
-11
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeUserServiceImpl.java
.../com/linkwechat/wecom/service/impl/WeUserServiceImpl.java
+8
-2
linkwe-wecom/src/main/resources/mapper/wecom/WeGroupMapper.xml
...e-wecom/src/main/resources/mapper/wecom/WeGroupMapper.xml
+3
-68
linkwe-wecom/src/main/resources/mapper/wecom/WeMaterialMapper.xml
...ecom/src/main/resources/mapper/wecom/WeMaterialMapper.xml
+1
-41
linkwe-wecom/src/main/resources/mapper/wecom/WeUserMapper.xml
...we-wecom/src/main/resources/mapper/wecom/WeUserMapper.xml
+19
-5
未找到文件。
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeDepartmentController.java
浏览文件 @
beb4e67a
...
@@ -69,15 +69,16 @@ public class WeDepartmentController extends BaseController
...
@@ -69,15 +69,16 @@ public class WeDepartmentController extends BaseController
weDepartmentService
.
updateWeDepartment
(
weDepartment
);
weDepartmentService
.
updateWeDepartment
(
weDepartment
);
return
AjaxResult
.
success
();
return
AjaxResult
.
success
();
}
}
//
// /**
// /**
// * 删除企业微信组织架构相关
// * 删除企业微信组织架构相关
// */
// */
// @PreAuthorize("@ss.hasPermi('wecom:department:remove')")
// @PreAuthorize("@ss.hasPermi('wecom:department:remove')")
// @Log(title = "企业微信组织架构相关", businessType = BusinessType.DELETE)
// @Log(title = "企业微信组织架构相关", businessType = BusinessType.DELETE)
// @DeleteMapping("/{ids}")
// @DeleteMapping("/{ids}")
// public AjaxResult remove(@PathVariable
Lo
ng[] ids)
// public AjaxResult remove(@PathVariable
Stri
ng[] ids)
// {
// {
// return toAjax(weDepartmentService.deleteWeDepartmentByIds(ids));
// return toAjax(weDepartmentService.deleteWeDepartmentByIds(ids));
// }
// }
}
}
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeUserController.java
浏览文件 @
beb4e67a
...
@@ -116,8 +116,8 @@ public class WeUserController extends BaseController {
...
@@ -116,8 +116,8 @@ public class WeUserController extends BaseController {
public
TableDataInfo
leaveUserAllocateList
(
WeLeaveUserVo
weLeaveUserVo
)
{
public
TableDataInfo
leaveUserAllocateList
(
WeLeaveUserVo
weLeaveUserVo
)
{
startPage
();
startPage
();
weLeaveUserVo
.
setIsActivate
(
WeConstans
.
WE_USER_IS_LEAVE
);
weLeaveUserVo
.
setIsActivate
(
WeConstans
.
WE_USER_IS_LEAVE
);
weLeaveUserVo
.
setIsAllocate
(
WeConstans
.
LEAVE_ALLOCATE_STATE
);
weLeaveUserVo
.
setIsAllocate
(
WeConstans
.
LEAVE_ALLOCATE_STATE
);
List
<
WeLeaveUserVo
>
list
=
this
.
weUserService
.
leave
No
AllocateUserList
(
weLeaveUserVo
);
List
<
WeLeaveUserVo
>
list
=
this
.
weUserService
.
leaveAllocateUserList
(
weLeaveUserVo
);
return
getDataTable
(
list
);
return
getDataTable
(
list
);
}
}
...
@@ -147,7 +147,7 @@ public class WeUserController extends BaseController {
...
@@ -147,7 +147,7 @@ public class WeUserController extends BaseController {
@PutMapping
({
"/allocateLeaveUserAboutData"
})
@PutMapping
({
"/allocateLeaveUserAboutData"
})
public
AjaxResult
allocateLeaveUserAboutData
(
@RequestBody
WeLeaveUserInfoAllocateVo
weLeaveUserInfoAllocateVo
)
{
public
AjaxResult
allocateLeaveUserAboutData
(
@RequestBody
WeLeaveUserInfoAllocateVo
weLeaveUserInfoAllocateVo
)
{
weUserService
.
allocateLeaveUserAboutData
(
weLeaveUserInfoAllocateVo
);
weUserService
.
allocateLeaveUserAboutData
(
weLeaveUserInfoAllocateVo
);
return
AjaxResult
.
success
(
"离职分配成功"
);
return
AjaxResult
.
success
(
"离职分配成功"
);
}
}
...
...
linkwe-ui/src/assets/image/vote-code.png
0 → 100644
浏览文件 @
beb4e67a
3.7 KB
linkwe-ui/src/views/contacts/organization.vue
浏览文件 @
beb4e67a
...
@@ -138,8 +138,8 @@ export default {
...
@@ -138,8 +138,8 @@ export default {
this
.
loading
=
false
;
this
.
loading
=
false
;
});
});
},
},
handleNodeClick
(
data
,
node
)
{
handleNodeClick
(
data
)
{
this
.
query
.
department
=
data
.
id
;
data
.
id
!=
1
&&
(
this
.
query
.
department
=
data
.
id
)
;
this
.
getList
(
1
);
this
.
getList
(
1
);
},
},
edit
(
data
,
type
)
{
edit
(
data
,
type
)
{
...
...
linkwe-ui/src/views/customerManage/groupDetail.vue
浏览文件 @
beb4e67a
...
@@ -42,9 +42,9 @@ export default {
...
@@ -42,9 +42,9 @@ export default {
};
};
},
},
created
()
{
created
()
{
this
.
getList
();
this
.
group
=
this
.
$route
.
query
;
this
.
group
=
this
.
$route
.
query
;
this
.
query
.
groupId
=
this
.
group
.
id
;
this
.
query
.
chatId
=
this
.
group
.
chatId
;
this
.
getList
();
},
},
methods
:
{
methods
:
{
getList
(
page
)
{
getList
(
page
)
{
...
@@ -143,7 +143,7 @@ export default {
...
@@ -143,7 +143,7 @@ export default {
</el-input>
</el-input>
<el-table
v-loading=
"loading"
:data=
"list"
@
selection-change=
"handleSelectionChange"
>
<el-table
v-loading=
"loading"
:data=
"list"
@
selection-change=
"handleSelectionChange"
>
<!--
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
-->
<!--
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
-->
<el-table-column
label=
"群成员"
align=
"center"
prop=
"
operId
"
>
<el-table-column
label=
"群成员"
align=
"center"
prop=
"
memberName
"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
memberName
}}
{{
scope
.
row
.
memberName
}}
<!--
<span
<!--
<span
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/WeMaterial.java
浏览文件 @
beb4e67a
...
@@ -41,26 +41,6 @@ public class WeMaterial extends BaseEntity {
...
@@ -41,26 +41,6 @@ public class WeMaterial extends BaseEntity {
*/
*/
private
String
digest
;
private
String
digest
;
/**
* 媒体id
*/
private
String
materialMediaId
;
/**
* 媒体文件上传时间戳
*/
private
String
materialCreatedAt
;
/**
* 视频封面媒体id
*/
private
String
coverMediaId
;
/**
* 视频封面媒体文件上传时间戳
*/
private
String
coverCreatedAt
;
/**
/**
* 封面本地资源文件
* 封面本地资源文件
*/
*/
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/vo/WeAllocateCustomersVo.java
0 → 100644
浏览文件 @
beb4e67a
package
com.linkwechat.wecom.domain.vo
;
import
lombok.Data
;
import
java.util.Date
;
/**
* @description: 已分配员工信息
* @author: HaoN
* @create: 2020-10-28 00:13
**/
@Data
public
class
WeAllocateCustomersVo
{
/**客户名称*/
private
String
customerName
;
/**接替人名称*/
private
String
takeUserName
;
/**分配时间*/
private
Date
allocateTime
;
/**接替人所在部门*/
private
String
department
;
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/vo/WeMaterialFileVO.java
浏览文件 @
beb4e67a
...
@@ -20,14 +20,4 @@ public class WeMaterialFileVO {
...
@@ -20,14 +20,4 @@ public class WeMaterialFileVO {
*/
*/
private
String
materialUrl
;
private
String
materialUrl
;
/**
* 媒体id
*/
private
String
materialMediaId
;
/**
* 媒体文件上传时间戳
*/
private
Long
materialCreatedAt
;
}
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeDepartmentService.java
浏览文件 @
beb4e67a
...
@@ -14,13 +14,6 @@ import org.apache.ibatis.annotations.Param;
...
@@ -14,13 +14,6 @@ import org.apache.ibatis.annotations.Param;
*/
*/
public
interface
IWeDepartmentService
extends
IService
<
WeDepartment
>
public
interface
IWeDepartmentService
extends
IService
<
WeDepartment
>
{
{
/**
* 查询企业微信组织架构相关
*
* @param id 企业微信组织架构相关ID
* @return 企业微信组织架构相关
*/
public
WeDepartment
selectWeDepartmentById
(
Long
id
);
/**
/**
* 查询企业微信组织架构相关列表
* 查询企业微信组织架构相关列表
...
@@ -47,23 +40,16 @@ public interface IWeDepartmentService extends IService<WeDepartment>
...
@@ -47,23 +40,16 @@ public interface IWeDepartmentService extends IService<WeDepartment>
/**
* 批量保存
* @param weDepartments
* @return
*/
public
int
batchInsertWeDepartment
(
List
<
WeDepartment
>
weDepartments
);
/**
* 删除部门表所有数据
* @return
*/
public
int
deleteAllWeDepartment
();
/**
/**
* 同步部门
* 同步部门
*/
*/
public
List
<
WeDepartment
>
synchWeDepartment
();
public
List
<
WeDepartment
>
synchWeDepartment
();
// /**
// * 根据部门id删除部门
// * @param ids
// */
// public void deleteWeDepartmentByIds(String[] ids);
}
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeDepartmentServiceImpl.java
浏览文件 @
beb4e67a
...
@@ -2,6 +2,8 @@ package com.linkwechat.wecom.service.impl;
...
@@ -2,6 +2,8 @@ package com.linkwechat.wecom.service.impl;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.collection.ListUtil
;
import
cn.hutool.core.collection.ListUtil
;
import
cn.hutool.core.util.ArrayUtil
;
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.HttpStatus
;
import
com.linkwechat.common.constant.HttpStatus
;
import
com.linkwechat.common.constant.WeConstans
;
import
com.linkwechat.common.constant.WeConstans
;
...
@@ -10,10 +12,12 @@ import com.linkwechat.common.utils.SnowFlakeUtil;
...
@@ -10,10 +12,12 @@ import com.linkwechat.common.utils.SnowFlakeUtil;
import
com.linkwechat.common.utils.bean.BeanUtils
;
import
com.linkwechat.common.utils.bean.BeanUtils
;
import
com.linkwechat.wecom.client.WeDepartMentClient
;
import
com.linkwechat.wecom.client.WeDepartMentClient
;
import
com.linkwechat.wecom.domain.WeDepartment
;
import
com.linkwechat.wecom.domain.WeDepartment
;
import
com.linkwechat.wecom.domain.WeUser
;
import
com.linkwechat.wecom.domain.dto.WeDepartMentDto
;
import
com.linkwechat.wecom.domain.dto.WeDepartMentDto
;
import
com.linkwechat.wecom.domain.dto.WeResultDto
;
import
com.linkwechat.wecom.domain.dto.WeResultDto
;
import
com.linkwechat.wecom.mapper.WeDepartmentMapper
;
import
com.linkwechat.wecom.mapper.WeDepartmentMapper
;
import
com.linkwechat.wecom.service.IWeDepartmentService
;
import
com.linkwechat.wecom.service.IWeDepartmentService
;
import
com.linkwechat.wecom.service.IWeUserService
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.ListUtils
;
import
org.apache.commons.collections4.ListUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -39,18 +43,11 @@ public class WeDepartmentServiceImpl extends ServiceImpl<WeDepartmentMapper,WeDe
...
@@ -39,18 +43,11 @@ public class WeDepartmentServiceImpl extends ServiceImpl<WeDepartmentMapper,WeDe
private
WeDepartMentClient
weDepartMentClient
;
private
WeDepartMentClient
weDepartMentClient
;
@Autowired
private
IWeUserService
weUserService
;
/**
* 查询企业微信组织架构相关
*
* @param id 企业微信组织架构相关ID
* @return 企业微信组织架构相关
*/
@Override
public
WeDepartment
selectWeDepartmentById
(
Long
id
)
{
return
weDepartmentMapper
.
selectWeDepartmentById
(
id
);
}
/**
/**
* 查询企业微信组织架构相关列表
* 查询企业微信组织架构相关列表
...
@@ -121,38 +118,6 @@ public class WeDepartmentServiceImpl extends ServiceImpl<WeDepartmentMapper,WeDe
...
@@ -121,38 +118,6 @@ public class WeDepartmentServiceImpl extends ServiceImpl<WeDepartmentMapper,WeDe
this
.
updateById
(
weDepartment
);
this
.
updateById
(
weDepartment
);
}
}
// int returnCode=weDepartmentMapper.updateWeDepartment(weDepartment);
// if(returnCode>0){
//
// weDepartMentClient.updateWeDepartMent(
// weDepartment.transformDeartMentDto(weDepartment)
// );
//
//
// }
//
// return returnCode;
}
/**
* 批量保存
* @param weDepartments
* @return
*/
@Override
public
int
batchInsertWeDepartment
(
List
<
WeDepartment
>
weDepartments
)
{
return
weDepartmentMapper
.
batchInsertWeDepartment
(
weDepartments
);
}
/**
* 删除部门表所有数据
* @return
*/
@Override
public
int
deleteAllWeDepartment
()
{
return
weDepartmentMapper
.
deleteAllWeDepartment
();
}
}
...
@@ -172,4 +137,33 @@ public class WeDepartmentServiceImpl extends ServiceImpl<WeDepartmentMapper,WeDe
...
@@ -172,4 +137,33 @@ public class WeDepartmentServiceImpl extends ServiceImpl<WeDepartmentMapper,WeDe
}
}
// /**
// * 根据部门id删除部门
// * @param ids
// */
// @Override
// public void deleteWeDepartmentByIds(String[] ids) {
//
// //查询当前部门下所有的子部门,如果存在,则不可以删除
// List<WeDepartment> weDepartments = this.list(new LambdaQueryWrapper<WeDepartment>()
// .in(WeDepartment::getParentId, ids));
// if(CollectionUtil.isNotEmpty(weDepartments)) {
// //抛出异常,请删除此部门下的成员或子部门后,再删除此部门
//
// }
//
//
// List<WeUser> weUsers = weUserService.selectWeUserList(WeUser.builder()
// .department(ids)
// .build());
// if(CollectionUtil.isNotEmpty(weUsers)){
// //该部门存在子部门或成员无法删除
//
// }
//
//
//
// }
}
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeMaterialServiceImpl.java
浏览文件 @
beb4e67a
...
@@ -30,9 +30,6 @@ import java.util.Optional;
...
@@ -30,9 +30,6 @@ import java.util.Optional;
@Service
@Service
public
class
WeMaterialServiceImpl
implements
IWeMaterialService
{
public
class
WeMaterialServiceImpl
implements
IWeMaterialService
{
@Autowired
private
WeMediaClient
weMediaClient
;
@Autowired
@Autowired
private
WeMaterialMapper
weMaterialMapper
;
private
WeMaterialMapper
weMaterialMapper
;
@Autowired
@Autowired
...
@@ -56,15 +53,8 @@ public class WeMaterialServiceImpl implements IWeMaterialService {
...
@@ -56,15 +53,8 @@ public class WeMaterialServiceImpl implements IWeMaterialService {
if
(!
mediaType
.
isPresent
())
{
if
(!
mediaType
.
isPresent
())
{
throw
new
WeComException
(
"媒体类型出错!"
);
throw
new
WeComException
(
"媒体类型出错!"
);
}
}
WeMediaDto
mediaDto
=
weMediaClient
.
upload
(
file
,
mediaType
.
get
().
getMediaType
());
if
(!
WeConstans
.
WE_SUCCESS_CODE
.
equals
(
mediaDto
.
getErrcode
()))
{
throw
new
WeComException
(
"临时素材上传失败!"
);
}
//构造返回结果
//构造返回结果
WeMaterialFileVO
weMaterialFileVO
return
WeMaterialFileVO
.
builder
().
materialUrl
(
url
).
materialName
(
file
.
getOriginalFilename
()).
build
();
=
WeMaterialFileVO
.
builder
().
materialUrl
(
url
).
materialMediaId
(
mediaDto
.
getMedia_id
())
.
materialCreatedAt
(
mediaDto
.
getCreated_at
()).
materialName
(
file
.
getOriginalFilename
()).
build
();
return
weMaterialFileVO
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
WeComException
(
"临时素材上传失败!"
);
throw
new
WeComException
(
"临时素材上传失败!"
);
}
}
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeUserServiceImpl.java
浏览文件 @
beb4e67a
...
@@ -153,7 +153,7 @@ public class WeUserServiceImpl extends ServiceImpl<WeUserMapper,WeUser> implemen
...
@@ -153,7 +153,7 @@ public class WeUserServiceImpl extends ServiceImpl<WeUserMapper,WeUser> implemen
*/
*/
@Override
@Override
public
List
<
WeLeaveUserVo
>
leaveAllocateUserList
(
WeLeaveUserVo
weLeaveUserVo
)
{
public
List
<
WeLeaveUserVo
>
leaveAllocateUserList
(
WeLeaveUserVo
weLeaveUserVo
)
{
return
null
;
return
this
.
baseMapper
.
leaveAllocateUserList
(
weLeaveUserVo
)
;
}
}
...
@@ -171,6 +171,12 @@ public class WeUserServiceImpl extends ServiceImpl<WeUserMapper,WeUser> implemen
...
@@ -171,6 +171,12 @@ public class WeUserServiceImpl extends ServiceImpl<WeUserMapper,WeUser> implemen
//分配群组
//分配群组
iWeGroupService
.
allocateWeGroup
(
weLeaveUserInfoAllocateVo
);
iWeGroupService
.
allocateWeGroup
(
weLeaveUserInfoAllocateVo
);
//更新员工状态为已分配
this
.
updateById
(
WeUser
.
builder
()
.
userId
(
weLeaveUserInfoAllocateVo
.
getHandoverUserid
())
.
isAllocate
(
WeConstans
.
LEAVE_ALLOCATE_STATE
)
.
build
());
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
throw
new
WeComException
(
e
.
getMessage
());
throw
new
WeComException
(
e
.
getMessage
());
}
}
...
@@ -211,7 +217,7 @@ public class WeUserServiceImpl extends ServiceImpl<WeUserMapper,WeUser> implemen
...
@@ -211,7 +217,7 @@ public class WeUserServiceImpl extends ServiceImpl<WeUserMapper,WeUser> implemen
weUsers
.
add
(
weUsers
.
add
(
WeUser
.
builder
()
WeUser
.
builder
()
.
userId
(
k
)
.
userId
(
k
)
.
enabl
e
(
WeConstans
.
WE_USER_IS_LEAVE
)
.
isActivat
e
(
WeConstans
.
WE_USER_IS_LEAVE
)
.
dimissionTime
(
new
Date
())
.
dimissionTime
(
new
Date
())
.
build
()
.
build
()
);
);
...
...
linkwe-wecom/src/main/resources/mapper/wecom/WeGroupMapper.xml
浏览文件 @
beb4e67a
...
@@ -12,81 +12,16 @@
...
@@ -12,81 +12,16 @@
wg.create_time,
wg.create_time,
wg.notice,
wg.notice,
wu.user_name as groupLeaderName,
wu.user_name as groupLeaderName,
(SELECT COUNT(*) FROM we_group_member wgm WHERE wgm.chat_id=wg.chat_id) as memberNum
(SELECT COUNT(*) FROM we_group_member wgm WHERE wgm.chat_id=wg.chat_id) as memberNum,
wg.status
FROM
FROM
we_group wg
we_group wg
INNER
JOIN we_user wu ON wg.`owner`=wu.user_id
LEFT
JOIN we_user wu ON wg.`owner`=wu.user_id
<where>
<where>
<if
test=
"groupName != null and groupName != ''"
>
and wg.group_name like concat('%', #{groupName}, '%')
</if>
<if
test=
"groupName != null and groupName != ''"
>
and wg.group_name like concat('%', #{groupName}, '%')
</if>
<if
test=
"owner != null and owner != ''"
>
and owner = #{owner}
</if>
<if
test=
"owner != null and owner != ''"
>
and owner = #{owner}
</if>
</where>
</where>
</select>
</select>
<!-- <select id="selectWeGroupById" parameterType="Long" resultMap="WeGroupResult">-->
<!-- <include refid="selectWeGroupVo"/>-->
<!-- where id = #{id}-->
<!-- </select>-->
<!-- <insert id="insertWeGroup" parameterType="WeGroup">-->
<!-- insert into we_group-->
<!-- <trim prefix="(" suffix=")" suffixOverrides=",">-->
<!-- <if test="id != null">id,</if>-->
<!-- <if test="groupName != null">group_name,</if>-->
<!-- <if test="memberNum != null">member_num,</if>-->
<!-- <if test="groupLeader != null">group_leader,</if>-->
<!-- <if test="createTime != null">create_time,</if>-->
<!-- <if test="notice != null">notice,</if>-->
<!-- <if test="groupLeaderUserId != null and groupLeaderUserId !=''">group_leader_user_id,</if>-->
<!-- </trim>-->
<!-- <trim prefix="values (" suffix=")" suffixOverrides=",">-->
<!-- <if test="id != null">#{id},</if>-->
<!-- <if test="groupName != null">#{groupName},</if>-->
<!-- <if test="memberNum != null">#{memberNum},</if>-->
<!-- <if test="groupLeader != null">#{groupLeader},</if>-->
<!-- <if test="createTime != null">#{createTime},</if>-->
<!-- <if test="notice != null">#{notice},</if>-->
<!-- <if test="groupLeaderUserId != null and groupLeaderUserId !=''">#{groupLeaderUserId},</if>-->
<!-- </trim>-->
<!-- </insert>-->
<!-- <update id="updateWeGroup" parameterType="WeGroup">-->
<!-- update we_group-->
<!-- <trim prefix="SET" suffixOverrides=",">-->
<!-- <if test="groupName != null">group_name = #{groupName},</if>-->
<!-- <if test="memberNum != null">member_num = #{memberNum},</if>-->
<!-- <if test="groupLeader != null">group_leader = #{groupLeader},</if>-->
<!-- <if test="createTime != null">create_time = #{createTime},</if>-->
<!-- <if test="notice != null">notice = #{notice},</if>-->
<!-- <if test="groupLeaderUserId != null and groupLeaderUserId !=''">group_leader_user_id =#{groupLeaderUserId},</if>-->
<!-- </trim>-->
<!-- where id = #{id}-->
<!-- </update>-->
<!-- <delete id="deleteWeGroupById" parameterType="Long">-->
<!-- delete from we_group where id = #{id}-->
<!-- </delete>-->
<!-- <delete id="deleteWeGroupByIds" parameterType="String">-->
<!-- delete from we_group where id in-->
<!-- <foreach item="id" collection="array" open="(" separator="," close=")">-->
<!-- #{id}-->
<!-- </foreach>-->
<!-- </delete>-->
<!-- <update id="batchLogicDeleteByIds" parameterType="String">-->
<!-- update we_group set del_flag=2-->
<!-- where id in-->
<!-- <foreach item="id" collection="ids" open="(" separator="," close=")">-->
<!-- #{id}-->
<!-- </foreach>-->
<!-- </update>-->
<!-- <insert id="batchInsetWeGroup" >-->
<!-- insert into we_group (id, group_name, member_num, group_leader, create_time, notice, group_leader_user_id)-->
<!-- values-->
<!-- <foreach collection="weGroups" item="weGroup" index="index" separator=",">-->
<!-- (#{weGroup.id},#{weGroup.groupName},#{weGroup.memberNum},#{weGroup.groupLeader},#{weGroup.createTime},#{weGroup.notice},#{weGroup.groupLeaderUserId})-->
<!-- </foreach>-->
<!-- </insert>-->
</mapper>
</mapper>
\ No newline at end of file
linkwe-wecom/src/main/resources/mapper/wecom/WeMaterialMapper.xml
浏览文件 @
beb4e67a
...
@@ -11,10 +11,6 @@
...
@@ -11,10 +11,6 @@
<result
property=
"content"
column=
"content"
/>
<result
property=
"content"
column=
"content"
/>
<result
property=
"materialName"
column=
"material_name"
/>
<result
property=
"materialName"
column=
"material_name"
/>
<result
property=
"digest"
column=
"digest"
/>
<result
property=
"digest"
column=
"digest"
/>
<result
property=
"materialMediaId"
column=
"material_media_id"
/>
<result
property=
"materialCreatedAt"
column=
"material_created_at"
/>
<result
property=
"coverMediaId"
column=
"cover_media_id"
/>
<result
property=
"coverCreatedAt"
column=
"cover_created_at"
/>
<result
property=
"coverUrl"
column=
"cover_url"
/>
<result
property=
"coverUrl"
column=
"cover_url"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"createTime"
column=
"create_time"
/>
...
@@ -44,18 +40,6 @@
...
@@ -44,18 +40,6 @@
<if
test=
"digest!=null"
>
<if
test=
"digest!=null"
>
digest,
digest,
</if>
</if>
<if
test=
"materialMediaId!=null"
>
material_media_id,
</if>
<if
test=
"materialCreatedAt!=null"
>
material_created_at,
</if>
<if
test=
"coverMediaId!=null"
>
cover_media_id,
</if>
<if
test=
"coverCreatedAt!=null"
>
cover_created_at,
</if>
<if
test=
"coverUrl!=null"
>
<if
test=
"coverUrl!=null"
>
cover_url,
cover_url,
</if>
</if>
...
@@ -92,18 +76,6 @@
...
@@ -92,18 +76,6 @@
<if
test=
"digest!=null"
>
<if
test=
"digest!=null"
>
#{digest},
#{digest},
</if>
</if>
<if
test=
"materialMediaId!=null"
>
#{materialMediaId},
</if>
<if
test=
"materialCreatedAt!=null"
>
#{materialCreatedAt},
</if>
<if
test=
"coverMediaId!=null"
>
#{coverMediaId},
</if>
<if
test=
"coverCreatedAt!=null"
>
#{coverCreatedAt},
</if>
<if
test=
"coverUrl!=null"
>
<if
test=
"coverUrl!=null"
>
#{coverUrl},
#{coverUrl},
</if>
</if>
...
@@ -142,18 +114,6 @@
...
@@ -142,18 +114,6 @@
<if
test=
"digest!=null"
>
<if
test=
"digest!=null"
>
digest=#{digest},
digest=#{digest},
</if>
</if>
<if
test=
"materialMediaId!=null"
>
material_media_id=#{materialMediaId},
</if>
<if
test=
"materialCreatedAt!=null"
>
material_created_at=#{materialCreatedAt},
</if>
<if
test=
"coverMediaId!=null"
>
cover_media_id=#{coverMediaId},
</if>
<if
test=
"coverCreatedAt!=null"
>
cover_created_at=#{coverCreatedAt},
</if>
<if
test=
"coverUrl!=null"
>
<if
test=
"coverUrl!=null"
>
cover_url=#{coverUrl},
cover_url=#{coverUrl},
</if>
</if>
...
@@ -215,7 +175,7 @@
...
@@ -215,7 +175,7 @@
</select>
</select>
<sql
id=
"material"
>
<sql
id=
"material"
>
id,category_id,material_url,content,material_name,digest,
material_media_id,material_created_at,cover_media_id,cover_created_at,
cover_url,create_by,create_time,update_by,update_time
id,category_id,material_url,content,material_name,digest,cover_url,create_by,create_time,update_by,update_time
</sql>
</sql>
</mapper>
</mapper>
\ No newline at end of file
linkwe-wecom/src/main/resources/mapper/wecom/WeUserMapper.xml
浏览文件 @
beb4e67a
...
@@ -43,7 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -43,7 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"mobile != null and mobile != ''"
>
and mobile = #{mobile}
</if>
<if
test=
"mobile != null and mobile != ''"
>
and mobile = #{mobile}
</if>
<if
test=
"email != null and email != ''"
>
and email = #{email}
</if>
<if
test=
"email != null and email != ''"
>
and email = #{email}
</if>
<if
test=
"wxAccount != null and wxAccount != ''"
>
and wx_account = #{wxAccount}
</if>
<if
test=
"wxAccount != null and wxAccount != ''"
>
and wx_account = #{wxAccount}
</if>
<if
test=
"department != null and department
!= '' and department != '1'
"
>
and FIND_IN_SET(#{department},department)
</if>
<if
test=
"department != null and department
.length > 0
"
>
and FIND_IN_SET(#{department},department)
</if>
<if
test=
"position != null and position != ''"
>
and position = #{position}
</if>
<if
test=
"position != null and position != ''"
>
and position = #{position}
</if>
<if
test=
"isLeaderInDept != null "
>
and is_leader_in_dept = #{isLeaderInDept}
</if>
<if
test=
"isLeaderInDept != null "
>
and is_leader_in_dept = #{isLeaderInDept}
</if>
<if
test=
"joinTime != null "
>
and join_time = #{joinTime}
</if>
<if
test=
"joinTime != null "
>
and join_time = #{joinTime}
</if>
...
@@ -164,12 +164,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -164,12 +164,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT
SELECT
wu.user_id,
wu.user_id,
wu.user_name,
wu.user_name,
wu.dimission_time,
(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,
(SELECT COUNT(*) FROM we_allocate_customer wac WHERE wac.handover_userid=wu.user_id) as allocateCustomerNum,
(SELECT COUNT(*) FROM we_allocate_customer wac WHERE wac.handover_userid=wu.user_id) as allocateCustomerNum,
(SELECT COUNT(*) FROM we_allocate_group wag WHERE wag.old_owner=wu.user_id) as allocateGroupNum,
(SELECT COUNT(*) FROM we_allocate_group wag WHERE wag.old_owner=wu.user_id) as allocateGroupNum
wu.dimission_time
FROM we_user wu
FROM
we_user wu
<where>
<where>
<if
test=
"userName != null and userName !=''"
>
and wu.user_name=#{userName}
</if>
<if
test=
"userName != null and userName !=''"
>
and wu.user_name=#{userName}
</if>
<if
test=
"beginTime != null and beginTime !='' and endTime != null and endTime !=''"
>
<if
test=
"beginTime != null and beginTime !='' and endTime != null and endTime !=''"
>
...
@@ -218,6 +217,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -218,6 +217,21 @@ 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>-->
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录