Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
O
operate-customer-service
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
沈振路
operate-customer-service
Commits
f2fc953c
提交
f2fc953c
authored
10月 08, 2022
作者:
沈振路
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
客服
上级
25510db5
显示空白字符变更
内嵌
并排
正在显示
19 个修改的文件
包含
577 行增加
和
75 行删除
+577
-75
CustomerServiceCommonAsyncComponent.java
...tomer/components/CustomerServiceCommonAsyncComponent.java
+27
-0
CustomerDelaySaveDTO.java
.../yaoyaozw/customer/dto/customer/CustomerDelaySaveDTO.java
+0
-6
CustomerGraphicsDTO.java
...m/yaoyaozw/customer/dto/customer/CustomerGraphicsDTO.java
+0
-25
CustomerMessageSaveDTO.java
...aoyaozw/customer/dto/customer/CustomerMessageSaveDTO.java
+21
-9
CustomerReferralDTO.java
...m/yaoyaozw/customer/dto/customer/CustomerReferralDTO.java
+46
-0
CustomerTextDTO.java
...a/com/yaoyaozw/customer/dto/customer/CustomerTextDTO.java
+0
-22
CustomerGraphics.java
...n/java/com/yaoyaozw/customer/entity/CustomerGraphics.java
+58
-4
ReferralEntity.java
...ain/java/com/yaoyaozw/customer/entity/ReferralEntity.java
+234
-0
ReferralEntityMapper.java
...va/com/yaoyaozw/customer/mapper/ReferralEntityMapper.java
+23
-0
RegisterUserEntityMapper.java
...om/yaoyaozw/customer/mapper/RegisterUserEntityMapper.java
+9
-0
CustomerGraphicsService.java
...om/yaoyaozw/customer/service/CustomerGraphicsService.java
+1
-0
ReferralEntityService.java
.../com/yaoyaozw/customer/service/ReferralEntityService.java
+21
-0
RegisterUserEntityService.java
.../yaoyaozw/customer/service/RegisterUserEntityService.java
+9
-0
CustomerGraphicsServiceImpl.java
...zw/customer/service/impl/CustomerGraphicsServiceImpl.java
+26
-6
ReferralEntityServiceImpl.java
...aozw/customer/service/impl/ReferralEntityServiceImpl.java
+21
-0
RegisterUserEntityServiceImpl.java
.../customer/service/impl/RegisterUserEntityServiceImpl.java
+5
-3
CustomerMessageListVO.java
.../yaoyaozw/customer/vo/customer/CustomerMessageListVO.java
+33
-0
ReferralEntityMapper.xml
src/main/resources/mapper/ReferralEntityMapper.xml
+33
-0
RegisterUserEntityMapper.xml
src/main/resources/mapper/RegisterUserEntityMapper.xml
+10
-0
没有找到文件。
src/main/java/com/yaoyaozw/customer/components/CustomerServiceCommonAsyncComponent.java
浏览文件 @
f2fc953c
package
com
.
yaoyaozw
.
customer
.
components
;
package
com
.
yaoyaozw
.
customer
.
components
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.yaoyaozw.customer.dto.customer.CustomerMessageSaveDTO
;
import
com.yaoyaozw.customer.entity.ReferralEntity
;
import
com.yaoyaozw.customer.service.ReferralEntityService
;
import
com.yaoyaozw.customer.service.RegisterUserEntityService
;
import
com.yaoyaozw.customer.vo.customer.CrowdPackageUserVO
;
import
com.yaoyaozw.customer.vo.customer.CrowdPackageUserVO
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -19,6 +25,11 @@ public class CustomerServiceCommonAsyncComponent {
...
@@ -19,6 +25,11 @@ public class CustomerServiceCommonAsyncComponent {
private
final
static
Logger
LOCAL_LOG
=
LoggerFactory
.
getLogger
(
CustomerServiceCommonAsyncComponent
.
class
);
private
final
static
Logger
LOCAL_LOG
=
LoggerFactory
.
getLogger
(
CustomerServiceCommonAsyncComponent
.
class
);
@Autowired
private
RegisterUserEntityService
userEntityService
;
@Autowired
private
ReferralEntityService
referralEntityService
;
@Async
(
"myExecutor"
)
@Async
(
"myExecutor"
)
public
void
addMatchUserIntoPackage
(
Long
packageId
,
List
<
CrowdPackageUserVO
>
userList
)
{
public
void
addMatchUserIntoPackage
(
Long
packageId
,
List
<
CrowdPackageUserVO
>
userList
)
{
...
@@ -66,5 +77,21 @@ public class CustomerServiceCommonAsyncComponent {
...
@@ -66,5 +77,21 @@ public class CustomerServiceCommonAsyncComponent {
LOCAL_LOG
.
info
(
"异步删除不符合条件用户所属人群包完成, 耗时: {}ms"
,
endTime
-
startTime
);
LOCAL_LOG
.
info
(
"异步删除不符合条件用户所属人群包完成, 耗时: {}ms"
,
endTime
-
startTime
);
}
}
@Async
(
"myExecutor"
)
public
void
getAuthListLink
(
Long
id
,
CustomerMessageSaveDTO
saveDto
)
{
LOCAL_LOG
.
info
(
"进入异步方法"
);
List
<
Long
>
accountIdList
=
userEntityService
.
getAccountIdListFromPackage
(
saveDto
.
getPackId
());
List
<
ReferralEntity
>
referralEntityList
=
new
ArrayList
<>(
accountIdList
.
size
());
// 遍历处理
referralEntityService
.
saveBatch
(
referralEntityList
);
}
}
}
src/main/java/com/yaoyaozw/customer/dto/customer/CustomerDelaySaveDTO.java
浏览文件 @
f2fc953c
...
@@ -22,10 +22,4 @@ public class CustomerDelaySaveDTO implements Serializable {
...
@@ -22,10 +22,4 @@ public class CustomerDelaySaveDTO implements Serializable {
@ApiModelProperty
(
"客服消息类型(图文、文本)"
)
@ApiModelProperty
(
"客服消息类型(图文、文本)"
)
private
Integer
messageType
;
private
Integer
messageType
;
@ApiModelProperty
(
"图文实体"
)
private
CustomerGraphicsDTO
graphicsDto
;
@ApiModelProperty
(
"文本实体"
)
private
CustomerTextDTO
textDto
;
}
}
src/main/java/com/yaoyaozw/customer/dto/customer/CustomerGraphicsDTO.java
deleted
100644 → 0
浏览文件 @
25510db5
package
com
.
yaoyaozw
.
customer
.
dto
.
customer
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @author darker
* @date 2022/9/15 11:15
*/
@Data
@ApiModel
(
"图文实体"
)
public
class
CustomerGraphicsDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
7314804348041896227L
;
@ApiModelProperty
(
"素材图片路径"
)
private
String
graphicsPicUrl
;
@ApiModelProperty
(
"素材文本内容"
)
private
String
graphicsContent
;
}
src/main/java/com/yaoyaozw/customer/dto/customer/CustomerMessageSaveDTO.java
浏览文件 @
f2fc953c
...
@@ -15,22 +15,34 @@ import java.io.Serializable;
...
@@ -15,22 +15,34 @@ import java.io.Serializable;
public
class
CustomerMessageSaveDTO
implements
Serializable
{
public
class
CustomerMessageSaveDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
4269904448093268275L
;
private
static
final
long
serialVersionUID
=
-
4269904448093268275L
;
@ApiModelProperty
(
"客服消息
人群包ID
"
)
@ApiModelProperty
(
"客服消息
id
"
)
private
Long
packageI
d
;
private
Long
i
d
;
@ApiModelProperty
(
"客服消息名称"
)
@ApiModelProperty
(
"人群包ID"
)
private
String
messageName
;
private
Long
packId
;
@ApiModelProperty
(
"标题"
)
private
String
title
;
@ApiModelProperty
(
"消息发送时间"
)
@ApiModelProperty
(
"消息发送时间"
)
private
String
postTime
;
private
String
postTime
;
@ApiModelProperty
(
"是否支付 0-否 1-是"
)
private
Integer
isPay
;
@ApiModelProperty
(
"客服消息类型(图文、文本)"
)
@ApiModelProperty
(
"客服消息类型(图文、文本)"
)
private
Integer
messageType
;
private
Integer
type
;
@ApiModelProperty
(
"素材文本内容"
)
private
String
extendTitle
;
@ApiModelProperty
(
"素材图片路径"
)
private
String
coverUrl
;
@ApiModelProperty
(
"
图文实体
"
)
@ApiModelProperty
(
"
素材文本内容
"
)
private
CustomerGraphicsDTO
graphicsDto
;
private
String
content
;
@ApiModelProperty
(
"
文本实体
"
)
@ApiModelProperty
(
"
链接相关内容
"
)
private
Customer
TextDTO
text
Dto
;
private
Customer
ReferralDTO
customerReferral
Dto
;
}
}
src/main/java/com/yaoyaozw/customer/dto/customer/CustomerReferralDTO.java
0 → 100644
浏览文件 @
f2fc953c
package
com
.
yaoyaozw
.
customer
.
dto
.
customer
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* @author darker
* @date 2022/10/8 12:00
*/
@Data
public
class
CustomerReferralDTO
implements
Serializable
{
@ApiModelProperty
(
"链接类型"
)
private
Integer
newsType
;
@ApiModelProperty
(
"书"
)
private
Long
bookId
;
@ApiModelProperty
(
"章节"
)
private
Integer
chapterIdx
;
@ApiModelProperty
(
"推广类型"
)
private
Integer
push
;
@ApiModelProperty
(
"原文链接"
)
private
String
referral
;
@ApiModelProperty
(
"活动标题"
)
private
String
activityTitle
;
@ApiModelProperty
(
"限制次数"
)
private
Integer
limited
;
@ApiModelProperty
(
value
=
"开始时间"
)
private
Date
startTime
;
@ApiModelProperty
(
value
=
"结束时间"
)
private
Date
endTime
;
}
src/main/java/com/yaoyaozw/customer/dto/customer/CustomerTextDTO.java
deleted
100644 → 0
浏览文件 @
25510db5
package
com
.
yaoyaozw
.
customer
.
dto
.
customer
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @author darker
* @date 2022/9/15 11:16
*/
@Data
@ApiModel
(
"文本实体"
)
public
class
CustomerTextDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
1088228495201151269L
;
@ApiModelProperty
(
"文本消息内容"
)
private
String
messageText
;
}
src/main/java/com/yaoyaozw/customer/entity/CustomerGraphics.java
浏览文件 @
f2fc953c
package
com
.
yaoyaozw
.
customer
.
entity
;
package
com
.
yaoyaozw
.
customer
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.*
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.Date
;
import
lombok.Data
;
import
lombok.Data
;
import
org.springframework.data.annotation.Id
;
/**
* 客户图片
*
* @author Admin
* @date 2022/10/08
*/
@Data
@Data
@TableName
(
value
=
"customer_graphics"
)
@TableName
(
value
=
"customer_graphics"
)
public
class
CustomerGraphics
implements
Serializable
{
public
class
CustomerGraphics
implements
Serializable
{
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
@Id
private
Long
id
;
private
Long
id
;
/**
/**
...
@@ -21,6 +27,42 @@ public class CustomerGraphics implements Serializable {
...
@@ -21,6 +27,42 @@ public class CustomerGraphics implements Serializable {
private
Long
packId
;
private
Long
packId
;
/**
/**
* 标题
*/
@TableField
(
value
=
"title"
)
private
String
title
;
/**
* 类型 0-文本 1-图文
*/
@TableField
(
value
=
"type"
)
private
Integer
type
;
/**
* 是否支付 0-否 1-是
*/
@TableField
(
value
=
"is_pay"
)
private
Integer
isPay
;
/**
* 推广标题
*/
@TableField
(
value
=
"extend_title"
)
private
String
extendTitle
;
/**
* 封面地址
*/
@TableField
(
value
=
"cover_url"
)
private
String
coverUrl
;
/**
* 文本内容
*/
@TableField
(
value
=
"content"
)
private
String
content
;
/**
* 发送时间
* 发送时间
*/
*/
@TableField
(
value
=
"post_time"
)
@TableField
(
value
=
"post_time"
)
...
@@ -54,6 +96,7 @@ public class CustomerGraphics implements Serializable {
...
@@ -54,6 +96,7 @@ public class CustomerGraphics implements Serializable {
* 逻辑删除
* 逻辑删除
*/
*/
@TableField
(
value
=
"is_deleted"
)
@TableField
(
value
=
"is_deleted"
)
@TableLogic
private
Boolean
isDeleted
;
private
Boolean
isDeleted
;
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
@@ -73,4 +116,14 @@ public class CustomerGraphics implements Serializable {
...
@@ -73,4 +116,14 @@ public class CustomerGraphics implements Serializable {
public
static
final
String
COL_GMT_MODIFIED
=
"gmt_modified"
;
public
static
final
String
COL_GMT_MODIFIED
=
"gmt_modified"
;
public
static
final
String
COL_IS_DELETED
=
"is_deleted"
;
public
static
final
String
COL_IS_DELETED
=
"is_deleted"
;
public
void
initOperateInfo
(
Long
userId
,
Boolean
isCreate
)
{
Date
now
=
new
Date
();
if
(
isCreate
)
{
this
.
createUser
=
userId
;
this
.
gmtCreate
=
now
;
}
this
.
gmtModified
=
now
;
this
.
modifiedUser
=
userId
;
}
}
}
\ No newline at end of file
src/main/java/com/yaoyaozw/customer/entity/ReferralEntity.java
0 → 100644
浏览文件 @
f2fc953c
package
com
.
yaoyaozw
.
customer
.
entity
;
import
com.baomidou.mybatisplus.annotation.*
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* 推荐实体
*
* @author Admin
* @date 2022/10/08
*/
@ApiModel
(
value
=
"referral_entity"
)
@Data
@TableName
(
value
=
"referral_entity"
)
public
class
ReferralEntity
implements
Serializable
{
@TableId
(
value
=
"id"
,
type
=
IdType
.
ID_WORKER
)
@ApiModelProperty
(
value
=
""
)
private
Long
id
;
/**
* 渠道id
*/
@TableField
(
value
=
"account_id"
)
@ApiModelProperty
(
value
=
"渠道id"
)
private
String
accountId
;
/**
* name
*/
@TableField
(
value
=
"name"
)
@ApiModelProperty
(
value
=
"name"
)
private
String
name
;
/**
* 小说名
*/
@TableField
(
value
=
"book_id"
)
@ApiModelProperty
(
value
=
"小说名"
)
private
String
bookId
;
/**
* 章节
*/
@TableField
(
value
=
"chapter_idx"
)
@ApiModelProperty
(
value
=
"章节"
)
private
Integer
chapterIdx
;
/**
* 素材表id
*/
@TableField
(
value
=
"material_graphics_id"
)
@ApiModelProperty
(
value
=
"素材表id"
)
private
Long
materialGraphicsId
;
/**
* 素材表id
*/
@TableField
(
value
=
"material_graphics_info_id"
)
@ApiModelProperty
(
value
=
"素材表id"
)
private
Long
materialGraphicsInfoId
;
/**
* 发文类型
*/
@TableField
(
value
=
"news_type"
)
@ApiModelProperty
(
value
=
"发文类型"
)
private
Integer
newsType
;
/**
* 推广id
*/
@TableField
(
value
=
"promote_id"
)
@ApiModelProperty
(
value
=
"推广id"
)
private
String
promoteId
;
/**
* 推广类型
*/
@TableField
(
value
=
"push_type"
)
@ApiModelProperty
(
value
=
"推广类型"
)
private
Integer
push
;
/**
* 原文链接
*/
@TableField
(
value
=
"referral"
)
@ApiModelProperty
(
value
=
"原文链接"
)
private
String
referral
;
/**
* 书成平台
*/
@TableField
(
value
=
"store_type"
)
@ApiModelProperty
(
value
=
"书成平台"
)
private
String
storeType
;
/**
* 样式
*/
@TableField
(
value
=
"style_type"
)
@ApiModelProperty
(
value
=
"样式"
)
private
Integer
styleType
;
@TableField
(
value
=
"gmt_create"
,
fill
=
FieldFill
.
INSERT
)
@ApiModelProperty
(
value
=
""
)
private
Date
gmtCreate
;
@TableField
(
value
=
"gmt_create_user"
,
fill
=
FieldFill
.
INSERT
)
@ApiModelProperty
(
value
=
""
)
private
String
gmtCreateUser
;
@TableField
(
value
=
"gmt_modified"
,
fill
=
FieldFill
.
INSERT
)
@ApiModelProperty
(
value
=
""
)
private
Date
gmtModified
;
@TableField
(
value
=
"gmt_modified_user"
,
fill
=
FieldFill
.
INSERT
)
@ApiModelProperty
(
value
=
""
)
private
String
gmtModifiedUser
;
/**
* 逻辑删除 1(true)已删除, 0(false)未删除
*/
@TableLogic
@TableField
(
value
=
"is_deleted"
,
fill
=
FieldFill
.
INSERT
)
@ApiModelProperty
(
value
=
"逻辑删除 1(true)已删除, 0(false)未删除"
)
private
Integer
isDeleted
;
/**
* name
*/
@ApiModelProperty
(
value
=
"bookName"
)
@TableField
(
value
=
"book_name"
)
private
String
bookName
;
/**
* name
*/
@ApiModelProperty
(
value
=
"storeTypeName"
)
@TableField
(
value
=
"store_type_name"
)
private
String
storeTypeName
;
/**
* name
*/
@ApiModelProperty
(
value
=
"activityTitle"
)
@TableField
(
value
=
"activity_title"
)
private
String
activityTitle
;
/**
* name
*/
@ApiModelProperty
(
value
=
"configId"
)
@TableField
(
value
=
"config_id"
)
private
String
configId
;
/**
* name
*/
@ApiModelProperty
(
value
=
"templateId"
)
@TableField
(
value
=
"template_id"
)
private
String
templateId
;
/**
* name
*/
@ApiModelProperty
(
value
=
"startTime"
)
@TableField
(
value
=
"start_time"
)
private
Date
startTime
;
/**
* name
*/
@ApiModelProperty
(
value
=
"endTime"
)
@TableField
(
value
=
"end_time"
)
private
Date
endTime
;
/**
* name
*/
@ApiModelProperty
(
value
=
"rechargeAmount"
)
@TableField
(
value
=
"recharge_amount"
)
private
BigDecimal
rechargeAmount
;
/**
* namev
*/
@ApiModelProperty
(
value
=
"giftAmount"
)
@TableField
(
value
=
"gift_amount"
)
private
Integer
giftAmount
;
/**
* namev
*/
@ApiModelProperty
(
value
=
"limited"
)
@TableField
(
value
=
"limited"
)
private
Integer
limited
;
/**
* name
*/
@ApiModelProperty
(
value
=
"configId"
)
@TableField
(
value
=
"config_name"
)
private
String
configName
;
public
static
final
String
COL_ID
=
"id"
;
public
static
final
String
COL_ACCOUNT_ID
=
"account_id"
;
public
static
final
String
COL_BOOK_ID
=
"book_id"
;
public
static
final
String
COL_CHAPTER_IDX
=
"chapter_idx"
;
public
static
final
String
COL_MATERIAL_GRAPHICS_ID
=
"material_graphics_id"
;
public
static
final
String
COL_NEWS_TYPE
=
"news_type"
;
public
static
final
String
COL_PROMOTE_ID
=
"promote_id"
;
public
static
final
String
COL_REFERRAL
=
"referral"
;
public
static
final
String
COL_STORE_TYPE
=
"store_type"
;
public
static
final
String
COL_STYLE_TYPE
=
"style_type"
;
public
static
final
String
COL_GMT_CREATE
=
"gmt_create"
;
public
static
final
String
COL_GMT_CREATE_USER
=
"gmt_create_user"
;
public
static
final
String
COL_GMT_MODIFIED
=
"gmt_modified"
;
public
static
final
String
COL_GMT_MODIFIED_USER
=
"gmt_modified_user"
;
public
void
changeDispatchBelong
(
Long
id
,
Long
materialGraphicsId
,
Long
materialGraphicsInfoId
)
{
this
.
id
=
id
;
this
.
materialGraphicsId
=
materialGraphicsId
;
this
.
materialGraphicsInfoId
=
materialGraphicsInfoId
;
}
}
\ No newline at end of file
src/main/java/com/yaoyaozw/customer/mapper/ReferralEntityMapper.java
0 → 100644
浏览文件 @
f2fc953c
package
com
.
yaoyaozw
.
customer
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yaoyaozw.customer.entity.ReferralEntity
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
/**
* @author Admin
* @date 2022/10/08
*/
@Mapper
public
interface
ReferralEntityMapper
extends
BaseMapper
<
ReferralEntity
>
{
/**
* 物理删除素材元素
*
* @param sourceId 素材主体ID
*/
void
ultimateDeleteReferrals
(
@Param
(
"sourceId"
)
Long
sourceId
);
}
\ No newline at end of file
src/main/java/com/yaoyaozw/customer/mapper/RegisterUserEntityMapper.java
浏览文件 @
f2fc953c
...
@@ -28,4 +28,12 @@ public interface RegisterUserEntityMapper extends BaseMapper<RegisterUserEntity>
...
@@ -28,4 +28,12 @@ public interface RegisterUserEntityMapper extends BaseMapper<RegisterUserEntity>
*/
*/
void
updateUserPackageBelong
(
@Param
(
"openId"
)
String
openId
,
@Param
(
"packageBelong"
)
String
packageBelong
);
void
updateUserPackageBelong
(
@Param
(
"openId"
)
String
openId
,
@Param
(
"packageBelong"
)
String
packageBelong
);
/**
* 从包中获取用户列表(现在已经在人群包内的)
*
* @param packageId 包id
* @return {@link List}<{@link RegisterUserEntity}>
*/
List
<
Long
>
getAuthListFromPackage
(
@Param
(
"packageId"
)
Long
packageId
);
}
}
\ No newline at end of file
src/main/java/com/yaoyaozw/customer/service/CustomerGraphicsService.java
浏览文件 @
f2fc953c
...
@@ -53,5 +53,6 @@ public interface CustomerGraphicsService extends IService<CustomerGraphics> {
...
@@ -53,5 +53,6 @@ public interface CustomerGraphicsService extends IService<CustomerGraphics> {
* @return {@link BaseResult}
* @return {@link BaseResult}
*/
*/
BaseResult
removeCustomerMessage
(
Long
id
);
BaseResult
removeCustomerMessage
(
Long
id
);
}
}
src/main/java/com/yaoyaozw/customer/service/ReferralEntityService.java
0 → 100644
浏览文件 @
f2fc953c
package
com
.
yaoyaozw
.
customer
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yaoyaozw.customer.entity.ReferralEntity
;
/**
* @author Admin
* @date 2022/10/08
*/
public
interface
ReferralEntityService
extends
IService
<
ReferralEntity
>
{
/**
* 物理删除素材元素
*
* @param sourceId 素材主体ID
*/
void
ultimateDeleteReferrals
(
Long
sourceId
);
}
src/main/java/com/yaoyaozw/customer/service/RegisterUserEntityService.java
浏览文件 @
f2fc953c
...
@@ -23,5 +23,14 @@ public interface RegisterUserEntityService extends IService<RegisterUserEntity>{
...
@@ -23,5 +23,14 @@ public interface RegisterUserEntityService extends IService<RegisterUserEntity>{
*/
*/
List
<
CrowdPackageUserVO
>
getUserMatchDynamicExpress
(
List
<
String
>
dynamicExpressList
,
String
openId
);
List
<
CrowdPackageUserVO
>
getUserMatchDynamicExpress
(
List
<
String
>
dynamicExpressList
,
String
openId
);
/**
* 从包中获取用户列表(现在已经在人群包内的)
*
* @param packageId 包id
* @return {@link List}<{@link RegisterUserEntity}>
*/
List
<
Long
>
getAccountIdListFromPackage
(
Long
packageId
);
}
}
src/main/java/com/yaoyaozw/customer/service/impl/CustomerGraphicsServiceImpl.java
浏览文件 @
f2fc953c
package
com
.
yaoyaozw
.
customer
.
service
.
impl
;
package
com
.
yaoyaozw
.
customer
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.yaoyaozw.customer.common.BaseResult
;
import
com.yaoyaozw.customer.common.BaseResult
;
import
com.yaoyaozw.customer.common.GenericsResult
;
import
com.yaoyaozw.customer.common.GenericsResult
;
import
com.yaoyaozw.customer.components.CustomerServiceCommonAsyncComponent
;
import
com.yaoyaozw.customer.components.TokenManager
;
import
com.yaoyaozw.customer.constants.CustomerCommonConstant
;
import
com.yaoyaozw.customer.constants.CustomerCommonConstant
;
import
com.yaoyaozw.customer.dto.customer.CustomerMessageQueryDTO
;
import
com.yaoyaozw.customer.dto.customer.CustomerMessageQueryDTO
;
import
com.yaoyaozw.customer.dto.customer.CustomerMessageSaveDTO
;
import
com.yaoyaozw.customer.dto.customer.CustomerMessageSaveDTO
;
import
com.yaoyaozw.customer.entity.ReferralEntity
;
import
com.yaoyaozw.customer.service.CrowdPackageConditionMatchService
;
import
com.yaoyaozw.customer.service.CrowdPackageConditionMatchService
;
import
com.yaoyaozw.customer.service.ReferralEntityService
;
import
com.yaoyaozw.customer.service.RegisterUserEntityService
;
import
com.yaoyaozw.customer.vo.customer.CrowdPackageUserVO
;
import
com.yaoyaozw.customer.vo.customer.CrowdPackageUserVO
;
import
com.yaoyaozw.customer.vo.customer.CustomerMessageListVO
;
import
com.yaoyaozw.customer.vo.customer.CustomerMessageListVO
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
...
@@ -13,6 +19,8 @@ import org.slf4j.LoggerFactory;
...
@@ -13,6 +19,8 @@ import org.slf4j.LoggerFactory;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yaoyaozw.customer.entity.CustomerGraphics
;
import
com.yaoyaozw.customer.entity.CustomerGraphics
;
...
@@ -33,18 +41,30 @@ public class CustomerGraphicsServiceImpl extends ServiceImpl<CustomerGraphicsMap
...
@@ -33,18 +41,30 @@ public class CustomerGraphicsServiceImpl extends ServiceImpl<CustomerGraphicsMap
@Autowired
@Autowired
private
CrowdPackageConditionMatchService
matchService
;
private
CrowdPackageConditionMatchService
matchService
;
@Autowired
@Autowired
private
RedisTemplate
redisTemplate
;
private
TokenManager
tokenManager
;
@Autowired
private
CustomerServiceCommonAsyncComponent
commonAsyncComponent
;
@Autowired
private
ReferralEntityService
referralEntityService
;
@Override
@Override
public
BaseResult
insertCustomerMessage
(
CustomerMessageSaveDTO
saveDto
)
{
public
BaseResult
insertCustomerMessage
(
CustomerMessageSaveDTO
saveDto
)
{
Long
packageId
=
saveDto
.
getPackageId
();
LOCAL_LOG
.
info
(
"根据人群包 {} 找符合条件的用户数据"
,
packageId
);
// 主体数据
List
<
CrowdPackageUserVO
>
userList
=
matchService
.
getUserListFromPackage
(
packageId
,
null
);
LOCAL_LOG
.
info
(
"处理主体数据"
);
redisTemplate
.
opsForHash
().
put
(
CustomerCommonConstant
.
CROWD_HUMAN_NUN_REDIS_KEY
,
packageId
.
toString
(),
userList
.
size
());
CustomerGraphics
customerGraphics
=
new
CustomerGraphics
();
BeanUtil
.
copyProperties
(
saveDto
,
customerGraphics
);
customerGraphics
.
initOperateInfo
(
tokenManager
.
getUserIdFromToken
(),
true
);
super
.
save
(
customerGraphics
);
// 处理活动数据
ReferralEntity
referralEntity
=
new
ReferralEntity
();
BeanUtil
.
copyProperties
(
saveDto
.
getCustomerReferralDto
(),
referralEntity
);
referralEntity
.
setMaterialGraphicsId
(
customerGraphics
.
getId
());
referralEntityService
.
save
(
referralEntity
);
// TODO: 2022/9/28 根据人群包找到下面的人所在的公众号,进行链接获取
return
new
BaseResult
().
success
();
return
new
BaseResult
().
success
();
}
}
...
...
src/main/java/com/yaoyaozw/customer/service/impl/ReferralEntityServiceImpl.java
0 → 100644
浏览文件 @
f2fc953c
package
com
.
yaoyaozw
.
customer
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yaoyaozw.customer.entity.ReferralEntity
;
import
com.yaoyaozw.customer.mapper.ReferralEntityMapper
;
import
com.yaoyaozw.customer.service.ReferralEntityService
;
import
org.springframework.stereotype.Service
;
/**
* @Author didi
* @Create 2022/3/23 16:14
*/
@Service
public
class
ReferralEntityServiceImpl
extends
ServiceImpl
<
ReferralEntityMapper
,
ReferralEntity
>
implements
ReferralEntityService
{
@Override
public
void
ultimateDeleteReferrals
(
Long
materialId
)
{
super
.
baseMapper
.
ultimateDeleteReferrals
(
materialId
);
}
}
src/main/java/com/yaoyaozw/customer/service/impl/RegisterUserEntityServiceImpl.java
浏览文件 @
f2fc953c
...
@@ -30,9 +30,6 @@ import java.util.stream.Collectors;
...
@@ -30,9 +30,6 @@ import java.util.stream.Collectors;
public
class
RegisterUserEntityServiceImpl
extends
ServiceImpl
<
RegisterUserEntityMapper
,
RegisterUserEntity
>
implements
RegisterUserEntityService
{
public
class
RegisterUserEntityServiceImpl
extends
ServiceImpl
<
RegisterUserEntityMapper
,
RegisterUserEntity
>
implements
RegisterUserEntityService
{
@Autowired
@Autowired
private
CustomerGraphicsService
customerGraphicsService
;
@Autowired
private
AuthorizerTokenService
authorizerTokenService
;
private
AuthorizerTokenService
authorizerTokenService
;
@Autowired
@Autowired
...
@@ -57,4 +54,9 @@ public class RegisterUserEntityServiceImpl extends ServiceImpl<RegisterUserEntit
...
@@ -57,4 +54,9 @@ public class RegisterUserEntityServiceImpl extends ServiceImpl<RegisterUserEntit
return
baseMapper
.
getUserMatchDynamicExpress
(
dynamicExpressList
,
openId
);
return
baseMapper
.
getUserMatchDynamicExpress
(
dynamicExpressList
,
openId
);
}
}
@Override
public
List
<
Long
>
getAccountIdListFromPackage
(
Long
packageId
)
{
return
baseMapper
.
getAuthListFromPackage
(
packageId
);
}
}
}
src/main/java/com/yaoyaozw/customer/vo/customer/CustomerMessageListVO.java
浏览文件 @
f2fc953c
package
com
.
yaoyaozw
.
customer
.
vo
.
customer
;
package
com
.
yaoyaozw
.
customer
.
vo
.
customer
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.io.Serializable
;
...
@@ -12,5 +13,37 @@ import java.io.Serializable;
...
@@ -12,5 +13,37 @@ import java.io.Serializable;
public
class
CustomerMessageListVO
implements
Serializable
{
public
class
CustomerMessageListVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
8057791504394044052L
;
private
static
final
long
serialVersionUID
=
-
8057791504394044052L
;
@ApiModelProperty
(
"客服消息id"
)
private
Long
id
;
@ApiModelProperty
(
"标题"
)
private
String
title
;
@ApiModelProperty
(
"消息发送时间"
)
private
String
postTime
;
@ApiModelProperty
(
"客服消息类型(图文、文本)"
)
private
String
type
;
@ApiModelProperty
(
"推广标题"
)
private
String
extendTitle
;
@ApiModelProperty
(
"推广类型"
)
private
String
extendType
;
@ApiModelProperty
(
"人群包id"
)
private
Long
packId
;
@ApiModelProperty
(
"人群包名称"
)
private
String
packName
;
@ApiModelProperty
(
"人数"
)
private
Integer
peopleNum
;
@ApiModelProperty
(
"发送状态值"
)
private
Integer
sendStatus
;
@ApiModelProperty
(
"发送状态描述"
)
private
String
sendStatusStr
;
}
}
src/main/resources/mapper/ReferralEntityMapper.xml
0 → 100644
浏览文件 @
f2fc953c
<?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.yaoyaozw.customer.mapper.ReferralEntityMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.yaoyaozw.customer.entity.ReferralEntity"
>
<!--@mbg.generated-->
<!--@Table referral_entity-->
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"account_id"
jdbcType=
"VARCHAR"
property=
"accountId"
/>
<result
column=
"book_id"
jdbcType=
"VARCHAR"
property=
"bookId"
/>
<result
column=
"chapter_idx"
jdbcType=
"INTEGER"
property=
"chapterIdx"
/>
<result
column=
"material_graphics_id"
jdbcType=
"VARCHAR"
property=
"materialGraphicsId"
/>
<result
column=
"news_type"
jdbcType=
"INTEGER"
property=
"newsType"
/>
<result
column=
"promote_id"
jdbcType=
"VARCHAR"
property=
"promoteId"
/>
<result
column=
"referral"
jdbcType=
"VARCHAR"
property=
"referral"
/>
<result
column=
"store_type"
jdbcType=
"VARCHAR"
property=
"storeType"
/>
<result
column=
"style_type"
jdbcType=
"INTEGER"
property=
"styleType"
/>
<result
column=
"gmt_create"
jdbcType=
"TIMESTAMP"
property=
"gmtCreate"
/>
<result
column=
"gmt_create_user"
jdbcType=
"CHAR"
property=
"gmtCreateUser"
/>
<result
column=
"gmt_modified"
jdbcType=
"TIMESTAMP"
property=
"gmtModified"
/>
<result
column=
"gmt_modified_user"
jdbcType=
"CHAR"
property=
"gmtModifiedUser"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
<!--@mbg.generated-->
id, account_id, book_id, chapter_idx, material_graphics_id, news_type, promote_id,
referral, store_type, style_type, gmt_create, gmt_create_user, gmt_modified, gmt_modified_user
</sql>
<delete
id=
"ultimateDeleteReferrals"
>
delete from referral_entity where material_graphics_id = #{sourceId}
</delete>
</mapper>
\ No newline at end of file
src/main/resources/mapper/RegisterUserEntityMapper.xml
浏览文件 @
f2fc953c
...
@@ -55,4 +55,13 @@
...
@@ -55,4 +55,13 @@
set in_package = #{packageBelong}
set in_package = #{packageBelong}
where open_id = #{openId}
where open_id = #{openId}
</update>
</update>
<select
id=
"getAuthListFromPackage"
resultType=
"java.lang.Long"
>
select
distinct ai.account_id
from register_user_entity rue
left join authorizer_info ai
on rue.app_id = ai.appid
where find_in_set(#{packageId}, in_package)
</select>
</mapper>
</mapper>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论