Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
仟微科技
Link Wechat
提交
59fa2c47
Link Wechat
项目概览
仟微科技
/
Link Wechat
通知
48
Star
3
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Link Wechat
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
59fa2c47
编写于
4月 01, 2021
作者:
Y
YaoYuHang
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/back_end_dev' into back_end_dev
上级
c3b0d208
620cdb25
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
59 addition
and
18 deletion
+59
-18
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeMaterialController.java
...linkwechat/web/controller/wecom/WeMaterialController.java
+6
-3
linkwe-common/src/main/java/com/linkwechat/common/core/domain/ConversationArchiveQuery.java
...nkwechat/common/core/domain/ConversationArchiveQuery.java
+8
-8
linkwe-framework/src/main/java/com/linkwechat/framework/config/SecurityConfig.java
.../java/com/linkwechat/framework/config/SecurityConfig.java
+2
-2
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/dto/TemporaryMaterialDto.java
...com/linkwechat/wecom/domain/dto/TemporaryMaterialDto.java
+15
-0
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/vo/WeMakeCustomerTag.java
...ava/com/linkwechat/wecom/domain/vo/WeMakeCustomerTag.java
+6
-0
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeCustomerMessagePushServiceImpl.java
.../wecom/service/impl/WeCustomerMessagePushServiceImpl.java
+11
-4
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeCustomerMessageServiceImpl.java
...chat/wecom/service/impl/WeCustomerMessageServiceImpl.java
+2
-1
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeCustomerServiceImpl.java
.../linkwechat/wecom/service/impl/WeCustomerServiceImpl.java
+9
-0
未找到文件。
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeMaterialController.java
浏览文件 @
59fa2c47
...
...
@@ -8,6 +8,7 @@ import com.linkwechat.common.enums.BusinessType;
import
com.linkwechat.common.enums.MediaType
;
import
com.linkwechat.wecom.domain.WeMaterial
;
import
com.linkwechat.wecom.domain.dto.ResetCategoryDto
;
import
com.linkwechat.wecom.domain.dto.TemporaryMaterialDto
;
import
com.linkwechat.wecom.domain.dto.WeMediaDto
;
import
com.linkwechat.wecom.domain.vo.WeMaterialFileVO
;
import
com.linkwechat.wecom.service.IWeMaterialService
;
...
...
@@ -135,10 +136,12 @@ public class WeMaterialController extends BaseController {
//@PreAuthorize("@ss.hasPermi('wechat:material:temporaryMaterialMediaId')")
@Log
(
title
=
"获取素材media_id"
,
businessType
=
BusinessType
.
OTHER
)
@
Ge
tMapping
(
"/temporaryMaterialMediaId"
)
@
Pos
tMapping
(
"/temporaryMaterialMediaId"
)
@ApiOperation
(
"获取素材media_id"
)
public
AjaxResult
temporaryMaterialMediaId
(
@RequestParam
(
value
=
"url"
)
String
url
,
@RequestParam
(
value
=
"type"
)
String
type
,
@RequestParam
(
value
=
"name"
)
String
name
){
WeMediaDto
weMediaDto
=
materialService
.
uploadTemporaryMaterial
(
url
,
type
,
name
);
public
AjaxResult
temporaryMaterialMediaId
(
@RequestBody
TemporaryMaterialDto
temporaryMaterialDto
){
WeMediaDto
weMediaDto
=
materialService
.
uploadTemporaryMaterial
(
temporaryMaterialDto
.
getUrl
(),
temporaryMaterialDto
.
getType
()
,
temporaryMaterialDto
.
getName
());
return
AjaxResult
.
success
(
weMediaDto
);
}
...
...
linkwe-common/src/main/java/com/linkwechat/common/core/domain/ConversationArchiveQuery.java
浏览文件 @
59fa2c47
...
...
@@ -10,26 +10,26 @@ import lombok.Data;
@Data
public
class
ConversationArchiveQuery
extends
BaseEntity
{
/** 发送人Id */
private
String
fromId
;
private
String
fromId
=
""
;
/** 成员名称 */
private
String
userName
;
private
String
userName
=
""
;
/** 接收人Id */
private
String
receiveId
;
private
String
receiveId
=
""
;
/** 客户姓名 */
private
String
customerName
;
private
String
customerName
=
""
;
/** 群聊Id */
private
String
roomId
;
private
String
roomId
=
""
;
/** 类型 */
private
String
msgType
;
private
String
msgType
=
""
;
/** 关键词 **/
private
String
keyWord
;
private
String
keyWord
=
""
;
/** 消息动作 */
private
String
action
;
private
String
action
=
""
;
}
linkwe-framework/src/main/java/com/linkwechat/framework/config/SecurityConfig.java
浏览文件 @
59fa2c47
...
...
@@ -121,8 +121,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
.
antMatchers
(
"/wecom/ticket/**"
).
anonymous
()
.
antMatchers
(
"/wecom/user/getUserInfo"
).
anonymous
()
// .antMatchers("/common/uploadFile2Cos").anonymous()
.
antMatchers
(
"/wecom/material/temporaryMaterialMediaId"
).
anonymous
()
// .antMatchers("/common/uploadFile2Cos").anonymous()
//
.antMatchers("/wecom/material/temporaryMaterialMediaId").anonymous()
.
antMatchers
(
"/wecom/portrait/**"
).
anonymous
()
.
antMatchers
(
"/wecom/fission/poster"
,
"/wecom/fission/*/progress/*"
).
anonymous
()
// 获取实际群活码和社群运营H5页面不需要登录
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/dto/TemporaryMaterialDto.java
0 → 100644
浏览文件 @
59fa2c47
package
com.linkwechat.wecom.domain.dto
;
import
lombok.Data
;
/**
* @description: 群发参数相关
* @author: HaoN
* @create: 2021-03-31 17:20
**/
@Data
public
class
TemporaryMaterialDto
{
private
String
url
;
private
String
type
;
private
String
name
;
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/vo/WeMakeCustomerTag.java
浏览文件 @
59fa2c47
package
com.linkwechat.wecom.domain.vo
;
import
com.linkwechat.wecom.domain.WeTag
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.List
;
...
...
@@ -11,6 +14,9 @@ import java.util.List;
* @create: 2020-10-24 20:09
**/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public
class
WeMakeCustomerTag
{
private
String
externalUserid
;
private
List
<
WeTag
>
addTag
;
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeCustomerMessagePushServiceImpl.java
浏览文件 @
59fa2c47
package
com.linkwechat.wecom.service.impl
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.google.common.collect.Lists
;
...
...
@@ -70,14 +71,20 @@ public class WeCustomerMessagePushServiceImpl implements IWeCustomerMessagePushS
private
WeCustomerMessageTimeTaskMapper
customerMessageTimeTaskMapper
;
@Override
@Transactional
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
addWeCustomerMessagePush
(
CustomerMessagePushDto
customerMessagePushDto
)
throws
JsonProcessingException
,
ParseException
{
if
((
null
!=
customerMessagePushDto
.
getSettingTime
()
&&
!
""
.
equals
(
customerMessagePushDto
.
getSettingTime
()))
&&
DateUtils
.
diffTime
(
new
Date
(),
DateUtil
.
parse
(
customerMessagePushDto
.
getSettingTime
(),
"yyyy-MM-dd HH:mm:ss"
))
>
0
)
{
throw
new
WeComException
(
"发送时间不能小于当前时间"
);
// if ((null != customerMessagePushDto.getSettingTime() && !"".equals(customerMessagePushDto.getSettingTime()))
// && DateUtils.diffTime(new Date(), DateUtil.parse(customerMessagePushDto.getSettingTime(), "yyyy-MM-dd HH:mm")) > 0) {
// throw new WeComException("发送时间不能小于当前时间");
// }
if
(
StrUtil
.
isBlank
(
customerMessagePushDto
.
getSettingTime
())){
throw
new
WeComException
(
"发送时间不能为空"
);
}
List
<
WeCustomer
>
customers
=
Lists
.
newArrayList
();
List
<
WeGroup
>
groups
=
new
ArrayList
<>();
// 0 发给客户
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeCustomerMessageServiceImpl.java
浏览文件 @
59fa2c47
...
...
@@ -148,7 +148,8 @@ public class WeCustomerMessageServiceImpl extends ServiceImpl<WeCustomerMessageM
weCustomerMessagePushDto
.
setText
(
customerMessagePushDto
.
getTextMessage
());
}
if
(
customerMessagePushDto
.
getMessageType
().
equals
(
GroupMessageType
.
IMAGE
.
getMessageType
()))
{
if
(
customerMessagePushDto
.
getMessageType
().
equals
(
GroupMessageType
.
IMAGE
.
getType
()))
{
weCustomerMessagePushDto
.
setImage
(
customerMessagePushDto
.
getImageMessage
());
weCustomerMessagePushDto
.
setLink
(
null
);
weCustomerMessagePushDto
.
setMiniprogram
(
null
);
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeCustomerServiceImpl.java
浏览文件 @
59fa2c47
...
...
@@ -347,14 +347,23 @@ public class WeCustomerServiceImpl extends ServiceImpl<WeCustomerMapper, WeCusto
if
(
CollectionUtil
.
isNotEmpty
(
addTags
))
{
addTags
.
removeAll
(
Collections
.
singleton
(
null
));
//移除重复标签(避免客户重复打标签)
this
.
removeLabel
(
WeMakeCustomerTag
.
builder
()
.
externalUserid
(
weMakeCustomerTag
.
getExternalUserid
())
.
addTag
(
addTags
)
.
build
());
List
<
WeFlowerCustomerTagRel
>
tagRels
=
new
ArrayList
<>();
List
<
CutomerTagEdit
>
cutomerTagEdits
=
new
ArrayList
<>();
flowerCustomerRels
.
stream
().
forEach
(
customer
->
{
CutomerTagEdit
cutomerTagEdit
=
CutomerTagEdit
.
builder
()
.
userid
(
customer
.
getUserId
())
.
external_userid
(
customer
.
getExternalUserid
())
.
build
();
List
<
String
>
tags
=
new
ArrayList
<>();
addTags
.
stream
().
forEach
(
tag
->
{
tags
.
add
(
tag
.
getTagId
());
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录