Commit 51383025 by sunxiwang

Merge remote-tracking branch 'origin/master'

2 parents 8822668b 14d3a122
Showing 43 changed files with 3503 additions and 375 deletions
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
<div align="center"> <div align="center">
![GVP Stars](http://img.shields.io/badge/GPV%20Stars-400+-yellow) ![GVP Stars](http://img.shields.io/badge/GPV%20Stars-500+-yellow)
![GVP Forks](http://img.shields.io/badge/GPV%20Forks-150+-yellow) ![GVP Forks](http://img.shields.io/badge/GPV%20Forks-190+-yellow)
![license](http://img.shields.io/badge/license-GPL%203.0-green) ![license](http://img.shields.io/badge/license-GPL%203.0-green)
</div> </div>
......
...@@ -24,6 +24,12 @@ ...@@ -24,6 +24,12 @@
<optional>true</optional> <!-- 表示依赖不会传递 --> <optional>true</optional> <!-- 表示依赖不会传递 -->
</dependency> </dependency>
<!-- 参数校验 -->
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
</dependency>
<!-- swagger2--> <!-- swagger2-->
<dependency> <dependency>
<groupId>io.springfox</groupId> <groupId>io.springfox</groupId>
......
...@@ -8,8 +8,10 @@ import com.linkwechat.common.core.page.TableDataInfo; ...@@ -8,8 +8,10 @@ import com.linkwechat.common.core.page.TableDataInfo;
import com.linkwechat.common.enums.BusinessType; import com.linkwechat.common.enums.BusinessType;
import com.linkwechat.wecom.domain.dto.message.CustomerMessagePushDto; import com.linkwechat.wecom.domain.dto.message.CustomerMessagePushDto;
import com.linkwechat.wecom.domain.vo.CustomerMessagePushVo; import com.linkwechat.wecom.domain.vo.CustomerMessagePushVo;
import com.linkwechat.wecom.domain.vo.WeCustomerMessageResultVo;
import com.linkwechat.wecom.service.IWeCustomerMessageOriginalService; import com.linkwechat.wecom.service.IWeCustomerMessageOriginalService;
import com.linkwechat.wecom.service.IWeCustomerMessagePushService; import com.linkwechat.wecom.service.IWeCustomerMessagePushService;
import com.linkwechat.wecom.service.IWeCustomerMessgaeResultService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
...@@ -33,6 +35,11 @@ public class WeCustomerMessagePushController extends BaseController { ...@@ -33,6 +35,11 @@ public class WeCustomerMessagePushController extends BaseController {
@Autowired @Autowired
private IWeCustomerMessageOriginalService weCustomerMessageOriginalService; private IWeCustomerMessageOriginalService weCustomerMessageOriginalService;
@Autowired
private IWeCustomerMessgaeResultService weCustomerMessgaeResultService;
/** /**
* 新增群发消息发送 * 新增群发消息发送
*/ */
...@@ -75,4 +82,15 @@ public class WeCustomerMessagePushController extends BaseController { ...@@ -75,4 +82,15 @@ public class WeCustomerMessagePushController extends BaseController {
return AjaxResult.success(customerMessagePushVo); return AjaxResult.success(customerMessagePushVo);
} }
/**
* 群发消息结果列表
*/
@PreAuthorize("@ss.hasPermi('customerMessagePush:push:pushResults')")
@GetMapping(value = "/pushResults")
public TableDataInfo customerMessagePushResult(@RequestParam(value = "messageId") Long messageId,@RequestParam(value = "status") String status){
startPage();
List<WeCustomerMessageResultVo> weCustomerMessageResuls = weCustomerMessgaeResultService.customerMessagePushs(messageId, status);
return getDataTable(weCustomerMessageResuls);
}
} }
package com.linkwechat.web.controller.wecom;
import com.linkwechat.common.annotation.Log;
import com.linkwechat.common.constant.HttpStatus;
import com.linkwechat.common.core.controller.BaseController;
import com.linkwechat.common.core.domain.AjaxResult;
import com.linkwechat.common.core.page.TableDataInfo;
import com.linkwechat.common.enums.BusinessType;
import com.linkwechat.wecom.domain.WeSensitive;
import com.linkwechat.wecom.service.IWeSensitiveService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
/**
* 敏感词设置Controller
*
* @author ruoyi
* @date 2020-12-29
*/
@RestController
@RequestMapping("/wecom/sensitive")
public class WeSensitiveController extends BaseController {
@Autowired
private IWeSensitiveService weSensitiveService;
/**
* 查询敏感词设置列表
*/
@PreAuthorize("@ss.hasPermi('wecom:sensitive:list')")
@GetMapping("/list")
public TableDataInfo list(WeSensitive weSensitive) {
startPage();
List<WeSensitive> list = weSensitiveService.selectWeSensitiveList(weSensitive);
return getDataTable(list);
}
/**
* 获取敏感词设置详细信息
*/
@PreAuthorize("@ss.hasPermi('wecom:sensitive:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return AjaxResult.success(weSensitiveService.selectWeSensitiveById(id));
}
/**
* 新增敏感词设置
*/
@PreAuthorize("@ss.hasPermi('wecom:sensitive:add')")
@Log(title = "敏感词设置", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@Valid @RequestBody WeSensitive weSensitive) {
return toAjax(weSensitiveService.insertWeSensitive(weSensitive));
}
/**
* 修改敏感词设置
*/
@PreAuthorize("@ss.hasPermi('wecom:sensitive:edit')")
@Log(title = "敏感词设置", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@Valid @RequestBody WeSensitive weSensitive) {
Long id = weSensitive.getId();
WeSensitive originData = weSensitiveService.selectWeSensitiveById(id);
if (originData == null) {
return AjaxResult.error(HttpStatus.NOT_FOUND, "数据不存在");
}
return toAjax(weSensitiveService.updateWeSensitive(weSensitive));
}
/**
* 删除敏感词设置
*/
@PreAuthorize("@ss.hasPermi('wecom:sensitive:remove')")
@Log(title = "敏感词设置", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable("ids") String ids) {
String[] id = ids.split(",");
Long[] idArray = new Long[id.length];
Arrays.stream(id).map(Long::parseLong).collect(Collectors.toList()).toArray(idArray);
return toAjax(weSensitiveService.destroyWeSensitiveByIds(idArray));
}
}
import request from '@/utils/request' import request from "@/utils/request";
const service = window.CONFIG.services.wecom + '/customerMessagePush' const service = window.CONFIG.services.wecom + "/customerMessagePush";
/** /**
* 新增企业id * 新增企业id
...@@ -35,10 +35,10 @@ const service = window.CONFIG.services.wecom + '/customerMessagePush' ...@@ -35,10 +35,10 @@ const service = window.CONFIG.services.wecom + '/customerMessagePush'
*/ */
export function add(data) { export function add(data) {
return request({ return request({
url: service + '/add', url: service + "/add",
method: 'post', method: "post",
data, data
}) });
} }
/** /**
...@@ -53,8 +53,32 @@ endTime:结束时间} ...@@ -53,8 +53,32 @@ endTime:结束时间}
*/ */
export function getList(data) { export function getList(data) {
return request({ return request({
url: service + '/list', url: service + "/list",
method: 'get', method: "get",
data, data
}) });
}
/**
* 群发消息详情
* @param {*} messageId:微信消息id
*/
export function getDetail(messageId) {
return request({
url: service + "/getInfo",
params: { messageId }
});
}
/**
*
* @param {*}
* messageId:微信消息id
status:发送状态 0-未发送 1-已发送 2-因客户不是好友导致发送失败 3-因客户已经收到其他群发消息导致发送失败
*/
export function getPushResult(params) {
return request({
url: service + "/pushResults",
params
});
} }
import Vue from 'vue' import Vue from "vue";
import Router from 'vue-router' import Router from "vue-router";
Vue.use(Router) Vue.use(Router);
/* Layout */ /* Layout */
import Layout from '@/layout' import Layout from "@/layout";
/** /**
* Note: 路由配置项 * Note: 路由配置项
...@@ -27,43 +27,43 @@ import Layout from '@/layout' ...@@ -27,43 +27,43 @@ import Layout from '@/layout'
// 公共路由 // 公共路由
export const constantRoutes = [ export const constantRoutes = [
{ {
path: '/redirect', path: "/redirect",
component: Layout, component: Layout,
hidden: true, hidden: true,
children: [ children: [
{ {
path: '/redirect/:path(.*)', path: "/redirect/:path(.*)",
component: (resolve) => require(['@/views/redirect'], resolve), component: resolve => require(["@/views/redirect"], resolve)
}, }
], ]
}, },
{ {
path: '', path: "",
component: Layout, component: Layout,
redirect: '/index', redirect: "/index",
children: [ children: [
{ {
path: '/index', path: "/index",
component: (resolve) => require(['@/views/index'], resolve), component: resolve => require(["@/views/index"], resolve),
name: '首页', name: "首页",
meta: { meta: {
title: '首页', title: "首页",
icon: 'dashboard', icon: "dashboard",
noCache: true, noCache: true,
affix: true, affix: true
}, }
}, }
], ]
}, },
{ {
path: '/login', path: "/login",
component: (resolve) => require(['@/views/login'], resolve), component: resolve => require(["@/views/login"], resolve),
hidden: true, hidden: true
}, },
{ {
path: '/authCallback', path: "/authCallback",
component: (resolve) => require(['@/views/authCallback'], resolve), component: resolve => require(["@/views/authCallback"], resolve),
hidden: true, hidden: true
}, },
// { // {
// path: '/customerManage', // path: '/customerManage',
...@@ -117,6 +117,42 @@ export const constantRoutes = [ ...@@ -117,6 +117,42 @@ export const constantRoutes = [
// ] // ]
// }, // },
// { // {
// path: "/communityOperating",
// component: Layout,
// redirect: "/communityOperating/newCustomer",
// meta: { title: "社群运营", icon: "peoples" },
// children: [
// {
// path: "newCustomer",
// name: "newCustomer",
// component: resolve =>
// require(["@/views/communityOperating/newCustomer/list"], resolve),
// meta: { title: "新客自动拉群", icon: "" }
// },
// {
// path: "oldCustomer",
// name: "oldCustomer",
// component: resolve =>
// require(["@/views/communityOperating/oldCustomer/list"], resolve),
// meta: { title: "老客标签建群", icon: "" }
// },
// {
// path: "keywords",
// name: "keywords",
// component: resolve =>
// require(["@/views/communityOperating/keywords/list"], resolve),
// meta: { title: "关键词拉群", icon: "" }
// },
// {
// path: "groupSOP",
// name: "groupSOP",
// component: resolve =>
// require(["@/views/communityOperating/groupSOP/list"], resolve),
// meta: { title: "群SOP", icon: "" }
// }
// ]
// },
// {
// path: '/groupMessage', // path: '/groupMessage',
// component: Layout, // component: Layout,
// redirect: '/groupMessage/add', // redirect: '/groupMessage/add',
...@@ -288,53 +324,75 @@ export const constantRoutes = [ ...@@ -288,53 +324,75 @@ export const constantRoutes = [
// ], // ],
// }, // },
// { // {
// path: '/appTool', // path: "/appTool",
// component: Layout, // component: Layout,
// redirect: '/appTool/text', // redirect: "/appTool/text",
// meta: { title: '应用工具', icon: 'app' }, // meta: { title: "应用工具", icon: "app" },
// children: [ // children: [
// { // {
// path: 'chatToolbar', // path: "chatToolbar",
// name: 'ChatToolbar', // name: "ChatToolbar",
// component: (resolve) => require(['@/views/appTool/chatToolbar/list'], resolve), // component: resolve =>
// meta: { title: '聊天工具栏', icon: '' } // require(["@/views/appTool/chatToolbar/list"], resolve),
// meta: { title: "聊天工具栏", icon: "" }
// }, // },
// { // {
// path: 'explain', // path: "explain",
// hidden: true, // hidden: true,
// component: (resolve) => require(['@/views/appTool/chatToolbar/explain'], resolve), // component: resolve =>
// meta: { title: '图文详解', icon: '' } // require(["@/views/appTool/chatToolbar/explain"], resolve),
// meta: { title: "图文详解", icon: "" }
// }, // },
// { // {
// path: 'config', // path: "config",
// hidden: true, // hidden: true,
// component: (resolve) => require(['@/views/appTool/chatToolbar/config'], resolve), // component: resolve =>
// meta: { title: '查看已配置信息', icon: '' } // require(["@/views/appTool/chatToolbar/config"], resolve),
// meta: { title: "查看已配置信息", icon: "" }
// }, // },
// { // {
// path: 'friendCircle', // path: "friendCircle",
// name: 'FriendCircle', // name: "FriendCircle",
// component: (resolve) => require(['@/views/appTool/friendCircle/list'], resolve), // component: resolve =>
// meta: { title: '朋友圈', icon: '' } // require(["@/views/appTool/friendCircle/list"], resolve),
// meta: { title: "朋友圈", icon: "" }
// }, // },
// { // {
// path: 'friendIntroduce', // path: "friendIntroduce",
// hidden: true, // hidden: true,
// component: (resolve) => require(['@/views/appTool/friendCircle/introduce'], resolve), // component: resolve =>
// meta: { title: '功能介绍', icon: '' } // require(["@/views/appTool/friendCircle/introduce"], resolve),
// meta: { title: "功能介绍", icon: "" }
// }, // },
// { // {
// path: 'friendPublish', // path: "friendPublish",
// hidden: true, // hidden: true,
// component: (resolve) => require(['@/views/appTool/friendCircle/publish'], resolve), // component: resolve =>
// meta: { title: '发布动态', icon: '' } // require(["@/views/appTool/friendCircle/publish"], resolve),
// meta: { title: "发布动态", icon: "" }
// }, // },
// { // {
// path: 'friendBackground', // path: "friendBackground",
// hidden: true, // hidden: true,
// component: (resolve) => require(['@/views/appTool/friendCircle/background'], resolve), // component: resolve =>
// meta: { title: '设置顶部背景', icon: '' } // require(["@/views/appTool/friendCircle/background"], resolve),
// meta: { title: "设置顶部背景", icon: "" }
// }, // },
// {
// path: "task",
// name: "Task",
// component: resolve => require(["@/views/appTool/task/list"], resolve),
// meta: { title: "任务宝", icon: "" }
// },
// {
// path: "groupFission",
// name: "groupFission",
// component: resolve =>
// require(["@/views/appTool/groupFission/list"], resolve),
// meta: { title: "群裂变", icon: "" }
// }
// ] // ]
// }, // },
// { // {
...@@ -366,59 +424,58 @@ export const constantRoutes = [ ...@@ -366,59 +424,58 @@ export const constantRoutes = [
// }, // },
{ {
path: '/user', path: "/user",
component: Layout, component: Layout,
hidden: true, hidden: true,
redirect: 'noredirect', redirect: "noredirect",
children: [ children: [
{ {
path: 'profile', path: "profile",
component: (resolve) => component: resolve =>
require(['@/views/system/user/profile/index'], resolve), require(["@/views/system/user/profile/index"], resolve),
name: 'Profile', name: "Profile",
meta: { title: '个人中心', icon: 'user' }, meta: { title: "个人中心", icon: "user" }
}, }
], ]
}, },
{ {
path: '/dict', path: "/dict",
component: Layout, component: Layout,
hidden: true, hidden: true,
children: [ children: [
{ {
path: 'type/data/:dictId(\\d+)', path: "type/data/:dictId(\\d+)",
component: (resolve) => require(['@/views/system/dict/data'], resolve), component: resolve => require(["@/views/system/dict/data"], resolve),
name: 'Data', name: "Data",
meta: { title: '字典数据', icon: '' }, meta: { title: "字典数据", icon: "" }
}, }
], ]
}, },
{ {
path: '/job', path: "/job",
component: Layout, component: Layout,
hidden: true, hidden: true,
children: [ children: [
{ {
path: 'log', path: "log",
component: (resolve) => require(['@/views/monitor/job/log'], resolve), component: resolve => require(["@/views/monitor/job/log"], resolve),
name: 'JobLog', name: "JobLog",
meta: { title: '调度日志' }, meta: { title: "调度日志" }
}, }
], ]
}, },
{ {
path: '/gen', path: "/gen",
component: Layout, component: Layout,
hidden: true, hidden: true,
children: [ children: [
{ {
path: 'edit/:tableId(\\d+)', path: "edit/:tableId(\\d+)",
component: (resolve) => component: resolve => require(["@/views/tool/gen/editTable"], resolve),
require(['@/views/tool/gen/editTable'], resolve), name: "GenEdit",
name: 'GenEdit', meta: { title: "修改生成配置" }
meta: { title: '修改生成配置' }, }
}, ]
],
}, },
// { // {
// path: '/test', // path: '/test',
...@@ -426,19 +483,19 @@ export const constantRoutes = [ ...@@ -426,19 +483,19 @@ export const constantRoutes = [
// hidden: true, // hidden: true,
// }, // },
{ {
path: '/404', path: "/404",
component: (resolve) => require(['@/views/error/404'], resolve), component: resolve => require(["@/views/error/404"], resolve),
hidden: true, hidden: true
}, },
{ {
path: '/401', path: "/401",
component: (resolve) => require(['@/views/error/401'], resolve), component: resolve => require(["@/views/error/401"], resolve),
hidden: true, hidden: true
}, }
] ];
export default new Router({ export default new Router({
// mode: 'history', // mode: 'history',
scrollBehavior: () => ({ y: 0 }), scrollBehavior: () => ({ y: 0 }),
routes: constantRoutes, routes: constantRoutes
}) });
<style lang="scss" scoped> <script>
.chat-preview { export default {
border-radius: 4px; components: {},
position: relative; props: {},
margin-left: 40px; data() {
display: inline-block; return {
width: 150px; dialogVisible: false
min-height: 263px; };
background-repeat: no-repeat; },
background-size: cover; watch: {},
top: 15px; computed: {},
.logo { created() {},
width: 40px; mounted() {},
height: 40px; methods: {}
position: absolute; };
top: 18px; </script>
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> <template>
<div> <div>
<div> <div>
配置聊天工具栏,方便成员在外部会话中查看和使用,提高服务效率。 配置聊天工具栏,方便成员在外部会话中查看和使用,提高服务效率。
<el-button type="text" @click="$router.push('/appTool/explain')">图文详解</el-button> <el-button type="text" @click="$router.push('/appTool/explain')"
<el-button type="text" @click="$router.push('/appTool/config')">查看已配置信息</el-button> >图文详解</el-button
>
<el-button type="text" @click="$router.push('/appTool/config')"
>查看已配置信息</el-button
>
</div> </div>
<div> <el-card shadow="never" header="红包工具栏">
<div slot="header">
<span>抓取快捷回复素材</span> 素材抓取后,即可在聊天工具栏使用 <span>抓取快捷回复素材</span> 素材抓取后,即可在聊天工具栏使用
</div> </div>
<el-table
<el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange"> 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" />
<el-table-column label="聊天工具栏名称" align="center" prop="title" /> <el-table-column label="聊天工具栏名称" align="center" prop="title" />
<el-table-column label="已抓取素材数量" align="center" prop="businessType" :formatter="typeFormat" /> <el-table-column
<el-table-column label="是否启用" align="center" prop="operTime" width="180"> label="已抓取素材数量"
align="center"
prop="businessType"
:formatter="typeFormat"
/>
<el-table-column
label="是否启用"
align="center"
prop="operTime"
width="180"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.operTime) }}</span> <span>{{ parseTime(scope.row.operTime) }}</span>
</template> </template>
...@@ -56,13 +59,15 @@ ...@@ -56,13 +59,15 @@
size="mini" size="mini"
type="text" type="text"
icon="el-icon-view" icon="el-icon-view"
@click="handleView(scope.row,scope.index)" @click="handleView(scope.row, scope.index)"
>抓取素材</el-button> >抓取素材</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-card>
<el-card shadow="never" header="红包工具栏"> <el-card class="mt20" shadow="never" header="红包工具栏">
<!-- <div slot="header"></div> --> <!-- <div slot="header"></div> -->
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="10"> <el-col :span="10">
...@@ -83,7 +88,12 @@ ...@@ -83,7 +88,12 @@
</div> </div>
<el-form ref="form" :model="form" label-width="100px"> <el-form ref="form" :model="form" label-width="100px">
<el-form-item label="企业logo"> <el-form-item label="企业logo">
<el-upload action :show-file-list="false" :on-success="d" :before-upload="d"> <el-upload
action
:show-file-list="false"
:on-success="d"
:before-upload="d"
>
<img v-if="imageUrl" :src="imageUrl" /> <img v-if="imageUrl" :src="imageUrl" />
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
...@@ -100,7 +110,7 @@ ...@@ -100,7 +110,7 @@
<el-col :span="10"> <el-col :span="10">
<div <div
class="chat-preview" class="chat-preview"
style="background-image: url(&quot;https://wscos-1253767630.cos.ap-nanjing.myqcloud.com/wework/assets/red-packet.png&quot;);" style='background-image: url("https://wscos-1253767630.cos.ap-nanjing.myqcloud.com/wework/assets/red-packet.png");'
> >
<div class="el-image logo" style> <div class="el-image logo" style>
<div class="el-image__error">加载失败</div> <div class="el-image__error">加载失败</div>
...@@ -132,32 +142,56 @@ ...@@ -132,32 +142,56 @@
</div> </div>
<el-table :data="data" style="width: 100%"> <el-table :data="data" style="width: 100%">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column prop="prop" label="文本内容" width="width"></el-table-column> <el-table-column
<el-table-column prop="prop" label="时间" width="width"></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-table>
</el-col> </el-col>
</el-row> </el-row>
<div slot="footer"> <div slot="footer">
<el-button @click="dialogVisible = false">取 消</el-button> <el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="dialogVisible = false">确 定</el-button> <el-button type="primary" @click="dialogVisible = false"
>确 定</el-button
>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <style lang="scss" scoped>
export default { .chat-preview {
components: {}, border-radius: 4px;
props: {}, position: relative;
data() { margin-left: 40px;
return { display: inline-block;
dialogVisible: true, width: 150px;
}; min-height: 263px;
}, background-repeat: no-repeat;
watch: {}, background-size: cover;
computed: {}, top: 15px;
created() {}, .logo {
mounted() {}, width: 40px;
methods: {}, height: 40px;
}; position: absolute;
</script> 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>
<style lang="scss" scoped> <style lang="scss" scoped></style>
</style>
<template> <template>
<div> <div>
<el-tabs type="border-card" v-model="activeName" @tab-click="handleClick"> <el-tabs type="card" v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="朋友圈动态" name="1"> <el-tab-pane label="朋友圈动态" name="1">
<div> <div class="mb20">
* 该朋友圈为展示在企业成员对外资料显示中的企业朋友圈, * 该朋友圈为展示在企业成员对外资料显示中的企业朋友圈,
<!-- <el-button type="primary">查看功能介绍</el-button> --> <!-- <el-button type="primary">查看功能介绍</el-button> -->
<el-link type="primary" href="/appTool/friendIntroduce">查看功能介绍</el-link> <el-link type="primary" href="/appTool/friendIntroduce"
>查看功能介绍</el-link
>
</div> </div>
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="100px"> <el-form
class="top-search"
:model="queryParams"
ref="queryForm"
:inline="true"
label-width="100px"
>
<el-form-item label="关键词" prop="title"> <el-form-item label="关键词" prop="title">
<el-input <el-input
v-model="queryParams.title" v-model="queryParams.title"
placeholder="请输入" placeholder="请输入"
clearable clearable
style="width: 240px;"
size="small" size="small"
/> />
</el-form-item> </el-form-item>
...@@ -25,7 +31,6 @@ ...@@ -25,7 +31,6 @@
<el-date-picker <el-date-picker
v-model="dateRange" v-model="dateRange"
size="small" size="small"
style="width: 240px"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
type="daterange" type="daterange"
range-separator="-" range-separator="-"
...@@ -34,66 +39,90 @@ ...@@ -34,66 +39,90 @@
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label> <el-form-item label>
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button> <el-button
type="cyan"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>查询</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="ar"> <div class="ar">
<el-button type="primary">发布动态</el-button> <el-button type="primary">发布动态</el-button>
</div> </div>
<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" />
<el-table-column label="发布内容" align="center" prop="title" /> <el-table-column label="发布内容" align="center" prop="title" />
<el-table-column label="创建人" align="center" prop="businessType" /> <el-table-column label="创建人" align="center" prop="businessType" />
<el-table-column label="发布时间" align="center" prop="operTime" width="180"> <el-table-column
label="发布时间"
align="center"
prop="operTime"
width="180"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.operTime) }}</span> <span>{{ parseTime(scope.row.operTime) }}</span>
</template> </template>
</el-table-column> </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">
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-view" icon="el-icon-view"
@click="handleView(scope.row,scope.index)" @click="handleView(scope.row, scope.index)"
v-hasPermi="['monitor:operlog:query']" v-hasPermi="['monitor:operlog:query']"
>下载</el-button> >下载</el-button
>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-view" icon="el-icon-view"
@click="handleView(scope.row,scope.index)" @click="handleView(scope.row, scope.index)"
v-hasPermi="['monitor:operlog:query']" v-hasPermi="['monitor:operlog:query']"
>复制链接</el-button> >复制链接</el-button
>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-view" icon="el-icon-view"
@click="handleView(scope.row,scope.index)" @click="handleView(scope.row, scope.index)"
v-hasPermi="['monitor:operlog:query']" v-hasPermi="['monitor:operlog:query']"
>查看详情</el-button> >查看详情</el-button
>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-view" icon="el-icon-view"
@click="handleView(scope.row,scope.index)" @click="handleView(scope.row, scope.index)"
v-hasPermi="['monitor:operlog:query']" v-hasPermi="['monitor:operlog:query']"
>编辑</el-button> >编辑</el-button
>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-view" icon="el-icon-view"
@click="handleView(scope.row,scope.index)" @click="handleView(scope.row, scope.index)"
v-hasPermi="['monitor:operlog:query']" v-hasPermi="['monitor:operlog:query']"
>删除</el-button> >删除</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total > 0"
:total="total" :total="total"
:page.sync="queryParams.pageNum" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
...@@ -101,20 +130,36 @@ ...@@ -101,20 +130,36 @@
/> />
<!-- 添加或修改参数配置对话框 --> <!-- 添加或修改参数配置对话框 -->
<el-dialog title="编辑图片" :visible.sync="open" width="600px" append-to-body> <el-dialog
title="编辑图片"
:visible.sync="open"
width="600px"
append-to-body
>
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="图片名称"> <el-form-item label="图片名称">
<el-input v-model="sd" placeholder></el-input> <el-input v-model="sd" placeholder></el-input>
</el-form-item> </el-form-item>
<el-form-item label="图片文案"> <el-form-item label="图片文案">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input> <el-input
v-model="form.remark"
type="textarea"
placeholder="请输入内容"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="图片"> <el-form-item label="图片">
<el-upload action :show-file-list="false" :on-success="d" :before-upload="d"> <el-upload
action
:show-file-list="false"
:on-success="d"
:before-upload="d"
>
<img v-if="imageUrl" :src="imageUrl" /> <img v-if="imageUrl" :src="imageUrl" />
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
<div>支持JPG,PNG格式,图片大小不超过2M,建议上传宽高1:1的图片</div> <div>
支持JPG,PNG格式,图片大小不超过2M,建议上传宽高1:1的图片
</div>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
...@@ -131,33 +176,45 @@ ...@@ -131,33 +176,45 @@
style="width: 240px;" style="width: 240px;"
v-model="input2" v-model="input2"
></el-input> ></el-input>
<el-button @click="$router.push('/appTool/friendBackground')">设置默认背景图片</el-button> <el-button @click="$router.push('/appTool/friendBackground')"
>设置默认背景图片</el-button
>
<el-button type="primary">一键设置朋友圈地址</el-button> <el-button type="primary">一键设置朋友圈地址</el-button>
</div> </div>
<el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange"> <el-table
v-loading="loading"
:data="list"
@selection-change="handleSelectionChange"
>
<el-table-column label="员工" align="center" prop="operId" /> <el-table-column label="员工" align="center" prop="operId" />
<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">
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-view" icon="el-icon-view"
@click="handleView(scope.row,scope.index)" @click="handleView(scope.row, scope.index)"
v-hasPermi="['monitor:operlog:query']" v-hasPermi="['monitor:operlog:query']"
>编辑头像背景</el-button> >编辑头像背景</el-button
>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-view" icon="el-icon-view"
@click="handleView(scope.row,scope.index)" @click="handleView(scope.row, scope.index)"
v-hasPermi="['monitor:operlog:query']" v-hasPermi="['monitor:operlog:query']"
>删除</el-button> >删除</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total > 0"
:total="total" :total="total"
:page.sync="queryParams.pageNum" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
...@@ -176,13 +233,13 @@ export default { ...@@ -176,13 +233,13 @@ export default {
return { return {
queryParams: {}, queryParams: {},
form: {}, form: {},
activeName: "1", activeName: "1"
}; };
}, },
watch: {}, watch: {},
computed: {}, computed: {},
created() {}, created() {},
mounted() {}, mounted() {},
methods: {}, methods: {}
}; };
</script> </script>
<script>
import * as api from "@/api/customer";
// import clipboard from "clipboard";
export default {
components: {},
props: {},
data() {
return {
query: {
pageNum: 1,
pageSize: 10,
name: ""
},
dateRange: [], // 添加日期
total: 0,
form: {},
list: [],
dialogVisible: false,
disabled: false,
loading: false,
rules: Object.freeze({
name: [{ required: true, message: "必填项", trigger: "blur" }],
corpId: [{ required: true, message: "必填项", trigger: "blur" }],
corpSecret: [{ required: true, message: "必填项", trigger: "blur" }],
contactSecret: [{ required: true, message: "必填项", trigger: "blur" }]
}),
status: ["正常", "停用"]
};
},
watch: {},
computed: {},
created() {
this.getList();
},
mounted() {
// new clipboard(".copy-btn");
},
methods: {
getList(page) {
if (this.dateRange[0]) {
this.query.beginTime = this.dateRange[0];
this.query.endTime = this.dateRange[1];
} else {
this.query.beginTime = "";
this.query.endTime = "";
}
page && (this.query.pageNum = page);
this.loading = true;
api
.getList(this.query)
.then(({ rows, total }) => {
this.list = rows;
this.total = +total;
this.loading = false;
})
.catch(() => {
this.loading = false;
});
},
edit(data, type) {
this.form = Object.assign({}, data || {});
this.dialogVisible = true;
type || !data ? (this.disabled = false) : (this.disabled = true);
},
submit() {
this.$refs["form"].validate(valid => {
if (valid) {
api[this.form.id ? "update" : "add"](this.form)
.then(() => {
this.msgSuccess("操作成功");
this.dialogVisible = false;
this.getList(!this.form.id && 1);
})
.catch(() => {
this.dialogVisible = false;
});
}
});
}
}
};
</script>
<template>
<div>
<div class="top-search">
<el-form inline label-position="right" :model="form" label-width="80px">
<el-form-item label="裂变名">
<el-input v-model="query.name" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="活动日期">
<el-date-picker
v-model="dateRange"
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="primary" @click="getList(1)">查询</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</div>
<div class="ar mb10">
<el-button
v-hasPermi="['enterpriseWechat:add']"
type="primary"
icon="el-icon-plus"
@click="edit()"
>新建群裂变任务</el-button
>
</div>
<!-- <el-card shadow="never" :body-style="{padding: '20px 0 0'}">
</el-card>-->
<el-table v-loading="loading" :data="list">
<!-- <el-table-column type="selection" width="50" align="center" /> -->
<el-table-column
label="群裂变名称"
align="center"
prop="name"
:show-overflow-tooltip="true"
/>
<el-table-column prop="createTime" label="裂变客户数量" align="center">
<template slot-scope="scope">{{
Math.floor(Math.random() * 10000)
}}</template>
</el-table-column>
<el-table-column prop="createTime" label="活动状态" align="center">
已结束
</el-table-column>
<el-table-column
label="活动时间"
align="center"
prop="createTime"
width="160"
></el-table-column>
<el-table-column
label="操作"
align="center"
width="180"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<el-button
v-hasPermi="['enterpriseWechat:view']"
size="mini"
type="text"
icon="el-icon-view"
@click="edit(scope.row, 0)"
>查看</el-button
>
<el-button
v-hasPermi="['enterpriseWechat:edit']"
size="mini"
type="text"
icon="el-icon-edit"
@click="edit(scope.row, 1)"
>编辑</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="query.pageNum"
:limit.sync="query.pageSize"
@pagination="getList()"
/>
<el-dialog title="查看企业微信号" :visible.sync="dialogVisible">
<el-form
ref="form"
label-position="right"
:model="form"
:rules="rules"
label-width="160px"
:disabled="disabled"
>
<el-form-item label="企业名称" prop="name">
<el-input v-model="form.name" :disabled="form.id"></el-input>
</el-form-item>
<el-form-item label="企业ID(CorpID)" prop="corpId">
<el-input
:disabled="form.id"
v-model="form.corpId"
style="width: 80%"
placeholder="可在新闻公告应用的生日祝福等场景使用"
></el-input>
<el-link class="fr" type="primary">如何获取?</el-link>
</el-form-item>
<!-- <el-form-item label="Token">
<el-input disabled id="copy-input" v-model="form.name" placeholder="成员唯一标识,不支持更改,不支持中文"></el-input>
<el-button type="primary" class="copy-btn" data-clipboard-target="#copy-input">复制</el-button>
</el-form-item>
<el-form-item label="EncodingAESKey">
<el-input disabled id="copy-input1" v-model="form.name"></el-input>
<el-button type="primary" class="copy-btn" data-clipboard-target="#copy-input1">复制</el-button>
</el-form-item>-->
<el-form-item label="服务商secret" prop="providerSecret">
<el-input v-model="form.providerSecret" style="width: 80%"></el-input>
<el-link class="fr" type="primary">如何获取?</el-link>
</el-form-item>
<el-form-item label="通讯录管理secret" prop="corpSecret">
<el-input v-model="form.corpSecret" style="width: 80%"></el-input>
<el-link class="fr" type="primary">如何获取?</el-link>
</el-form-item>
<!-- <el-form-item label="通讯录事件服务">
<el-radio-group v-model="form.contactSecret">
<el-radio label="label">开启</el-radio>
<el-radio label="label">不开启</el-radio>
</el-radio-group>
<div>开启后,可以将成员、部门的增删改以及成员的标签变更实时的同步到塬微SCRM,无需手动更新同步。</div>
</el-form-item>-->
<el-form-item label="外部联系人管理secret" prop="contactSecret">
<el-input v-model="form.contactSecret"></el-input>
</el-form-item>
<!-- <el-form-item label="通讯录事件服务">
<el-radio-group v-model="form.model">
<el-radio label="label">开启</el-radio>
<el-radio label="label">不开启</el-radio>
</el-radio-group>
<div>开启后,可以将企业客户的添加、编辑以及主动删除客户和被动被客户删除实时的同步到塬微SCRM,无需手动更新同步。</div>
</el-form-item>-->
<el-form-item
label="企业微信扫码登陆回调地址"
prop="wxQrLoginRedirectUri"
>
<el-input v-model="form.wxQrLoginRedirectUri"></el-input>
</el-form-item>
</el-form>
<div slot="footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="submit" v-show="!disabled"
>确 定</el-button
>
</div>
</el-dialog>
</div>
</template>
<script>
import * as api from "@/api/customer";
// import clipboard from "clipboard";
export default {
components: {},
props: {},
data() {
return {
query: {
pageNum: 1,
pageSize: 10,
name: ""
},
dateRange: [], // 添加日期
total: 0,
form: {},
list: [],
dialogVisible: false,
disabled: false,
loading: false,
rules: Object.freeze({
name: [{ required: true, message: "必填项", trigger: "blur" }],
corpId: [{ required: true, message: "必填项", trigger: "blur" }],
corpSecret: [{ required: true, message: "必填项", trigger: "blur" }],
contactSecret: [{ required: true, message: "必填项", trigger: "blur" }]
}),
status: ["正常", "停用"]
};
},
watch: {},
computed: {},
created() {
this.getList();
},
mounted() {
// new clipboard(".copy-btn");
},
methods: {
getList(page) {
if (this.dateRange[0]) {
this.query.beginTime = this.dateRange[0];
this.query.endTime = this.dateRange[1];
} else {
this.query.beginTime = "";
this.query.endTime = "";
}
page && (this.query.pageNum = page);
this.loading = true;
api
.getList(this.query)
.then(({ rows, total }) => {
this.list = rows;
this.total = +total;
this.loading = false;
})
.catch(() => {
this.loading = false;
});
},
edit(data, type) {
this.form = Object.assign({}, data || {});
this.dialogVisible = true;
type || !data ? (this.disabled = false) : (this.disabled = true);
},
submit() {
this.$refs["form"].validate(valid => {
if (valid) {
api[this.form.id ? "update" : "add"](this.form)
.then(() => {
this.msgSuccess("操作成功");
this.dialogVisible = false;
this.getList(!this.form.id && 1);
})
.catch(() => {
this.dialogVisible = false;
});
}
});
}
}
};
</script>
<template>
<div>
<div class="top-search">
<el-form inline label-position="right" :model="form" label-width="80px">
<el-form-item label="任务名">
<el-input v-model="query.name" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="活动日期">
<el-date-picker
v-model="dateRange"
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="primary" @click="getList(1)">查询</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</div>
<div class="ar mb10">
<el-button
v-hasPermi="['enterpriseWechat:add']"
type="primary"
icon="el-icon-plus"
@click="edit()"
>新建任务</el-button
>
</div>
<!-- <el-card shadow="never" :body-style="{padding: '20px 0 0'}">
</el-card>-->
<el-table v-loading="loading" :data="list">
<!-- <el-table-column type="selection" width="50" align="center" /> -->
<el-table-column
label="任务活动名称"
align="center"
prop="name"
:show-overflow-tooltip="true"
/>
<el-table-column prop="createTime" label="裂变客户数量" align="center">
<template slot-scope="scope">{{
Math.floor(Math.random() * 10000)
}}</template>
</el-table-column>
<el-table-column prop="createTime" label="活动状态" align="center">
已结束
</el-table-column>
<el-table-column
label="活动时间"
align="center"
prop="createTime"
width="160"
></el-table-column>
<el-table-column
label="操作"
align="center"
width="180"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<el-button
v-hasPermi="['enterpriseWechat:view']"
size="mini"
type="text"
icon="el-icon-view"
@click="edit(scope.row, 0)"
>查看</el-button
>
<el-button
v-hasPermi="['enterpriseWechat:edit']"
size="mini"
type="text"
icon="el-icon-edit"
@click="edit(scope.row, 1)"
>编辑</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="query.pageNum"
:limit.sync="query.pageSize"
@pagination="getList()"
/>
<el-dialog title="查看企业微信号" :visible.sync="dialogVisible">
<el-form
ref="form"
label-position="right"
:model="form"
:rules="rules"
label-width="160px"
:disabled="disabled"
>
<el-form-item label="企业名称" prop="name">
<el-input v-model="form.name" :disabled="form.id"></el-input>
</el-form-item>
<el-form-item label="企业ID(CorpID)" prop="corpId">
<el-input
:disabled="form.id"
v-model="form.corpId"
style="width: 80%"
placeholder="可在新闻公告应用的生日祝福等场景使用"
></el-input>
<el-link class="fr" type="primary">如何获取?</el-link>
</el-form-item>
<!-- <el-form-item label="Token">
<el-input disabled id="copy-input" v-model="form.name" placeholder="成员唯一标识,不支持更改,不支持中文"></el-input>
<el-button type="primary" class="copy-btn" data-clipboard-target="#copy-input">复制</el-button>
</el-form-item>
<el-form-item label="EncodingAESKey">
<el-input disabled id="copy-input1" v-model="form.name"></el-input>
<el-button type="primary" class="copy-btn" data-clipboard-target="#copy-input1">复制</el-button>
</el-form-item>-->
<el-form-item label="服务商secret" prop="providerSecret">
<el-input v-model="form.providerSecret" style="width: 80%"></el-input>
<el-link class="fr" type="primary">如何获取?</el-link>
</el-form-item>
<el-form-item label="通讯录管理secret" prop="corpSecret">
<el-input v-model="form.corpSecret" style="width: 80%"></el-input>
<el-link class="fr" type="primary">如何获取?</el-link>
</el-form-item>
<!-- <el-form-item label="通讯录事件服务">
<el-radio-group v-model="form.contactSecret">
<el-radio label="label">开启</el-radio>
<el-radio label="label">不开启</el-radio>
</el-radio-group>
<div>开启后,可以将成员、部门的增删改以及成员的标签变更实时的同步到塬微SCRM,无需手动更新同步。</div>
</el-form-item>-->
<el-form-item label="外部联系人管理secret" prop="contactSecret">
<el-input v-model="form.contactSecret"></el-input>
</el-form-item>
<!-- <el-form-item label="通讯录事件服务">
<el-radio-group v-model="form.model">
<el-radio label="label">开启</el-radio>
<el-radio label="label">不开启</el-radio>
</el-radio-group>
<div>开启后,可以将企业客户的添加、编辑以及主动删除客户和被动被客户删除实时的同步到塬微SCRM,无需手动更新同步。</div>
</el-form-item>-->
<el-form-item
label="企业微信扫码登陆回调地址"
prop="wxQrLoginRedirectUri"
>
<el-input v-model="form.wxQrLoginRedirectUri"></el-input>
</el-form-item>
</el-form>
<div slot="footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="submit" v-show="!disabled"
>确 定</el-button
>
</div>
</el-dialog>
</div>
</template>
<script>
import * as api from "@/api/customer";
export default {
components: {},
props: {},
data() {
return {
query: {
pageNum: 1,
pageSize: 10,
name: ""
},
dateRange: [], // 添加日期
total: 0,
form: {},
list: [],
dialogVisible: false,
disabled: false,
loading: false,
rules: Object.freeze({
name: [{ required: true, message: "必填项", trigger: "blur" }],
corpId: [{ required: true, message: "必填项", trigger: "blur" }],
corpSecret: [{ required: true, message: "必填项", trigger: "blur" }],
contactSecret: [{ required: true, message: "必填项", trigger: "blur" }]
}),
status: ["正常", "停用"],
pushType: {
0: "发给客户",
1: "发给客户群"
}
};
},
watch: {},
computed: {},
created() {
this.getList();
},
mounted() {
// new clipboard(".copy-btn");
},
methods: {
getList(page) {
if (this.dateRange[0]) {
this.query.beginTime = this.dateRange[0];
this.query.endTime = this.dateRange[1];
} else {
this.query.beginTime = "";
this.query.endTime = "";
}
page && (this.query.pageNum = page);
this.loading = true;
api
.getList(this.query)
.then(({ rows, total }) => {
this.list = rows;
this.total = +total;
this.loading = false;
})
.catch(() => {
this.loading = false;
});
},
edit(data, type) {
this.form = Object.assign({}, data || {});
this.dialogVisible = true;
type || !data ? (this.disabled = false) : (this.disabled = true);
},
submit() {
this.$refs["form"].validate(valid => {
if (valid) {
api[this.form.id ? "update" : "add"](this.form)
.then(() => {
this.msgSuccess("操作成功");
this.dialogVisible = false;
this.getList(!this.form.id && 1);
})
.catch(() => {
this.dialogVisible = false;
});
}
});
}
}
};
</script>
<template>
<div>
<div class="fxbw mb10 aic">
<div class="total">
群SOP 制定推送规则后,通知群主定时给指定客户群发送消息。
</div>
<div>
<el-button type="primary" icon="el-icon-plus" @click="goRoute()"
>创建规则</el-button
>
<el-input
placeholder="请输入规则名称"
prefix-icon="el-icon-search"
v-model="query.welcomeMsg"
style="width: 240px; margin-left: 10px;"
@change="getList(0)"
></el-input>
</div>
</div>
<!-- <el-card shadow="never" :body-style="{padding: '20px 0 0'}">
</el-card>-->
<el-table v-loading="loading" :data="list">
<!-- <el-table-column type="selection" width="50" align="center" /> -->
<el-table-column
label="规则名称"
align="center"
prop="name"
:show-overflow-tooltip="true"
/>
<el-table-column prop="createTime" label="创建人" align="center">
<template slot-scope="scope">{{
Math.floor(Math.random() * 10000)
}}</template>
</el-table-column>
<el-table-column
label="创建时间"
align="center"
prop="createTime"
></el-table-column>
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<el-button
v-hasPermi="['enterpriseWechat:view']"
size="mini"
type="text"
icon="el-icon-view"
@click="edit(scope.row, 0)"
>查看</el-button
>
<el-button
v-hasPermi="['enterpriseWechat:edit']"
size="mini"
type="text"
icon="el-icon-edit"
@click="edit(scope.row, 1)"
>编辑</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="query.pageNum"
:limit.sync="query.pageSize"
@pagination="getList()"
/>
<el-dialog title="查看企业微信号" :visible.sync="dialogVisible">
<el-form
ref="form"
label-position="right"
:model="form"
:rules="rules"
label-width="160px"
:disabled="disabled"
>
<el-form-item label="企业名称" prop="name">
<el-input v-model="form.name" :disabled="form.id"></el-input>
</el-form-item>
<el-form-item label="企业ID(CorpID)" prop="corpId">
<el-input
:disabled="form.id"
v-model="form.corpId"
style="width: 80%"
placeholder="可在新闻公告应用的生日祝福等场景使用"
></el-input>
<el-link class="fr" type="primary">如何获取?</el-link>
</el-form-item>
<!-- <el-form-item label="Token">
<el-input disabled id="copy-input" v-model="form.name" placeholder="成员唯一标识,不支持更改,不支持中文"></el-input>
<el-button type="primary" class="copy-btn" data-clipboard-target="#copy-input">复制</el-button>
</el-form-item>
<el-form-item label="EncodingAESKey">
<el-input disabled id="copy-input1" v-model="form.name"></el-input>
<el-button type="primary" class="copy-btn" data-clipboard-target="#copy-input1">复制</el-button>
</el-form-item>-->
<el-form-item label="服务商secret" prop="providerSecret">
<el-input v-model="form.providerSecret" style="width: 80%"></el-input>
<el-link class="fr" type="primary">如何获取?</el-link>
</el-form-item>
<el-form-item label="通讯录管理secret" prop="corpSecret">
<el-input v-model="form.corpSecret" style="width: 80%"></el-input>
<el-link class="fr" type="primary">如何获取?</el-link>
</el-form-item>
<!-- <el-form-item label="通讯录事件服务">
<el-radio-group v-model="form.contactSecret">
<el-radio label="label">开启</el-radio>
<el-radio label="label">不开启</el-radio>
</el-radio-group>
<div>开启后,可以将成员、部门的增删改以及成员的标签变更实时的同步到塬微SCRM,无需手动更新同步。</div>
</el-form-item>-->
<el-form-item label="外部联系人管理secret" prop="contactSecret">
<el-input v-model="form.contactSecret"></el-input>
</el-form-item>
<!-- <el-form-item label="通讯录事件服务">
<el-radio-group v-model="form.model">
<el-radio label="label">开启</el-radio>
<el-radio label="label">不开启</el-radio>
</el-radio-group>
<div>开启后,可以将企业客户的添加、编辑以及主动删除客户和被动被客户删除实时的同步到塬微SCRM,无需手动更新同步。</div>
</el-form-item>-->
<el-form-item
label="企业微信扫码登陆回调地址"
prop="wxQrLoginRedirectUri"
>
<el-input v-model="form.wxQrLoginRedirectUri"></el-input>
</el-form-item>
</el-form>
<div slot="footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="submit" v-show="!disabled"
>确 定</el-button
>
</div>
</el-dialog>
</div>
</template>
<script>
import * as api from "@/api/customer";
export default {
components: {},
props: {},
data() {
return {
query: {
pageNum: 1,
pageSize: 10,
name: ""
},
dateRange: [], // 添加日期
total: 0,
form: {},
list: [],
dialogVisible: false,
disabled: false,
loading: false,
rules: Object.freeze({
name: [{ required: true, message: "必填项", trigger: "blur" }],
corpId: [{ required: true, message: "必填项", trigger: "blur" }],
corpSecret: [{ required: true, message: "必填项", trigger: "blur" }],
contactSecret: [{ required: true, message: "必填项", trigger: "blur" }]
}),
status: ["正常", "停用"],
pushType: {
0: "发给客户",
1: "发给客户群"
}
};
},
watch: {},
computed: {},
created() {
this.getList();
},
mounted() {
// new clipboard(".copy-btn");
},
methods: {
getList(page) {
if (this.dateRange[0]) {
this.query.beginTime = this.dateRange[0];
this.query.endTime = this.dateRange[1];
} else {
this.query.beginTime = "";
this.query.endTime = "";
}
page && (this.query.pageNum = page);
this.loading = true;
api
.getList(this.query)
.then(({ rows, total }) => {
this.list = rows;
this.total = +total;
this.loading = false;
})
.catch(() => {
this.loading = false;
});
},
edit(data, type) {
this.form = Object.assign({}, data || {});
this.dialogVisible = true;
type || !data ? (this.disabled = false) : (this.disabled = true);
},
submit() {
this.$refs["form"].validate(valid => {
if (valid) {
api[this.form.id ? "update" : "add"](this.form)
.then(() => {
this.msgSuccess("操作成功");
this.dialogVisible = false;
this.getList(!this.form.id && 1);
})
.catch(() => {
this.dialogVisible = false;
});
}
});
}
}
};
</script>
<template>
<div>
<div class="fxbw mb10 aic">
<div class="total">
关键词拉群
配置聊天工具栏,管理员创建关键词拉群后,员工可在聊天功能栏使用。
</div>
<div>
<el-button type="primary" icon="el-icon-plus" @click="goRoute()"
>新建关键词拉群</el-button
>
<el-input
placeholder="请输入活动名称"
prefix-icon="el-icon-search"
v-model="query.welcomeMsg"
style="width: 240px; margin-left: 10px;"
@change="getList(0)"
></el-input>
</div>
</div>
<!-- <el-card shadow="never" :body-style="{padding: '20px 0 0'}">
</el-card>-->
<el-table v-loading="loading" :data="list">
<!-- <el-table-column type="selection" width="50" align="center" /> -->
<el-table-column
label="群活码"
align="center"
prop="name"
:show-overflow-tooltip="true"
/>
<el-table-column prop="createTime" label="活动名称" align="center">
<template slot-scope="scope">{{
Math.floor(Math.random() * 10000)
}}</template>
</el-table-column>
<el-table-column prop="createTime" label="关键词" align="center">
已结束
</el-table-column>
<el-table-column
label="群聊"
align="center"
prop="createTime"
width="160"
></el-table-column>
<el-table-column
label="创建时间"
align="center"
prop="createTime"
width="160"
></el-table-column>
<el-table-column
label="操作"
align="center"
width="180"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<el-button
v-hasPermi="['enterpriseWechat:view']"
size="mini"
type="text"
icon="el-icon-view"
@click="edit(scope.row, 0)"
>查看</el-button
>
<el-button
v-hasPermi="['enterpriseWechat:edit']"
size="mini"
type="text"
icon="el-icon-edit"
@click="edit(scope.row, 1)"
>编辑</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="query.pageNum"
:limit.sync="query.pageSize"
@pagination="getList()"
/>
<el-dialog title="查看企业微信号" :visible.sync="dialogVisible">
<el-form
ref="form"
label-position="right"
:model="form"
:rules="rules"
label-width="160px"
:disabled="disabled"
>
<el-form-item label="企业名称" prop="name">
<el-input v-model="form.name" :disabled="form.id"></el-input>
</el-form-item>
<el-form-item label="企业ID(CorpID)" prop="corpId">
<el-input
:disabled="form.id"
v-model="form.corpId"
style="width: 80%"
placeholder="可在新闻公告应用的生日祝福等场景使用"
></el-input>
<el-link class="fr" type="primary">如何获取?</el-link>
</el-form-item>
<!-- <el-form-item label="Token">
<el-input disabled id="copy-input" v-model="form.name" placeholder="成员唯一标识,不支持更改,不支持中文"></el-input>
<el-button type="primary" class="copy-btn" data-clipboard-target="#copy-input">复制</el-button>
</el-form-item>
<el-form-item label="EncodingAESKey">
<el-input disabled id="copy-input1" v-model="form.name"></el-input>
<el-button type="primary" class="copy-btn" data-clipboard-target="#copy-input1">复制</el-button>
</el-form-item>-->
<el-form-item label="服务商secret" prop="providerSecret">
<el-input v-model="form.providerSecret" style="width: 80%"></el-input>
<el-link class="fr" type="primary">如何获取?</el-link>
</el-form-item>
<el-form-item label="通讯录管理secret" prop="corpSecret">
<el-input v-model="form.corpSecret" style="width: 80%"></el-input>
<el-link class="fr" type="primary">如何获取?</el-link>
</el-form-item>
<!-- <el-form-item label="通讯录事件服务">
<el-radio-group v-model="form.contactSecret">
<el-radio label="label">开启</el-radio>
<el-radio label="label">不开启</el-radio>
</el-radio-group>
<div>开启后,可以将成员、部门的增删改以及成员的标签变更实时的同步到塬微SCRM,无需手动更新同步。</div>
</el-form-item>-->
<el-form-item label="外部联系人管理secret" prop="contactSecret">
<el-input v-model="form.contactSecret"></el-input>
</el-form-item>
<!-- <el-form-item label="通讯录事件服务">
<el-radio-group v-model="form.model">
<el-radio label="label">开启</el-radio>
<el-radio label="label">不开启</el-radio>
</el-radio-group>
<div>开启后,可以将企业客户的添加、编辑以及主动删除客户和被动被客户删除实时的同步到塬微SCRM,无需手动更新同步。</div>
</el-form-item>-->
<el-form-item
label="企业微信扫码登陆回调地址"
prop="wxQrLoginRedirectUri"
>
<el-input v-model="form.wxQrLoginRedirectUri"></el-input>
</el-form-item>
</el-form>
<div slot="footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="submit" v-show="!disabled"
>确 定</el-button
>
</div>
</el-dialog>
</div>
</template>
<script>
import * as api from "@/api/customer";
export default {
components: {},
props: {},
data() {
return {
query: {
pageNum: 1,
pageSize: 10,
name: ""
},
dateRange: [], // 添加日期
total: 0,
form: {},
list: [],
dialogVisible: false,
disabled: false,
loading: false,
rules: Object.freeze({
name: [{ required: true, message: "必填项", trigger: "blur" }],
corpId: [{ required: true, message: "必填项", trigger: "blur" }],
corpSecret: [{ required: true, message: "必填项", trigger: "blur" }],
contactSecret: [{ required: true, message: "必填项", trigger: "blur" }]
}),
status: ["正常", "停用"],
pushType: {
0: "发给客户",
1: "发给客户群"
}
};
},
watch: {},
computed: {},
created() {
this.getList();
},
mounted() {
// new clipboard(".copy-btn");
},
methods: {
getList(page) {
if (this.dateRange[0]) {
this.query.beginTime = this.dateRange[0];
this.query.endTime = this.dateRange[1];
} else {
this.query.beginTime = "";
this.query.endTime = "";
}
page && (this.query.pageNum = page);
this.loading = true;
api
.getList(this.query)
.then(({ rows, total }) => {
this.list = rows;
this.total = +total;
this.loading = false;
})
.catch(() => {
this.loading = false;
});
},
edit(data, type) {
this.form = Object.assign({}, data || {});
this.dialogVisible = true;
type || !data ? (this.disabled = false) : (this.disabled = true);
},
submit() {
this.$refs["form"].validate(valid => {
if (valid) {
api[this.form.id ? "update" : "add"](this.form)
.then(() => {
this.msgSuccess("操作成功");
this.dialogVisible = false;
this.getList(!this.form.id && 1);
})
.catch(() => {
this.dialogVisible = false;
});
}
});
}
}
};
</script>
<template>
<div>
<div class="fxbw mb10 aic">
<div class="total">
新客自动拉群
客户通过员工活码添加员工,自动发送入群引导语、群活码,客户扫码入群。
</div>
<div>
<el-button type="primary" icon="el-icon-plus" @click="goRoute()"
>新建自动拉群</el-button
>
<el-input
placeholder="请输入活动名称"
prefix-icon="el-icon-search"
v-model="query.welcomeMsg"
style="width: 240px; margin-left: 10px;"
@change="getList(0)"
></el-input>
</div>
</div>
<!-- <el-card shadow="never" :body-style="{padding: '20px 0 0'}">
</el-card>-->
<el-table v-loading="loading" :data="list">
<!-- <el-table-column type="selection" width="50" align="center" /> -->
<el-table-column
label="员工活码"
align="center"
prop="name"
:show-overflow-tooltip="true"
/>
<el-table-column prop="createTime" label="活动名称" align="center">
<template slot-scope="scope">{{
Math.floor(Math.random() * 10000)
}}</template>
</el-table-column>
<el-table-column prop="createTime" label="使用成员" align="center">
已结束
</el-table-column>
<el-table-column
label="标签"
align="center"
prop="createTime"
width="160"
></el-table-column>
<el-table-column
label="群聊"
align="center"
prop="createTime"
width="160"
></el-table-column>
<el-table-column
label="添加好友数"
align="center"
prop="createTime"
width="160"
></el-table-column>
<el-table-column
label="创建时间"
align="center"
prop="createTime"
width="160"
></el-table-column>
<el-table-column
label="操作"
align="center"
width="180"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<el-button
v-hasPermi="['enterpriseWechat:view']"
size="mini"
type="text"
icon="el-icon-view"
@click="edit(scope.row, 0)"
>查看</el-button
>
<el-button
v-hasPermi="['enterpriseWechat:edit']"
size="mini"
type="text"
icon="el-icon-edit"
@click="edit(scope.row, 1)"
>编辑</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="query.pageNum"
:limit.sync="query.pageSize"
@pagination="getList()"
/>
<el-dialog title="查看企业微信号" :visible.sync="dialogVisible">
<el-form
ref="form"
label-position="right"
:model="form"
:rules="rules"
label-width="160px"
:disabled="disabled"
>
<el-form-item label="企业名称" prop="name">
<el-input v-model="form.name" :disabled="form.id"></el-input>
</el-form-item>
<el-form-item label="企业ID(CorpID)" prop="corpId">
<el-input
:disabled="form.id"
v-model="form.corpId"
style="width: 80%"
placeholder="可在新闻公告应用的生日祝福等场景使用"
></el-input>
<el-link class="fr" type="primary">如何获取?</el-link>
</el-form-item>
<!-- <el-form-item label="Token">
<el-input disabled id="copy-input" v-model="form.name" placeholder="成员唯一标识,不支持更改,不支持中文"></el-input>
<el-button type="primary" class="copy-btn" data-clipboard-target="#copy-input">复制</el-button>
</el-form-item>
<el-form-item label="EncodingAESKey">
<el-input disabled id="copy-input1" v-model="form.name"></el-input>
<el-button type="primary" class="copy-btn" data-clipboard-target="#copy-input1">复制</el-button>
</el-form-item>-->
<el-form-item label="服务商secret" prop="providerSecret">
<el-input v-model="form.providerSecret" style="width: 80%"></el-input>
<el-link class="fr" type="primary">如何获取?</el-link>
</el-form-item>
<el-form-item label="通讯录管理secret" prop="corpSecret">
<el-input v-model="form.corpSecret" style="width: 80%"></el-input>
<el-link class="fr" type="primary">如何获取?</el-link>
</el-form-item>
<!-- <el-form-item label="通讯录事件服务">
<el-radio-group v-model="form.contactSecret">
<el-radio label="label">开启</el-radio>
<el-radio label="label">不开启</el-radio>
</el-radio-group>
<div>开启后,可以将成员、部门的增删改以及成员的标签变更实时的同步到塬微SCRM,无需手动更新同步。</div>
</el-form-item>-->
<el-form-item label="外部联系人管理secret" prop="contactSecret">
<el-input v-model="form.contactSecret"></el-input>
</el-form-item>
<!-- <el-form-item label="通讯录事件服务">
<el-radio-group v-model="form.model">
<el-radio label="label">开启</el-radio>
<el-radio label="label">不开启</el-radio>
</el-radio-group>
<div>开启后,可以将企业客户的添加、编辑以及主动删除客户和被动被客户删除实时的同步到塬微SCRM,无需手动更新同步。</div>
</el-form-item>-->
<el-form-item
label="企业微信扫码登陆回调地址"
prop="wxQrLoginRedirectUri"
>
<el-input v-model="form.wxQrLoginRedirectUri"></el-input>
</el-form-item>
</el-form>
<div slot="footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="submit" v-show="!disabled"
>确 定</el-button
>
</div>
</el-dialog>
</div>
</template>
<script>
import * as api from "@/api/customer";
// import clipboard from "clipboard";
export default {
components: {},
props: {},
data() {
return {
query: {
pageNum: 1,
pageSize: 10,
name: ""
},
dateRange: [], // 添加日期
total: 0,
form: {},
list: [],
dialogVisible: false,
disabled: false,
loading: false,
rules: Object.freeze({
name: [{ required: true, message: "必填项", trigger: "blur" }],
corpId: [{ required: true, message: "必填项", trigger: "blur" }],
corpSecret: [{ required: true, message: "必填项", trigger: "blur" }],
contactSecret: [{ required: true, message: "必填项", trigger: "blur" }]
}),
status: ["正常", "停用"]
};
},
watch: {},
computed: {},
created() {
this.getList();
},
mounted() {
// new clipboard(".copy-btn");
},
methods: {
getList(page) {
if (this.dateRange[0]) {
this.query.beginTime = this.dateRange[0];
this.query.endTime = this.dateRange[1];
} else {
this.query.beginTime = "";
this.query.endTime = "";
}
page && (this.query.pageNum = page);
this.loading = true;
api
.getList(this.query)
.then(({ rows, total }) => {
this.list = rows;
this.total = +total;
this.loading = false;
})
.catch(() => {
this.loading = false;
});
},
edit(data, type) {
this.form = Object.assign({}, data || {});
this.dialogVisible = true;
type || !data ? (this.disabled = false) : (this.disabled = true);
},
submit() {
this.$refs["form"].validate(valid => {
if (valid) {
api[this.form.id ? "update" : "add"](this.form)
.then(() => {
this.msgSuccess("操作成功");
this.dialogVisible = false;
this.getList(!this.form.id && 1);
})
.catch(() => {
this.dialogVisible = false;
});
}
});
}
}
};
</script>
<template>
<div>
<div class="top-search">
<el-form inline label-position="right" :model="form" label-width="80px">
<el-form-item label="发送方式">
<el-select v-model="query.pushType" placeholder="请选择" size="small">
<el-option
v-for="(value, key, index) in pushType"
:label="value"
:value="key"
:key="index"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="任务名称">
<el-input v-model="query.name" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label>
<el-button type="primary" @click="getList(1)">查询</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</div>
<div class="ar mb10">
<el-button
v-hasPermi="['enterpriseWechat:add']"
type="primary"
icon="el-icon-plus"
@click="edit()"
>新建任务</el-button
>
</div>
<!-- <el-card shadow="never" :body-style="{padding: '20px 0 0'}">
</el-card>-->
<el-table v-loading="loading" :data="list">
<!-- <el-table-column type="selection" width="50" align="center" /> -->
<el-table-column
label="任务活动名称"
align="center"
prop="name"
:show-overflow-tooltip="true"
/>
<el-table-column prop="createTime" label="裂变客户数量" align="center">
<template slot-scope="scope">{{
Math.floor(Math.random() * 10000)
}}</template>
</el-table-column>
<el-table-column prop="createTime" label="活动状态" align="center">
已结束
</el-table-column>
<el-table-column
label="活动时间"
align="center"
prop="createTime"
width="160"
></el-table-column>
<el-table-column
label="操作"
align="center"
width="180"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<el-button
v-hasPermi="['enterpriseWechat:view']"
size="mini"
type="text"
icon="el-icon-view"
@click="edit(scope.row, 0)"
>查看</el-button
>
<el-button
v-hasPermi="['enterpriseWechat:edit']"
size="mini"
type="text"
icon="el-icon-edit"
@click="edit(scope.row, 1)"
>编辑</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="query.pageNum"
:limit.sync="query.pageSize"
@pagination="getList()"
/>
<el-dialog title="查看企业微信号" :visible.sync="dialogVisible">
<el-form
ref="form"
label-position="right"
:model="form"
:rules="rules"
label-width="160px"
:disabled="disabled"
>
<el-form-item label="企业名称" prop="name">
<el-input v-model="form.name" :disabled="form.id"></el-input>
</el-form-item>
<el-form-item label="企业ID(CorpID)" prop="corpId">
<el-input
:disabled="form.id"
v-model="form.corpId"
style="width: 80%"
placeholder="可在新闻公告应用的生日祝福等场景使用"
></el-input>
<el-link class="fr" type="primary">如何获取?</el-link>
</el-form-item>
<!-- <el-form-item label="Token">
<el-input disabled id="copy-input" v-model="form.name" placeholder="成员唯一标识,不支持更改,不支持中文"></el-input>
<el-button type="primary" class="copy-btn" data-clipboard-target="#copy-input">复制</el-button>
</el-form-item>
<el-form-item label="EncodingAESKey">
<el-input disabled id="copy-input1" v-model="form.name"></el-input>
<el-button type="primary" class="copy-btn" data-clipboard-target="#copy-input1">复制</el-button>
</el-form-item>-->
<el-form-item label="服务商secret" prop="providerSecret">
<el-input v-model="form.providerSecret" style="width: 80%"></el-input>
<el-link class="fr" type="primary">如何获取?</el-link>
</el-form-item>
<el-form-item label="通讯录管理secret" prop="corpSecret">
<el-input v-model="form.corpSecret" style="width: 80%"></el-input>
<el-link class="fr" type="primary">如何获取?</el-link>
</el-form-item>
<!-- <el-form-item label="通讯录事件服务">
<el-radio-group v-model="form.contactSecret">
<el-radio label="label">开启</el-radio>
<el-radio label="label">不开启</el-radio>
</el-radio-group>
<div>开启后,可以将成员、部门的增删改以及成员的标签变更实时的同步到塬微SCRM,无需手动更新同步。</div>
</el-form-item>-->
<el-form-item label="外部联系人管理secret" prop="contactSecret">
<el-input v-model="form.contactSecret"></el-input>
</el-form-item>
<!-- <el-form-item label="通讯录事件服务">
<el-radio-group v-model="form.model">
<el-radio label="label">开启</el-radio>
<el-radio label="label">不开启</el-radio>
</el-radio-group>
<div>开启后,可以将企业客户的添加、编辑以及主动删除客户和被动被客户删除实时的同步到塬微SCRM,无需手动更新同步。</div>
</el-form-item>-->
<el-form-item
label="企业微信扫码登陆回调地址"
prop="wxQrLoginRedirectUri"
>
<el-input v-model="form.wxQrLoginRedirectUri"></el-input>
</el-form-item>
</el-form>
<div slot="footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="submit" v-show="!disabled"
>确 定</el-button
>
</div>
</el-dialog>
</div>
</template>
<script> <script>
import * as api from '@/api/enterpriseId' import * as api from "@/api/enterpriseId";
// import clipboard from "clipboard"; // import clipboard from "clipboard";
export default { export default {
...@@ -10,7 +10,7 @@ export default { ...@@ -10,7 +10,7 @@ export default {
query: { query: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
companyName: '', companyName: ""
}, },
total: 0, total: 0,
form: {}, form: {},
...@@ -19,65 +19,65 @@ export default { ...@@ -19,65 +19,65 @@ export default {
disabled: false, disabled: false,
loading: false, loading: false,
rules: Object.freeze({ rules: Object.freeze({
companyName: [{ required: true, message: '必填项', trigger: 'blur' }], companyName: [{ required: true, message: "必填项", trigger: "blur" }],
corpId: [{ required: true, message: '必填项', trigger: 'blur' }], corpId: [{ required: true, message: "必填项", trigger: "blur" }],
corpSecret: [{ required: true, message: '必填项', trigger: 'blur' }], corpSecret: [{ required: true, message: "必填项", trigger: "blur" }],
contactSecret: [{ required: true, message: '必填项', trigger: 'blur' }], contactSecret: [{ required: true, message: "必填项", trigger: "blur" }]
}), }),
status: ['正常', '停用'], status: ["正常", "停用"]
} };
}, },
watch: {}, watch: {},
computed: {}, computed: {},
created() { created() {
this.getList() this.getList();
}, },
mounted() { mounted() {
// new clipboard(".copy-btn"); // new clipboard(".copy-btn");
}, },
methods: { methods: {
getList(page) { getList(page) {
page && (this.query.pageNum = page) page && (this.query.pageNum = page);
this.loading = true this.loading = true;
api api
.getList(this.query) .getList(this.query)
.then(({ rows, total }) => { .then(({ rows, total }) => {
this.list = rows this.list = rows;
this.total = +total this.total = +total;
this.loading = false this.loading = false;
}) })
.catch(() => { .catch(() => {
this.loading = false this.loading = false;
}) });
}, },
edit(data, type) { edit(data, type) {
this.form = Object.assign({}, data || {}) this.form = Object.assign({}, data || {});
this.dialogVisible = true this.dialogVisible = true;
type || !data ? (this.disabled = false) : (this.disabled = true) type || !data ? (this.disabled = false) : (this.disabled = true);
}, },
submit() { submit() {
this.$refs['form'].validate((valid) => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
api[this.form.id ? 'update' : 'add'](this.form) api[this.form.id ? "update" : "add"](this.form)
.then(() => { .then(() => {
this.msgSuccess('操作成功') this.msgSuccess("操作成功");
this.dialogVisible = false this.dialogVisible = false;
this.getList(!this.form.id && 1) this.getList(!this.form.id && 1);
}) })
.catch(() => { .catch(() => {
this.dialogVisible = false this.dialogVisible = false;
}) });
} }
}) });
}, },
start(corpId) { start(corpId) {
api.start(corpId).then(({ rows, total }) => { api.start(corpId).then(({ rows, total }) => {
this.msgSuccess('操作成功') this.msgSuccess("操作成功");
this.getList() this.getList();
}) });
}, }
}, }
} };
</script> </script>
<template> <template>
...@@ -94,9 +94,7 @@ export default { ...@@ -94,9 +94,7 @@ export default {
<el-form-item label> <el-form-item label>
<el-button <el-button
v-hasPermi="['enterpriseWechat:query']" v-hasPermi="['enterpriseWechat:query']"
type="cyan" type="primary"
icon="el-icon-search"
size="mini"
@click="getList(1)" @click="getList(1)"
>查询</el-button >查询</el-button
> >
......
...@@ -377,8 +377,6 @@ export default { ...@@ -377,8 +377,6 @@ export default {
border-radius: 8px; border-radius: 8px;
padding: 10px; padding: 10px;
} }
.select {
}
} }
.input-wrap { .input-wrap {
width: 240px; width: 240px;
......
<script>
import { getPushResult } from "@/api/groupMessage";
export default {
components: {},
props: {},
data() {
return {
query: {
pageNum: 1,
pageSize: 10,
messageId: "",
status: 0
},
// 表格数据
list: [],
form: {},
activeName: "1",
total1: 0,
total2: 0
};
},
watch: {},
computed: {},
created() {
this.id = this.$route.query.id;
this.id && this.getList();
},
mounted() {},
methods: {
getList(page) {
this.query = {
messageId: this.id,
status: 0
};
page && (this.query.pageNum = page);
this.loading = true;
getPushResult(this.query)
.then(({ rows, total }) => {
this.list = rows;
this.total = +total;
this.loading = false;
this.ids = [];
})
.catch(() => {
this.loading = false;
});
}
}
};
</script>
<template>
<div>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane :label="`待发送(${total1})`" name="1">
<div class="ar">
<el-button type="primary">发布动态</el-button>
</div>
<el-table
v-loading="loading"
:data="list"
@selection-change="handleSelectionChange"
>
<el-table-column label="发送员工" align="center" prop="title" />
<el-table-column label="发送客户" align="center" prop="operTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.operTime) }}</span>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="query.pageNum"
:limit.sync="query.pageSize"
@pagination="getList"
/>
</el-tab-pane>
<el-tab-pane :label="`已发送(${total2})`" name="2">
<el-table
v-loading="loading"
:data="list"
@selection-change="handleSelectionChange"
>
<el-table-column label="发送员工" align="center" prop="title" />
<el-table-column label="发送客户" align="center" prop="operTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.operTime) }}</span>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="query.pageNum"
:limit.sync="query.pageSize"
@pagination="getList"
/>
</el-tab-pane>
</el-tabs>
</div>
</template>
<style lang="less" scoped></style>
<script> <script>
import { getList } from '@/api/groupMessage' import { getList } from "@/api/groupMessage";
export default { export default {
name: 'Operlog', name: "Operlog",
filters: {
sendInfo(data) {
if (data.timedTask == 1) {
return "定时任务 发送时间:" + data.settingTime;
} else {
let unit = data.expectSend == 1 ? "个群" : "人";
return `预计发送${data.expectSend}${unit},已成功发送${data.actualSend}${unit}`;
}
}
},
data() { data() {
return { return {
// 遮罩层 // 遮罩层
...@@ -22,75 +32,78 @@ export default { ...@@ -22,75 +32,78 @@ export default {
content: undefined, content: undefined,
pushType: undefined, pushType: undefined,
beginTime: undefined, beginTime: undefined,
endTime: undefined, endTime: undefined
}, },
pushType: { pushType: {
0: '发给客户', 0: "发给客户",
1: '发给客户群', 1: "发给客户群"
}, },
pickerOptions: { pickerOptions: {
disabledDate(time) { disabledDate(time) {
return time.getTime() > Date.now() // 选当前时间之前的时间 return time.getTime() > Date.now(); // 选当前时间之前的时间
}, }
},
} }
};
}, },
created() { created() {
this.getList() this.getList();
}, },
methods: { methods: {
getList(page) { getList(page) {
if (this.dateRange[0]) { if (this.dateRange[0]) {
this.query.beginTime = this.dateRange[0] this.query.beginTime = this.dateRange[0];
this.query.endTime = this.dateRange[1] this.query.endTime = this.dateRange[1];
} else { } else {
this.query.beginTime = '' this.query.beginTime = "";
this.query.endTime = '' this.query.endTime = "";
} }
page && (this.query.pageNum = page) page && (this.query.pageNum = page);
this.loading = true this.loading = true;
getList(this.query) getList(this.query)
.then(({ rows, total }) => { .then(({ rows, total }) => {
this.list = rows this.list = rows;
this.total = +total this.total = +total;
this.loading = false this.loading = false;
this.ids = [] this.ids = [];
}) })
.catch(() => { .catch(() => {
this.loading = false this.loading = false;
}) });
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.dateRange = [] this.dateRange = [];
this.resetForm('queryForm') this.resetForm("queryForm");
this.getList(1) this.getList(1);
}, },
// 多选框选中数据 // 多选框选中数据
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id) this.ids = selection.map(item => item.id);
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const operIds = row.operId || this.ids const operIds = row.operId || this.ids;
this.$confirm( this.$confirm(
'是否确认删除日志编号为"' + operIds + '"的数据项?', '是否确认删除日志编号为"' + operIds + '"的数据项?',
'警告', "警告",
{ {
confirmButtonText: '确定', confirmButtonText: "确定",
cancelButtonText: '取消', cancelButtonText: "取消",
type: 'warning', type: "warning"
} }
) )
.then(function() {}) .then(function() {})
.then(() => { .then(() => {
this.getList() this.getList();
this.msgSuccess('删除成功') this.msgSuccess("删除成功");
}) })
.catch(function() {}) .catch(function() {});
},
}, },
} goRoute(id, path) {
this.$router.push({ path: "/groupMessage/" + path, query: { id } });
}
}
};
</script> </script>
<template> <template>
<div> <div>
...@@ -139,10 +152,8 @@ export default { ...@@ -139,10 +152,8 @@ export default {
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label=" "> <el-form-item label=" ">
<el-button type="cyan" icon="el-icon-search" @click="getList(1)" <el-button type="primary" @click="getList(1)">查询</el-button>
>查询</el-button <el-button @click="resetQuery">重置</el-button>
>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -158,7 +169,7 @@ export default { ...@@ -158,7 +169,7 @@ export default {
{{ pushType[scope.row.pushType] }} {{ pushType[scope.row.pushType] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建人" align="center" prop="businessType" /> <el-table-column label="创建人" align="center" prop="sender" />
<el-table-column <el-table-column
label="创建时间" label="创建时间"
align="center" align="center"
...@@ -168,7 +179,28 @@ export default { ...@@ -168,7 +179,28 @@ export default {
</el-table-column> </el-table-column>
<el-table-column label="发送情况" align="center" prop="sendInfo"> <el-table-column label="发送情况" align="center" prop="sendInfo">
<template slot-scope="scope"> <template slot-scope="scope">
{{ pushType[scope.row.sendInfo] }} {{ scope.row | sendInfo }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="180">
<template slot-scope="scope">
<el-button
v-hasPermi="['enterpriseWechat:view']"
size="mini"
type="text"
icon="el-icon-view"
@click="goRoute(scope.row.messageId, 'detail')"
>查看</el-button
>
<el-button
v-hasPermi="['enterpriseWechat:edit']"
size="mini"
type="text"
icon="el-icon-edit"
disabled=""
@click="goRoute(scope.row, 1)"
>编辑</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
......
...@@ -57,20 +57,29 @@ public class WeCustomerMessage extends BaseEntity { ...@@ -57,20 +57,29 @@ public class WeCustomerMessage extends BaseEntity {
private String msgid; private String msgid;
/** /**
* 发送情况 * 消息内容
* ps:显示样式
*
* 1)定时任务 发送时间:2020-12-25 10:00:00
* 2) 预计发送3190人,已成功发送0人
* 3)预计发送2个群,已成功发送0个群
*
*/ */
private String sendInfo; private String content;
/** /**
* 消息内容 * 发送时间
*/ */
private String content; private String settingTime;
/**
* 预计发送消息数(客户对应多少人 客户群对应多个群)
*/
private Integer expectSend;
/**
* 实际发送消息数(客户对应多少人 客户群对应多个群)
*/
private Integer actualSend;
/**
* 是否定时任务 0 常规 1 定时发送
*/
private Integer timedTask;
/** /**
* 0 未删除 1 已删除 * 0 未删除 1 已删除
......
package com.linkwechat.wecom.domain;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.linkwechat.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;
/**
* 敏感词实体
*
* @author leejoker <1056650571@qq.com>
* @version 1.0
* @date 2020/12/28 13:29
*/
@EqualsAndHashCode(callSuper = true)
@Data
@TableName(value = "we_sensitive")
@ApiModel(value = "敏感词")
public class WeSensitive extends BaseEntity {
/**
* id
*/
@TableId
@ApiModelProperty(value = "敏感词设置id")
private Long id;
/**
* 策略名称
*/
@TableField(value = "strategy_name")
@NotBlank(message = "策略名称不能为空")
@ApiModelProperty(value = "策略名称")
private String strategyName;
/**
* 匹配词
*/
@TableField(value = "pattern_words")
@ApiModelProperty(value = "匹配词,逗号分隔")
@NotBlank(message = "匹配词不能为空")
private String patternWords;
/**
* 审计范围,敏感词审计需要覆盖的用户或机构
*/
@NotEmpty(message = "审计范围不能为空")
@TableField(exist = false)
@ApiModelProperty(value = "审计范围")
private List<WeSensitiveAuditScope> auditUserScope;
/**
* 审计人id
*/
@TableField(value = "audit_user_id")
@ApiModelProperty(value = "审计人id")
@NotNull(message = "审计人id不能为空")
private Long auditUserId;
/**
* 审计人姓名
*/
@TableField(value = "audit_user_name")
@ApiModelProperty(value = "审计人姓名")
@NotBlank(message = "审计人不能为空")
private String auditUserName;
/**
* 消息通知
*/
@TableField(value = "alert_flag")
@ApiModelProperty(value = "1 开启 0 关闭")
private Integer alertFlag;
/**
* 删除状态
*/
@TableField(value = "del_flag")
@TableLogic
@ApiModelProperty(value = "1 已删除 0 未删除")
private Integer delFlag;
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("strategyName", getStrategyName())
.append("patternWords", getPatternWords())
.append("auditUserId", getAuditUserId())
.append("alertFlag", getAlertFlag())
.append("delFlag", getDelFlag())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}
package com.linkwechat.wecom.domain;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.io.Serializable;
/**
* @author leejoker <1056650571@qq.com>
* @version 1.0
* @date 2020/12/28 14:07
*/
@Data
@TableName(value = "we_sensitive_audit_scope")
@ApiModel(value = "敏感词审计范围")
public class WeSensitiveAuditScope implements Serializable {
private static final long serialVersionUID = 7696067707890730540L;
@TableId
@ApiModelProperty(value = "审计范围id")
private Long id;
@TableField(value = "sensitive_id")
@ApiModelProperty(value = "敏感词表主键")
private Long sensitiveId;
/**
* 1:组织机构id,2:成员id
*/
@TableField(value = "scope_type")
@ApiModelProperty(value = "审计范围类型, 1 组织机构 2 成员")
private Integer scopeType;
/**
* 审计对象id
*/
@TableField(value = "audit_scope_id")
@ApiModelProperty(value = "审计对象id")
private Long auditScopeId;
/**
* 审计对象名称
*/
@TableField(value = "audit_scope_name")
@ApiModelProperty(value = "审计对象名称")
private String auditScopeName;
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("scopeType", getScopeType())
.append("auditScopeId", getAuditScopeId())
.append("auditScopeName", getAuditScopeName())
.toString();
}
}
...@@ -22,6 +22,12 @@ public class CustomerMessagePushVo { ...@@ -22,6 +22,12 @@ public class CustomerMessagePushVo {
private String messageType; private String messageType;
/** /**
* 群发任务的类型,默认为single,表示发送给客户,group表示发送给客户群
* 0 发送给客户 1 发送给客户群
*/
private String chatType;
/**
* 消息内容 * 消息内容
*/ */
private String content; private String content;
...@@ -47,22 +53,30 @@ public class CustomerMessagePushVo { ...@@ -47,22 +53,30 @@ public class CustomerMessagePushVo {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date sendTime; private Date sendTime;
/**
* msgid 可以用于获取发送结果
*/
private String msgid;
/** /**
* 发送情况 * 发送时间
* ps:显示样式
*
* 1)定时任务 发送时间:2020-12-25 10:00:00
* 2) 预计发送3190人,已成功发送0人
* 3)预计发送2个群,已成功发送0个群
*
*/ */
private String sendInfo; private String settingTime;
/** /**
* msgid 可以用于获取发送结果 * 预计发送消息数(客户对应多少人 客户群对应多个群)
*/ */
private String msgid; private Integer expectSend;
/**
* 实际发送消息数(客户对应多少人 客户群对应多个群)
*/
private Integer actualSend;
/**
* 是否定时任务 0 常规 1 定时发送
*/
private Integer timedTask;
} }
package com.linkwechat.wecom.domain.vo;
import lombok.Data;
/**
* 消息发送结果
*/
@Data
public class WeCustomerMessageResultVo {
/**
* 发送员工名称
*/
private String userName;
/**
* 客户名称列表,通过`、`进行分隔
*/
private String customers;
}
...@@ -2,6 +2,7 @@ package com.linkwechat.wecom.mapper; ...@@ -2,6 +2,7 @@ package com.linkwechat.wecom.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.linkwechat.wecom.domain.WeCustomerMessage; import com.linkwechat.wecom.domain.WeCustomerMessage;
import org.apache.ibatis.annotations.Param;
/** /**
* 群发消息 微信消息表Mapper接口 * 群发消息 微信消息表Mapper接口
...@@ -10,5 +11,14 @@ import com.linkwechat.wecom.domain.WeCustomerMessage; ...@@ -10,5 +11,14 @@ import com.linkwechat.wecom.domain.WeCustomerMessage;
* @date 2020-12-08 * @date 2020-12-08
*/ */
public interface WeCustomerMessageMapper extends BaseMapper<WeCustomerMessage> { public interface WeCustomerMessageMapper extends BaseMapper<WeCustomerMessage> {
int updateWeCustomerMessageMsgIdById(WeCustomerMessage customerMessage); int updateWeCustomerMessageMsgIdById(WeCustomerMessage customerMessage);
/**
*
* @param messageId 微信消息表主键id
* @param actualSend 实际发送消息数(客户对应多少人 客户群对应多个群)
* @return int
*/
int updateWeCustomerMessageActualSend(@Param("messageId") Long messageId,@Param("actualSend") Integer actualSend);
} }
...@@ -2,8 +2,11 @@ package com.linkwechat.wecom.mapper; ...@@ -2,8 +2,11 @@ package com.linkwechat.wecom.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.linkwechat.wecom.domain.WeCustomerMessgaeResult; import com.linkwechat.wecom.domain.WeCustomerMessgaeResult;
import com.linkwechat.wecom.domain.vo.WeCustomerMessageResultVo;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* 群发消息 微信消息发送结果表 Mapper接口 * 群发消息 微信消息发送结果表 Mapper接口
* *
...@@ -26,4 +29,13 @@ public interface WeCustomerMessgaeResultMapper extends BaseMapper<WeCustomerMess ...@@ -26,4 +29,13 @@ public interface WeCustomerMessgaeResultMapper extends BaseMapper<WeCustomerMess
int updateWeCustomerMessgaeResult(@Param("messageId") Long messageId,@Param("chatId") String chatId,@Param("externalUserid") String externalUserid int updateWeCustomerMessgaeResult(@Param("messageId") Long messageId,@Param("chatId") String chatId,@Param("externalUserid") String externalUserid
,@Param("status") String status,@Param("sendTime") String sendTime); ,@Param("status") String status,@Param("sendTime") String sendTime);
/**
* 查询微信消息发送情况
*
* @param messageId 微信消息表id
* @param status 发送状态 0-未发送 1-已发送 2-因客户不是好友导致发送失败 3-因客户已经收到其他群发消息导致发送失败
* @return {@link WeCustomerMessageResultVo}s
*/
List<WeCustomerMessageResultVo> customerMessagePushs(@Param("messageId") Long messageId,@Param("status") String status);
} }
package com.linkwechat.wecom.mapper;
import com.linkwechat.wecom.domain.WeSensitiveAuditScope;
import java.util.List;
/**
* 敏感词审计范围Mapper接口
*
* @author ruoyi
* @date 2020-12-29
*/
public interface WeSensitiveAuditScopeMapper {
/**
* 查询敏感词审计范围
*
* @param id 敏感词审计范围ID
* @return 敏感词审计范围
*/
public WeSensitiveAuditScope selectWeSensitiveAuditScopeById(Long id);
/**
* 查询敏感词审计范围列表
*
* @param weSensitiveAuditScope 敏感词审计范围
* @return 敏感词审计范围集合
*/
public List<WeSensitiveAuditScope> selectWeSensitiveAuditScopeList(WeSensitiveAuditScope weSensitiveAuditScope);
/**
* 新增敏感词审计范围
*
* @param weSensitiveAuditScope 敏感词审计范围
* @return 结果
*/
public int insertWeSensitiveAuditScope(WeSensitiveAuditScope weSensitiveAuditScope);
/**
* 批量新增敏感词审计范围
*
* @param weSensitiveAuditScopeList 敏感词审计范围List
* @return 结果
*/
public int insertWeSensitiveAuditScopeList(List<WeSensitiveAuditScope> weSensitiveAuditScopeList);
/**
* 修改敏感词审计范围
*
* @param weSensitiveAuditScope 敏感词审计范围
* @return 结果
*/
public int updateWeSensitiveAuditScope(WeSensitiveAuditScope weSensitiveAuditScope);
/**
* 删除敏感词审计范围
*
* @param id 敏感词审计范围ID
* @return 结果
*/
public int deleteWeSensitiveAuditScopeById(Long id);
/**
* 批量删除敏感词审计范围
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteWeSensitiveAuditScopeByIds(Long[] ids);
/**
* 根据敏感词表id删除关联数据
*
* @param sensitiveId
* @return
*/
public int deleteAuditScopeBySensitiveId(Long sensitiveId);
public int deleteAuditScopeBySensitiveIds(Long[] sensitiveIds);
}
package com.linkwechat.wecom.mapper;
import com.linkwechat.wecom.domain.WeSensitive;
import java.util.List;
/**
* 敏感词设置Mapper接口
*
* @author ruoyi
* @date 2020-12-29
*/
public interface WeSensitiveMapper {
/**
* 查询敏感词设置
*
* @param id 敏感词设置ID
* @return 敏感词设置
*/
public WeSensitive selectWeSensitiveById(Long id);
public List<WeSensitive> selectWeSensitiveByIds(Long[] ids);
/**
* 查询敏感词设置列表
*
* @param weSensitive 敏感词设置
* @return 敏感词设置集合
*/
public List<WeSensitive> selectWeSensitiveList(WeSensitive weSensitive);
/**
* 新增敏感词设置
*
* @param weSensitive 敏感词设置
* @return 结果
*/
public int insertWeSensitive(WeSensitive weSensitive);
/**
* 修改敏感词设置
*
* @param weSensitive 敏感词设置
* @return 结果
*/
public int updateWeSensitive(WeSensitive weSensitive);
public int batchUpdateWeSensitive(List<WeSensitive> weSensitiveList);
/**
* 删除敏感词设置
*
* @param id 敏感词设置ID
* @return 结果
*/
public int deleteWeSensitiveById(Long id);
/**
* 批量删除敏感词设置
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteWeSensitiveByIds(Long[] ids);
}
...@@ -2,6 +2,7 @@ package com.linkwechat.wecom.service; ...@@ -2,6 +2,7 @@ package com.linkwechat.wecom.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.linkwechat.wecom.domain.WeCustomerMessage; import com.linkwechat.wecom.domain.WeCustomerMessage;
import org.apache.ibatis.annotations.Param;
/** /**
* 群发消息 微信消息表service接口 * 群发消息 微信消息表service接口
...@@ -12,10 +13,18 @@ import com.linkwechat.wecom.domain.WeCustomerMessage; ...@@ -12,10 +13,18 @@ import com.linkwechat.wecom.domain.WeCustomerMessage;
public interface IWeCustomerMessageService extends IService<WeCustomerMessage> { public interface IWeCustomerMessageService extends IService<WeCustomerMessage> {
/** /**
*
* @param customerMessage * @param customerMessage
* @return * @return
*/ */
int updateWeCustomerMessageMsgId(WeCustomerMessage customerMessage); int updateWeCustomerMessageMsgId(WeCustomerMessage customerMessage);
/**
*
* @param messageId 微信消息表主键id
* @param actualSend 实际发送消息数(客户对应多少人 客户群对应多个群)
* @return int
*/
int updateWeCustomerMessageActualSend( Long messageId, Integer actualSend);
} }
...@@ -2,6 +2,10 @@ package com.linkwechat.wecom.service; ...@@ -2,6 +2,10 @@ package com.linkwechat.wecom.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.linkwechat.wecom.domain.WeCustomerMessgaeResult; import com.linkwechat.wecom.domain.WeCustomerMessgaeResult;
import com.linkwechat.wecom.domain.vo.WeCustomerMessageResultVo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* 群发消息 微信消息发送结果表 we_customer_messgaeResult * 群发消息 微信消息发送结果表 we_customer_messgaeResult
...@@ -10,4 +14,14 @@ import com.linkwechat.wecom.domain.WeCustomerMessgaeResult; ...@@ -10,4 +14,14 @@ import com.linkwechat.wecom.domain.WeCustomerMessgaeResult;
* @date 2020-12-12 * @date 2020-12-12
*/ */
public interface IWeCustomerMessgaeResultService extends IService<WeCustomerMessgaeResult> { public interface IWeCustomerMessgaeResultService extends IService<WeCustomerMessgaeResult> {
/**
* 查询微信消息发送情况
*
* @param messageId 微信消息表id
* @param status 发送状态 0-未发送 1-已发送 2-因客户不是好友导致发送失败 3-因客户已经收到其他群发消息导致发送失败
* @return {@link WeCustomerMessageResultVo}s
*/
List<WeCustomerMessageResultVo> customerMessagePushs(Long messageId, String status);
} }
package com.linkwechat.wecom.service;
import com.linkwechat.wecom.domain.WeSensitiveAuditScope;
import java.util.List;
/**
* 敏感词审计范围Service接口
*
* @author ruoyi
* @date 2020-12-29
*/
public interface IWeSensitiveAuditScopeService {
/**
* 查询敏感词审计范围
*
* @param id 敏感词审计范围ID
* @return 敏感词审计范围
*/
public WeSensitiveAuditScope selectWeSensitiveAuditScopeById(Long id);
/**
* 查询敏感词审计范围列表
*
* @param weSensitiveAuditScope 敏感词审计范围
* @return 敏感词审计范围集合
*/
public List<WeSensitiveAuditScope> selectWeSensitiveAuditScopeList(WeSensitiveAuditScope weSensitiveAuditScope);
/**
* 新增敏感词审计范围
*
* @param weSensitiveAuditScope 敏感词审计范围
* @return 结果
*/
public int insertWeSensitiveAuditScope(WeSensitiveAuditScope weSensitiveAuditScope);
/**
* 批量新增
*
* @param weSensitiveAuditScopeList
* @return
*/
public int insertWeSensitiveAuditScopeList(List<WeSensitiveAuditScope> weSensitiveAuditScopeList);
/**
* 修改敏感词审计范围
*
* @param weSensitiveAuditScope 敏感词审计范围
* @return 结果
*/
public int updateWeSensitiveAuditScope(WeSensitiveAuditScope weSensitiveAuditScope);
/**
* 批量删除敏感词审计范围
*
* @param ids 需要删除的敏感词审计范围ID
* @return 结果
*/
public int deleteWeSensitiveAuditScopeByIds(Long[] ids);
/**
* 删除敏感词审计范围信息
*
* @param id 敏感词审计范围ID
* @return 结果
*/
public int deleteWeSensitiveAuditScopeById(Long id);
public int deleteAuditScopeBySensitiveId(Long sensitiveId);
public int deleteAuditScopeBySensitiveIds(Long[] sensitiveIds);
}
package com.linkwechat.wecom.service;
import com.linkwechat.wecom.domain.WeSensitive;
import java.util.List;
/**
* 敏感词设置Service接口
*
* @author ruoyi
* @date 2020-12-29
*/
public interface IWeSensitiveService {
/**
* 查询敏感词设置
*
* @param id 敏感词设置ID
* @return 敏感词设置
*/
public WeSensitive selectWeSensitiveById(Long id);
/**
* 查询敏感词设置列表
*
* @param weSensitive 敏感词设置
* @return 敏感词设置集合
*/
public List<WeSensitive> selectWeSensitiveList(WeSensitive weSensitive);
/**
* 新增敏感词设置
*
* @param weSensitive 敏感词设置
* @return 结果
*/
public int insertWeSensitive(WeSensitive weSensitive);
/**
* 修改敏感词设置
*
* @param weSensitive 敏感词设置
* @return 结果
*/
public int updateWeSensitive(WeSensitive weSensitive);
/**
* 批量删除敏感词设置
*
* @param ids 需要删除的敏感词设置ID
* @return 结果
*/
public int deleteWeSensitiveByIds(Long[] ids);
/**
* 批量删除敏感词设置信息
*
* @param ids 敏感词设置ID
* @return 结果
*/
public int destroyWeSensitiveByIds(Long[] ids);
}
...@@ -15,12 +15,14 @@ import com.linkwechat.wecom.domain.vo.CustomerMessagePushVo; ...@@ -15,12 +15,14 @@ import com.linkwechat.wecom.domain.vo.CustomerMessagePushVo;
import com.linkwechat.wecom.mapper.WeCustomerMessageOriginalMapper; import com.linkwechat.wecom.mapper.WeCustomerMessageOriginalMapper;
import com.linkwechat.wecom.mapper.WeCustomerMessgaeResultMapper; import com.linkwechat.wecom.mapper.WeCustomerMessgaeResultMapper;
import com.linkwechat.wecom.service.IWeCustomerMessageOriginalService; import com.linkwechat.wecom.service.IWeCustomerMessageOriginalService;
import com.linkwechat.wecom.service.IWeCustomerMessageService;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List; import java.util.List;
import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletableFuture;
import java.util.concurrent.atomic.AtomicInteger;
/** /**
* 群发消息 原始数据信息表 we_customer_messageOriginal * 群发消息 原始数据信息表 we_customer_messageOriginal
...@@ -41,6 +43,9 @@ public class WeCustomerMessageOriginalServiceImpl extends ServiceImpl<WeCustomer ...@@ -41,6 +43,9 @@ public class WeCustomerMessageOriginalServiceImpl extends ServiceImpl<WeCustomer
private WeCustomerMessgaeResultMapper weCustomerMessgaeResultMapper; private WeCustomerMessgaeResultMapper weCustomerMessgaeResultMapper;
@Autowired @Autowired
private IWeCustomerMessageService weCustomerMessageService;
@Autowired
private ObjectMapper objectMapper; private ObjectMapper objectMapper;
@Override @Override
...@@ -58,22 +63,29 @@ public class WeCustomerMessageOriginalServiceImpl extends ServiceImpl<WeCustomer ...@@ -58,22 +63,29 @@ public class WeCustomerMessageOriginalServiceImpl extends ServiceImpl<WeCustomer
CustomerMessagePushVo customerMessagePushDetail = weCustomerMessageOriginalMapper.findCustomerMessagePushDetail(messageId); CustomerMessagePushVo customerMessagePushDetail = weCustomerMessageOriginalMapper.findCustomerMessagePushDetail(messageId);
AtomicInteger atomicInteger=new AtomicInteger();
//拉取消息发送结果 //拉取消息发送结果
// CompletableFuture.runAsync(()->{ CompletableFuture.runAsync(()->{
String msgid = customerMessagePushDetail.getMsgid(); String msgid = customerMessagePushDetail.getMsgid();
if(StringUtils.isNotEmpty(msgid)){ if(StringUtils.isNotEmpty(msgid)){
List<String> msgIds = null; List<String> msgIds = null;
try { try {
msgIds = objectMapper.readValue(msgid,new TypeReference<List<String>>() { }); msgIds = objectMapper.readValue(msgid,new TypeReference<List<String>>() { });
} catch (JsonProcessingException e) { } catch (JsonProcessingException e) {
e.printStackTrace(); e.printStackTrace();
} }
if(CollectionUtils.isNotEmpty(msgIds)){ if(CollectionUtils.isNotEmpty(msgIds)){
msgIds.forEach(m->{ msgIds.forEach(m->{
QueryCustomerMessageStatusResultDataObjectDto dataObjectDto=new QueryCustomerMessageStatusResultDataObjectDto(); QueryCustomerMessageStatusResultDataObjectDto dataObjectDto=new QueryCustomerMessageStatusResultDataObjectDto();
...@@ -82,24 +94,38 @@ public class WeCustomerMessageOriginalServiceImpl extends ServiceImpl<WeCustomer ...@@ -82,24 +94,38 @@ public class WeCustomerMessageOriginalServiceImpl extends ServiceImpl<WeCustomer
//拉取发送结果 //拉取发送结果
QueryCustomerMessageStatusResultDto queryCustomerMessageStatusResultDto = weCustomerMessagePushClient.queryCustomerMessageStatus(dataObjectDto); QueryCustomerMessageStatusResultDto queryCustomerMessageStatusResultDto = weCustomerMessagePushClient.queryCustomerMessageStatus(dataObjectDto);
if (WeConstans.WE_SUCCESS_CODE.equals(queryCustomerMessageStatusResultDto.getErrcode())) { if (WeConstans.WE_SUCCESS_CODE.equals(queryCustomerMessageStatusResultDto.getErrcode())) {
List<DetailMessageStatusResultDto> detailList = queryCustomerMessageStatusResultDto.getDetail_list(); List<DetailMessageStatusResultDto> detailList = queryCustomerMessageStatusResultDto.getDetail_list();
detailList.forEach(d-> weCustomerMessgaeResultMapper.updateWeCustomerMessgaeResult(messageId,d.getChat_id(),d.getExternal_userid(),d.getStatus(),d.getSend_time())); detailList.forEach(d-> {
if(d.getStatus().equals("1")){
atomicInteger.incrementAndGet();
} }
weCustomerMessgaeResultMapper.updateWeCustomerMessgaeResult(messageId,d.getChat_id(),d.getExternal_userid(),d.getStatus(),d.getSend_time());
}); });
}
});
} }
} }
// }); //更新微信实际发送条数
weCustomerMessageService.updateWeCustomerMessageActualSend(messageId,atomicInteger.get());
});
return weCustomerMessageOriginalMapper.findCustomerMessagePushDetail(messageId); return customerMessagePushDetail;
} }
} }
...@@ -10,6 +10,7 @@ import com.linkwechat.common.exception.wecom.WeComException; ...@@ -10,6 +10,7 @@ import com.linkwechat.common.exception.wecom.WeComException;
import com.linkwechat.common.utils.DateUtils; 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.StringUtils;
import com.linkwechat.wecom.client.WeCustomerMessagePushClient; import com.linkwechat.wecom.client.WeCustomerMessagePushClient;
import com.linkwechat.wecom.domain.*; import com.linkwechat.wecom.domain.*;
import com.linkwechat.wecom.domain.dto.message.*; import com.linkwechat.wecom.domain.dto.message.*;
...@@ -68,11 +69,6 @@ public class WeCustomerMessagePushServiceImpl implements IWeCustomerMessagePushS ...@@ -68,11 +69,6 @@ public class WeCustomerMessagePushServiceImpl implements IWeCustomerMessagePushS
throw new WeComException("发送时间不能小于当前时间"); throw new WeComException("发送时间不能小于当前时间");
} }
//查询员id
List<String> senders = Lists.newArrayList();
StringBuffer sendInfo = new StringBuffer();
//保存原始数据信息表 //保存原始数据信息表
long messageOriginalId = saveWeCustomerMessageOriginal(customerMessagePushDto); long messageOriginalId = saveWeCustomerMessageOriginal(customerMessagePushDto);
...@@ -81,10 +77,8 @@ public class WeCustomerMessagePushServiceImpl implements IWeCustomerMessagePushS ...@@ -81,10 +77,8 @@ public class WeCustomerMessagePushServiceImpl implements IWeCustomerMessagePushS
//保存映射信息 //保存映射信息
int size = workerMappingCustomer(customerMessagePushDto, messageId); int size = workerMappingCustomer(customerMessagePushDto, messageId);
sendInfo(customerMessagePushDto, sendInfo, size);
//保存微信消息 //保存微信消息
saveWeCustomerMessage(messageId, messageOriginalId, customerMessagePushDto, sendInfo); saveWeCustomerMessage(messageId, messageOriginalId, customerMessagePushDto, size);
//保存分类消息信息 //保存分类消息信息
weCustomerSeedMessageService.saveSeedMessage(customerMessagePushDto, messageId); weCustomerSeedMessageService.saveSeedMessage(customerMessagePushDto, messageId);
...@@ -136,7 +130,8 @@ public class WeCustomerMessagePushServiceImpl implements IWeCustomerMessagePushS ...@@ -136,7 +130,8 @@ public class WeCustomerMessagePushServiceImpl implements IWeCustomerMessagePushS
WeCustomerMessgaeResult customerMessgaeResult = new WeCustomerMessgaeResult(); WeCustomerMessgaeResult customerMessgaeResult = new WeCustomerMessgaeResult();
customerMessgaeResult.setMessgaeResultId(SnowFlakeUtil.nextId()); customerMessgaeResult.setMessgaeResultId(SnowFlakeUtil.nextId());
customerMessgaeResult.setMessageId(messageId); customerMessgaeResult.setMessageId(messageId);
customerMessgaeResult.setSendTime(customerMessagePushDto.getSettingTime()); //这个是实际发送时间
customerMessgaeResult.setSendTime(null);
customerMessgaeResult.setSendType(customerMessgaeResult.getSettingTime() == null ? customerMessagePushDto.getPushType() : "2"); customerMessgaeResult.setSendType(customerMessgaeResult.getSettingTime() == null ? customerMessagePushDto.getPushType() : "2");
customerMessgaeResult.setExternalUserid(customer.getExternalUserid()); customerMessgaeResult.setExternalUserid(customer.getExternalUserid());
customerMessgaeResult.setExternalName(customer.getName()); customerMessgaeResult.setExternalName(customer.getName());
...@@ -214,31 +209,8 @@ public class WeCustomerMessagePushServiceImpl implements IWeCustomerMessagePushS ...@@ -214,31 +209,8 @@ public class WeCustomerMessagePushServiceImpl implements IWeCustomerMessagePushS
} }
private void sendInfo(CustomerMessagePushDto customerMessagePushDto, StringBuffer sendInfo, int size) {
if (null != customerMessagePushDto.getSettingTime() && !customerMessagePushDto.getSettingTime().equals("")) {
sendInfo.append("定时任务");
sendInfo.append("发送时间:");
sendInfo.append(customerMessagePushDto.getSettingTime());
} else {
if (customerMessagePushDto.getPushType().equals("0")) {
//预计发送3190人,已成功发送0人
sendInfo.append("预计发送");
sendInfo.append(size);
sendInfo.append("人,");
sendInfo.append("已成功发送0人");
}
if (customerMessagePushDto.getPushType().equals("1")) {
//预计发送2个群,已成功发送0个群
sendInfo.append("预计发送");
sendInfo.append(size);
sendInfo.append("个群,");
sendInfo.append("已成功发送0个群");
}
}
}
//保存微信消息 WeCustomerMessage //保存微信消息 WeCustomerMessage
public void saveWeCustomerMessage(long messageId, long messageOriginalId, CustomerMessagePushDto customerMessagePushDto, StringBuffer sendInfo) { public void saveWeCustomerMessage(long messageId, long messageOriginalId, CustomerMessagePushDto customerMessagePushDto, int size) {
//保存微信消息 //保存微信消息
//微信群发消息表 WeCustomerMessage //微信群发消息表 WeCustomerMessage
WeCustomerMessage customerMessage = new WeCustomerMessage(); WeCustomerMessage customerMessage = new WeCustomerMessage();
...@@ -250,9 +222,16 @@ public class WeCustomerMessagePushServiceImpl implements IWeCustomerMessagePushS ...@@ -250,9 +222,16 @@ public class WeCustomerMessagePushServiceImpl implements IWeCustomerMessagePushS
customerMessage.setCheckStatus("0"); customerMessage.setCheckStatus("0");
customerMessage.setDelFlag(0); customerMessage.setDelFlag(0);
customerMessage.setContent(content(customerMessagePushDto)); customerMessage.setContent(content(customerMessagePushDto));
customerMessage.setSendInfo(sendInfo.toString());
customerMessage.setCreateBy(SecurityUtils.getUsername()); customerMessage.setCreateBy(SecurityUtils.getUsername());
customerMessage.setMsgid(""); customerMessage.setMsgid("");
if(StringUtils.isNotEmpty(customerMessagePushDto.getSettingTime())){
customerMessage.setSettingTime(customerMessagePushDto.getSettingTime());
customerMessage.setTimedTask(1);
}else {
customerMessage.setTimedTask(0);
}
customerMessage.setExpectSend(size);
customerMessage.setActualSend(0);
weCustomerMessageService.save(customerMessage); weCustomerMessageService.save(customerMessage);
} }
......
package com.linkwechat.wecom.service.impl; package com.linkwechat.wecom.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.linkwechat.common.utils.SecurityUtils;
import com.linkwechat.common.utils.SnowFlakeUtil;
import com.linkwechat.wecom.domain.WeCustomerMessage; import com.linkwechat.wecom.domain.WeCustomerMessage;
import com.linkwechat.wecom.mapper.WeCustomerMessageMapper; import com.linkwechat.wecom.mapper.WeCustomerMessageMapper;
import com.linkwechat.wecom.service.IWeCustomerMessageService; import com.linkwechat.wecom.service.IWeCustomerMessageService;
...@@ -25,4 +23,9 @@ public class WeCustomerMessageServiceImpl extends ServiceImpl<WeCustomerMessageM ...@@ -25,4 +23,9 @@ public class WeCustomerMessageServiceImpl extends ServiceImpl<WeCustomerMessageM
return weCustomerMessageMapper.updateWeCustomerMessageMsgIdById(customerMessage); return weCustomerMessageMapper.updateWeCustomerMessageMsgIdById(customerMessage);
} }
@Override
public int updateWeCustomerMessageActualSend(Long messageId, Integer actualSend) {
return weCustomerMessageMapper.updateWeCustomerMessageActualSend(messageId, actualSend);
}
} }
...@@ -2,10 +2,14 @@ package com.linkwechat.wecom.service.impl; ...@@ -2,10 +2,14 @@ package com.linkwechat.wecom.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.linkwechat.wecom.domain.WeCustomerMessgaeResult; import com.linkwechat.wecom.domain.WeCustomerMessgaeResult;
import com.linkwechat.wecom.domain.vo.WeCustomerMessageResultVo;
import com.linkwechat.wecom.mapper.WeCustomerMessgaeResultMapper; import com.linkwechat.wecom.mapper.WeCustomerMessgaeResultMapper;
import com.linkwechat.wecom.service.IWeCustomerMessgaeResultService; import com.linkwechat.wecom.service.IWeCustomerMessgaeResultService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List;
/** /**
* 群发消息 微信消息发送结果表 we_customer_messgaeResult * 群发消息 微信消息发送结果表 we_customer_messgaeResult
* *
...@@ -14,4 +18,13 @@ import org.springframework.stereotype.Service; ...@@ -14,4 +18,13 @@ import org.springframework.stereotype.Service;
*/ */
@Service @Service
public class WeCustomerMessgaeResultServiceImpl extends ServiceImpl<WeCustomerMessgaeResultMapper, WeCustomerMessgaeResult> implements IWeCustomerMessgaeResultService { public class WeCustomerMessgaeResultServiceImpl extends ServiceImpl<WeCustomerMessgaeResultMapper, WeCustomerMessgaeResult> implements IWeCustomerMessgaeResultService {
@Autowired
private WeCustomerMessgaeResultMapper customerMessgaeResultMapper;
@Override
public List<WeCustomerMessageResultVo> customerMessagePushs(Long messageId, String status) {
return customerMessgaeResultMapper.customerMessagePushs(messageId, status);
}
} }
package com.linkwechat.wecom.service.impl;
import com.linkwechat.wecom.domain.WeSensitiveAuditScope;
import com.linkwechat.wecom.mapper.WeSensitiveAuditScopeMapper;
import com.linkwechat.wecom.service.IWeSensitiveAuditScopeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 敏感词审计范围Service业务层处理
*
* @author ruoyi
* @date 2020-12-29
*/
@Service
public class WeSensitiveAuditScopeServiceImpl implements IWeSensitiveAuditScopeService {
@Autowired
private WeSensitiveAuditScopeMapper weSensitiveAuditScopeMapper;
/**
* 查询敏感词审计范围
*
* @param id 敏感词审计范围ID
* @return 敏感词审计范围
*/
@Override
public WeSensitiveAuditScope selectWeSensitiveAuditScopeById(Long id) {
return weSensitiveAuditScopeMapper.selectWeSensitiveAuditScopeById(id);
}
/**
* 查询敏感词审计范围列表
*
* @param weSensitiveAuditScope 敏感词审计范围
* @return 敏感词审计范围
*/
@Override
public List<WeSensitiveAuditScope> selectWeSensitiveAuditScopeList(WeSensitiveAuditScope weSensitiveAuditScope) {
return weSensitiveAuditScopeMapper.selectWeSensitiveAuditScopeList(weSensitiveAuditScope);
}
/**
* 新增敏感词审计范围
*
* @param weSensitiveAuditScope 敏感词审计范围
* @return 结果
*/
@Override
public int insertWeSensitiveAuditScope(WeSensitiveAuditScope weSensitiveAuditScope) {
return weSensitiveAuditScopeMapper.insertWeSensitiveAuditScope(weSensitiveAuditScope);
}
@Override
public int insertWeSensitiveAuditScopeList(List<WeSensitiveAuditScope> weSensitiveAuditScopeList) {
return weSensitiveAuditScopeMapper.insertWeSensitiveAuditScopeList(weSensitiveAuditScopeList);
}
/**
* 修改敏感词审计范围
*
* @param weSensitiveAuditScope 敏感词审计范围
* @return 结果
*/
@Override
public int updateWeSensitiveAuditScope(WeSensitiveAuditScope weSensitiveAuditScope) {
return weSensitiveAuditScopeMapper.updateWeSensitiveAuditScope(weSensitiveAuditScope);
}
/**
* 批量删除敏感词审计范围
*
* @param ids 需要删除的敏感词审计范围ID
* @return 结果
*/
@Override
public int deleteWeSensitiveAuditScopeByIds(Long[] ids) {
return weSensitiveAuditScopeMapper.deleteWeSensitiveAuditScopeByIds(ids);
}
/**
* 删除敏感词审计范围信息
*
* @param id 敏感词审计范围ID
* @return 结果
*/
@Override
public int deleteWeSensitiveAuditScopeById(Long id) {
return weSensitiveAuditScopeMapper.deleteWeSensitiveAuditScopeById(id);
}
@Override
public int deleteAuditScopeBySensitiveId(Long sensitiveId) {
return weSensitiveAuditScopeMapper.deleteAuditScopeBySensitiveId(sensitiveId);
}
@Override
public int deleteAuditScopeBySensitiveIds(Long[] sensitiveIds) {
return weSensitiveAuditScopeMapper.deleteAuditScopeBySensitiveIds(sensitiveIds);
}
}
package com.linkwechat.wecom.service.impl;
import com.linkwechat.common.utils.DateUtils;
import com.linkwechat.common.utils.SecurityUtils;
import com.linkwechat.wecom.domain.WeSensitive;
import com.linkwechat.wecom.mapper.WeSensitiveMapper;
import com.linkwechat.wecom.service.IWeSensitiveAuditScopeService;
import com.linkwechat.wecom.service.IWeSensitiveService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* 敏感词设置Service业务层处理
*
* @author ruoyi
* @date 2020-12-29
*/
@Service
public class WeSensitiveServiceImpl implements IWeSensitiveService {
@Autowired
private WeSensitiveMapper weSensitiveMapper;
@Autowired
private IWeSensitiveAuditScopeService sensitiveAuditScopeService;
/**
* 查询敏感词设置
*
* @param id 敏感词设置ID
* @return 敏感词设置
*/
@Override
public WeSensitive selectWeSensitiveById(Long id) {
return weSensitiveMapper.selectWeSensitiveById(id);
}
/**
* 查询敏感词设置列表
*
* @param weSensitive 敏感词设置
* @return 敏感词设置
*/
@Override
public List<WeSensitive> selectWeSensitiveList(WeSensitive weSensitive) {
return weSensitiveMapper.selectWeSensitiveList(weSensitive);
}
/**
* 新增敏感词设置
*
* @param weSensitive 敏感词设置
* @return 结果
*/
@Override
@Transactional
public int insertWeSensitive(WeSensitive weSensitive) {
weSensitive.setCreateBy(SecurityUtils.getUsername());
weSensitive.setCreateTime(DateUtils.getNowDate());
int insertResult = weSensitiveMapper.insertWeSensitive(weSensitive);
if (insertResult > 0) {
if (CollectionUtils.isNotEmpty(weSensitive.getAuditUserScope())) {
if (weSensitive.getId() != null) {
weSensitive.getAuditUserScope().forEach(scope -> {
scope.setSensitiveId(weSensitive.getId());
});
sensitiveAuditScopeService.insertWeSensitiveAuditScopeList(weSensitive.getAuditUserScope());
}
}
}
return insertResult;
}
/**
* 修改敏感词设置
*
* @param weSensitive 敏感词设置
* @return 结果
*/
@Override
@Transactional
public int updateWeSensitive(WeSensitive weSensitive) {
weSensitive.setUpdateBy(SecurityUtils.getUsername());
weSensitive.setUpdateTime(DateUtils.getNowDate());
int updateResult = weSensitiveMapper.updateWeSensitive(weSensitive);
if (updateResult > 0 && weSensitive.getAuditUserScope() != null) {
//删除原有关联信息
sensitiveAuditScopeService.deleteAuditScopeBySensitiveId(weSensitive.getId());
if (CollectionUtils.isNotEmpty(weSensitive.getAuditUserScope())) {
weSensitive.getAuditUserScope().forEach(scope -> {
scope.setSensitiveId(weSensitive.getId());
});
sensitiveAuditScopeService.insertWeSensitiveAuditScopeList(weSensitive.getAuditUserScope());
}
}
return updateResult;
}
/**
* 批量删除敏感词设置
*
* @param ids 需要删除的敏感词设置ID
* @return 结果
*/
@Override
public int deleteWeSensitiveByIds(Long[] ids) {
List<WeSensitive> sensitiveList = weSensitiveMapper.selectWeSensitiveByIds(ids);
sensitiveList.forEach(sensitive -> {
sensitive.setDelFlag(1);
sensitive.setUpdateBy(SecurityUtils.getUsername());
sensitive.setUpdateTime(DateUtils.getNowDate());
});
return weSensitiveMapper.batchUpdateWeSensitive(sensitiveList);
}
/**
* 批量删除敏感词配置数据
*
* @param ids 敏感词设置ID
* @return 结果
*/
@Override
@Transactional
public int destroyWeSensitiveByIds(Long[] ids) {
int deleteResult = weSensitiveMapper.deleteWeSensitiveByIds(ids);
if (deleteResult > 0) {
//删除关联数据
sensitiveAuditScopeService.deleteAuditScopeBySensitiveIds(ids);
}
return deleteResult;
}
}
...@@ -12,4 +12,14 @@ ...@@ -12,4 +12,14 @@
message_id=#{messageId} message_id=#{messageId}
</where> </where>
</update> </update>
<update id="updateWeCustomerMessageActualSend">
UPDATE we_customer_message
<set>
actual_send=#{actualSend}
</set>
<where>
message_id=#{messageId}
</where>
</update>
</mapper> </mapper>
...@@ -5,10 +5,21 @@ ...@@ -5,10 +5,21 @@
<mapper namespace="com.linkwechat.wecom.mapper.WeCustomerMessageOriginalMapper"> <mapper namespace="com.linkwechat.wecom.mapper.WeCustomerMessageOriginalMapper">
<select id="selectCustomerMessagePushs" resultType="com.linkwechat.wecom.domain.vo.CustomerMessagePushVo"> <select id="selectCustomerMessagePushs" resultType="com.linkwechat.wecom.domain.vo.CustomerMessagePushVo">
SELECT SELECT
wcmo.push_type,wcmo.message_type,wcmo.push_range,wcm.create_by sender,wcmo.create_time wcmo.push_type,
sendTime,wcm.message_id,wcm.content,wcm.send_info wcmo.message_type,
FROM we_customer_messageOriginal wcmo LEFT JOIN we_customer_message wcm ON wcmo.push_range,
wcmo.message_original_Id=wcm.original_id wcm.create_by sender,
wcmo.create_time sendTime,
wcm.message_id,
wcm.content,
wcm.chat_type,
wcm.setting_time,
wcm.expect_send,
wcm.actual_send,
wcm.timed_task
FROM
we_customer_messageOriginal wcmo
LEFT JOIN we_customer_message wcm ON wcmo.message_original_Id = wcm.original_id
<where> <where>
<if test="sender!=null and sender!=''"> <if test="sender!=null and sender!=''">
AND wcmo.create_by LIKE CONCAT('%',#{sender},'%') AND wcmo.create_by LIKE CONCAT('%',#{sender},'%')
...@@ -31,10 +42,22 @@ ...@@ -31,10 +42,22 @@
<select id="findCustomerMessagePushDetail" <select id="findCustomerMessagePushDetail"
resultType="com.linkwechat.wecom.domain.vo.CustomerMessagePushVo"> resultType="com.linkwechat.wecom.domain.vo.CustomerMessagePushVo">
SELECT SELECT
wcmo.push_type,wcmo.message_type,wcmo.push_range,wcm.create_by sender,wcmo.create_time wcmo.push_type,
sendTime,wcm.message_id,wcm.content,wcm.send_info,wcm.msgid wcmo.message_type,
FROM we_customer_messageOriginal wcmo LEFT JOIN we_customer_message wcm ON wcmo.push_range,
wcmo.message_original_Id=wcm.original_id wcm.create_by sender,
wcmo.create_time sendTime,
wcm.message_id,
wcm.content,
wcm.msgid,
wcm.chat_type,
wcm.setting_time,
wcm.expect_send,
wcm.actual_send,
wcm.timed_task
FROM
we_customer_messageOriginal wcmo
LEFT JOIN we_customer_message wcm ON wcmo.message_original_Id = wcm.original_id
<where> <where>
wcm.message_id=#{messageId} wcm.message_id=#{messageId}
</where> </where>
......
...@@ -6,12 +6,6 @@ ...@@ -6,12 +6,6 @@
<update id="updateWeCustomerMessgaeResult"> <update id="updateWeCustomerMessgaeResult">
UPDATE we_customer_messgaeResult UPDATE we_customer_messgaeResult
<set> <set>
<if test="chatId!=null and chatId!=''">
chat_id=#{chatId},
</if>
<if test="externalUserid!=null and externalUserid!=''">
external_userid=#{externalUserid},
</if>
<if test="sendTime!=null and sendTime!=''"> <if test="sendTime!=null and sendTime!=''">
send_time=#{sendTime}, send_time=#{sendTime},
</if> </if>
...@@ -19,6 +13,29 @@ ...@@ -19,6 +13,29 @@
status=#{status} status=#{status}
</if> </if>
</set> </set>
WHERE message_id=#{messageId} <where>
message_id=#{messageId}
<if test="chatId!=null and chatId!=''">
AND chat_id=#{chatId}
</if>
<if test="externalUserid!=null and externalUserid!=''">
AND external_userid=#{externalUserid}
</if>
</where>
</update> </update>
<select id="customerMessagePushs" resultType="com.linkwechat.wecom.domain.vo.WeCustomerMessageResultVo">
SELECT
user_name,
GROUP_CONCAT(external_name SEPARATOR '、') customers
FROM
we_customer_messgaeResult
<where>
message_id=#{messageId}
<if test="status!=null">
AND `status`=#{status}
</if>
</where>
GROUP BY user_name
</select>
</mapper> </mapper>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.linkwechat.wecom.mapper.WeSensitiveAuditScopeMapper">
<resultMap type="WeSensitiveAuditScope" id="WeSensitiveAuditScopeResult">
<result property="id" column="id"/>
<result property="sensitiveId" column="sensitive_id"/>
<result property="scopeType" column="scope_type"/>
<result property="auditScopeId" column="audit_scope_id"/>
<result property="auditScopeName" column="audit_scope_name"/>
</resultMap>
<sql id="selectWeSensitiveAuditScopeVo">
select id, sensitive_id, scope_type, audit_scope_id, audit_scope_name from we_sensitive_audit_scope
</sql>
<select id="selectWeSensitiveAuditScopeList" parameterType="WeSensitiveAuditScope"
resultMap="WeSensitiveAuditScopeResult">
<include refid="selectWeSensitiveAuditScopeVo"/>
<where>
<if test="sensitiveId != null ">and sensitive_id = #{sensitiveId}</if>
<if test="scopeType != null ">and scope_type = #{scopeType}</if>
<if test="auditScopeId != null ">and audit_scope_id = #{auditScopeId}</if>
<if test="auditScopeName != null and auditScopeName != ''">and audit_scope_name like concat('%',
#{auditScopeName}, '%')
</if>
</where>
</select>
<select id="selectWeSensitiveAuditScopeById" parameterType="Long" resultMap="WeSensitiveAuditScopeResult">
<include refid="selectWeSensitiveAuditScopeVo"/>
where id = #{id}
</select>
<insert id="insertWeSensitiveAuditScope" parameterType="WeSensitiveAuditScope" useGeneratedKeys="true"
keyProperty="id">
insert into we_sensitive_audit_scope
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="sensitiveId != null ">sensitive_id,</if>
<if test="scopeType != null">scope_type,</if>
<if test="auditScopeId != null">audit_scope_id,</if>
<if test="auditScopeName != null and auditScopeName != ''">audit_scope_name,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="sensitiveId != null ">#{sensitiveId},</if>
<if test="scopeType != null">#{scopeType},</if>
<if test="auditScopeId != null">#{auditScopeId},</if>
<if test="auditScopeName != null and auditScopeName != ''">#{auditScopeName},</if>
</trim>
</insert>
<insert id="insertWeSensitiveAuditScopeList" parameterType="java.util.List" useGeneratedKeys="true"
keyProperty="id">
insert into we_sensitive_audit_scope(sensitive_id,scope_type,audit_scope_id,audit_scope_name)
values
<foreach collection="list" item="item" separator=",">
(#{item.sensitiveId},#{item.scopeType},#{item.auditScopeId},#{item.auditScopeName})
</foreach>
</insert>
<update id="updateWeSensitiveAuditScope" parameterType="WeSensitiveAuditScope">
update we_sensitive_audit_scope
<trim prefix="SET" suffixOverrides=",">
<if test="sensitiveId != null ">sensitive_id = #{sensitiveId},</if>
<if test="scopeType != null">scope_type = #{scopeType},</if>
<if test="auditScopeId != null">audit_scope_id = #{auditScopeId},</if>
<if test="auditScopeName != null and auditScopeName != ''">audit_scope_name = #{auditScopeName},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteWeSensitiveAuditScopeById" parameterType="Long">
delete from we_sensitive_audit_scope where id = #{id}
</delete>
<delete id="deleteAuditScopeBySensitiveId" parameterType="Long">
delete from we_sensitive_audit_scope where sensitive_id = #{sensitiveId}
</delete>
<delete id="deleteWeSensitiveAuditScopeByIds">
delete from we_sensitive_audit_scope where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<delete id="deleteAuditScopeBySensitiveIds">
delete from we_sensitive_audit_scope where sensitive_id in
<foreach item="sensitiveId" collection="array" open="(" separator="," close=")">
#{sensitiveId}
</foreach>
</delete>
</mapper>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.linkwechat.wecom.mapper.WeSensitiveMapper">
<resultMap type="WeSensitive" id="WeSensitiveResult">
<result property="id" column="id"/>
<result property="strategyName" column="strategy_name"/>
<result property="patternWords" column="pattern_words"/>
<result property="auditUserId" column="audit_user_id"/>
<result property="auditUserName" column="audit_user_name"/>
<result property="alertFlag" column="alert_flag"/>
<result property="delFlag" column="del_flag"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<collection property="auditUserScope" ofType="com.linkwechat.wecom.domain.WeSensitiveAuditScope">
<result property="scopeType" column="scope_type"/>
<result property="auditScopeId" column="audit_scope_id"/>
<result property="auditScopeName" column="audit_scope_name"/>
</collection>
</resultMap>
<sql id="selectWeSensitiveVo">
select id, strategy_name, pattern_words, audit_user_id, audit_user_name, alert_flag, del_flag, create_by,
create_time, update_by, update_time from we_sensitive
</sql>
<sql id="selectWeSensitiveList">
select a.*,b.audit_scope_id,b.audit_scope_name,b.scope_type from we_sensitive a left join we_sensitive_audit_scope b on a.id
= b.sensitive_id
</sql>
<select id="selectWeSensitiveList" parameterType="WeSensitive" resultMap="WeSensitiveResult">
<include refid="selectWeSensitiveList"/>
<where>
<if test="strategyName != null and strategyName != ''">and a.strategy_name like concat('%',
#{strategyName}, '%')
</if>
<if test="patternWords != null and patternWords != ''">and a.pattern_words like concat('%',
#{patternWords}, '%')
</if>
<if test="auditUserId != null ">and a.audit_user_id = #{auditUserId}</if>
<if test="auditUserName != null and auditUserName != ''">and a.audit_user_name like concat('%',
#{auditUserName}, '%')
</if>
</where>
</select>
<select id="selectWeSensitiveById" parameterType="Long" resultMap="WeSensitiveResult">
<include refid="selectWeSensitiveList"/>
where a.id = #{id}
</select>
<select id="selectWeSensitiveByIds" parameterType="String" resultMap="WeSensitiveResult">
<include refid="selectWeSensitiveList"/>
where a.id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</select>
<insert id="insertWeSensitive" parameterType="WeSensitive" useGeneratedKeys="true" keyProperty="id">
insert into we_sensitive
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="strategyName != null and strategyName != ''">strategy_name,</if>
<if test="patternWords != null and patternWords != ''">pattern_words,</if>
<if test="auditUserId != null">audit_user_id,</if>
<if test="auditUserName != null and auditUserName != ''">audit_user_name,</if>
<if test="alertFlag != null">alert_flag,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="strategyName != null and strategyName != ''">#{strategyName},</if>
<if test="patternWords != null and patternWords != ''">#{patternWords},</if>
<if test="auditUserId != null">#{auditUserId},</if>
<if test="auditUserName != null and auditUserName != ''">#{auditUserName},</if>
<if test="alertFlag != null">#{alertFlag},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateWeSensitive" parameterType="WeSensitive">
update we_sensitive
<trim prefix="SET" suffixOverrides=",">
<if test="strategyName != null and strategyName != ''">strategy_name = #{strategyName},</if>
<if test="patternWords != null and patternWords != ''">pattern_words = #{patternWords},</if>
<if test="auditUserId != null">audit_user_id = #{auditUserId},</if>
<if test="auditUserName != null">audit_user_name = #{auditUserName},</if>
<if test="alertFlag != null">alert_flag = #{alertFlag},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<update id="batchUpdateWeSensitive" parameterType="java.util.List">
update we_sensitive
<trim prefix="SET" suffixOverrides=",">
<trim prefix="strategy_name = case" suffix="end,">
<foreach collection="list" item="item" index="index">
<if test="item.strategyName != null and item.strategyName != ''">
when id = #{item.id} then #{item.strategyName}
</if>
</foreach>
</trim>
<trim prefix="pattern_words = case" suffix="end,">
<foreach collection="list" item="item" index="index">
<if test="item.patternWords != null and item.patternWords != ''">
when id = #{item.id} then #{item.patternWords}
</if>
</foreach>
</trim>
<trim prefix="audit_user_id = case" suffix="end,">
<foreach collection="list" item="item" index="index">
<if test="item.auditUserId != null">
when id = #{item.id} then #{item.auditUserId}
</if>
</foreach>
</trim>
<trim prefix="audit_user_name = case" suffix="end,">
<foreach collection="list" item="item" index="index">
<if test="item.auditUserName != null and item.auditUserName != ''">
when id = #{item.id} then #{item.auditUserName}
</if>
</foreach>
</trim>
<trim prefix="alert_flag = case" suffix="end,">
<foreach collection="list" item="item" index="index">
<if test="item.alertFlag != null">
when id = #{item.id} then #{item.alertFlag}
</if>
</foreach>
</trim>
<trim prefix="del_flag = case" suffix="end,">
<foreach collection="list" item="item" index="index">
<if test="item.delFlag != null">
when id = #{item.id} then #{item.delFlag}
</if>
</foreach>
</trim>
<trim prefix="create_by = case" suffix="end,">
<foreach collection="list" item="item" index="index">
<if test="item.createBy != null and item.createBy != ''">
when id = #{item.id} then #{item.createBy}
</if>
</foreach>
</trim>
<trim prefix="create_time = case" suffix="end,">
<foreach collection="list" item="item" index="index">
<if test="item.createTime != null">
when id = #{item.id} then #{item.createTime}
</if>
</foreach>
</trim>
<trim prefix="update_by = case" suffix="end,">
<foreach collection="list" item="item" index="index">
<if test="item.updateBy != null and item.updateBy != ''">
when id = #{item.id} then #{item.updateBy}
</if>
</foreach>
</trim>
<trim prefix="update_time = case" suffix="end,">
<foreach collection="list" item="item" index="index">
<if test="item.updateTime != null">
when id = #{item.id} then #{item.updateTime}
</if>
</foreach>
</trim>
</trim>
WHERE id in
<foreach collection="list" index="index" item="item" separator="," open="(" close=")">
#{item.id}
</foreach>
</update>
<delete id="deleteWeSensitiveById" parameterType="Long">
delete from we_sensitive where id = #{id}
</delete>
<delete id="deleteWeSensitiveByIds">
delete from we_sensitive where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file \ No newline at end of file
...@@ -10,7 +10,7 @@ Target Server Type : MYSQL ...@@ -10,7 +10,7 @@ Target Server Type : MYSQL
Target Server Version : 50718 Target Server Version : 50718
File Encoding : 65001 File Encoding : 65001
Date: 2020-12-25 14:01:49 Date: 2020-12-30 10:16:02
*/ */
SET FOREIGN_KEY_CHECKS=0; SET FOREIGN_KEY_CHECKS=0;
...@@ -5678,6 +5678,24 @@ CREATE TABLE `we_category` ( ...@@ -5678,6 +5678,24 @@ CREATE TABLE `we_category` (
-- ---------------------------- -- ----------------------------
-- ---------------------------- -- ----------------------------
-- Table structure for we_chat_contact_mapping
-- ----------------------------
DROP TABLE IF EXISTS `we_chat_contact_mapping`;
CREATE TABLE `we_chat_contact_mapping` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`from_id` varchar(32) NOT NULL COMMENT '发送人id',
`receive_id` varchar(32) DEFAULT NULL COMMENT '接收人id',
`room_id` varchar(32) DEFAULT NULL COMMENT '群聊id',
`is_custom` tinyint(4) DEFAULT NULL COMMENT '接收人是否为客户 0-成员 1-客户 2-机器人',
PRIMARY KEY (`id`),
KEY `we_chat_contact_mapping_from_id_IDX` (`from_id`,`is_custom`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
-- ----------------------------
-- Records of we_chat_contact_mapping
-- ----------------------------
-- ----------------------------
-- Table structure for we_config -- Table structure for we_config
-- ---------------------------- -- ----------------------------
DROP TABLE IF EXISTS `we_config`; DROP TABLE IF EXISTS `we_config`;
...@@ -5705,6 +5723,7 @@ CREATE TABLE `we_corp_account` ( ...@@ -5705,6 +5723,7 @@ CREATE TABLE `we_corp_account` (
`contact_secret` varchar(64) DEFAULT NULL COMMENT '外部联系人密钥', `contact_secret` varchar(64) DEFAULT NULL COMMENT '外部联系人密钥',
`wx_qr_login_redirect_uri` varchar(64) DEFAULT NULL COMMENT '企业微信扫码登陆系统回调地址', `wx_qr_login_redirect_uri` varchar(64) DEFAULT NULL COMMENT '企业微信扫码登陆系统回调地址',
`provider_secret` varchar(64) DEFAULT NULL, `provider_secret` varchar(64) DEFAULT NULL,
`chat_secret` varchar(64) DEFAULT NULL COMMENT '会话存档密钥',
`agent_id` varchar(64) DEFAULT NULL COMMENT '应用id', `agent_id` varchar(64) DEFAULT NULL COMMENT '应用id',
`status` char(1) DEFAULT '1' COMMENT '帐号状态(0正常 1停用)', `status` char(1) DEFAULT '1' COMMENT '帐号状态(0正常 1停用)',
`del_flag` char(1) DEFAULT '0' COMMENT '删除标志(0代表存在 2代表删除)', `del_flag` char(1) DEFAULT '0' COMMENT '删除标志(0代表存在 2代表删除)',
...@@ -5798,6 +5817,8 @@ CREATE TABLE `we_customer_message` ( ...@@ -5798,6 +5817,8 @@ CREATE TABLE `we_customer_message` (
`sender` varchar(255) DEFAULT NULL COMMENT '发送企业群发消息的成员userid,当类型为发送给客户群时必填(和企微客户沟通后确认是群主id)', `sender` varchar(255) DEFAULT NULL COMMENT '发送企业群发消息的成员userid,当类型为发送给客户群时必填(和企微客户沟通后确认是群主id)',
`check_status` varchar(2) DEFAULT NULL COMMENT '消息发送状态 0 未发送 1 已发送', `check_status` varchar(2) DEFAULT NULL COMMENT '消息发送状态 0 未发送 1 已发送',
`msgid` varchar(100) DEFAULT NULL COMMENT '企业群发消息的id,可用于<a href="https://work.weixin.qq.com/api/doc/90000/90135/92136">获取群发消息发送结果</a>', `msgid` varchar(100) DEFAULT NULL COMMENT '企业群发消息的id,可用于<a href="https://work.weixin.qq.com/api/doc/90000/90135/92136">获取群发消息发送结果</a>',
`content` text COMMENT '消息内容',
`send_info` varchar(255) DEFAULT NULL COMMENT '发送情况 ps:显示样式 1)定时任务 发送时间:2020-12-25 10:00:00 2) 预计发送3190人,已成功发送0人 3)预计发送2个群,已成功发送0个群 ',
`create_by` varchar(64) DEFAULT NULL, `create_by` varchar(64) DEFAULT NULL,
`create_time` datetime DEFAULT NULL, `create_time` datetime DEFAULT NULL,
`update_by` varchar(64) DEFAULT NULL, `update_by` varchar(64) DEFAULT NULL,
...@@ -5847,11 +5868,16 @@ CREATE TABLE `we_customer_messgaeResult` ( ...@@ -5847,11 +5868,16 @@ CREATE TABLE `we_customer_messgaeResult` (
`userid` varchar(100) DEFAULT NULL COMMENT '企业服务人员的userid', `userid` varchar(100) DEFAULT NULL COMMENT '企业服务人员的userid',
`status` varchar(2) DEFAULT NULL COMMENT '发送状态 0-未发送 1-已发送 2-因客户不是好友导致发送失败 3-因客户已经收到其他群发消息导致发送失败', `status` varchar(2) DEFAULT NULL COMMENT '发送状态 0-未发送 1-已发送 2-因客户不是好友导致发送失败 3-因客户已经收到其他群发消息导致发送失败',
`send_time` varchar(40) DEFAULT NULL, `send_time` varchar(40) DEFAULT NULL,
`external_name` varchar(100) DEFAULT NULL COMMENT '外部联系人名称',
`user_name` varchar(100) DEFAULT NULL COMMENT '企业服务人员的名称',
`send_type` varchar(1) DEFAULT NULL COMMENT '0 发给客户 1 发给客户群 2 定时发送',
`setting_time` varchar(40) DEFAULT NULL COMMENT '定时发送时间',
`create_by` varchar(64) DEFAULT NULL, `create_by` varchar(64) DEFAULT NULL,
`create_time` datetime DEFAULT NULL, `create_time` datetime DEFAULT NULL,
`update_by` varchar(64) DEFAULT NULL, `update_by` varchar(64) DEFAULT NULL,
`update_time` datetime DEFAULT NULL, `update_time` datetime DEFAULT NULL,
`del_flag` int(2) DEFAULT '0', `del_flag` int(2) DEFAULT '0',
`chat_name` varchar(255) DEFAULT NULL COMMENT '外部客户群名称',
PRIMARY KEY (`messgae_result_id`) PRIMARY KEY (`messgae_result_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='群发消息 微信消息发送结果'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='群发消息 微信消息发送结果';
...@@ -5883,6 +5909,37 @@ CREATE TABLE `we_customer_miniprogramMessage` ( ...@@ -5883,6 +5909,37 @@ CREATE TABLE `we_customer_miniprogramMessage` (
-- ---------------------------- -- ----------------------------
-- ---------------------------- -- ----------------------------
-- Table structure for we_customer_seedMessage
-- ----------------------------
DROP TABLE IF EXISTS `we_customer_seedMessage`;
CREATE TABLE `we_customer_seedMessage` (
`image_message_id` bigint(64) DEFAULT NULL,
`message_id` bigint(64) DEFAULT NULL COMMENT '微信消息表id',
`content` text COMMENT '消息文本内容,最多4000个字节',
`media_id` varchar(100) DEFAULT NULL COMMENT '图片消息:图片的media_id,可以通过 <a href="https://work.weixin.qq.com/api/doc/90000/90135/90253">素材管理接口</a>获得',
`pic_url` varchar(100) DEFAULT NULL COMMENT '图片消息:图片的链接,仅可使用<a href="https://work.weixin.qq.com/api/doc/90000/90135/90256">上传图片接口</a>得到的链接',
`link_title` varchar(100) DEFAULT NULL COMMENT '链接消息:图文消息标题',
`link_picurl` varchar(255) DEFAULT NULL COMMENT '链接消息:图文消息封面的url',
`lin_desc` varchar(1000) DEFAULT NULL COMMENT '链接消息:图文消息的描述,最多512个字节',
`link_url` varchar(1000) DEFAULT NULL COMMENT '链接消息:图文消息的链接',
`miniprogram_title` varchar(255) DEFAULT NULL COMMENT '小程序消息标题,最多64个字节',
`miniprogram_media_id` varchar(100) DEFAULT NULL COMMENT '小程序消息封面的mediaid,封面图建议尺寸为520*416',
`appid` varchar(100) DEFAULT NULL COMMENT '小程序appid,必须是关联到企业的小程序应用',
`page` varchar(255) DEFAULT NULL COMMENT '小程序page路径',
`create_by` varchar(64) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
`update_by` varchar(255) DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`del_flag` int(1) DEFAULT '0',
`seed_message_id` bigint(20) NOT NULL,
PRIMARY KEY (`seed_message_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
-- ----------------------------
-- Records of we_customer_seedMessage
-- ----------------------------
-- ----------------------------
-- Table structure for we_customer_textMessage -- Table structure for we_customer_textMessage
-- ---------------------------- -- ----------------------------
DROP TABLE IF EXISTS `we_customer_textMessage`; DROP TABLE IF EXISTS `we_customer_textMessage`;
...@@ -6190,17 +6247,19 @@ CREATE TABLE `we_msg_tlp_scope` ( ...@@ -6190,17 +6247,19 @@ CREATE TABLE `we_msg_tlp_scope` (
DROP TABLE IF EXISTS `we_poster`; DROP TABLE IF EXISTS `we_poster`;
CREATE TABLE `we_poster` ( CREATE TABLE `we_poster` (
`id` bigint(20) NOT NULL, `id` bigint(20) NOT NULL,
`del_flag` tinyint(255) DEFAULT NULL, `del_flag` tinyint(255) DEFAULT NULL COMMENT '0 正常 1 删除',
`create_by` varchar(50) DEFAULT NULL, `create_by` varchar(50) DEFAULT NULL,
`create_time` timestamp NULL DEFAULT NULL, `create_time` timestamp NULL DEFAULT NULL,
`update_by` varchar(50) DEFAULT NULL, `update_by` varchar(50) DEFAULT NULL,
`update_time` timestamp NULL DEFAULT NULL, `update_time` timestamp NULL DEFAULT NULL,
`title` varchar(30) DEFAULT NULL, `title` varchar(30) DEFAULT NULL COMMENT '图片标题',
`background_img_path` varchar(255) DEFAULT NULL, `background_img_path` varchar(255) DEFAULT NULL COMMENT '背景图层图片地址',
`sample_img_path` varchar(255) DEFAULT NULL, `sample_img_path` varchar(255) DEFAULT NULL COMMENT '示例图',
`type` bigint(255) DEFAULT NULL, `type` bigint(255) DEFAULT NULL COMMENT '类型 1 通用海报',
`width` int(255) DEFAULT NULL, `width` int(255) DEFAULT NULL COMMENT '背景图片宽',
`height` int(11) DEFAULT NULL, `height` int(11) DEFAULT NULL COMMENT '背景图片高',
`media_type` varchar(255) DEFAULT NULL,
`category_id` bigint(20) DEFAULT NULL COMMENT '分类id',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
...@@ -6222,6 +6281,8 @@ CREATE TABLE `we_poster_font` ( ...@@ -6222,6 +6281,8 @@ CREATE TABLE `we_poster_font` (
`create_time` timestamp NULL DEFAULT NULL, `create_time` timestamp NULL DEFAULT NULL,
`update_by` varchar(50) DEFAULT NULL, `update_by` varchar(50) DEFAULT NULL,
`update_time` timestamp NULL DEFAULT NULL, `update_time` timestamp NULL DEFAULT NULL,
`media_type` int(11) DEFAULT NULL,
`category_id` bigint(20) DEFAULT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
...@@ -6243,15 +6304,18 @@ CREATE TABLE `we_poster_subassembly` ( ...@@ -6243,15 +6304,18 @@ CREATE TABLE `we_poster_subassembly` (
`poster_id` bigint(20) DEFAULT NULL COMMENT '海报id', `poster_id` bigint(20) DEFAULT NULL COMMENT '海报id',
`left` int(255) DEFAULT NULL, `left` int(255) DEFAULT NULL,
`top` int(255) DEFAULT NULL, `top` int(255) DEFAULT NULL,
`width` int(11) DEFAULT NULL, `width` int(11) DEFAULT NULL COMMENT '宽',
`height` int(11) DEFAULT NULL, `height` int(11) DEFAULT NULL COMMENT '高',
`type` int(255) DEFAULT NULL, `type` int(255) DEFAULT NULL COMMENT '1 文本 2 图片 3 二维码',
`font_size` int(11) DEFAULT NULL, `font_size` int(11) DEFAULT NULL COMMENT '字体大小',
`font_color` varchar(10) DEFAULT NULL, `font_color` varchar(10) DEFAULT NULL COMMENT '字体颜色',
`img_path` varchar(255) DEFAULT NULL, `img_path` varchar(255) DEFAULT NULL COMMENT '图片地址',
`font_id` bigint(20) DEFAULT NULL, `font_id` bigint(20) DEFAULT NULL COMMENT '字体id',
`font_text_align` int(255) DEFAULT NULL, `font_text_align` int(255) DEFAULT NULL COMMENT '水平对齐',
`content` varchar(255) DEFAULT NULL COMMENT '内容', `content` varchar(255) DEFAULT NULL COMMENT '内容',
`vertical_type` tinyint(255) DEFAULT NULL COMMENT '垂直对齐方式',
`word_space` int(255) DEFAULT NULL COMMENT '字间距',
`line_space` int(255) DEFAULT NULL COMMENT '行间距',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
...@@ -6327,3 +6391,35 @@ CREATE TABLE `we_user` ( ...@@ -6327,3 +6391,35 @@ CREATE TABLE `we_user` (
-- ---------------------------- -- ----------------------------
-- Records of we_user -- Records of we_user
-- ---------------------------- -- ----------------------------
-- ----------------------------
-- Table structure for we_sensitive
-- ----------------------------
DROP TABLE IF EXISTS `we_sensitive`;
CREATE TABLE `we_sensitive` (
id BIGINT auto_increment NOT NULL COMMENT '主键',
strategy_name varchar(100) NOT NULL COMMENT '策略名称',
pattern_words TEXT NOT NULL COMMENT '匹配词',
audit_user_id BIGINT NOT NULL COMMENT '审计人id',
audit_user_name varchar(30) NOT NULL COMMENT '审计人',
alert_flag TINYINT DEFAULT 1 NOT NULL COMMENT '消息通知,1 开启 0 关闭',
del_flag TINYINT DEFAULT 0 NOT NULL COMMENT '删除标识,1 已删除 0 未删除',
create_by varchar(64) NULL COMMENT '创建人',
create_time DATETIME NULL COMMENT '创建时间',
update_by varchar(64) NULL COMMENT '更新人',
update_time DATETIME NULL COMMENT '更新时间',
CONSTRAINT we_sensitive_pk PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='敏感词设置表';
-- ----------------------------
-- Table structure for we_sensitive_audit_scope
-- ----------------------------
DROP TABLE IF EXISTS `we_sensitive_audit_scope`;
CREATE TABLE `we_sensitive_audit_scope` (
id BIGINT auto_increment NOT NULL COMMENT '主键',
sensitive_id BIGINT NOT NULL COMMENT '敏感词表主键',
scope_type TINYINT NOT NULL COMMENT '审计范围类型, 1 组织机构 2 成员',
audit_scope_id BIGINT NOT NULL COMMENT '审计对象id',
audit_scope_name varchar(64) NOT NULL COMMENT '审计对象名称',
CONSTRAINT we_sensitive_audit_scope_pk PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='敏感词审计范围';
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!