Commit acd4a56a by danmo

Merge remote-tracking branch 'origin/master'

2 parents 0fa9d998 dad6cb58
Showing 45 changed files with 789 additions and 182 deletions
...@@ -72,7 +72,7 @@ npm install --registry=https://registry.npm.taobao.org ...@@ -72,7 +72,7 @@ npm install --registry=https://registry.npm.taobao.org
npm run serve npm run serve
``` ```
打开浏览器,输入 `http://localhost:80 `,默认账密为:`admin/123admin123` 。 打开浏览器,输入 `http://localhost:80 `,默认账密为:`admin/admin123` 。
若能正确展示登录页面,并能成功登录,菜单及页面展示正常,则表明环境搭建成功。 若能正确展示登录页面,并能成功登录,菜单及页面展示正常,则表明环境搭建成功。
......
...@@ -6,9 +6,9 @@ import com.linkwechat.common.core.controller.BaseController; ...@@ -6,9 +6,9 @@ import com.linkwechat.common.core.controller.BaseController;
import com.linkwechat.common.core.domain.AjaxResult; import com.linkwechat.common.core.domain.AjaxResult;
import com.linkwechat.common.core.page.TableDataInfo; import com.linkwechat.common.core.page.TableDataInfo;
import com.linkwechat.common.enums.BusinessType; import com.linkwechat.common.enums.BusinessType;
import com.linkwechat.wecom.domain.WeCustomer;
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.service.IWeCustomerMessageOriginalService;
import com.linkwechat.wecom.service.IWeCustomerMessagePushService; import com.linkwechat.wecom.service.IWeCustomerMessagePushService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -31,13 +31,15 @@ public class WeCustomerMessagePushController extends BaseController { ...@@ -31,13 +31,15 @@ public class WeCustomerMessagePushController extends BaseController {
@Autowired @Autowired
private IWeCustomerMessagePushService weCustomerMessagePushService; private IWeCustomerMessagePushService weCustomerMessagePushService;
@Autowired
private IWeCustomerMessageOriginalService weCustomerMessageOriginalService;
/** /**
* 新增群发消息发送 * 新增群发消息发送
*/ */
@PreAuthorize("@ss.hasPermi('system:push:add')") @PreAuthorize("@ss.hasPermi('customerMessagePush:push:add')")
@Log(title = "新增群发消息发送", businessType = BusinessType.INSERT) @Log(title = "新增群发消息发送", businessType = BusinessType.INSERT)
@PostMapping(value = "add") @PostMapping(value = "add")
public AjaxResult add(@RequestBody CustomerMessagePushDto customerMessagePushDto) { public AjaxResult add(@RequestBody CustomerMessagePushDto customerMessagePushDto) {
try { try {
weCustomerMessagePushService.addWeCustomerMessagePush(customerMessagePushDto); weCustomerMessagePushService.addWeCustomerMessagePush(customerMessagePushDto);
} catch (JsonProcessingException e) { } catch (JsonProcessingException e) {
...@@ -51,16 +53,26 @@ public class WeCustomerMessagePushController extends BaseController { ...@@ -51,16 +53,26 @@ public class WeCustomerMessagePushController extends BaseController {
/** /**
* 群发消息列表 * 群发消息列表
*/ */
@PreAuthorize("@ss.hasPermi('system:push:list')") @PreAuthorize("@ss.hasPermi('customerMessagePush:push:list')")
@GetMapping(value = "/list") @GetMapping(value = "/list")
public TableDataInfo list(@RequestParam(value = "sender",required = false) String sender public TableDataInfo list(@RequestParam(value = "sender", required = false) String sender
,@RequestParam(value = "content",required = false) String content , @RequestParam(value = "content", required = false) String content
,@RequestParam(value = "pushType",required = false) String pushType , @RequestParam(value = "pushType", required = false) String pushType
,@RequestParam(value = "beginTime",required = false) String beginTime , @RequestParam(value = "beginTime", required = false) String beginTime
,@RequestParam(value = "endTime",required = false) String endTime) { , @RequestParam(value = "endTime", required = false) String endTime) {
startPage(); startPage();
List<CustomerMessagePushVo> list = weCustomerMessagePushService.customerMessagePushs(sender,content,pushType,beginTime,endTime); List<CustomerMessagePushVo> list = weCustomerMessagePushService.customerMessagePushs(sender, content, pushType, beginTime, endTime);
return getDataTable(list); return getDataTable(list);
} }
/**
* 群发消息详情
*/
@PreAuthorize("@ss.hasPermi('customerMessagePush:push:view')")
@GetMapping(value = "/getInfo")
public AjaxResult getInfo(@RequestParam(value = "messageId") Long messageId) {
CustomerMessagePushVo customerMessagePushVo = weCustomerMessageOriginalService.CustomerMessagePushDetail(messageId);
return AjaxResult.success(customerMessagePushVo);
}
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
ENV = 'production' ENV = 'production'
# 塬微管理系统/生产环境api # 塬微管理系统/生产环境api
VUE_APP_BASE_API = 'http://106.13.201.219' VUE_APP_BASE_API = 'http://106.13.236.58:8080'
# 生产环境IP # 生产环境IP
VUE_APP_BASE_URL = 'http://106.13.201.219' VUE_APP_BASE_URL = 'http://106.13.236.58:8080'
...@@ -62,6 +62,7 @@ ...@@ -62,6 +62,7 @@
"vue-quill-editor": "3.0.6", "vue-quill-editor": "3.0.6",
"vue-router": "3.0.2", "vue-router": "3.0.2",
"vue-splitpane": "1.0.4", "vue-splitpane": "1.0.4",
"vue-ueditor-wrap": "^2.4.4",
"vuedraggable": "2.20.0", "vuedraggable": "2.20.0",
"vuex": "3.1.0" "vuex": "3.1.0"
}, },
......
import request from '@/utils/request'
const service = window.CONFIG.services.wecom + '/material'
const serviceCategory = window.CONFIG.services.wecom + '/poster'
/**
* 查询海报列表
* @param {*} params
*/
export function getList(params) {
return request({ url: service + '/list', params })
}
/**
* 添加海报
* @param {*} data
*/
export function addPoster(data) {
return request({ url: serviceCategory + '/insert', method: 'post', data })
}
/**
* 查询海报详情
* @param {*} data
*/
export function getPosterInfo(data) {
return request({ url: serviceCategory + '/entity', method: 'get', data })
}
/**
* 删除海报
* @param {*} data
*/
export function removePoster(ids) {
return request({
url: serviceCategory + '/delete/' + ids,
method: 'DELETE'
})
}
...@@ -234,51 +234,57 @@ export const constantRoutes = [ ...@@ -234,51 +234,57 @@ export const constantRoutes = [
// { // {
// path: '/material', // path: '/material',
// component: Layout, // component: Layout,
// redirect: '/material/text', // redirect: '/material/poster',
// meta: { title: '素材中心', icon: 'material' }, // meta: { title: '素材中心', icon: 'material' },
// children: [ // children: [
// { // {
// path: 'text', // path: 'poster',
// name: 'MaterialText', // name: 'MaterialPoster',
// component: (resolve) => require(['@/views/material/text'], resolve), // component: (resolve) => require(['@/views/material/poster'], resolve),
// meta: { title: '文本', icon: '' }, // meta: { title: '海报', icon: '' },
// }, // },
// { // {
// path: 'image', // path: 'text',
// name: 'MaterialImage', // name: 'MaterialText',
// component: (resolve) => require(['@/views/material/image'], resolve), // component: (resolve) => require(['@/views/material/text'], resolve),
// meta: { title: '图片', icon: '' }, // meta: { title: '文本', icon: '' },
// }, // },
// { // {
// path: 'web', // path: 'image',
// name: 'MaterialWeb', // name: 'MaterialImage',
// component: (resolve) => require(['@/views/material/web'], resolve), // component: (resolve) => require(['@/views/material/image'], resolve),
// meta: { title: '网页', icon: '' }, // meta: { title: '图片', icon: '' },
// }, // },
// { // {
// path: 'audio', // path: 'web',
// name: 'MaterialAudio', // name: 'MaterialWeb',
// component: (resolve) => require(['@/views/material/audio'], resolve), // component: (resolve) => require(['@/views/material/web'], resolve),
// meta: { title: '语音', icon: '' }, // meta: { title: '网页', icon: '' },
// }, // },
// { // {
// path: 'video', // path: 'audio',
// name: 'MaterialVideo', // name: 'MaterialAudio',
// component: (resolve) => require(['@/views/material/video'], resolve), // component: (resolve) => require(['@/views/material/audio'], resolve),
// meta: { title: '视频', icon: '' }, // meta: { title: '语音', icon: '' },
// }, // },
// { // {
// path: 'file', // path: 'video',
// name: 'MaterialFile', // name: 'MaterialVideo',
// component: (resolve) => require(['@/views/material/file'], resolve), // component: (resolve) => require(['@/views/material/video'], resolve),
// meta: { title: '文件', icon: '' }, // meta: { title: '视频', icon: '' },
// }, // },
// { // {
// path: 'applet', // path: 'file',
// name: 'MaterialApplet', // name: 'MaterialFile',
// component: (resolve) => require(['@/views/material/applet'], resolve), // component: (resolve) => require(['@/views/material/file'], resolve),
// meta: { title: '小程序', icon: '' }, // meta: { title: '文件', icon: '' },
// }, // },
// {
// path: 'applet',
// name: 'MaterialApplet',
// component: (resolve) => require(['@/views/material/applet'], resolve),
// meta: { title: '小程序', icon: '' },
// },
// ], // ],
// }, // },
// { // {
......
...@@ -139,7 +139,6 @@ export default { ...@@ -139,7 +139,6 @@ export default {
this.$refs.selectTag.$forceUpdate() this.$refs.selectTag.$forceUpdate()
}, },
makeTag(type) { makeTag(type) {
debugger
this.selectedTag = [] this.selectedTag = []
if (!this.multipleSelection.length) { if (!this.multipleSelection.length) {
this.msgInfo('请选择一位客户') this.msgInfo('请选择一位客户')
......
...@@ -13,11 +13,15 @@ import { ...@@ -13,11 +13,15 @@ import {
moveGroup, moveGroup,
} from '@/api/material' } from '@/api/material'
// import {
// getList
// } from '@/api/material/poster'
export default { export default {
name: 'MaPage', name: 'MaPage',
components: {}, components: {},
props: { props: {
// "0 图片(image)、1 语音(voice)、2 视频(video),3 普通文件(file) 4 文本", // "0 图片(image)、1 语音(voice)、2 视频(video),3 普通文件(file) 4 文本 5 海报 6 海报字体",
type: { type: {
type: String, type: String,
default: '0', default: '0',
...@@ -37,7 +41,7 @@ export default { ...@@ -37,7 +41,7 @@ export default {
pageSize: 10, pageSize: 10,
categoryId: '', categoryId: '',
search: '', search: '',
mediaType: '4', mediaType: '0',
}, },
list: [], // 列表 list: [], // 列表
total: 0, // 总条数 total: 0, // 总条数
...@@ -62,7 +66,7 @@ export default { ...@@ -62,7 +66,7 @@ export default {
emitPath: false, emitPath: false,
}, },
typeTitle: ['图片', '语音', '视频', '文件', '文本'], typeTitle: ['图片', '语音', '视频', '文件', '文本', '海报', '海报字体'],
form: {}, // 素材表单 form: {}, // 素材表单
dialogVisible: false, // 素材表格对话框显隐 dialogVisible: false, // 素材表格对话框显隐
// 表单校验 // 表单校验
......
...@@ -4,16 +4,16 @@ import MaPage from '@/views/material/components/MaPage' ...@@ -4,16 +4,16 @@ import MaPage from '@/views/material/components/MaPage'
export default { export default {
name: 'Image', name: 'Image',
components: { MaPage }, components: { MaPage },
data() { data () {
return { return {
srcList: [], srcList: [],
ids: [], // 选中数组 ids: [], // 选中数组
} }
}, },
watch: {}, watch: {},
created() {}, created () { },
methods: { methods: {
listChange(data) { listChange (data) {
this.srcList = data.map((item) => item.materialUrl) this.srcList = data.map((item) => item.materialUrl)
}, },
}, },
......
<script>
import VueUeditorWrap from 'vue-ueditor-wrap'
import MaPage from '@/views/material/components/MaPage'
export default {
name: 'Poster',
components: { MaPage, VueUeditorWrap },
data () {
return {
dialog: {
preview: false, // 预览弹出显示隐藏
edit: false // 编辑弹出显示隐藏
},
posterEdit: {
step: 0
},
posterForm: {
name: '', // 海报名称
classifyFirst: '', // 所属分类
classifySecond: '', // 所属二级分类
type: '', // 海报类型
content: '', // 内容
count: '', // 虚拟次数
sort: '', // 海报排序
jump: [], // 跳转页面
switch: '0' // 是否启用
},
srcList: [],
ids: [], // 选中数组
previewImg: '', // 预览图片地址
}
},
watch: {},
created () { },
methods: {
listChange (data) {
console.log('listChange', JSON.stringify(data))
this.srcList = data.map((item) => item.materialUrl)
},
preview (url) {
console.log('preview', url)
this.previewImg = url || ''
this.dialog.preview = true
},
edit (item) {
console.log('edit', JSON.stringify(item))
this.posterEdit.step = 0
this.dialog.edit = true
},
ready () {
console.log('ready')
}
},
}
</script>
<template>
<MaPage
ref="page"
type="5"
@listChange="listChange"
:selected="ids"
v-slot="{ list }"
>
<el-row :gutter="20">
<el-col
:span="6"
style="margin-bottom: 24px; min-width: 220px"
v-for="(item, index) in list"
:key="index"
>
<el-card shadow="hover" body-style="padding: 0px;">
<div class="img-wrap">
<el-image
class="poster-img"
:src="item.materialUrl"
fit="contain"
></el-image>
<div class="actions">
<el-tag
class="actions-btn"
type="success"
size="mini"
effect="dark"
@click="preview(item.materialUrl)"
>预览</el-tag
>
<el-tag
class="actions-btn"
type="success"
size="mini"
effect="dark"
@click="edit(item)"
>编辑</el-tag
>
<el-tag
class="actions-btn"
type="success"
size="mini"
effect="dark"
@click="$refs.page.remove(item.id)"
>删除</el-tag
>
</div>
</div>
<div style="padding: 14px">
<el-checkbox v-model="ids" :label="item.id">{{
item.materialName
}}</el-checkbox>
</div>
</el-card>
</el-col>
</el-row>
<el-dialog title="海报预览" width="30%" :visible.sync="dialog.preview">
<el-image class="preview-img" :src="previewImg" fit="contain"></el-image>
</el-dialog>
<el-dialog title="海报编辑" width="80%" :visible.sync="dialog.edit">
<div class="poster-edit-dialog">
<el-steps :active="posterEdit.step" simple finish-status="success">
<el-step title="基本信息编辑"></el-step>
<el-step title="界面元素及内容编辑"></el-step>
</el-steps>
<br />
<div v-if="posterEdit.step === 0">
<el-form ref="form" :model="posterForm" label-width="120px">
<el-form-item label="海报名称">
<el-input
v-model="posterForm.name"
maxlength="10"
show-word-limit
></el-input>
</el-form-item>
<el-form-item label="所属分类">
<el-select
v-model="posterForm.classifyFirst"
placeholder="请选择分类"
>
<el-option label="海报一" value="poster1"></el-option>
<el-option label="海报二" value="poster2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="所属二级分类">
<el-select
v-model="posterForm.classifySecond"
placeholder="请选择分类"
>
<el-option label="海报一" value="poster1"></el-option>
<el-option label="海报二" value="poster2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="海报类型">
<el-radio-group v-model="posterForm.type">
<!-- <el-radio label="1">名片海报</el-radio>
<el-radio label="2">专属海报</el-radio> -->
<el-radio label="3">通用海报</el-radio>
<!-- <el-radio label="4">案例海报</el-radio>
<el-radio label="5">产品海报</el-radio> -->
</el-radio-group>
</el-form-item>
<el-form-item
:label="`${posterForm.type === '4' ? '案例' : '产品'}内容`"
v-if="posterForm.type === '4' || posterForm.type === '5'"
>
<el-input v-model="posterForm.content"></el-input>
</el-form-item>
<el-form-item label="虚拟次数">
<el-input v-model="posterForm.count" type="number"></el-input>
</el-form-item>
<el-form-item label="海报排序">
<el-input v-model="posterForm.sort" type="number"></el-input>
</el-form-item>
<el-form-item label="跳转页面" v-if="posterForm.type === '3'">
<el-checkbox-group v-model="posterForm.jump">
<el-checkbox label="首页" value="1"></el-checkbox>
<el-checkbox label="名片" value="2"></el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="是否启用">
<el-radio-group v-model="posterForm.switch">
<el-radio label="名片海报" value="1">是</el-radio>
<el-radio label="专属海报" value="0">否</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item>
<el-button type="success" @click="posterEdit.step = 1"
>前往设计海报</el-button
>
<el-button>返回</el-button>
</el-form-item>
</el-form>
</div>
<div v-else></div>
</div>
</el-dialog>
</MaPage>
</template>
<style lang="scss" scoped>
.img-wrap {
position: relative;
height: 0;
padding: 70% 0 0 0;
border-bottom: 1px solid #e6ebf5;
&:hover .actions {
opacity: 1;
}
}
.actions {
position: absolute;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-end;
width: 100%;
height: 100%;
left: 0;
top: 0;
padding: 10px;
opacity: 0;
transition: opacity 0.3s;
.actions-btn {
display: inline-block;
cursor: pointer;
& + .actions-btn {
margin-top: 10px;
}
}
}
.poster-img {
position: absolute;
width: 100%;
height: 100%;
top: 0;
}
.preview-img {
width: 100%;
}
</style>
package com.linkwechat.wecom.client; package com.linkwechat.wecom.client;
import com.dtflys.forest.annotation.Body;
import com.dtflys.forest.annotation.DataObject; import com.dtflys.forest.annotation.DataObject;
import com.dtflys.forest.annotation.Query; import com.dtflys.forest.annotation.Query;
import com.dtflys.forest.annotation.Request; import com.dtflys.forest.annotation.Request;
import com.linkwechat.wecom.domain.dto.message.QueryCustomerMessageStatusResultDataObjectDto;
import com.linkwechat.wecom.domain.dto.message.QueryCustomerMessageStatusResultDto; import com.linkwechat.wecom.domain.dto.message.QueryCustomerMessageStatusResultDto;
import com.linkwechat.wecom.domain.dto.message.SendMessageResultDto; import com.linkwechat.wecom.domain.dto.message.SendMessageResultDto;
import com.linkwechat.wecom.domain.dto.message.WeCustomerMessagePushDto; import com.linkwechat.wecom.domain.dto.message.WeCustomerMessagePushDto;
...@@ -22,18 +24,18 @@ public interface WeCustomerMessagePushClient { ...@@ -22,18 +24,18 @@ public interface WeCustomerMessagePushClient {
@Request(url = "/externalcontact/add_msg_template", @Request(url = "/externalcontact/add_msg_template",
type = "POST" type = "POST"
) )
SendMessageResultDto sendCustomerMessageToUser(@DataObject WeCustomerMessagePushDto customerMessagePushDto); SendMessageResultDto sendCustomerMessageToUser(@Body WeCustomerMessagePushDto customerMessagePushDto);
/** /**
* 获取企业群发消息发送结果 * 获取企业群发消息发送结果
* <a href="https://work.weixin.qq.com/api/doc/90000/90135/92136">API文档地址</a> * <a href="https://work.weixin.qq.com/api/doc/90000/90135/92136">API文档地址</a>
* *
* @param msgid <a href="https://work.weixin.qq.com/api/doc/90000/90135/92135">添加企业群发消息任务返回的msgid</a> * @param queryCustomerMessageStatusResultDataObjectDto{msgid} <a href="https://work.weixin.qq.com/api/doc/90000/90135/92135">添加企业群发消息任务返回的msgid</a>
*/ */
@Request(url = "/externalcontact/get_group_msg_result", @Request(url = "/externalcontact/get_group_msg_result",
type = "POST" type = "POST"
) )
QueryCustomerMessageStatusResultDto queryCustomerMessageStatus(@Query(value = "msgid") String msgid); QueryCustomerMessageStatusResultDto queryCustomerMessageStatus(@Body QueryCustomerMessageStatusResultDataObjectDto queryCustomerMessageStatusResultDataObjectDto);
} }
...@@ -95,5 +95,17 @@ public class WeCustomer extends BaseEntity ...@@ -95,5 +95,17 @@ public class WeCustomer extends BaseEntity
@TableField(exist = false) @TableField(exist = false)
private String departmentIds; private String departmentIds;
/**
* 添加人名称
*/
@TableField(exist = false)
private String userName;
/**
* 员工id
*/
@TableField(exist = false)
private String userId;
} }
...@@ -41,6 +41,11 @@ public class WeCustomerMessgaeResult extends BaseEntity { ...@@ -41,6 +41,11 @@ public class WeCustomerMessgaeResult extends BaseEntity {
private String chatId; private String chatId;
/** /**
* 外部客户群名称
*/
private String chatName;
/**
* 企业服务人员的userid * 企业服务人员的userid
*/ */
private String userid; private String userid;
...@@ -56,6 +61,26 @@ public class WeCustomerMessgaeResult extends BaseEntity { ...@@ -56,6 +61,26 @@ public class WeCustomerMessgaeResult extends BaseEntity {
private String sendTime; private String sendTime;
/** /**
* 外部联系人名称
*/
private String externalName;
/**
* 企业服务人员的名称
*/
private String userName;
/**
* 0 定时发送 1 发给客户 2 发给客户群
*/
private String sendType;
/**
* 定时发送时间
*/
private String settingTime;
/**
* 0 未删除 1 已删除 * 0 未删除 1 已删除
*/ */
private int delFlag; private int delFlag;
......
package com.linkwechat.wecom.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import com.linkwechat.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 群发消息 群发消息 子消息表(包括 文本消息、图片消息、链接消息、小程序消息) we_customer_seedMessage
*
* @author kewen
* @date 2020-12-28
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("we_customer_seedMessage")
public class WeCustomerSeedMessage extends BaseEntity {
/**
* 主键id
*/
private Long seedMessageId;
/**
* 微信消息表id
*/
private Long messageId;
/**
* 消息文本内容,最多4000个字节
*/
private String content;
/**
* 图片消息:图片的media_id,可以通过 <a href="https://work.weixin.qq.com/api/doc/90000/90135/90253">素材管理接口</a>获得'
*/
private String mediaId;
/**
* 图片消息:图片的链接,仅可使用<a href="https://work.weixin.qq.com/api/doc/90000/90135/90256">上传图片接口</a>得到的链接'
*/
private String picUrl;
/**
* 链接消息:图文消息标题
*/
private String linkTitle;
/**
* 链接消息:图文消息封面的url
*/
private String linkPicurl;
/**
* 链接消息:图文消息的描述,最多512个字节
*/
private String linDesc;
/**
* 链接消息:图文消息的链接
*/
private String linkUrl;
/**
* 小程序消息标题,最多64个字节
*/
private String miniprogramTitle;
/**
* 小程序消息封面的mediaid,封面图建议尺寸为520*416
*/
private String miniprogramMediaId;
/**
* 小程序appid,必须是关联到企业的小程序应用
*/
private String appid;
/**
* 小程序page路径
*/
private String page;
}
...@@ -68,4 +68,39 @@ public class CustomerMessagePushDto { ...@@ -68,4 +68,39 @@ public class CustomerMessagePushDto {
*/ */
private MiniprogramMessageDto miniprogramMessage; private MiniprogramMessageDto miniprogramMessage;
/**
* 消息内容
*
* @param customerMessagePushDto
* @return
*/
public String content() {
if (this.getMessageType()!=null) {
// 消息类型 0 文本消息 1 图片消息 2 链接消息 3 小程序消息
if ( this.getMessageType().equals("0")) {
return this.getTextMessage().getContent();
}
if (this.getMessageType().equals("1")) {
return this.getImageMessage().getPic_url();
}
if (this.getMessageType().equals("2")) {
return this.getLinkMessage().getTitle() + ":" + this.getLinkMessage().getPicurl()
+ ":" + this.getLinkMessage().getUrl() + "" + this.getLinkMessage().getDesc();
}
if (this.getMessageType().equals("3")) {
return this.getMiniprogramMessage().getTitle() + ":" + this.getMiniprogramMessage().getPage();
}
}
return null;
}
} }
...@@ -5,12 +5,12 @@ import lombok.Data; ...@@ -5,12 +5,12 @@ import lombok.Data;
@Data @Data
public class DetailMessageStatusResultDto { public class DetailMessageStatusResultDto {
/** /**
* 外部联系人userid * 外部联系人userid,群发消息到企业的客户群不吐出该字段
*/ */
private String external_userid; private String external_userid;
/** /**
* 外部客户群id * 外部客户群id,群发消息到客户不吐出该字段
*/ */
private String chat_id; private String chat_id;
......
package com.linkwechat.wecom.domain.dto.message;
import lombok.Data;
@Data
public class QueryCustomerMessageStatusResultDataObjectDto {
/**
* 群发消息的id,通过<a href=“https://work.weixin.qq.com/api/doc/90000/90135/92135”>创建企业群发接口</a>返回
*/
private String msgid;
}
...@@ -59,5 +59,10 @@ public class CustomerMessagePushVo { ...@@ -59,5 +59,10 @@ public class CustomerMessagePushVo {
*/ */
private String sendInfo; private String sendInfo;
/**
* msgid 可以用于获取发送结果
*/
private String msgid;
} }
...@@ -10,4 +10,5 @@ import com.linkwechat.wecom.domain.WeCustomerMessage; ...@@ -10,4 +10,5 @@ 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);
} }
...@@ -28,4 +28,11 @@ public interface WeCustomerMessageOriginalMapper extends BaseMapper<WeCustomerMe ...@@ -28,4 +28,11 @@ public interface WeCustomerMessageOriginalMapper extends BaseMapper<WeCustomerMe
public List<CustomerMessagePushVo> selectCustomerMessagePushs(@Param("sender") String sender,@Param("content") String content public List<CustomerMessagePushVo> selectCustomerMessagePushs(@Param("sender") String sender,@Param("content") String content
,@Param("pushType") String pushType, @Param("beginTime") String beginTime,@Param("endTime") String endTime); ,@Param("pushType") String pushType, @Param("beginTime") String beginTime,@Param("endTime") String endTime);
/**
* 群发详情
* @param messageId 微信群发id
* @return {@link CustomerMessagePushVo} 群发详情
*/
public CustomerMessagePushVo findCustomerMessagePushDetail(@Param("messageId") Long messageId);
} }
...@@ -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.WeCustomerMessgaeResult; import com.linkwechat.wecom.domain.WeCustomerMessgaeResult;
import org.apache.ibatis.annotations.Param;
/** /**
* 群发消息 微信消息发送结果表 Mapper接口 * 群发消息 微信消息发送结果表 Mapper接口
...@@ -10,4 +11,19 @@ import com.linkwechat.wecom.domain.WeCustomerMessgaeResult; ...@@ -10,4 +11,19 @@ import com.linkwechat.wecom.domain.WeCustomerMessgaeResult;
* @date 2020-12-08 * @date 2020-12-08
*/ */
public interface WeCustomerMessgaeResultMapper extends BaseMapper<WeCustomerMessgaeResult> { public interface WeCustomerMessgaeResultMapper extends BaseMapper<WeCustomerMessgaeResult> {
/**
* 更新群发消息结果
*
* @param messageId 微信消息表id
* @param chatId 外部客户群id
* @param externalUserid 外部联系人userid
* @param status 发送状态 0-未发送 1-已发送 2-因客户不是好友导致发送失败 3-因客户已经收到其他群发消息导致发送失败
* @param sendTime 发送时间,发送状态为1时返回(为时间戳的形式)
* @return int
*/
int updateWeCustomerMessgaeResult(@Param("messageId") Long messageId,@Param("chatId") String chatId,@Param("externalUserid") String externalUserid
,@Param("status") String status,@Param("sendTime") String sendTime);
} }
package com.linkwechat.wecom.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.linkwechat.wecom.domain.WeCustomerSeedMessage;
/**
* 群发消息 群发消息 子消息表(包括 文本消息、图片消息、链接消息、小程序消息) Mapper接口
*
* @author kewen
* @date 2020-12-28
*/
public interface WeCustomerSeedMessageMapper extends BaseMapper<WeCustomerSeedMessage> {
}
package com.linkwechat.wecom.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.linkwechat.wecom.domain.WeCustomerImageMessage;
public interface IWeCustomerImageMessageService extends IService<WeCustomerImageMessage> {
}
package com.linkwechat.wecom.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.linkwechat.wecom.domain.WeCustomerLinkMessage;
public interface IWeCustomerLinkMessageService extends IService<WeCustomerLinkMessage> {
}
package com.linkwechat.wecom.service; package com.linkwechat.wecom.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.linkwechat.wecom.domain.WeCustomerMessageOriginal; import com.linkwechat.wecom.domain.WeCustomerMessageOriginal;
import com.linkwechat.wecom.domain.vo.CustomerMessagePushVo; import com.linkwechat.wecom.domain.vo.CustomerMessagePushVo;
...@@ -32,4 +33,11 @@ public interface IWeCustomerMessageOriginalService extends IService<WeCustomerMe ...@@ -32,4 +33,11 @@ public interface IWeCustomerMessageOriginalService extends IService<WeCustomerMe
*/ */
List<CustomerMessagePushVo> customerMessagePushs(String sender,String content,String pushType,String beginTime,String endTime); List<CustomerMessagePushVo> customerMessagePushs(String sender,String content,String pushType,String beginTime,String endTime);
/**
* 群发详情
* @param messageId 微信群发id
* @return {@link CustomerMessagePushVo} 群发详情
*/
CustomerMessagePushVo CustomerMessagePushDetail(Long messageId);
} }
...@@ -10,4 +10,12 @@ import com.linkwechat.wecom.domain.WeCustomerMessage; ...@@ -10,4 +10,12 @@ import com.linkwechat.wecom.domain.WeCustomerMessage;
* @date 2020-12-12 * @date 2020-12-12
*/ */
public interface IWeCustomerMessageService extends IService<WeCustomerMessage> { public interface IWeCustomerMessageService extends IService<WeCustomerMessage> {
/**
*
* @param customerMessage
* @return
*/
int updateWeCustomerMessageMsgId(WeCustomerMessage customerMessage);
} }
package com.linkwechat.wecom.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.linkwechat.wecom.domain.WeCustomerMiniprogramMessage;
public interface IWeCustomerMiniprogramMessageService extends IService<WeCustomerMiniprogramMessage> {
}
package com.linkwechat.wecom.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.linkwechat.wecom.domain.WeCustomerSeedMessage;
import com.linkwechat.wecom.domain.dto.message.CustomerMessagePushDto;
/**
* 群发消息 子消息表(包括 文本消息、图片消息、链接消息、小程序消息) we_customer_seedMessage
*
* @author kewen
* @date 2020-12-28
*/
public interface IWeCustomerSeedMessageService extends IService<WeCustomerSeedMessage> {
/**
* 各分类消息表
*
* @param customerMessagePushDto 群发消息
* @param messageId 消息id
*/
void saveSeedMessage(CustomerMessagePushDto customerMessagePushDto, long messageId);
}
package com.linkwechat.wecom.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.linkwechat.wecom.domain.WeCustomerTextMessag;
public interface IWeCustomerTextMessagService extends IService<WeCustomerTextMessag> {
}
package com.linkwechat.wecom.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.linkwechat.wecom.domain.WeCustomerImageMessage;
import com.linkwechat.wecom.mapper.WeCustomerImageMessageMapper;
import com.linkwechat.wecom.service.IWeCustomerImageMessageService;
import org.springframework.stereotype.Service;
/**
* 群发消息 图片消息表 we_customer_imageMessage
*
* @author kewen
* @date 2020-12-12
*/
@Service
public class WeCustomerImageMessageServiceImpl extends ServiceImpl<WeCustomerImageMessageMapper, WeCustomerImageMessage> implements IWeCustomerImageMessageService {
}
package com.linkwechat.wecom.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.linkwechat.wecom.domain.WeCustomerLinkMessage;
import com.linkwechat.wecom.mapper.WeCustomerLinkMessageMapper;
import com.linkwechat.wecom.service.IWeCustomerLinkMessageService;
import org.springframework.stereotype.Service;
/**
* 群发消息 链接消息表 we_customer_linkMessage
*
* @author kewen
* @date 2020-12-13
*/
@Service
public class WeCustomerLinkMessageServiceImpl extends ServiceImpl<WeCustomerLinkMessageMapper, WeCustomerLinkMessage> implements IWeCustomerLinkMessageService {
}
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.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.linkwechat.common.constant.WeConstans;
import com.linkwechat.common.utils.StringUtils;
import com.linkwechat.wecom.client.WeCustomerMessagePushClient;
import com.linkwechat.wecom.domain.WeCustomerMessageOriginal; import com.linkwechat.wecom.domain.WeCustomerMessageOriginal;
import com.linkwechat.wecom.domain.dto.message.DetailMessageStatusResultDto;
import com.linkwechat.wecom.domain.dto.message.QueryCustomerMessageStatusResultDataObjectDto;
import com.linkwechat.wecom.domain.dto.message.QueryCustomerMessageStatusResultDto;
import com.linkwechat.wecom.domain.vo.CustomerMessagePushVo; 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.service.IWeCustomerMessageOriginalService; import com.linkwechat.wecom.service.IWeCustomerMessageOriginalService;
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;
/** /**
* 群发消息 原始数据信息表 we_customer_messageOriginal * 群发消息 原始数据信息表 we_customer_messageOriginal
...@@ -22,6 +34,15 @@ public class WeCustomerMessageOriginalServiceImpl extends ServiceImpl<WeCustomer ...@@ -22,6 +34,15 @@ public class WeCustomerMessageOriginalServiceImpl extends ServiceImpl<WeCustomer
@Autowired @Autowired
private WeCustomerMessageOriginalMapper weCustomerMessageOriginalMapper; private WeCustomerMessageOriginalMapper weCustomerMessageOriginalMapper;
@Autowired
private WeCustomerMessagePushClient weCustomerMessagePushClient;
@Autowired
private WeCustomerMessgaeResultMapper weCustomerMessgaeResultMapper;
@Autowired
private ObjectMapper objectMapper;
@Override @Override
public int saveWeCustomerMessageOriginal(WeCustomerMessageOriginal weCustomerMessageOriginal) { public int saveWeCustomerMessageOriginal(WeCustomerMessageOriginal weCustomerMessageOriginal) {
return weCustomerMessageOriginalMapper.insert(weCustomerMessageOriginal); return weCustomerMessageOriginalMapper.insert(weCustomerMessageOriginal);
...@@ -32,5 +53,53 @@ public class WeCustomerMessageOriginalServiceImpl extends ServiceImpl<WeCustomer ...@@ -32,5 +53,53 @@ public class WeCustomerMessageOriginalServiceImpl extends ServiceImpl<WeCustomer
return weCustomerMessageOriginalMapper.selectCustomerMessagePushs(sender, content, pushType, beginTime, endTime); return weCustomerMessageOriginalMapper.selectCustomerMessagePushs(sender, content, pushType, beginTime, endTime);
} }
@Override
public CustomerMessagePushVo CustomerMessagePushDetail(Long messageId) {
CustomerMessagePushVo customerMessagePushDetail = weCustomerMessageOriginalMapper.findCustomerMessagePushDetail(messageId);
//拉取消息发送结果
// CompletableFuture.runAsync(()->{
String msgid = customerMessagePushDetail.getMsgid();
if(StringUtils.isNotEmpty(msgid)){
List<String> msgIds = null;
try {
msgIds = objectMapper.readValue(msgid,new TypeReference<List<String>>() { });
} catch (JsonProcessingException e) {
e.printStackTrace();
}
if(CollectionUtils.isNotEmpty(msgIds)){
msgIds.forEach(m->{
QueryCustomerMessageStatusResultDataObjectDto dataObjectDto=new QueryCustomerMessageStatusResultDataObjectDto();
dataObjectDto.setMsgid(m);
//拉取发送结果
QueryCustomerMessageStatusResultDto queryCustomerMessageStatusResultDto = weCustomerMessagePushClient.queryCustomerMessageStatus(dataObjectDto);
if (WeConstans.WE_SUCCESS_CODE.equals(queryCustomerMessageStatusResultDto.getErrcode())) {
List<DetailMessageStatusResultDto> detailList = queryCustomerMessageStatusResultDto.getDetail_list();
detailList.forEach(d-> weCustomerMessgaeResultMapper.updateWeCustomerMessgaeResult(messageId,d.getChat_id(),d.getExternal_userid(),d.getStatus(),d.getSend_time()));
}
});
}
}
// });
return weCustomerMessageOriginalMapper.findCustomerMessagePushDetail(messageId);
}
} }
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;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
/** /**
...@@ -14,4 +17,12 @@ import org.springframework.stereotype.Service; ...@@ -14,4 +17,12 @@ import org.springframework.stereotype.Service;
*/ */
@Service @Service
public class WeCustomerMessageServiceImpl extends ServiceImpl<WeCustomerMessageMapper, WeCustomerMessage> implements IWeCustomerMessageService { public class WeCustomerMessageServiceImpl extends ServiceImpl<WeCustomerMessageMapper, WeCustomerMessage> implements IWeCustomerMessageService {
@Autowired
private WeCustomerMessageMapper weCustomerMessageMapper;
@Override
public int updateWeCustomerMessageMsgId(WeCustomerMessage customerMessage) {
return weCustomerMessageMapper.updateWeCustomerMessageMsgIdById(customerMessage);
}
} }
package com.linkwechat.wecom.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.linkwechat.wecom.domain.WeCustomerMiniprogramMessage;
import com.linkwechat.wecom.mapper.WeCustomerMiniprogramMessageMapper;
import com.linkwechat.wecom.service.IWeCustomerMiniprogramMessageService;
import org.springframework.stereotype.Service;
/**
* 群发消息 小程序消息表 we_customer_miniprogramMessage
*
* @author kewen
* @date 2020-12-12
*/
@Service
public class WeCustomerMiniprogramMessageServiceImpl extends ServiceImpl<WeCustomerMiniprogramMessageMapper, WeCustomerMiniprogramMessage> implements IWeCustomerMiniprogramMessageService {
}
package com.linkwechat.wecom.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.linkwechat.common.utils.SnowFlakeUtil;
import com.linkwechat.wecom.domain.WeCustomerSeedMessage;
import com.linkwechat.wecom.domain.dto.message.CustomerMessagePushDto;
import com.linkwechat.wecom.mapper.WeCustomerSeedMessageMapper;
import com.linkwechat.wecom.service.IWeCustomerSeedMessageService;
import org.springframework.stereotype.Service;
/**
* 群发消息 子消息表(包括 文本消息、图片消息、链接消息、小程序消息) we_customer_seedMessage
*
* @author kewen
* @date 2020-12-28
*/
@Service
public class WeCustomerSeedMessageServiceImpl extends ServiceImpl<WeCustomerSeedMessageMapper, WeCustomerSeedMessage> implements IWeCustomerSeedMessageService {
@Override
public void saveSeedMessage(CustomerMessagePushDto customerMessagePushDto, long messageId) {
WeCustomerSeedMessage customerSeedMessage=new WeCustomerSeedMessage();
customerSeedMessage.setSeedMessageId(SnowFlakeUtil.nextId());
customerSeedMessage.setMessageId(messageId);
//文本消息
customerSeedMessage.setContent(customerMessagePushDto.getTextMessage()!=null ?customerMessagePushDto.getTextMessage().getContent():null);
//图片消息
customerSeedMessage.setMediaId(customerMessagePushDto.getImageMessage()!=null ?customerMessagePushDto.getImageMessage().getMedia_id():null);
customerSeedMessage.setPicUrl(customerMessagePushDto.getImageMessage()!=null ?customerMessagePushDto.getImageMessage().getPic_url():null);
//链接消息
customerSeedMessage.setLinkUrl(customerMessagePushDto.getLinkMessage()!=null ?customerMessagePushDto.getLinkMessage().getUrl():null);
customerSeedMessage.setLinkTitle(customerMessagePushDto.getLinkMessage()!=null ?customerMessagePushDto.getLinkMessage().getTitle():null);
customerSeedMessage.setLinkPicurl(customerMessagePushDto.getLinkMessage()!=null ?customerMessagePushDto.getLinkMessage().getPicurl():null);
customerSeedMessage.setLinDesc(customerMessagePushDto.getLinkMessage()!=null ?customerMessagePushDto.getLinkMessage().getDesc():null);
//小程序消息
customerSeedMessage.setMiniprogramTitle(customerMessagePushDto.getMiniprogramMessage()!=null ?customerMessagePushDto.getMiniprogramMessage().getTitle():null);
customerSeedMessage.setMiniprogramMediaId(customerMessagePushDto.getMiniprogramMessage()!=null ?customerMessagePushDto.getMiniprogramMessage().getPic_media_id():null);
customerSeedMessage.setAppid(customerMessagePushDto.getMiniprogramMessage()!=null ?customerMessagePushDto.getMiniprogramMessage().getAppid():null);
customerSeedMessage.setPage(customerMessagePushDto.getMiniprogramMessage()!=null ?customerMessagePushDto.getMiniprogramMessage().getPage():null);
this.save(customerSeedMessage);
}
}
package com.linkwechat.wecom.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.linkwechat.wecom.domain.WeCustomerTextMessag;
import com.linkwechat.wecom.mapper.WeCustomerTextMessagMapper;
import com.linkwechat.wecom.service.IWeCustomerTextMessagService;
import org.springframework.stereotype.Service;
/**
* 群发消息 文本消息表 we_customer_textMessage
*
* @author kewen
* @date 2020-12-12
*/
@Service
public class WeCustomerTextMessagServiceImpl extends ServiceImpl<WeCustomerTextMessagMapper, WeCustomerTextMessag> implements IWeCustomerTextMessagService {
}
<?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.WeCustomerLinkMessageMapper">
</mapper>
...@@ -15,6 +15,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -15,6 +15,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="corpName" column="corp_name" /> <result property="corpName" column="corp_name" />
<result property="corpFullName" column="corp_full_name" /> <result property="corpFullName" column="corp_full_name" />
<result property="position" column="position" /> <result property="position" column="position" />
<result property="userName" column="user_name" />
<result property="userId" column="user_id" />
<collection property="weFlowerCustomerRels" ofType="com.linkwechat.wecom.domain.WeFlowerCustomerRel"> <collection property="weFlowerCustomerRels" ofType="com.linkwechat.wecom.domain.WeFlowerCustomerRel">
<result property="id" column="wfcrId" /> <result property="id" column="wfcrId" />
<result property="userId" column="user_id" /> <result property="userId" column="user_id" />
......
...@@ -3,4 +3,13 @@ ...@@ -3,4 +3,13 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.linkwechat.wecom.mapper.WeCustomerMessageMapper"> <mapper namespace="com.linkwechat.wecom.mapper.WeCustomerMessageMapper">
<update id="updateWeCustomerMessageMsgIdById">
UPDATE we_customer_message
<set>
msgid=#{msgid}
</set>
<where>
message_id=#{messageId}
</where>
</update>
</mapper> </mapper>
...@@ -28,4 +28,15 @@ ...@@ -28,4 +28,15 @@
</if> </if>
</where> </where>
</select> </select>
<select id="findCustomerMessagePushDetail"
resultType="com.linkwechat.wecom.domain.vo.CustomerMessagePushVo">
SELECT
wcmo.push_type,wcmo.message_type,wcmo.push_range,wcm.create_by sender,wcmo.create_time
sendTime,wcm.message_id,wcm.content,wcm.send_info,wcm.msgid
FROM we_customer_messageOriginal wcmo LEFT JOIN we_customer_message wcm ON
wcmo.message_original_Id=wcm.original_id
<where>
wcm.message_id=#{messageId}
</where>
</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.WeCustomerMessgaeResultMapper">
<update id="updateWeCustomerMessgaeResult">
UPDATE we_customer_messgaeResult
<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!=''">
send_time=#{sendTime},
</if>
<if test="status!=null and status!=''">
status=#{status}
</if>
</set>
WHERE message_id=#{messageId}
</update>
</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.WeCustomerMiniprogramMessageMapper">
</mapper>
\ No newline at end of file \ No newline at end of file
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.linkwechat.wecom.mapper.WeCustomerImageMessageMapper"> <mapper namespace="com.linkwechat.wecom.mapper.WeCustomerSeedMessageMapper">
</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.WeCustomerTextMessagMapper">
</mapper>
\ 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!