Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
O
operate-customer-service
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
沈振路
operate-customer-service
Commits
ee47fc32
提交
ee47fc32
authored
10月 17, 2022
作者:
沈振路
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
延时客服-图文-finish
上级
42445d1d
全部展开
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
149 行增加
和
57 行删除
+149
-57
CustomerServiceCommonAsyncComponent.java
...tomer/components/CustomerServiceCommonAsyncComponent.java
+85
-45
CustomerDelaySaveDTO.java
.../yaoyaozw/customer/dto/customer/CustomerDelaySaveDTO.java
+3
-0
CustomerGraphicsDelay.java
...a/com/yaoyaozw/customer/entity/CustomerGraphicsDelay.java
+11
-0
CustomerGraphicsDelayMapper.java
...yaoyaozw/customer/mapper/CustomerGraphicsDelayMapper.java
+2
-1
CustomerGraphicsDelayServiceImpl.java
...stomer/service/impl/CustomerGraphicsDelayServiceImpl.java
+32
-10
CustomerDelayGraphicsDetailVO.java
...w/customer/vo/customer/CustomerDelayGraphicsDetailVO.java
+11
-0
CustomerMessageDetailVO.java
...aoyaozw/customer/vo/customer/CustomerMessageDetailVO.java
+1
-1
CustomerGraphicsDelayMapper.xml
src/main/resources/mapper/CustomerGraphicsDelayMapper.xml
+4
-0
没有找到文件。
src/main/java/com/yaoyaozw/customer/components/CustomerServiceCommonAsyncComponent.java
浏览文件 @
ee47fc32
差异被折叠。
点击展开。
src/main/java/com/yaoyaozw/customer/dto/customer/CustomerDelaySaveDTO.java
浏览文件 @
ee47fc32
...
@@ -41,6 +41,9 @@ public class CustomerDelaySaveDTO implements Serializable {
...
@@ -41,6 +41,9 @@ public class CustomerDelaySaveDTO implements Serializable {
@ApiModelProperty
(
"发文间隔时间"
)
@ApiModelProperty
(
"发文间隔时间"
)
private
Long
timeInterval
;
private
Long
timeInterval
;
@ApiModelProperty
(
"已支付、未支付"
)
private
Integer
isPay
;
@ApiModelProperty
(
"消息内容实体"
)
@ApiModelProperty
(
"消息内容实体"
)
private
CustomerReferralDTO
customerReferralDto
;
private
CustomerReferralDTO
customerReferralDto
;
...
...
src/main/java/com/yaoyaozw/customer/entity/CustomerGraphicsDelay.java
浏览文件 @
ee47fc32
...
@@ -44,6 +44,11 @@ public class CustomerGraphicsDelay implements Serializable {
...
@@ -44,6 +44,11 @@ public class CustomerGraphicsDelay implements Serializable {
@TableField
(
value
=
"extend_title"
)
@TableField
(
value
=
"extend_title"
)
private
String
extendTitle
;
private
String
extendTitle
;
/**
* 封面图片地址
*/
@TableField
(
value
=
"cover_url"
)
private
String
coverUrl
;
/**
/**
* 文本内容
* 文本内容
...
@@ -64,6 +69,12 @@ public class CustomerGraphicsDelay implements Serializable {
...
@@ -64,6 +69,12 @@ public class CustomerGraphicsDelay implements Serializable {
private
String
sourceUrl
;
private
String
sourceUrl
;
/**
/**
* 是否支付
*/
@TableField
(
value
=
"is_pay"
)
private
Integer
isPay
;
/**
* 是否是历史遗留
* 是否是历史遗留
*/
*/
@TableField
(
value
=
"is_history"
)
@TableField
(
value
=
"is_history"
)
...
...
src/main/java/com/yaoyaozw/customer/mapper/CustomerGraphicsDelayMapper.java
浏览文件 @
ee47fc32
...
@@ -50,9 +50,10 @@ public interface CustomerGraphicsDelayMapper extends BaseMapper<CustomerGraphics
...
@@ -50,9 +50,10 @@ public interface CustomerGraphicsDelayMapper extends BaseMapper<CustomerGraphics
* @param keyword 关键词
* @param keyword 关键词
* @param keywordList 关键词拆分
* @param keywordList 关键词拆分
* @param storeType 书城
* @param storeType 书城
* @param appId 需要排除的公众号appId
* @return {@link List}<{@link AuthInfoVO}>
* @return {@link List}<{@link AuthInfoVO}>
*/
*/
List
<
AuthInfoVO
>
getAuthList
(
@Param
(
"keyword"
)
String
keyword
,
@Param
(
"keywordList"
)
List
<
String
>
keywordList
,
@Param
(
"storeType"
)
String
storeType
);
List
<
AuthInfoVO
>
getAuthList
(
@Param
(
"keyword"
)
String
keyword
,
@Param
(
"keywordList"
)
List
<
String
>
keywordList
,
@Param
(
"storeType"
)
String
storeType
,
@Param
(
"appId"
)
String
appId
);
/**
/**
* 让时间间隔列表
* 让时间间隔列表
...
...
src/main/java/com/yaoyaozw/customer/service/impl/CustomerGraphicsDelayServiceImpl.java
浏览文件 @
ee47fc32
...
@@ -36,6 +36,7 @@ import org.springframework.stereotype.Service;
...
@@ -36,6 +36,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.*
;
import
java.util.function.Function
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -78,7 +79,6 @@ public class CustomerGraphicsDelayServiceImpl extends ServiceImpl<CustomerGraphi
...
@@ -78,7 +79,6 @@ public class CustomerGraphicsDelayServiceImpl extends ServiceImpl<CustomerGraphi
}
}
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseResult
insertCustomerDelay
(
CustomerDelaySaveDTO
saveDto
)
{
public
BaseResult
insertCustomerDelay
(
CustomerDelaySaveDTO
saveDto
)
{
CustomerGraphicsDelay
customerGraphicsDelay
=
new
CustomerGraphicsDelay
();
CustomerGraphicsDelay
customerGraphicsDelay
=
new
CustomerGraphicsDelay
();
...
@@ -92,23 +92,45 @@ public class CustomerGraphicsDelayServiceImpl extends ServiceImpl<CustomerGraphi
...
@@ -92,23 +92,45 @@ public class CustomerGraphicsDelayServiceImpl extends ServiceImpl<CustomerGraphi
}
}
customerGraphicsDelay
.
setSendStatus
(
CustomerCommonConstant
.
SEND_STATUS_LINK_GETTING
);
customerGraphicsDelay
.
setSendStatus
(
CustomerCommonConstant
.
SEND_STATUS_LINK_GETTING
);
localLog
.
info
(
"生成referral数据"
);
ReferralEntity
referralEntity
=
new
ReferralEntity
();
BeanUtil
.
copyProperties
(
saveDto
.
getCustomerReferralDto
(),
referralEntity
);
referralEntity
.
setMaterialGraphicsId
(
customerGraphicsDelay
.
getId
());
// 非自定义获取链接
if
(!
referralEntity
.
getNewsType
().
equals
(-
1
))
{
try
{
localLog
.
info
(
"准备获取链接"
);
String
linkNameModel
=
CustomerCommonConstant
.
getLinkNameModel
(
referralEntity
.
getNewsType
());
localLog
.
info
(
"获取链接name模板: {}"
,
linkNameModel
);
referralEntity
.
setName
(
linkNameModel
);
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"yyyy/MM/dd"
);
String
dateStr
=
dateFormat
.
format
(
new
Date
());
AuthorizerInfo
authorizerInfo
=
authorizerInfoService
.
getOne
(
new
QueryWrapper
<
AuthorizerInfo
>().
eq
(
"appid"
,
saveDto
.
getAppId
()));
AuthInfoVO
authInfoVO
=
new
AuthInfoVO
();
authInfoVO
.
putPropertyValue
(
authorizerInfo
);
commonAsyncComponent
.
getCopyReferral
(
dateStr
,
authInfoVO
,
referralEntity
);
customerGraphicsDelay
.
setSendStatus
(
CustomerCommonConstant
.
SEND_STATUS_LINK_FINISH
);
localLog
.
info
(
"链接获取完成"
);
}
catch
(
Exception
e
)
{
localLog
.
info
(
"获取链接异常"
);
return
new
BaseResult
().
error
(
"获取链接异常"
);
}
}
customerGraphicsDelay
.
setSourceUrl
(
referralEntity
.
getReferral
());
boolean
mainResult
=
super
.
saveOrUpdate
(
customerGraphicsDelay
);
boolean
mainResult
=
super
.
saveOrUpdate
(
customerGraphicsDelay
);
if
(!
mainResult
)
{
if
(!
mainResult
)
{
localLog
.
info
(
"主体数据生成异常"
);
localLog
.
info
(
"主体数据生成异常"
);
return
new
BaseResult
().
error
(
"新增/更新 主体数据异常"
);
return
new
BaseResult
().
error
(
"新增/更新 主体数据异常"
);
}
}
localLog
.
info
(
"生成referral数据"
);
ReferralEntity
referralEntity
=
new
ReferralEntity
();
referralEntity
.
setMaterialGraphicsId
(
customerGraphicsDelay
.
getId
());
BeanUtil
.
copyProperties
(
referralEntity
,
saveDto
.
getCustomerReferralDto
());
boolean
referralResult
=
referralEntityService
.
saveOrUpdate
(
referralEntity
);
boolean
referralResult
=
referralEntityService
.
saveOrUpdate
(
referralEntity
);
if
(!
referralResult
)
{
if
(!
referralResult
)
{
localLog
.
info
(
"referral数据生成异常, 回滚事务"
);
return
new
BaseResult
().
error
(
"新增/更新 链接数据异常"
);
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
}
}
// TODO: 2022/10/14 生成链接
return
new
BaseResult
().
success
();
return
new
BaseResult
().
success
();
}
}
...
@@ -221,7 +243,7 @@ public class CustomerGraphicsDelayServiceImpl extends ServiceImpl<CustomerGraphi
...
@@ -221,7 +243,7 @@ public class CustomerGraphicsDelayServiceImpl extends ServiceImpl<CustomerGraphi
keyword
=
null
;
keyword
=
null
;
}
}
List
<
AuthInfoVO
>
authList
=
super
.
baseMapper
.
getAuthList
(
keyword
,
keywordList
,
storeType
);
List
<
AuthInfoVO
>
authList
=
super
.
baseMapper
.
getAuthList
(
keyword
,
keywordList
,
storeType
,
appId
);
return
new
GenericsResult
<>(
authList
);
return
new
GenericsResult
<>(
authList
);
}
}
...
...
src/main/java/com/yaoyaozw/customer/vo/customer/CustomerDelayGraphicsDetailVO.java
浏览文件 @
ee47fc32
...
@@ -29,14 +29,25 @@ public class CustomerDelayGraphicsDetailVO implements Serializable {
...
@@ -29,14 +29,25 @@ public class CustomerDelayGraphicsDetailVO implements Serializable {
private
String
type
;
private
String
type
;
@ApiModelProperty
(
"是否支付 0-否 1-是"
)
@ApiModelProperty
(
"是否支付 0-否 1-是"
)
@JsonSerialize
(
using
=
ToStringSerializer
.
class
)
private
Integer
isPay
;
private
Integer
isPay
;
@ApiModelProperty
(
"素材图片路径"
)
@ApiModelProperty
(
"素材图片路径"
)
private
String
coverUrl
;
private
String
coverUrl
;
@ApiModelProperty
(
"推广标题"
)
private
String
extendTitle
;
@ApiModelProperty
(
"素材文本内容"
)
@ApiModelProperty
(
"素材文本内容"
)
private
String
content
;
private
String
content
;
@ApiModelProperty
(
"素材文本内容"
)
private
Integer
postSort
;
@ApiModelProperty
(
"时间间隔"
)
@JsonSerialize
(
using
=
ToStringSerializer
.
class
)
private
Long
timeInterval
;
@ApiModelProperty
(
"链接相关内容"
)
@ApiModelProperty
(
"链接相关内容"
)
private
CustomerReferralDTO
customerReferralDto
;
private
CustomerReferralDTO
customerReferralDto
;
...
...
src/main/java/com/yaoyaozw/customer/vo/customer/CustomerMessageDetailVO.java
浏览文件 @
ee47fc32
...
@@ -31,7 +31,7 @@ public class CustomerMessageDetailVO implements Serializable {
...
@@ -31,7 +31,7 @@ public class CustomerMessageDetailVO implements Serializable {
@ApiModelProperty
(
"客服消息类型(图文、文本)"
)
@ApiModelProperty
(
"客服消息类型(图文、文本)"
)
private
String
type
;
private
String
type
;
@ApiModelProperty
(
"
素材文本内容
"
)
@ApiModelProperty
(
"
推广标题
"
)
private
String
extendTitle
;
private
String
extendTitle
;
@ApiModelProperty
(
"素材图片路径"
)
@ApiModelProperty
(
"素材图片路径"
)
...
...
src/main/resources/mapper/CustomerGraphicsDelayMapper.xml
浏览文件 @
ee47fc32
...
@@ -110,6 +110,9 @@
...
@@ -110,6 +110,9 @@
<if
test=
"storeType != null and storeType != ''"
>
<if
test=
"storeType != null and storeType != ''"
>
and store_type = #{storeType}
and store_type = #{storeType}
</if>
</if>
<if
test=
"appId != null and appId != ''"
>
and appId != #{appId}
</if>
</where>
</where>
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论