Commit 96e71c76 by [zmy2771345724]

Merge branch 'master' of https://gitee.com/LinkWeChat/link-wechat

2 parents c3b5e763 5ca676df
Showing 42 changed files with 1428 additions and 139 deletions
...@@ -32,7 +32,7 @@ Node >= 10 ...@@ -32,7 +32,7 @@ Node >= 10
##### 后端运行 ##### 后端运行
- 导入LinkWeChat到Eclipse,菜单 File -> Import,然后选择 Maven -> Existing Maven Projects,点击 Next> 按钮,选择工作目录,然后点击 Finish 按钮,即可成功导入Eclipse会自动加载Maven依赖包,初次加载会比较慢(根据自身网络情况而定) - 导入IDEA中
- 创建数据库LW-vue并导入数据脚本 - 创建数据库LW-vue并导入数据脚本
- 打开运行com.linkwechat. LinkWeChatApplication.java - 打开运行com.linkwechat. LinkWeChatApplication.java
......
...@@ -53,7 +53,8 @@ public class WeDepartmentController extends BaseController ...@@ -53,7 +53,8 @@ public class WeDepartmentController extends BaseController
@ApiOperation("添加部门") @ApiOperation("添加部门")
public AjaxResult add(@Validated @RequestBody WeDepartment weDepartment) public AjaxResult add(@Validated @RequestBody WeDepartment weDepartment)
{ {
return toAjax(weDepartmentService.insertWeDepartment(weDepartment)); weDepartmentService.insertWeDepartment(weDepartment);
return AjaxResult.success();
} }
/** /**
...@@ -65,7 +66,8 @@ public class WeDepartmentController extends BaseController ...@@ -65,7 +66,8 @@ public class WeDepartmentController extends BaseController
@ApiOperation("更新部门") @ApiOperation("更新部门")
public AjaxResult edit(@RequestBody WeDepartment weDepartment) public AjaxResult edit(@RequestBody WeDepartment weDepartment)
{ {
return toAjax(weDepartmentService.updateWeDepartment(weDepartment)); weDepartmentService.updateWeDepartment(weDepartment);
return AjaxResult.success();
} }
// //
// /** // /**
......
...@@ -45,6 +45,7 @@ public class WeUserController extends BaseController { ...@@ -45,6 +45,7 @@ public class WeUserController extends BaseController {
public TableDataInfo list(WeUser weUser) public TableDataInfo list(WeUser weUser)
{ {
startPage(); startPage();
List<WeUser> list = weUserService.selectWeUserList(weUser); List<WeUser> list = weUserService.selectWeUserList(weUser);
return getDataTable(list); return getDataTable(list);
} }
......
...@@ -5,13 +5,33 @@ const service = config.services.wecom + '/user' ...@@ -5,13 +5,33 @@ const service = config.services.wecom + '/user'
* 获取离职未分配员工列表 * 获取离职未分配员工列表
* @param {*} params * @param {*} params
* { * {
* pageNum: pageNum:
pageSize: pageSize:
userName:离职人员名称 beginTime:
beginTime:} endTime:
userName:
}
*/ */
export function getList(params) { export function getList(params) {
return request({ return request({
url: service + '/leaveUserAllocateList',
params
})
}
/**
* 获取离职已分配员工列表
* @param {*} params
* {
pageNum:
pageSize:
beginTime:
endTime:
userName:
}
*/
export function getListNo(params) {
return request({
url: service + '/leaveUserNoAllocateList', url: service + '/leaveUserNoAllocateList',
params params
}) })
......
...@@ -35,3 +35,13 @@ export function getMembers(params) { ...@@ -35,3 +35,13 @@ export function getMembers(params) {
params params
}) })
} }
/**
* 客户群同步接口
*/
export function sync() {
return request({
url: service + '/chat/synchWeGroup',
})
}
<style lang="scss" scoped>
.el-card-inner {
h4 {
margin: 12px 0 24px;
}
p {
font-size: 14px;
color: #606266 !important;
margin-bottom: 13px;
padding: 0;
margin: 1em 0;
}
.upload-desc {
align-items: start;
}
}
</style>
<template>
<div>
<el-card shadow="never">
<div class="el-card-inner">
<h4>创建自建应用并设置应用主页</h4>
<p>
请在企业微信官方后台“应用管理-自建应用”(
<el-link
type="primary"
href="https://work.weixin.qq.com/wework_admin/loginpage_wx?redirect_uri=https://work.weixin.qq.com/wework_admin/frame#apps"
target="_blank"
>官方后台链接</el-link>)创建自建应用用于聊天工具栏。
</p>
<p>
然后在“客户联系-配置-聊天工具栏管理”(
<el-link
type="primary"
href="https://work.weixin.qq.com/wework_admin/loginpage_wx?redirect_uri=https://work.weixin.qq.com/wework_admin/frame#apps"
target="_blank"
>官方后台链接</el-link>)的配置应用页面,选择该应用并将以下网址链接复制并设置为自定义应用主页。
<el-button type="text">查看图示讲解</el-button>
</p>
<span>访问地址</span>
<el-input v-model="jio" disabled style="width: 350px; margin: 0px 15px;" placeholder></el-input>
<el-button type="primary">复制链接地址</el-button>
<p>请将该链接设置为聊天工具栏应用主页,用于聊天工具栏页面访问。否则无法正常使用聊天工具栏</p>
</div>
</el-card>
<el-card shadow="never">
<div class="el-card-inner">
<h4>设置应用可信域名</h4>
<p>
请在企业微信官方后台“应用管理-自建应用”(
<el-link
type="primary"
href="https://work.weixin.qq.com/wework_admin/loginpage_wx?redirect_uri=https://work.weixin.qq.com/wework_admin/frame#apps"
target="_blank"
>官方后台链接</el-link>),打开用于聊天工具栏的应用设置页,将qw.wshoto.com设置为可信域名,并下载校验文件保存到电脑本地后,在此处上传。
<button
type="button"
class="el-button el-button--text el-button--medium"
>
<!---->
<!---->
<span>查看图示讲解</span>
</button>
</p>
<p class="upload-desc flex">
<span style="float: left;">上传校验文件:</span>
<el-upload
action
on-preview
on-remove
before-remove
multiple
limit="3"
on-exceed
:file-list="[{name: 'name', url: 'url'}]"
>
<el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">请上传txt格式的校验文件,用于完成域名归属验证。否则无法正常使用聊天工具栏</div>
</el-upload>
</p>
</div>
</el-card>
<div class="ac">
<el-checkbox v-model="d" >已配置好聊天工具栏应用主页和应用可信域名</el-checkbox>
<div><el-button type="primary">完成配置,去抓取素材</el-button></div>
</div>
</div>
</template>
<script>
export default {
components: {},
props: {},
data() {
return {};
},
watch: {},
computed: {},
created() {},
mounted() {},
methods: {},
};
</script>
<style lang="scss" scoped>
.section-box {
margin-top: 32px;
&:first-of-type {
margin-top: 0;
}
.section-step {
height: 22px;
line-height: 22px;
padding: 0 7px;
text-align: center;
color: #fff;
background-color: #faad14;
display: inline-block;
font-size: 14px;
margin-bottom: 12px;
}
.message {
font-size: 14px;
color: #606266;
line-height: 22px;
font-weight: 400;
}
}
</style>
<template>
<div class="main-page">
<el-card shadow="never">
<div class="section-box">
<div class="section-step">什么是聊天工具栏?</div>
<div class="message">
企业微信3.0.16版本更新原聊天侧边栏升级为聊天工具栏。升级后:1.可以配置小程序了;2.入口更浅,交互体验更好;3.可配置第三方应用的页面了。
<br />企业可以把CRM页面、商品页面、知识库等挂接到聊天工具栏,方便员工和在客户聊天时,快速查看和编辑客户信息、快速给客户发东西、快速查找回答等。
</div>
</div>
<div class="section-box">
<div class="section-step">员工视角:聊天工具栏</div>
<div class="message">员工在与客户单聊或者外部群聊的时候,点击右上角的图标,对话框上方即可出现工具栏。</div>
<img
src="https://wscos-1253767630.cos.ap-nanjing.myqcloud.com/wework/assets/siber/1.png"
class="image"
style="width: 818px; height: 495px;"
/>
</div>
<div class="section-box">
<div class="section-step">员工视角:电脑端外部群及单聊聊天侧边栏界面</div>
<div class="message">员工在与客户单聊或者外部群聊的时候,点击右上角的图标,对话框上方即可出现工具栏。</div>
<img
src="https://wscos-1253767630.cos.ap-nanjing.myqcloud.com/wework/assets/siber/2.png"
class="image"
style="width: 818px; height: 494px;"
/>
<img
src="https://wscos-1253767630.cos.ap-nanjing.myqcloud.com/wework/assets/siber/3.png"
class="image"
style="width: 818px; height: 483px;"
/>
<div
class="message"
style="margin-top: 32px;"
>聊天侧边栏的素材支持文本、网页、图文视频及文件,售前售后在客户服务过程中选择需要的素材直接即可发送。</div>
<img
src="https://wscos-1253767630.cos.ap-nanjing.myqcloud.com/wework/assets/siber/4.png"
class="image"
style="width: 984px; height: 572px;"
/>
</div>
<div class="section-box">
<div class="section-step">如何配置聊天工具栏?</div>
<img
src="https://wscos-1253767630.cos.ap-nanjing.myqcloud.com/wework/assets/siber/5.png"
class="image"
style="width: 1154px; height: 639px;"
/>
<img
src="https://wscos-1253767630.cos.ap-nanjing.myqcloud.com/wework/assets/siber/6.png"
class="image"
style="width: 550px; height: 634px;"
/>
</div>
<div class="section-box">
<div class="section-step">聊天工具栏的内容是如何维护的?</div>
<img
src="https://wscos-1253767630.cos.ap-nanjing.myqcloud.com/wework/assets/siber/7.png"
class="image"
style="width: 1176px; height: 629px;"
/>
<img
src="https://wscos-1253767630.cos.ap-nanjing.myqcloud.com/wework/assets/siber/8.png"
class="image"
style="width: 555px; height: 634px;"
/>
<img
src="https://wscos-1253767630.cos.ap-nanjing.myqcloud.com/wework/assets/siber/9.png"
class="image"
style="width: 797px; height: 387px;"
/>
<img
src="https://wscos-1253767630.cos.ap-nanjing.myqcloud.com/wework/assets/siber/10.png"
class="image"
style="width: 797px; height: 387px;"
/>
</div>
</el-card>
</div>
</template>
<script>
export default {
components: {},
props: {},
data() {
return {};
},
watch: {},
computed: {},
created() {},
mounted() {},
methods: {},
};
</script>
<style lang="scss" scoped>
.chat-preview {
border-radius: 4px;
position: relative;
margin-left: 40px;
display: inline-block;
width: 150px;
min-height: 263px;
background-repeat: no-repeat;
background-size: cover;
top: 15px;
.logo {
width: 40px;
height: 40px;
position: absolute;
top: 18px;
left: 50%;
transform: translateX(-50%);
border-radius: 50%;
}
.company-name {
font-size: 12px;
position: absolute;
top: 70px;
text-align: center;
color: #ffe7be;
width: 100%;
}
}
</style>
<template>
<div>
<div>
配置聊天工具栏,方便成员在外部会话中查看和使用,提高服务效率。
<el-button type="text" @click="$router.push('/appTool/explain')">图文详解</el-button>
<el-button type="text" @click="$router.push('/appTool/config')">查看已配置信息</el-button>
</div>
<div>
<span>抓取快捷回复素材</span> 素材抓取后,即可在聊天工具栏使用
</div>
<el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="素材类型" align="center" prop="operId" />
<el-table-column label="聊天工具栏名称" align="center" prop="title" />
<el-table-column label="已抓取素材数量" align="center" prop="businessType" :formatter="typeFormat" />
<el-table-column label="是否启用" align="center" prop="operTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.operTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" prop="operId">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="handleView(scope.row,scope.index)"
>抓取素材</el-button>
</template>
</el-table-column>
</el-table>
<el-card shadow="never" header="红包工具栏">
<!-- <div slot="header"></div> -->
<el-row :gutter="10">
<el-col :span="10">
<div>
<div>
发红包权限人
<el-button type="text">修改</el-button>
</div>
<el-tag type="info" effect="plain">
<i class="el-icon-user-solid"></i> 深肤色
</el-tag>
<el-tag type="info" effect="plain">
<i class="el-icon-user-solid"></i>深肤色
</el-tag>
<el-tag type="info" effect="plain">
<i class="el-icon-user-solid"></i>深肤色
</el-tag>
</div>
<el-form ref="form" :model="form" label-width="100px">
<el-form-item label="企业logo">
<el-upload action :show-file-list="false" :on-success="d" :before-upload="d">
<img v-if="imageUrl" :src="imageUrl" />
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<div>上传企业logo,建议112*112</div>
</el-form-item>
<el-form-item label="企业名称">
<el-input v-model="model"></el-input>
</el-form-item>
<el-form-item label="红包应用ID">
<el-input v-model="model"></el-input>
</el-form-item>
</el-form>
</el-col>
<el-col :span="10">
<div
class="chat-preview"
style="background-image: url(&quot;https://wscos-1253767630.cos.ap-nanjing.myqcloud.com/wework/assets/red-packet.png&quot;);"
>
<div class="el-image logo" style>
<div class="el-image__error">加载失败</div>
<!---->
</div>
<el-image class="logo" :src="url" :fit="fit"></el-image>
<div class="company-name">脑白金</div>
</div>
</el-col>
</el-row>
</el-card>
<el-dialog
title="抓取文本类型素材库"
:visible.sync="dialogVisible"
:before-close="dialogBeforeClose"
>
<el-row :gutter="10">
<el-col :span="6">
<el-tree :data="d" :props="d" @node-click="d"></el-tree>
</el-col>
<el-col :span="18">
<div class="fxbw">
素材库更新本分类素材后,自动同步到聊天工具栏
<div class="filter-right">
<i class="el-icon-arrow-left"></i> 1/1
<i class="el-icon-arrow-right"></i>
</div>
</div>
<el-table :data="data" style="width: 100%">
<el-table-column type="selection" width="55" align="center" />
<el-table-column prop="prop" label="文本内容" width="width"></el-table-column>
<el-table-column prop="prop" label="时间" width="width"></el-table-column>
</el-table>
</el-col>
</el-row>
<div slot="footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
components: {},
props: {},
data() {
return {
dialogVisible: true,
};
},
watch: {},
computed: {},
created() {},
mounted() {},
methods: {},
};
</script>
<style lang="scss" scoped>
.preview {
width: 260px;
height: 500px;
background: #eee;
border-radius: 8px;
padding: 10px;
}
</style>
<template>
<div>
<el-card shadow="never">
<el-row type="flex" justify="center" :gutter="50">
<el-col :span="10">
<el-form ref="form" :model="form" label-width="80px">
<el-form-item label="公司名称">
<el-input v-model="model"></el-input>
</el-form-item>
<el-form-item label="背景图片">
<el-upload action :show-file-list="false" :on-success="d" :before-upload="d">
<img v-if="imageUrl" :src="imageUrl" />
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
<el-form-item label=" ">
<el-button type="primary" size="small">提交</el-button>
</el-form-item>
</el-form>
</el-col>
<el-col :span="10">
<div class="preview">
<div class="top">房管局会</div>
</div>
</el-col>
</el-row>
</el-card>
</div>
</template>
<script>
export default {
components: {},
props: {},
data() {
return {};
},
watch: {},
computed: {},
created() {},
mounted() {},
methods: {},
};
</script>
<style lang="scss" scoped>
.section-box {
margin-top: 32px;
&:first-of-type {
margin-top: 0;
}
.section-step {
height: 22px;
line-height: 22px;
padding: 0 7px;
text-align: center;
color: #fff;
background-color: #faad14;
display: inline-block;
font-size: 14px;
margin-bottom: 12px;
}
.message {
font-size: 14px;
color: #606266;
line-height: 22px;
font-weight: 400;
}
}
</style>
<template>
<div>
<div class="el-card__body">
<div class="section-box">
<div class="section-step">第一步</div>
<div class="message">管理员登录企业微信管理后台,在我的企业——通讯录管理——成员资料显示——对外资料显示,点击修改;</div>
<img
src="https://wscos-1253767630.cos.ap-nanjing.myqcloud.com/wework/assets/moment/1.png"
class="image"
style="width: 882px; height: 277px;"
/>
<div class="message">点击添加自定义信息,选择网页,名称填写朋友圈,确定保存后,员工对外资料页就会出现朋友圈这一项信息。</div>
<img
src="https://wscos-1253767630.cos.ap-nanjing.myqcloud.com/wework/assets/moment/2.png"
class="image"
style="width: 750px; height: 817px;"
/>
</div>
<div class="section-box">
<div class="section-step">第二步</div>
<div
class="message"
>完成修改后,返回企业微信手机端,打开对外信息显示,填写朋友圈网页信息;该栏需要输入网页名称,建议填写“查看朋友圈”;</div>
<img
src="https://wscos-1253767630.cos.ap-nanjing.myqcloud.com/wework/assets/moment/3.png"
class="image"
style="width: 439px; height: 526px;"
/>
</div>
<div class="section-box">
<div class="section-step">第三步</div>
<div class="message">
获取朋友圈地址。后台管理员可一键发送、导出、复制员工的朋友圈地址。
<br />员工将朋友圈链接粘贴到对外信息显示的朋友圈列表内,这样客户打开员工的对外资料,就能看到员工发布的朋友圈。
</div>
<img
src="https://wscos-1253767630.cos.ap-nanjing.myqcloud.com/wework/assets/moment/4.png"
class="image"
style="width: 561px; height: 577px;"
/>
</div>
</div>
</div>
</template>
<script>
export default {
components: {},
props: {},
data() {
return {};
},
watch: {},
computed: {},
created() {},
mounted() {},
methods: {},
};
</script>
<style lang="scss" scoped>
</style>
<template>
<div>
<el-tabs type="border-card" v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="朋友圈动态" name="1">
<div>
* 该朋友圈为展示在企业成员对外资料显示中的企业朋友圈,
<!-- <el-button type="primary">查看功能介绍</el-button> -->
<el-link type="primary" href="/appTool/friendIntroduce">查看功能介绍</el-link>
</div>
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="100px">
<el-form-item label="关键词" prop="title">
<el-input
v-model="queryParams.title"
placeholder="请输入"
clearable
style="width: 240px;"
size="small"
/>
</el-form-item>
<el-form-item label="发布时间">
<el-date-picker
v-model="dateRange"
size="small"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item label>
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
</el-form-item>
</el-form>
<div class="ar">
<el-button type="primary">发布动态</el-button>
</div>
<el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="所选成员" align="center" prop="operId" />
<el-table-column label="发布内容" align="center" prop="title" />
<el-table-column label="创建人" align="center" prop="businessType" />
<el-table-column label="发布时间" align="center" prop="operTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.operTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="handleView(scope.row,scope.index)"
v-hasPermi="['monitor:operlog:query']"
>下载</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="handleView(scope.row,scope.index)"
v-hasPermi="['monitor:operlog:query']"
>复制链接</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="handleView(scope.row,scope.index)"
v-hasPermi="['monitor:operlog:query']"
>查看详情</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="handleView(scope.row,scope.index)"
v-hasPermi="['monitor:operlog:query']"
>编辑</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="handleView(scope.row,scope.index)"
v-hasPermi="['monitor:operlog:query']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改参数配置对话框 -->
<el-dialog title="编辑图片" :visible.sync="open" width="600px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="图片名称">
<el-input v-model="sd" placeholder></el-input>
</el-form-item>
<el-form-item label="图片文案">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
</el-form-item>
<el-form-item label="图片">
<el-upload action :show-file-list="false" :on-success="d" :before-upload="d">
<img v-if="imageUrl" :src="imageUrl" />
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<div>支持JPG,PNG格式,图片大小不超过2M,建议上传宽高1:1的图片</div>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</el-tab-pane>
<el-tab-pane label="设置" name="2">
<div class="ar">
<el-input
placeholder="请输入内容"
prefix-icon="el-icon-search"
style="width: 240px;"
v-model="input2"
></el-input>
<el-button @click="$router.push('/appTool/friendBackground')">设置默认背景图片</el-button>
<el-button type="primary">一键设置朋友圈地址</el-button>
</div>
<el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
<el-table-column label="员工" align="center" prop="operId" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="handleView(scope.row,scope.index)"
v-hasPermi="['monitor:operlog:query']"
>编辑头像背景</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="handleView(scope.row,scope.index)"
v-hasPermi="['monitor:operlog:query']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
export default {
components: {},
props: {},
data() {
return {
queryParams: {},
form: {},
activeName: "1",
};
},
watch: {},
computed: {},
created() {},
mounted() {},
methods: {},
};
</script>
<style lang="scss" scoped>
.content-wrap {
height: 500px;
align-items: stretch;
justify-content: space-between;
padding-right: 6%;
.el-tabs,
.preview {
width: 60%;
background: #eee;
border-radius: 8px;
padding: 10px;
}
.preview {
width: 260px;
}
}
</style>
<template>
<div class="app-container">
<el-card shadow="never" :body-style="{padding: '40px 20px 20px'}">
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="选择员工" prop="postCode">
<el-button type="primary" size="mini">选择</el-button>
</el-form-item>
<el-form-item label="朋友圈内容">
<div class="flex content-wrap">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-button class="fr" type="primary" size="mini">新建素材</el-button>
<el-tab-pane name="first">
<span slot="label">
<i class="el-icon-date"></i> 文本
</span>
<el-upload action="#" list-type="picture-card" :auto-upload="false">
<i slot="default" class="el-icon-plus"></i>
<div slot="file" slot-scope="{file}">
<img class="el-upload-list__item-thumbnail" :src="file.url" alt />
<span class="el-upload-list__item-actions">
<span
class="el-upload-list__item-preview"
@click="handlePictureCardPreview(file)"
>
<i class="el-icon-zoom-in"></i>
</span>
<span
v-if="!disabled"
class="el-upload-list__item-delete"
@click="handleDownload(file)"
>
<i class="el-icon-download"></i>
</span>
<span
v-if="!disabled"
class="el-upload-list__item-delete"
@click="handleRemove(file)"
>
<i class="el-icon-delete"></i>
</span>
</span>
</div>
</el-upload>
</el-tab-pane>
<el-tab-pane label="角色管理" name="third">
<span slot="label">
<i class="el-icon-date"></i> 图片
</span>
角色管理
</el-tab-pane>
<el-tab-pane label="定时任务补偿" name="fourth">
<span slot="label">
<i class="el-icon-date"></i> 视频
</span>
定时任务补偿
</el-tab-pane>
</el-tabs>
<div class="preview">
<div class="top">房管局会</div>
</div>
</div>
</el-form-item>
<el-form-item label=" ">
<el-button type="primary" size="small">提交</el-button>
</el-form-item>
</el-form>
</el-card>
</div>
</template>
<script>
export default {
components: {},
props: {},
data() {
return {
// 表单参数
form: {},
statusOptions: [
{ label: "发送给客户", value: "" },
{ label: "发送给客户群", value: "" },
],
activeName: "second",
};
},
watch: {},
computed: {},
created() {},
mounted() {},
methods: {
handleClick(tab, event) {
console.log(tab, event);
},
},
};
</script>
...@@ -11,7 +11,7 @@ export default { ...@@ -11,7 +11,7 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
isActivate: "", isActivate: "",
department: "1", department: "",
}, },
dateRange: [], dateRange: [],
treeData: [], treeData: [],
...@@ -31,7 +31,7 @@ export default { ...@@ -31,7 +31,7 @@ export default {
total: 0, total: 0,
defaultProps: { defaultProps: {
label: "name", label: "name",
childr启用en: "children", children: "children",
}, },
form: {}, form: {},
dialogVisible: false, dialogVisible: false,
......
...@@ -172,7 +172,7 @@ export default { ...@@ -172,7 +172,7 @@ export default {
}); });
api.sync().then(() => { api.sync().then(() => {
loading.close(); loading.close();
this.msgSuccess("操作成功"); this.msgSuccess("后台开始同步数据,请稍后关注进度");
}); });
}, },
selectedUser(list) { selectedUser(list) {
......
...@@ -43,7 +43,7 @@ export default { ...@@ -43,7 +43,7 @@ export default {
</div> </div>
<div class="info"> <div class="info">
出生日期:{{customer.birthday || '--'}} 出生日期:{{customer.birthday || '--'}}
<div class="ml20" style="position: absolute;"> <div class="bfc-d ml20">
<el-date-picker <el-date-picker
v-if="datePickerVisible" v-if="datePickerVisible"
v-model="customer.birthday" v-model="customer.birthday"
...@@ -87,7 +87,7 @@ export default { ...@@ -87,7 +87,7 @@ export default {
</el-row> </el-row>
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="10">所在部门:</el-col> <el-col :span="10">所在部门:</el-col>
<el-col :span="12">{{"--"}}</el-col> <el-col :span="12">{{customer.weFlowerCustomerRels[0].department}}</el-col>
</el-row> </el-row>
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="10">添加时间:</el-col> <el-col :span="10">添加时间:</el-col>
......
...@@ -39,7 +39,7 @@ export default { ...@@ -39,7 +39,7 @@ export default {
page && (this.query.pageNum = page); page && (this.query.pageNum = page);
this.loading = true; this.loading = true;
api api
.getList(this.query) .getListNo(this.query)
.then(({ rows, total }) => { .then(({ rows, total }) => {
this.list = rows; this.list = rows;
this.total = +total; this.total = +total;
...@@ -111,6 +111,7 @@ export default { ...@@ -111,6 +111,7 @@ export default {
v-hasPermi="['customerManage:dimission:filter']" v-hasPermi="['customerManage:dimission:filter']"
type="primary" type="primary"
size="mini" size="mini"
@click="getList(1)"
>已分配的离职员工</el-button> >已分配的离职员工</el-button>
<el-button <el-button
v-hasPermi="['customerManage:dimission:allocate']" v-hasPermi="['customerManage:dimission:allocate']"
......
...@@ -65,6 +65,18 @@ export default { ...@@ -65,6 +65,18 @@ export default {
this.dateRange = []; this.dateRange = [];
this.$refs["queryForm"].resetFields(); this.$refs["queryForm"].resetFields();
}, },
sync() {
const loading = this.$loading({
lock: true,
text: "Loading",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
api.sync().then((r) => {
loading.close();
this.msgSuccess("后台开始同步数据,请稍后关注进度");
});
},
// 多选框选中数据 // 多选框选中数据
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id); this.ids = selection.map((item) => item.id);
...@@ -166,11 +178,12 @@ export default { ...@@ -166,11 +178,12 @@ export default {
<div class="mid-action"> <div class="mid-action">
<div class="total"> <div class="total">
己选 <!-- 己选
<span class="num">{{total}}</span> 个客户群 <span class="num">{{total}}</span> 个客户群-->
<span> <span>
最近更新:2020-08-25 06:35:00,同步 <!-- 最近更新:2020-08-25 06:35:00,同步
<span class="num">{{total}}</span> 条信息 ,共 <span class="num">{{total}}</span> 条信息 ,-->
共
<span class="num">{{total}}</span> 个客户群 <span class="num">{{total}}</span> 个客户群
</span> </span>
</div> </div>
...@@ -180,6 +193,7 @@ export default { ...@@ -180,6 +193,7 @@ export default {
type="primary" type="primary"
size="mini" size="mini"
icon="el-icon-refresh" icon="el-icon-refresh"
@click="sync"
>同步客户群</el-button> >同步客户群</el-button>
</div> </div>
</div> </div>
...@@ -188,7 +202,7 @@ export default { ...@@ -188,7 +202,7 @@ export default {
<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="groupName" /> <el-table-column label="群名" align="center" prop="groupName" />
<el-table-column label="群人数" align="center" prop="memberNum" /> <el-table-column label="群人数" align="center" prop="memberNum" />
<el-table-column label="群主" align="center" prop="groupLeader" /> <el-table-column label="群主" align="center" prop="groupLeaderName" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180"></el-table-column> <el-table-column label="创建时间" align="center" prop="createTime" width="180"></el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
......
...@@ -34,6 +34,11 @@ export default { ...@@ -34,6 +34,11 @@ export default {
groupId: undefined, groupId: undefined,
memberName: undefined, memberName: undefined,
}, },
joinScene: {
1: "由成员邀请入群(直接邀请入群)",
2: "由成员邀请入群(通过邀请链接入群)",
3: "通过扫描群二维码入群",
},
}; };
}, },
created() { created() {
...@@ -130,14 +135,14 @@ export default { ...@@ -130,14 +135,14 @@ export default {
<div style="margin-bottom: 20px;">{{group.groupName}}</div> <div style="margin-bottom: 20px;">{{group.groupName}}</div>
<div <div
class="info" class="info"
>群主:{{group.groupLeader}} | 创建时间:{{group.createTime}} | 群公告:{{group.notice || '未设置'}}</div> >群主:{{group.groupLeaderName}} | 创建时间:{{group.createTime}} | 群公告:{{group.notice || '未设置'}}</div>
</div> </div>
</div> </div>
<el-input placeholder="请输入群成员" v-model="query.memberName" class> <el-input placeholder="请输入群成员" v-model="query.memberName" class>
<el-button slot="append" @click="getList(1)">查询</el-button> <el-button slot="append" @click="getList(1)">查询</el-button>
</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="operId">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.memberName }} {{ scope.row.memberName }}
...@@ -147,12 +152,12 @@ export default { ...@@ -147,12 +152,12 @@ export default {
<!-- <i :class="['el-icon-s-custom', ({1: 'man', 2: 'woman'})[scope.row.gender]]"></i> --> <!-- <i :class="['el-icon-s-custom', ({1: 'man', 2: 'woman'})[scope.row.gender]]"></i> -->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="进群时间" align="center" prop="joinTime" width="180"> <el-table-column label="进群时间" align="center" prop="joinTime" width="180"></el-table-column>
<el-table-column label="进群方式" align="center" prop="joinScene">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.joinTime) }}</span> <span>{{ joinScene[scope.row.joinScene] }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="进群方式" align="center" prop="joinType" />
</el-table> </el-table>
<pagination <pagination
...@@ -160,7 +165,7 @@ export default { ...@@ -160,7 +165,7 @@ export default {
:total="total" :total="total"
:page.sync="query.pageNum" :page.sync="query.pageNum"
:limit.sync="query.pageSize" :limit.sync="query.pageSize"
@pagination="getList" @pagination="getList()"
/> />
</div> </div>
</template> </template>
......
...@@ -9,6 +9,7 @@ export default { ...@@ -9,6 +9,7 @@ export default {
dialogVisible: false, dialogVisible: false,
dialogVisible1: false, dialogVisible1: false,
form: { id: "", welcomeMsgTplType: "", welcomeMsg: "" }, form: { id: "", welcomeMsgTplType: "", welcomeMsg: "" },
imageUrl: "",
}; };
}, },
watch: {}, watch: {},
...@@ -25,6 +26,23 @@ export default { ...@@ -25,6 +26,23 @@ export default {
insertName() { insertName() {
this.form.welcomeMsg += "#客户昵称#"; this.form.welcomeMsg += "#客户昵称#";
}, },
uploadSuccess(res, file) {
debugger;
this.imageUrl = URL.createObjectURL(file.raw);
},
beforeUpload(file) {
debugger;
const isJPG = file.type === "image/jpeg";
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isJPG) {
this.$message.error("上传头像图片只能是 JPG 格式!");
}
if (!isLt2M) {
this.$message.error("上传头像图片大小不能超过 2MB!");
}
return isJPG && isLt2M;
},
}, },
}; };
</script> </script>
...@@ -54,17 +72,18 @@ export default { ...@@ -54,17 +72,18 @@ export default {
>插入客户昵称</el-button> >插入客户昵称</el-button>
</div> </div>
<el-divider></el-divider> <el-divider></el-divider>
<img v-if="imageUrl" :src="imageUrl" />
<el-popover placement="top-start" trigger="hover"> <el-popover placement="top-start" trigger="hover">
<div class="flex"> <div class="flex">
<el-upload <el-upload
class="mr10" class="mr10"
action action
:show-file-list="false" :show-file-list="false"
:on-success="on-success" :on-success="uploadSuccess"
:before-upload="before-upload" :before-upload="beforeUpload"
> >
<img v-if="imageUrl" :src="imageUrl" /> <el-button>
<el-button v-else>
<i class="el-icon-picture-outline"></i> <i class="el-icon-picture-outline"></i>
<p>图片</p> <p>图片</p>
</el-button> </el-button>
...@@ -79,7 +98,7 @@ export default { ...@@ -79,7 +98,7 @@ export default {
<p>小程序</p> <p>小程序</p>
</el-button>--> </el-button>-->
</div> </div>
<el-button slot="reference" icon="el-icon-plus" size="mini" @click="resetQuery">添加图片/网页</el-button> <el-button slot="reference" icon="el-icon-plus" size="mini">添加图片/网页</el-button>
</el-popover> </el-popover>
</el-card> </el-card>
</el-form-item> </el-form-item>
...@@ -99,12 +118,7 @@ export default { ...@@ -99,12 +118,7 @@ export default {
</div> </div>
</div> </div>
<el-dialog <el-dialog title="添加网页消息" :visible.sync="dialogVisible" width="width">
title="添加网页消息"
:visible.sync="dialogVisible"
width="width"
:before-close="dialogBeforeClose"
>
<el-form :model="form" inline> <el-form :model="form" inline>
<el-form-item label="添加网页消息" label-width="200"> <el-form-item label="添加网页消息" label-width="200">
<el-input style="width: 400px;" v-model="j" placeholder="以http或https开头"></el-input> <el-input style="width: 400px;" v-model="j" placeholder="以http或https开头"></el-input>
...@@ -116,11 +130,10 @@ export default { ...@@ -116,11 +130,10 @@ export default {
</div> </div>
</el-dialog> </el-dialog>
<el-dialog <!-- <el-dialog
title="添加小程序消息" title="添加小程序消息"
:visible.sync="dialogVisible1" :visible.sync="dialogVisible1"
width="width" width="width"
:before-close="dialogBeforeClose"
> >
<div class="flex filter-wrap"> <div class="flex filter-wrap">
<el-select v-model="model" placeholder="请选择分组"> <el-select v-model="model" placeholder="请选择分组">
...@@ -152,7 +165,7 @@ export default { ...@@ -152,7 +165,7 @@ export default {
<el-button @click="dialogVisible1 = false">取 消</el-button> <el-button @click="dialogVisible1 = false">取 消</el-button>
<el-button type="primary" @click="dialogVisible1 = false">确 定</el-button> <el-button type="primary" @click="dialogVisible1 = false">确 定</el-button>
</div> </div>
</el-dialog> </el-dialog>-->
</div> </div>
</template> </template>
......
<style lang="scss" scoped>
.content-wrap {
height: 500px;
align-items: stretch;
justify-content: space-between;
padding-right: 6%;
.el-tabs,
.preview {
width: 60%;
background: #eee;
border-radius: 8px;
padding: 10px;
}
.preview {
width: 260px;
}
}
</style>
<template>
<div class="app-container">
<el-card shadow="never" :body-style="{padding: '40px 20px 20px'}">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="群发类型" prop="postName">
<el-radio-group v-model="form.status">
<el-radio
v-for="dict in statusOptions"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="发送范围" prop="postCode">
<el-button type="primary" size="mini">选择发送客户</el-button>
</el-form-item>
<el-form-item label="发送时间" prop="postSort">
<el-date-picker
v-model="form.status"
size="small"
style="width: 240px"
value-format="yyyy-MM-dd"
type="datetime"
placeholder="开始日期"
></el-date-picker>
<span>设置时间定时发送,不设置立即发送</span>
</el-form-item>
<el-form-item label=" ">
<div class="flex content-wrap">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-button class="fr" type="primary" size="mini">新建素材</el-button>
<el-tab-pane name="first">
<span slot="label">
<i class="el-icon-date"></i> 文本
</span>
<el-upload action="#" list-type="picture-card" :auto-upload="false">
<i slot="default" class="el-icon-plus"></i>
<div slot="file" slot-scope="{file}">
<img class="el-upload-list__item-thumbnail" :src="file.url" alt />
<span class="el-upload-list__item-actions">
<span
class="el-upload-list__item-preview"
@click="handlePictureCardPreview(file)"
>
<i class="el-icon-zoom-in"></i>
</span>
<span
v-if="!disabled"
class="el-upload-list__item-delete"
@click="handleDownload(file)"
>
<i class="el-icon-download"></i>
</span>
<span
v-if="!disabled"
class="el-upload-list__item-delete"
@click="handleRemove(file)"
>
<i class="el-icon-delete"></i>
</span>
</span>
</div>
</el-upload>
</el-tab-pane>
<el-tab-pane label="配置管理" name="second">
<span slot="label">
<i class="el-icon-date"></i> 网页
</span>
配置管理
</el-tab-pane>
<el-tab-pane label="角色管理" name="third">
<span slot="label">
<i class="el-icon-date"></i> 图片
</span>
角色管理
</el-tab-pane>
<el-tab-pane label="定时任务补偿" name="fourth">
<span slot="label">
<i class="el-icon-date"></i> 海报
</span>
定时任务补偿
</el-tab-pane>
<el-tab-pane label="定时任务补偿" name="fourth">
<span slot="label">
<i class="el-icon-date"></i> 小程序
</span>
定时任务补偿
</el-tab-pane>
</el-tabs>
<div class="preview">
<div class="top">房管局会</div>
</div>
</div>
</el-form-item>
<el-form-item label=" ">
<el-button type="primary" size="mini" icon="el-icon-search">通知成员发送</el-button>
<span>通知成员,向选中的客户发送以上企业消息</span>
<i class="el-icon-edit"></i>
</el-form-item>
</el-form>
</el-card>
</div>
</template>
<script>
export default {
components: {},
props: {},
data() {
return {
// 表单参数
form: {},
statusOptions: [
{ label: "发送给客户", value: "" },
{ label: "发送给客户群", value: "" },
],
activeName: "second",
};
},
watch: {},
computed: {},
created() {},
mounted() {},
methods: {
handleClick(tab, event) {
console.log(tab, event);
},
},
};
</script>
<style lang="scss" scoped>
.mid-action {
display: flex;
justify-content: space-between;
margin: 10px 0;
align-items: center;
.total {
background-color: rgba(65, 133, 244, 0.1);
border: 1px solid rgba(65, 133, 244, 0.2);
border-radius: 3px;
font-size: 14px;
min-height: 32px;
line-height: 32px;
padding: 0 12px;
color: #606266;
}
.num {
color: #00f;
}
}
</style>
<template>
<div class="app-container">
<el-card shadow="never" :body-style="{padding: '20px 0 0'}">
<el-form
:model="queryParams"
ref="queryForm"
:inline="true"
v-show="showSearch"
label-width="100px"
>
<el-form-item label="创建人" prop="title">
<el-input
v-model="queryParams.title"
placeholder="请输入"
clearable
style="width: 240px;"
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="内容消息" prop="operName">
<el-input
v-model="queryParams.operName"
placeholder="请输入"
clearable
style="width: 240px;"
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="群发类型">
<el-select v-model="form.region" placeholder="请选择" size="small" style="width: 240px;">
<el-option label="区域一" value="shanghai"></el-option>
<el-option label="区域二" value="beijing"></el-option>
</el-select>
</el-form-item>
<el-form-item label="创建日期">
<el-date-picker
v-model="dateRange"
size="small"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item label=" ">
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
<el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="消息内容" align="center" prop="operId" />
<el-table-column label="群发类型" align="center" prop="title" />
<el-table-column label="创建人" align="center" prop="businessType" :formatter="typeFormat" />
<el-table-column label="创建时间" align="center" prop="operTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.operTime) }}</span>
</template>
</el-table-column>
<el-table-column label="发送情况" align="center" prop="operId">
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
export default {
name: "Operlog",
data() {
return {
// 遮罩层
loading: false,
// 选中数组
ids: [],
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 表格数据
list: [],
// 是否显示弹出层
open: false,
// 类型数据字典
typeOptions: [],
// 类型数据字典
statusOptions: [],
// 日期范围
dateRange: [],
// 表单参数
form: {},
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
title: undefined,
operName: undefined,
businessType: undefined,
status: undefined,
},
};
},
created() {
this.getList();
this.getDicts("sys_oper_type").then((response) => {
this.typeOptions = response.data;
});
this.getDicts("sys_common_status").then((response) => {
this.statusOptions = response.data;
});
},
methods: {
/** 查询登录日志 */
getList() {
this.loading = false;
list(this.addDateRange(this.queryParams, this.dateRange)).then(
(response) => {
this.list = response.rows;
this.total = response.total;
this.loading = false;
}
);
},
// 操作日志状态字典翻译
statusFormat(row, column) {
return this.selectDictLabel(this.statusOptions, row.status);
},
// 操作日志类型字典翻译
typeFormat(row, column) {
return this.selectDictLabel(this.typeOptions, row.businessType);
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = [];
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.operId);
this.multiple = !selection.length;
},
/** 详细按钮操作 */
handleView(row) {
this.open = true;
this.form = row;
},
/** 删除按钮操作 */
handleDelete(row) {
const operIds = row.operId || this.ids;
this.$confirm(
'是否确认删除日志编号为"' + operIds + '"的数据项?',
"警告",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
)
.then(function () {
return delOperlog(operIds);
})
.then(() => {
this.getList();
this.msgSuccess("删除成功");
})
.catch(function () {});
},
/** 清空按钮操作 */
handleClean() {
this.$confirm("是否确认清空所有操作日志数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return cleanOperlog();
})
.then(() => {
this.getList();
this.msgSuccess("清空成功");
})
.catch(function () {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm("是否确认导出所有操作日志数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return exportOperlog(queryParams);
})
.then((response) => {
this.download(response.msg);
})
.catch(function () {});
},
},
};
</script>
\ No newline at end of file \ No newline at end of file
package com.linkwechat.wecom.domain; package com.linkwechat.wecom.domain;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.linkwechat.common.core.domain.BaseEntity; import com.linkwechat.common.core.domain.BaseEntity;
import com.linkwechat.common.utils.SnowFlakeUtil; import com.linkwechat.common.utils.SnowFlakeUtil;
...@@ -25,12 +26,13 @@ import javax.validation.constraints.NotNull; ...@@ -25,12 +26,13 @@ import javax.validation.constraints.NotNull;
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
@TableName("we_department") @TableName("we_department")
public class WeDepartment extends BaseEntity public class WeDepartment
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** $column.columnComment */ /** $column.columnComment */
private Long id= SnowFlakeUtil.nextId(); @TableId
private Long id;
/** 部门名称 */ /** 部门名称 */
......
...@@ -77,4 +77,9 @@ public class WeFlowerCustomerRel ...@@ -77,4 +77,9 @@ public class WeFlowerCustomerRel
@TableField(exist = false) @TableField(exist = false)
private List<WeFlowerCustomerTagRel> weFlowerCustomerTagRels; private List<WeFlowerCustomerTagRel> weFlowerCustomerTagRels;
@TableField(exist = false)
private String department;
} }
...@@ -47,4 +47,7 @@ public class WeFlowerCustomerTagRel ...@@ -47,4 +47,7 @@ public class WeFlowerCustomerTagRel
private Date createTime; private Date createTime;
} }
...@@ -40,6 +40,7 @@ public class WeGroupMember { ...@@ -40,6 +40,7 @@ public class WeGroupMember {
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
private Date joinTime; private Date joinTime;
/**入群方式: 1 - 由成员邀请入群(直接邀请入群) ; 2 - 由成员邀请入群(通过邀请链接入群); 3 - 通过扫描群二维码入群 */
private Integer joinScene; private Integer joinScene;
@TableField(value="type") @TableField(value="type")
......
...@@ -31,7 +31,7 @@ public class CustomerGroupDetail extends WeResultDto { ...@@ -31,7 +31,7 @@ public class CustomerGroupDetail extends WeResultDto {
private String owner; private String owner;
/**群的创建时间*/ /**群的创建时间*/
private Date create_time; private long create_time;
/**群公告*/ /**群公告*/
private String notice; private String notice;
......
...@@ -18,7 +18,7 @@ public class CustomerGroupMember { ...@@ -18,7 +18,7 @@ public class CustomerGroupMember {
private Integer type; private Integer type;
/**入群时间*/ /**入群时间*/
private Date join_time; private long join_time;
/**1 - 由成员邀请入群(直接邀请入群);2 - 由成员邀请入群(通过邀请链接入群);3 - 通过扫描群二维码入群*/ /**1 - 由成员邀请入群(直接邀请入群);2 - 由成员邀请入群(通过邀请链接入群);3 - 通过扫描群二维码入群*/
private Integer join_scene; private Integer join_scene;
......
...@@ -55,7 +55,7 @@ public class ExternalUserDetail extends WeResultDto { ...@@ -55,7 +55,7 @@ public class ExternalUserDetail extends WeResultDto {
/**该成员对此外部联系人的描述*/ /**该成员对此外部联系人的描述*/
private String description; private String description;
/**该成员添加此外部联系人的时间*/ /**该成员添加此外部联系人的时间*/
private Date createtime; private long createtime;
/**该成员对此客户备注的企业名称*/ /**该成员对此客户备注的企业名称*/
private String remark_company; private String remark_company;
/**该成员对此客户备注的手机号码*/ /**该成员对此客户备注的手机号码*/
......
...@@ -35,7 +35,7 @@ public interface IWeDepartmentService extends IService<WeDepartment> ...@@ -35,7 +35,7 @@ public interface IWeDepartmentService extends IService<WeDepartment>
* @param weDepartment 企业微信组织架构相关 * @param weDepartment 企业微信组织架构相关
* @return 结果 * @return 结果
*/ */
public int insertWeDepartment(WeDepartment weDepartment); public void insertWeDepartment(WeDepartment weDepartment);
/** /**
* 修改企业微信组织架构相关 * 修改企业微信组织架构相关
...@@ -43,7 +43,7 @@ public interface IWeDepartmentService extends IService<WeDepartment> ...@@ -43,7 +43,7 @@ public interface IWeDepartmentService extends IService<WeDepartment>
* @param weDepartment 企业微信组织架构相关 * @param weDepartment 企业微信组织架构相关
* @return 结果 * @return 结果
*/ */
public int updateWeDepartment(WeDepartment weDepartment); public void updateWeDepartment(WeDepartment weDepartment);
......
...@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; ...@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
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.common.utils.DateUtils;
import com.linkwechat.common.utils.SecurityUtils; import com.linkwechat.common.utils.SecurityUtils;
import com.linkwechat.common.utils.SnowFlakeUtil; import com.linkwechat.common.utils.SnowFlakeUtil;
import com.linkwechat.common.utils.bean.BeanUtils; import com.linkwechat.common.utils.bean.BeanUtils;
...@@ -71,11 +72,6 @@ public class WeCustomerServiceImpl extends ServiceImpl<WeCustomerMapper,WeCustom ...@@ -71,11 +72,6 @@ public class WeCustomerServiceImpl extends ServiceImpl<WeCustomerMapper,WeCustom
private IWeAllocateCustomerService iWeAllocateCustomerService; private IWeAllocateCustomerService iWeAllocateCustomerService;
@Autowired @Autowired
private WeUserClient weUserClient; private WeUserClient weUserClient;
...@@ -149,12 +145,24 @@ public class WeCustomerServiceImpl extends ServiceImpl<WeCustomerMapper,WeCustom ...@@ -149,12 +145,24 @@ public class WeCustomerServiceImpl extends ServiceImpl<WeCustomerMapper,WeCustom
List<WeFlowerCustomerTagRel> weFlowerCustomerTagRels=new ArrayList<>(); List<WeFlowerCustomerTagRel> weFlowerCustomerTagRels=new ArrayList<>();
List<WeFlowerCustomerRel> weFlowerCustomerRel=new ArrayList<>(); List<WeFlowerCustomerRel> weFlowerCustomerRel=new ArrayList<>();
externalUserDetail.getFollow_user().stream().forEach(kk->{ externalUserDetail.getFollow_user().stream().forEach(kk->{
WeFlowerCustomerRel weFlowerCustomerRelOne=new WeFlowerCustomerRel(); // WeFlowerCustomerRel weFlowerCustomerRelOne=new WeFlowerCustomerRel();
BeanUtils.copyPropertiesignoreOther(kk,weFlowerCustomerRelOne); // BeanUtils.copyPropertiesignoreOther(kk,weFlowerCustomerRelOne);
Long weFlowerCustomerRelId=SnowFlakeUtil.nextId(); Long weFlowerCustomerRelId=SnowFlakeUtil.nextId();
weFlowerCustomerRelOne.setId(weFlowerCustomerRelId); // weFlowerCustomerRelOne.setId(weFlowerCustomerRelId);
weFlowerCustomerRelOne.setExternalUserid(weCustomer.getExternalUserid()); // weFlowerCustomerRelOne.setExternalUserid(weCustomer.getExternalUserid());
weFlowerCustomerRel.add(weFlowerCustomerRelOne); weFlowerCustomerRel.add(WeFlowerCustomerRel.builder()
.id(weFlowerCustomerRelId)
.userId(kk.getUserid())
.description(kk.getDescription())
.remarkCorpName(kk.getRemark_company())
.remarkMobiles(kk.getRemark_mobiles())
.operUserid(kk.getOper_userid())
.addWay(kk.getAdd_way())
.externalUserid(weCustomer.getExternalUserid())
.createTime(new Date(kk.getCreatetime() * 1000L))
.build());
List<ExternalUserTag> tags = kk.getTags(); List<ExternalUserTag> tags = kk.getTags();
if(CollectionUtil.isNotEmpty(tags)){ if(CollectionUtil.isNotEmpty(tags)){
...@@ -339,7 +347,9 @@ public class WeCustomerServiceImpl extends ServiceImpl<WeCustomerMapper,WeCustom ...@@ -339,7 +347,9 @@ public class WeCustomerServiceImpl extends ServiceImpl<WeCustomerMapper,WeCustom
List<WeTag> addTags = weMakeCustomerTag.getAddTag(); List<WeTag> addTags = weMakeCustomerTag.getAddTag();
if(CollectionUtil.isNotEmpty(addTags)){ if(CollectionUtil.isNotEmpty(addTags)){
addTags.removeAll(Collections.singleton(null));
List<WeFlowerCustomerTagRel> tagRels=new ArrayList<>(); List<WeFlowerCustomerTagRel> tagRels=new ArrayList<>();
List<CutomerTagEdit> cutomerTagEdits=new ArrayList<>(); List<CutomerTagEdit> cutomerTagEdits=new ArrayList<>();
...@@ -393,15 +403,24 @@ public class WeCustomerServiceImpl extends ServiceImpl<WeCustomerMapper,WeCustom ...@@ -393,15 +403,24 @@ public class WeCustomerServiceImpl extends ServiceImpl<WeCustomerMapper,WeCustom
if(CollectionUtil.isNotEmpty(addTags)){ if(CollectionUtil.isNotEmpty(addTags)){
//获取当前客户需要移除的标签
List<WeFlowerCustomerTagRel> removeTag = iWeFlowerCustomerTagRelService.list(new LambdaQueryWrapper<WeFlowerCustomerTagRel>()
.in(WeFlowerCustomerTagRel::getFlowerCustomerRelId, iWeFlowerCustomerRelService.list(new LambdaQueryWrapper<WeFlowerCustomerRel>().eq(WeFlowerCustomerRel::getExternalUserid
, weMakeCustomerTag.getExternalUserid())).stream().map(WeFlowerCustomerRel::getId).collect(Collectors.toList()))
.notIn(WeFlowerCustomerTagRel::getTagId, addTags.stream().map(WeTag::getTagId).collect(Collectors.toList()))
);
//查询出当前用户对应的 //查询出当前用户对应的
List<WeFlowerCustomerRel> flowerCustomerRels = iWeFlowerCustomerRelService.list(new LambdaQueryWrapper<WeFlowerCustomerRel>() List<WeFlowerCustomerRel> flowerCustomerRels = iWeFlowerCustomerRelService.list(new LambdaQueryWrapper<WeFlowerCustomerRel>()
.eq(WeFlowerCustomerRel::getExternalUserid, weMakeCustomerTag.getExternalUserid())); .eq(WeFlowerCustomerRel::getExternalUserid, weMakeCustomerTag.getExternalUserid()));
if(CollectionUtil.isNotEmpty(flowerCustomerRels) ){ if(CollectionUtil.isNotEmpty(flowerCustomerRels) ){
if(iWeFlowerCustomerTagRelService.remove( if(iWeFlowerCustomerTagRelService.remove(
new LambdaQueryWrapper<WeFlowerCustomerTagRel>() new LambdaQueryWrapper<WeFlowerCustomerTagRel>()
.in(WeFlowerCustomerTagRel::getFlowerCustomerRelId, flowerCustomerRels.stream().map(WeFlowerCustomerRel::getId).collect(Collectors.toList())) .in(WeFlowerCustomerTagRel::getFlowerCustomerRelId, flowerCustomerRels.stream().map(WeFlowerCustomerRel::getId).collect(Collectors.toList()))
.in(WeFlowerCustomerTagRel::getTagId, addTags.stream().map(WeTag::getTagId).collect(Collectors.toList())) .in(WeFlowerCustomerTagRel::getTagId, removeTag.stream().map(WeFlowerCustomerTagRel::getTagId).collect(Collectors.toList()))
)){ )){
flowerCustomerRels.stream().forEach(k->{ flowerCustomerRels.stream().forEach(k->{
...@@ -409,7 +428,7 @@ public class WeCustomerServiceImpl extends ServiceImpl<WeCustomerMapper,WeCustom ...@@ -409,7 +428,7 @@ public class WeCustomerServiceImpl extends ServiceImpl<WeCustomerMapper,WeCustom
CutomerTagEdit.builder() CutomerTagEdit.builder()
.external_userid(k.getExternalUserid()) .external_userid(k.getExternalUserid())
.userid(k.getUserId()) .userid(k.getUserId())
.remove_tag(ArrayUtil.toArray(addTags.stream().map(WeTag::getTagId).collect(Collectors.toList()), String.class)) .remove_tag(ArrayUtil.toArray(removeTag.stream().map(WeFlowerCustomerTagRel::getTagId).collect(Collectors.toList()), String.class))
.build() .build()
); );
......
...@@ -86,23 +86,20 @@ public class WeDepartmentServiceImpl extends ServiceImpl<WeDepartmentMapper,WeDe ...@@ -86,23 +86,20 @@ public class WeDepartmentServiceImpl extends ServiceImpl<WeDepartmentMapper,WeDe
* @return 结果 * @return 结果
*/ */
@Override @Override
@Transactional public void insertWeDepartment(WeDepartment weDepartment)
public int insertWeDepartment(WeDepartment weDepartment)
{ {
weDepartment.setId(SnowFlakeUtil.nextId());
int returnCode=weDepartmentMapper.insertWeDepartment(weDepartment);
if(returnCode>0){
weDepartMentClient.createWeDepartMent( WeResultDto weDepartMent = weDepartMentClient.createWeDepartMent(
weDepartment.transformDeartMentDto(weDepartment) weDepartment.transformDeartMentDto(weDepartment)
); );
if(weDepartMent.getErrcode().equals(WeConstans.WE_SUCCESS_CODE) && weDepartMent.getId() != null){
weDepartment.setId(weDepartMent.getId());
this.save(weDepartment);
} }
return returnCode;
} }
/** /**
...@@ -112,20 +109,29 @@ public class WeDepartmentServiceImpl extends ServiceImpl<WeDepartmentMapper,WeDe ...@@ -112,20 +109,29 @@ public class WeDepartmentServiceImpl extends ServiceImpl<WeDepartmentMapper,WeDe
* @return 结果 * @return 结果
*/ */
@Override @Override
public int updateWeDepartment(WeDepartment weDepartment) public void updateWeDepartment(WeDepartment weDepartment)
{ {
int returnCode=weDepartmentMapper.updateWeDepartment(weDepartment); WeResultDto weDepartMent = weDepartMentClient.updateWeDepartMent(
if(returnCode>0){
weDepartMentClient.updateWeDepartMent(
weDepartment.transformDeartMentDto(weDepartment) weDepartment.transformDeartMentDto(weDepartment)
); );
if(weDepartMent.getErrcode().equals(WeConstans.WE_SUCCESS_CODE)){
this.updateById(weDepartment);
} }
return returnCode; // int returnCode=weDepartmentMapper.updateWeDepartment(weDepartment);
// if(returnCode>0){
//
// weDepartMentClient.updateWeDepartMent(
// weDepartment.transformDeartMentDto(weDepartment)
// );
//
//
// }
//
// return returnCode;
} }
...@@ -159,8 +165,7 @@ public class WeDepartmentServiceImpl extends ServiceImpl<WeDepartmentMapper,WeDe ...@@ -159,8 +165,7 @@ public class WeDepartmentServiceImpl extends ServiceImpl<WeDepartmentMapper,WeDe
public List<WeDepartment> synchWeDepartment() { public List<WeDepartment> synchWeDepartment() {
List<WeDepartment> weDepartments = weDepartMentClient.weAllDepartMents().findWeDepartments(); List<WeDepartment> weDepartments = weDepartMentClient.weAllDepartMents().findWeDepartments();
if(CollectionUtil.isNotEmpty(weDepartments)){ if(CollectionUtil.isNotEmpty(weDepartments)){
this.deleteAllWeDepartment(); this.saveOrUpdateBatch(weDepartments);
this.batchInsertWeDepartment(weDepartments);
} }
return weDepartments; return weDepartments;
......
...@@ -136,7 +136,7 @@ public class WeGroupServiceImpl extends ServiceImpl<WeGroupMapper,WeGroup> imple ...@@ -136,7 +136,7 @@ public class WeGroupServiceImpl extends ServiceImpl<WeGroupMapper,WeGroup> imple
.groupName(kk.getName()) .groupName(kk.getName())
.notice(kk.getNotice()) .notice(kk.getNotice())
.owner(kk.getOwner()) .owner(kk.getOwner())
.createTime(kk.getCreate_time()) .createTime(new Date(kk.getCreate_time() * 1000L))
.status(k.getStatus()) .status(k.getStatus())
.build() .build()
); );
...@@ -148,7 +148,7 @@ public class WeGroupServiceImpl extends ServiceImpl<WeGroupMapper,WeGroup> imple ...@@ -148,7 +148,7 @@ public class WeGroupServiceImpl extends ServiceImpl<WeGroupMapper,WeGroup> imple
WeGroupMember.builder() WeGroupMember.builder()
.chatId(kk.getChat_id()) .chatId(kk.getChat_id())
.userId(member.getUserid()) .userId(member.getUserid())
.joinTime(member.getJoin_time()) .joinTime(new Date(member.getJoin_time() * 1000L))
.joinScene(member.getJoin_scene()) .joinScene(member.getJoin_scene())
.joinType(member.getType()) .joinType(member.getType())
.unionId(member.getUnionid()) .unionId(member.getUnionid())
......
...@@ -26,6 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -26,6 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="addWay" column="add_way" /> <result property="addWay" column="add_way" />
<result property="state" column="state" /> <result property="state" column="state" />
<result property="userName" column="user_name"/> <result property="userName" column="user_name"/>
<result property="department" column="department"/>
<collection property="weFlowerCustomerTagRels" ofType="com.linkwechat.wecom.domain.WeFlowerCustomerTagRel"> <collection property="weFlowerCustomerTagRels" ofType="com.linkwechat.wecom.domain.WeFlowerCustomerTagRel">
<result property="flowerCustomerRelId" column="flower_customer_rel_id" /> <result property="flowerCustomerRelId" column="flower_customer_rel_id" />
<result property="tagId" column="tag_id" /> <result property="tagId" column="tag_id" />
...@@ -64,7 +65,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -64,7 +65,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
wfcrf.flower_customer_rel_id, wfcrf.flower_customer_rel_id,
wt.tag_id, wt.tag_id,
wt.create_time, 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
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
......
...@@ -4,75 +4,31 @@ ...@@ -4,75 +4,31 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.linkwechat.wecom.mapper.WeGroupMemberMapper"> <mapper namespace="com.linkwechat.wecom.mapper.WeGroupMemberMapper">
<!-- <resultMap type="WeGroupMember" id="WeGroupMemberResult">-->
<!-- <result property="id" column="id" />-->
<!-- <result property="groupId" column="group_id" />-->
<!-- <result property="memberName" column="member_name" />-->
<!-- <result property="joinTime" column="join_time" />-->
<!-- <result property="joinType" column="join_type" />-->
<!-- </resultMap>-->
<!-- <sql id="selectWeGroupMemberVo">-->
<!-- select id, group_id, member_name, join_time, join_type from we_group_member-->
<!-- </sql>-->
<select id="selectWeGroupMemberList" parameterType="WeGroupMember" resultType="com.linkwechat.wecom.domain.WeGroupMember"> <select id="selectWeGroupMemberList" parameterType="WeGroupMember" resultType="com.linkwechat.wecom.domain.WeGroupMember">
SELECT SELECT
wc.`name` AS memberName,
wgm.join_time, wgm.join_time,
wgm.type wgm.type,
wgm.join_scene,
CASE
WHEN wgm.type=1 THEN
(
SELECT wu.user_name FROM we_user wu
WHERE wu.user_id=wgm.user_id
)
WHEN wgm.type = 2 THEN
(
SELECT wc.name FROM we_customer wc
WHERE wc.external_userid=wgm.user_id
)
END memberName
FROM FROM
we_group_member wgm we_group_member wgm
LEFT JOIN we_customer wc ON wgm.user_id=wc.external_userid
<where> <where>
<if test="chatId != null "> and wgm.chat_id = #{chatId}</if> <if test="chatId != null "> and wgm.chat_id = #{chatId}</if>
<if test="memberName != null and memberName != ''"> and wc.`name` like concat('%', #{memberName}, '%')</if> <if test="memberName != null and memberName != ''"> and HAVING wc.`name` like concat('%', #{memberName}, '%')</if>
</where> </where>
</select> </select>
<!-- <select id="selectWeGroupMemberById" parameterType="Long" resultMap="WeGroupMemberResult">-->
<!-- <include refid="selectWeGroupMemberVo"/>-->
<!-- where id = #{id}-->
<!-- </select>-->
<!-- <insert id="insertWeGroupMember" parameterType="WeGroupMember">-->
<!-- insert into we_group_member-->
<!-- <trim prefix="(" suffix=")" suffixOverrides=",">-->
<!-- <if test="id != null">id,</if>-->
<!-- <if test="groupId != null">group_id,</if>-->
<!-- <if test="memberName != null">member_name,</if>-->
<!-- <if test="joinTime != null">join_time,</if>-->
<!-- <if test="joinType != null">join_type,</if>-->
<!-- </trim>-->
<!-- <trim prefix="values (" suffix=")" suffixOverrides=",">-->
<!-- <if test="id != null">#{id},</if>-->
<!-- <if test="groupId != null">#{groupId},</if>-->
<!-- <if test="memberName != null">#{memberName},</if>-->
<!-- <if test="joinTime != null">#{joinTime},</if>-->
<!-- <if test="joinType != null">#{joinType},</if>-->
<!-- </trim>-->
<!-- </insert>-->
<!-- <update id="updateWeGroupMember" parameterType="WeGroupMember">-->
<!-- update we_group_member-->
<!-- <trim prefix="SET" suffixOverrides=",">-->
<!-- <if test="groupId != null">group_id = #{groupId},</if>-->
<!-- <if test="memberName != null">member_name = #{memberName},</if>-->
<!-- <if test="joinTime != null">join_time = #{joinTime},</if>-->
<!-- <if test="joinType != null">join_type = #{joinType},</if>-->
<!-- </trim>-->
<!-- where id = #{id}-->
<!-- </update>-->
<!-- <delete id="deleteWeGroupMemberById" parameterType="Long">-->
<!-- delete from we_group_member where id = #{id}-->
<!-- </delete>-->
<!-- <delete id="deleteWeGroupMemberByIds" parameterType="String">-->
<!-- delete from we_group_member where id in-->
<!-- <foreach item="id" collection="array" open="(" separator="," close=")">-->
<!-- #{id}-->
<!-- </foreach>-->
<!-- </delete>-->
</mapper> </mapper>
\ No newline at end of file \ No newline at end of file
...@@ -28,12 +28,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -28,12 +28,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectWeUserVo"> <sql id="selectWeUserVo">
select head_image_url as avatarMediaid, user_name, alias, user_id, gender, mobile, email, wx_account, department, position, is_leader_in_dept, join_time, enable, id_card, qq_account, telephone, address, birthday, remark from we_user select is_activate,head_image_url as avatarMediaid, user_name, alias, user_id, gender, mobile, email, wx_account, department, position, is_leader_in_dept, join_time, enable, id_card, qq_account, telephone, address, birthday, remark from we_user
</sql> </sql>
<select id="selectWeUserList" parameterType="WeUser" resultMap="WeUserResult"> <select id="selectWeUserList" parameterType="WeUser" resultMap="WeUserResult">
<include refid="selectWeUserVo"/> <include refid="selectWeUserVo"/>
<where> WHERE
is_activate !=6
<if test="avatarMediaid != null and avatarMediaid != ''"> and head_image_url = #{avatarMediaid}</if> <if test="avatarMediaid != null and avatarMediaid != ''"> and head_image_url = #{avatarMediaid}</if>
<if test="name != null and name != ''"> and user_name like concat('%', #{name}, '%')</if> <if test="name != null and name != ''"> and user_name like concat('%', #{name}, '%')</if>
<if test="alias != null and alias != ''"> and alias = #{alias}</if> <if test="alias != null and alias != ''"> and alias = #{alias}</if>
...@@ -42,7 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -42,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 FIND_IN_SET(#{department},department)</if> <if test="department != null and department != '' and department != '1' "> 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>
...@@ -51,7 +52,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -51,7 +52,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="telephone != null and telephone != ''"> and telephone = #{telephone}</if> <if test="telephone != null and telephone != ''"> and telephone = #{telephone}</if>
<if test="address != null and address != ''"> and address = #{address}</if> <if test="address != null and address != ''"> and address = #{address}</if>
<if test="birthday != null "> and birthday = #{birthday}</if> <if test="birthday != null "> and birthday = #{birthday}</if>
</where>
</select> </select>
<select id="selectWeUserById" parameterType="Long" resultMap="WeUserResult"> <select id="selectWeUserById" parameterType="Long" resultMap="WeUserResult">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!