Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
O
operate-customer-service
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
沈振路
operate-customer-service
Commits
1bed98b9
提交
1bed98b9
authored
10月 09, 2022
作者:
沈振路
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
客服
上级
39d1c46f
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
34 个修改的文件
包含
625 行增加
和
61 行删除
+625
-61
CustomerServiceApplication.java
...ava/com/yaoyaozw/customer/CustomerServiceApplication.java
+2
-0
CustomerServiceCommonAsyncComponent.java
...tomer/components/CustomerServiceCommonAsyncComponent.java
+0
-0
CrowdPackageCommonConstant.java
...oyaozw/customer/constants/CrowdPackageCommonConstant.java
+6
-0
CustomerCommonConstant.java
...m/yaoyaozw/customer/constants/CustomerCommonConstant.java
+29
-0
CustomerCommonController.java
...aoyaozw/customer/controller/CustomerCommonController.java
+33
-0
CustomerMessageController.java
...oyaozw/customer/controller/CustomerMessageController.java
+12
-5
CustomerMessageQueryDTO.java
...oyaozw/customer/dto/customer/CustomerMessageQueryDTO.java
+4
-7
CustomerMessageSaveDTO.java
...aoyaozw/customer/dto/customer/CustomerMessageSaveDTO.java
+3
-9
CustomerReferralDTO.java
...m/yaoyaozw/customer/dto/customer/CustomerReferralDTO.java
+52
-1
CustomerGraphics.java
...n/java/com/yaoyaozw/customer/entity/CustomerGraphics.java
+4
-10
ReferralEntity.java
...ain/java/com/yaoyaozw/customer/entity/ReferralEntity.java
+4
-0
RegisterUserEntity.java
...java/com/yaoyaozw/customer/entity/RegisterUserEntity.java
+6
-0
ReferralFeignClient.java
...ava/com/yaoyaozw/customer/feigns/ReferralFeignClient.java
+28
-0
CustomerGraphicsMapper.java
.../com/yaoyaozw/customer/mapper/CustomerGraphicsMapper.java
+22
-0
KanbanCommonMapper.java
...java/com/yaoyaozw/customer/mapper/KanbanCommonMapper.java
+8
-0
MaterialCommonMapper.java
...va/com/yaoyaozw/customer/mapper/MaterialCommonMapper.java
+37
-0
ReferralEntityMapper.java
...va/com/yaoyaozw/customer/mapper/ReferralEntityMapper.java
+2
-0
RegisterUserEntityMapper.java
...om/yaoyaozw/customer/mapper/RegisterUserEntityMapper.java
+10
-1
CustomerGraphicsService.java
...om/yaoyaozw/customer/service/CustomerGraphicsService.java
+13
-3
CustomerServiceCommonService.java
...oyaozw/customer/service/CustomerServiceCommonService.java
+8
-0
RegisterUserEntityService.java
.../yaoyaozw/customer/service/RegisterUserEntityService.java
+9
-1
CrowdPackageServiceImpl.java
...oyaozw/customer/service/impl/CrowdPackageServiceImpl.java
+10
-4
CustomerGraphicsServiceImpl.java
...zw/customer/service/impl/CustomerGraphicsServiceImpl.java
+130
-14
CustomerServiceCommonServiceImpl.java
...stomer/service/impl/CustomerServiceCommonServiceImpl.java
+11
-0
RegisterUserEntityServiceImpl.java
.../customer/service/impl/RegisterUserEntityServiceImpl.java
+5
-0
AuthInfoVO.java
src/main/java/com/yaoyaozw/customer/vo/AuthInfoVO.java
+24
-0
CrowdPackageConditionVO.java
...m/yaoyaozw/customer/vo/crowd/CrowdPackageConditionVO.java
+4
-1
CrowdPackageUserVO.java
...com/yaoyaozw/customer/vo/customer/CrowdPackageUserVO.java
+4
-0
CustomerMessageDetailVO.java
...aoyaozw/customer/vo/customer/CustomerMessageDetailVO.java
+46
-0
CustomerMessageListVO.java
.../yaoyaozw/customer/vo/customer/CustomerMessageListVO.java
+8
-4
CustomerGraphicsMapper.xml
src/main/resources/mapper/CustomerGraphicsMapper.xml
+29
-0
KanbanCommonMapper.xml
src/main/resources/mapper/KanbanCommonMapper.xml
+10
-0
MaterialCommonMapper.xml
src/main/resources/mapper/MaterialCommonMapper.xml
+29
-0
RegisterUserEntityMapper.xml
src/main/resources/mapper/RegisterUserEntityMapper.xml
+23
-1
没有找到文件。
src/main/java/com/yaoyaozw/customer/CustomerServiceApplication.java
浏览文件 @
1bed98b9
...
...
@@ -3,6 +3,7 @@ package com.yaoyaozw.customer;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
...
...
@@ -13,6 +14,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
@SpringBootApplication
@EnableScheduling
@MapperScan
(
"com.yaoyaozw.customer.mapper"
)
@EnableFeignClients
@EnableAsync
public
class
CustomerServiceApplication
{
public
static
void
main
(
String
[]
args
)
{
...
...
src/main/java/com/yaoyaozw/customer/components/CustomerServiceCommonAsyncComponent.java
浏览文件 @
1bed98b9
差异被折叠。
点击展开。
src/main/java/com/yaoyaozw/customer/constants/CrowdPackageCommonConstant.java
浏览文件 @
1bed98b9
...
...
@@ -25,6 +25,12 @@ public class CrowdPackageCommonConstant {
public
static
final
String
GROUP_OR
=
"group_or"
;
public
static
final
String
CONDITION_STORE_ID
=
"store_id"
;
public
static
final
String
MULTIPLE_SELECT
=
"multiple_select"
;
public
static
final
String
COMMA_SEPARATOR
=
","
;
public
static
final
Integer
STATIC_CONDITION
=
1
;
public
static
final
Integer
NON_STATIC_CONDITION
=
0
;
...
...
src/main/java/com/yaoyaozw/customer/constants/CustomerCommonConstant.java
浏览文件 @
1bed98b9
package
com
.
yaoyaozw
.
customer
.
constants
;
import
cn.hutool.core.util.ObjectUtil
;
/**
* @author darker
* @date 2022/9/28 20:09
...
...
@@ -8,4 +10,31 @@ public class CustomerCommonConstant {
public
final
static
String
CROWD_HUMAN_NUN_REDIS_KEY
=
"crowdHumanNum"
;
public
final
static
Integer
ACTIVITY_NEWS_TYPE
=
8
;
public
final
static
Integer
BOOK_NEWS_TYPE
=
7
;
public
final
static
Integer
USUAL_LINK_NEWS_TYPE
=
9
;
public
final
static
String
CUSTOMER_TYPE_VALUE_GRAPHICS
=
"news"
;
public
final
static
String
CUSTOMER_TYPE_VALUE_TEXT
=
"text"
;
public
final
static
String
CUSTOMER_TYPE_NAME_GRAPHICS
=
"图文"
;
public
final
static
String
CUSTOMER_TYPE_NAME_TEXT
=
"文本"
;
public
static
String
getCustomerType
(
String
type
)
{
if
(
ObjectUtil
.
isNull
(
type
))
{
return
null
;
}
if
(
type
.
equals
(
CUSTOMER_TYPE_VALUE_GRAPHICS
))
{
return
CUSTOMER_TYPE_NAME_GRAPHICS
;
}
if
(
type
.
equals
(
CUSTOMER_TYPE_VALUE_TEXT
))
{
return
CUSTOMER_TYPE_NAME_TEXT
;
}
return
type
;
}
}
src/main/java/com/yaoyaozw/customer/controller/CustomerCommonController.java
0 → 100644
浏览文件 @
1bed98b9
package
com
.
yaoyaozw
.
customer
.
controller
;
import
com.yaoyaozw.customer.common.GenericsResult
;
import
com.yaoyaozw.customer.service.CustomerServiceCommonService
;
import
com.yaoyaozw.customer.vo.CommonOptionResponseVO
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
/**
* @author darker
* @date 2022/10/9 10:15
*/
@RestController
@RequestMapping
(
"/customer-service/common"
)
@Api
(
tags
=
"客服通用接口"
)
public
class
CustomerCommonController
{
@Autowired
private
CustomerServiceCommonService
commonService
;
@GetMapping
(
"/getStoreList"
)
@ApiOperation
(
"获取书城列表"
)
public
GenericsResult
<
List
<
CommonOptionResponseVO
>>
getStoreList
()
{
return
commonService
.
getStoreList
();
}
}
src/main/java/com/yaoyaozw/customer/controller/CustomerMessageController.java
浏览文件 @
1bed98b9
package
com
.
yaoyaozw
.
customer
.
controller
;
import
com.github.pagehelper.PageInfo
;
import
com.yaoyaozw.customer.common.BaseResult
;
import
com.yaoyaozw.customer.common.GenericsResult
;
import
com.yaoyaozw.customer.dto.customer.CustomerMessageQueryDTO
;
import
com.yaoyaozw.customer.dto.customer.CustomerMessageSaveDTO
;
import
com.yaoyaozw.customer.service.CustomerGraphicsService
;
import
com.yaoyaozw.customer.vo.customer.CustomerDelayListVO
;
import
com.yaoyaozw.customer.vo.customer.CustomerMessageDetailVO
;
import
com.yaoyaozw.customer.vo.customer.CustomerMessageListVO
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -33,15 +35,15 @@ public class CustomerMessageController {
return
customerGraphicsService
.
insertCustomerMessage
(
saveDto
);
}
@ApiOperation
(
"
编辑
"
)
@
PostMapping
(
"/edit
"
)
public
BaseResult
updateCustomerMessage
(
@RequestBody
CustomerMessageSaveDTO
saveDto
)
{
return
customerGraphicsService
.
updateCustomerMessage
(
saveDto
);
@ApiOperation
(
"
获取详情
"
)
@
GetMapping
(
"/detail/{id}
"
)
public
GenericsResult
<
CustomerMessageDetailVO
>
getCustomerMessageDetail
(
@PathVariable
(
"id"
)
Long
id
)
{
return
customerGraphicsService
.
getCustomerMessageDetail
(
id
);
}
@ApiOperation
(
"查询"
)
@PostMapping
(
"/pageList"
)
public
GenericsResult
<
List
<
CustomerMessageListVO
>>
pageList
(
@RequestBody
CustomerMessageQueryDTO
queryDto
)
{
public
GenericsResult
<
PageInfo
<
CustomerMessageListVO
>>
pageList
(
@RequestBody
CustomerMessageQueryDTO
queryDto
)
{
return
customerGraphicsService
.
pageList
(
queryDto
);
}
...
...
@@ -51,5 +53,10 @@ public class CustomerMessageController {
return
customerGraphicsService
.
removeCustomerMessage
(
id
);
}
@ApiOperation
(
"设置人群包"
)
@GetMapping
(
"/setPack"
)
public
BaseResult
setPack
(
@RequestParam
Long
id
,
@RequestParam
Long
packId
)
{
return
customerGraphicsService
.
setPack
(
id
,
packId
);
}
}
src/main/java/com/yaoyaozw/customer/dto/customer/CustomerMessageQueryDTO.java
浏览文件 @
1bed98b9
package
com
.
yaoyaozw
.
customer
.
dto
.
customer
;
import
com.yaoyaozw.customer.common.PageParams
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.io.Serializable
;
...
...
@@ -10,17 +12,12 @@ import java.io.Serializable;
* @author darker
* @date 2022/9/15 11:20
*/
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
@ApiModel
(
"延时客服列表查询实体"
)
public
class
CustomerMessageQueryDTO
implements
Serializable
{
public
class
CustomerMessageQueryDTO
extends
PageParams
implements
Serializable
{
private
static
final
long
serialVersionUID
=
2406901469313438527L
;
@ApiModelProperty
(
"消息名称关键词"
)
private
String
messageKeyword
;
@ApiModelProperty
(
"客服消息类型"
)
private
Integer
messageType
;
}
src/main/java/com/yaoyaozw/customer/dto/customer/CustomerMessageSaveDTO.java
浏览文件 @
1bed98b9
...
...
@@ -18,22 +18,16 @@ public class CustomerMessageSaveDTO implements Serializable {
@ApiModelProperty
(
"客服消息id"
)
private
Long
id
;
@ApiModelProperty
(
"人群包ID"
)
private
Long
packId
;
@ApiModelProperty
(
"标题"
)
private
String
titl
e
;
private
String
nam
e
;
@ApiModelProperty
(
"消息发送时间"
)
private
String
postTime
;
@ApiModelProperty
(
"是否支付 0-否 1-是"
)
private
Integer
isPay
;
@ApiModelProperty
(
"客服消息类型(图文、文本)"
)
private
Integer
type
;
private
String
type
;
@ApiModelProperty
(
"
素材文本内容
"
)
@ApiModelProperty
(
"
推广标题
"
)
private
String
extendTitle
;
@ApiModelProperty
(
"素材图片路径"
)
...
...
src/main/java/com/yaoyaozw/customer/dto/customer/CustomerReferralDTO.java
浏览文件 @
1bed98b9
package
com
.
yaoyaozw
.
customer
.
dto
.
customer
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
com.fasterxml.jackson.databind.ser.std.ToStringSerializer
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
/**
* @author darker
...
...
@@ -14,11 +22,18 @@ import java.util.Date;
@Data
public
class
CustomerReferralDTO
implements
Serializable
{
@ApiModelProperty
(
"主键id"
)
@JsonSerialize
(
using
=
ToStringSerializer
.
class
)
private
Long
id
;
@ApiModelProperty
(
"链接类型"
)
private
Integer
newsType
;
@ApiModelProperty
(
"书城"
)
private
String
storeType
;
@ApiModelProperty
(
"书"
)
private
Lo
ng
bookId
;
private
Stri
ng
bookId
;
@ApiModelProperty
(
"章节"
)
private
Integer
chapterIdx
;
...
...
@@ -41,6 +56,42 @@ public class CustomerReferralDTO implements Serializable {
@ApiModelProperty
(
value
=
"结束时间"
)
private
Date
endTime
;
@ApiModelProperty
(
value
=
"开始、结束时间"
)
private
List
<
Date
>
dateList
;
@ApiModelProperty
(
value
=
"充值金额"
)
private
BigDecimal
rechargeAmount
;
@ApiModelProperty
(
value
=
"赠送数量"
)
private
Integer
giftAmount
;
private
Integer
isDeleted
;
public
Date
getStartTime
()
{
if
(
ObjectUtil
.
isNull
(
this
.
startTime
)
&&
CollectionUtil
.
isNotEmpty
(
this
.
dateList
))
{
return
dateList
.
get
(
0
);
}
return
startTime
;
}
public
Date
getEndTime
()
{
if
(
ObjectUtil
.
isNull
(
this
.
endTime
)
&&
CollectionUtil
.
isNotEmpty
(
this
.
dateList
))
{
return
dateList
.
get
(
0
);
}
return
endTime
;
}
public
List
<
Date
>
getDateList
()
{
if
(
CollectionUtil
.
isEmpty
(
this
.
dateList
)
&&
ObjectUtil
.
isNotNull
(
this
.
startTime
)
&&
ObjectUtil
.
isNotNull
(
this
.
endTime
))
{
return
Arrays
.
asList
(
this
.
startTime
,
this
.
endTime
);
}
return
dateList
;
}
public
Integer
getIsDeleted
()
{
if
(
ObjectUtil
.
isNull
(
this
.
isDeleted
))
{
return
0
;
}
return
isDeleted
;
}
}
src/main/java/com/yaoyaozw/customer/entity/CustomerGraphics.java
浏览文件 @
1bed98b9
...
...
@@ -16,7 +16,7 @@ import org.springframework.data.annotation.Id;
@Data
@TableName
(
value
=
"customer_graphics"
)
public
class
CustomerGraphics
implements
Serializable
{
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
ID_WORKER
)
@Id
private
Long
id
;
...
...
@@ -29,20 +29,14 @@ public class CustomerGraphics implements Serializable {
/**
* 标题
*/
@TableField
(
value
=
"
titl
e"
)
private
String
titl
e
;
@TableField
(
value
=
"
nam
e"
)
private
String
nam
e
;
/**
* 类型 0-文本 1-图文
*/
@TableField
(
value
=
"type"
)
private
Integer
type
;
/**
* 是否支付 0-否 1-是
*/
@TableField
(
value
=
"is_pay"
)
private
Integer
isPay
;
private
String
type
;
/**
* 推广标题
...
...
src/main/java/com/yaoyaozw/customer/entity/ReferralEntity.java
浏览文件 @
1bed98b9
...
...
@@ -196,6 +196,10 @@ public class ReferralEntity implements Serializable {
@TableField
(
value
=
"config_name"
)
private
String
configName
;
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"infoId"
)
private
Long
infoId
;
public
static
final
String
COL_ID
=
"id"
;
public
static
final
String
COL_ACCOUNT_ID
=
"account_id"
;
...
...
src/main/java/com/yaoyaozw/customer/entity/RegisterUserEntity.java
浏览文件 @
1bed98b9
...
...
@@ -87,6 +87,12 @@ public class RegisterUserEntity implements Serializable {
@TableField
(
value
=
"customer_publish"
)
private
Date
customerPublish
;
/**
* 延时客服发送时间
*/
@TableField
(
value
=
"in_package"
)
private
String
inPackage
;
private
static
final
long
serialVersionUID
=
1L
;
...
...
src/main/java/com/yaoyaozw/customer/feigns/ReferralFeignClient.java
0 → 100644
浏览文件 @
1bed98b9
package
com
.
yaoyaozw
.
customer
.
feigns
;
import
com.yaoyaozw.customer.common.R
;
import
com.yaoyaozw.customer.entity.ReferralEntity
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
/**
* 推荐装客户端
*
* @author Admin
* @date 2022/10/09
*/
@FeignClient
(
"referral-service-wgh"
)
public
interface
ReferralFeignClient
{
/**
* 产品推荐
*
* @param referralEntity 推荐实体
* @return {@link R}
*/
@PostMapping
(
"/getReferral"
)
R
productReferral
(
@RequestBody
ReferralEntity
referralEntity
);
}
src/main/java/com/yaoyaozw/customer/mapper/CustomerGraphicsMapper.java
浏览文件 @
1bed98b9
package
com
.
yaoyaozw
.
customer
.
mapper
;
import
com.baomidou.dynamic.datasource.annotation.DS
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yaoyaozw.customer.dto.customer.CustomerMessageQueryDTO
;
import
com.yaoyaozw.customer.entity.CustomerGraphics
;
import
com.yaoyaozw.customer.vo.customer.CustomerMessageListVO
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* @author Admin
* @date 2022/10/08
*/
@Mapper
@DS
(
"material"
)
public
interface
CustomerGraphicsMapper
extends
BaseMapper
<
CustomerGraphics
>
{
/**
* 页面列表
*
* @param queryDto 查询dto
* @return {@link List}<{@link CustomerMessageListVO}>
*/
List
<
CustomerMessageListVO
>
pageList
(
@Param
(
"queryDto"
)
CustomerMessageQueryDTO
queryDto
);
}
\ No newline at end of file
src/main/java/com/yaoyaozw/customer/mapper/KanbanCommonMapper.java
浏览文件 @
1bed98b9
...
...
@@ -33,5 +33,13 @@ public interface KanbanCommonMapper {
*/
List
<
Long
>
getSetupIdListFromStaticCondition
(
@Param
(
"expressList"
)
List
<
String
>
expressList
);
/**
* 被表达存储类型
*
* @param expression 表达式
* @return {@link String}
*/
String
getStoreTypeByExpression
(
@Param
(
"expression"
)
String
expression
);
}
src/main/java/com/yaoyaozw/customer/mapper/MaterialCommonMapper.java
0 → 100644
浏览文件 @
1bed98b9
package
com
.
yaoyaozw
.
customer
.
mapper
;
import
com.baomidou.dynamic.datasource.annotation.DS
;
import
com.yaoyaozw.customer.common.GenericsResult
;
import
com.yaoyaozw.customer.vo.AuthInfoVO
;
import
com.yaoyaozw.customer.vo.CommonOptionResponseVO
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
import
java.util.Set
;
/**
* @author darker
* @date 2022/10/9 10:31
*/
@Repository
@DS
(
"material"
)
public
interface
MaterialCommonMapper
{
/**
* 获取存储列表
*
* @return {@link List}<{@link CommonOptionResponseVO}>
*/
List
<
CommonOptionResponseVO
>
getStoreList
();
/**
* 获得身份验证信息列表
*
* @param accountSet 帐户设置
* @return {@link List}<{@link AuthInfoVO}>
*/
List
<
AuthInfoVO
>
getAuthInfoList
(
@Param
(
"accountSet"
)
Set
<
String
>
accountSet
);
}
src/main/java/com/yaoyaozw/customer/mapper/ReferralEntityMapper.java
浏览文件 @
1bed98b9
package
com
.
yaoyaozw
.
customer
.
mapper
;
import
com.baomidou.dynamic.datasource.annotation.DS
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yaoyaozw.customer.entity.ReferralEntity
;
import
org.apache.ibatis.annotations.Mapper
;
...
...
@@ -11,6 +12,7 @@ import org.apache.ibatis.annotations.Param;
* @date 2022/10/08
*/
@Mapper
@DS
(
"material"
)
public
interface
ReferralEntityMapper
extends
BaseMapper
<
ReferralEntity
>
{
/**
...
...
src/main/java/com/yaoyaozw/customer/mapper/RegisterUserEntityMapper.java
浏览文件 @
1bed98b9
...
...
@@ -29,11 +29,19 @@ public interface RegisterUserEntityMapper extends BaseMapper<RegisterUserEntity>
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
);
/**
* 得到当前包用户列表中
*
* @param packageId 包id
* @return {@link List}<{@link CrowdPackageUserVO}>
*/
List
<
CrowdPackageUserVO
>
getCurrentInPackUserList
(
@Param
(
"packageId"
)
Long
packageId
);
}
\ No newline at end of file
src/main/java/com/yaoyaozw/customer/service/CustomerGraphicsService.java
浏览文件 @
1bed98b9
package
com
.
yaoyaozw
.
customer
.
service
;
import
com.github.pagehelper.PageInfo
;
import
com.yaoyaozw.customer.common.BaseResult
;
import
com.yaoyaozw.customer.common.GenericsResult
;
import
com.yaoyaozw.customer.dto.customer.CustomerMessageQueryDTO
;
...
...
@@ -7,6 +8,7 @@ import com.yaoyaozw.customer.dto.customer.CustomerMessageSaveDTO;
import
com.yaoyaozw.customer.entity.CustomerGraphics
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yaoyaozw.customer.vo.customer.CustomerDelayListVO
;
import
com.yaoyaozw.customer.vo.customer.CustomerMessageDetailVO
;
import
com.yaoyaozw.customer.vo.customer.CustomerMessageListVO
;
import
java.util.List
;
...
...
@@ -32,10 +34,10 @@ public interface CustomerGraphicsService extends IService<CustomerGraphics> {
/**
* 更新客户信息
*
* @param
saveDto 保存dto
* @param
id 客服消息主键
* @return {@link BaseResult}
*/
BaseResult
updateCustomerMessage
(
CustomerMessageSaveDTO
saveDto
);
GenericsResult
<
CustomerMessageDetailVO
>
getCustomerMessageDetail
(
Long
id
);
/**
...
...
@@ -44,7 +46,7 @@ public interface CustomerGraphicsService extends IService<CustomerGraphics> {
* @param queryDto 查询dto
* @return {@link GenericsResult}<{@link List}<{@link CustomerDelayListVO}>>
*/
GenericsResult
<
List
<
CustomerMessageListVO
>>
pageList
(
CustomerMessageQueryDTO
queryDto
);
GenericsResult
<
PageInfo
<
CustomerMessageListVO
>>
pageList
(
CustomerMessageQueryDTO
queryDto
);
/**
* 删除客户信息
...
...
@@ -54,5 +56,13 @@ public interface CustomerGraphicsService extends IService<CustomerGraphics> {
*/
BaseResult
removeCustomerMessage
(
Long
id
);
/**
* 设置包
*
* @param id id
* @param packId 包id
* @return {@link BaseResult}
*/
BaseResult
setPack
(
Long
id
,
Long
packId
);
}
src/main/java/com/yaoyaozw/customer/service/CustomerServiceCommonService.java
浏览文件 @
1bed98b9
package
com
.
yaoyaozw
.
customer
.
service
;
import
com.yaoyaozw.customer.common.GenericsResult
;
import
com.yaoyaozw.customer.vo.CommonOptionResponseVO
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
@@ -18,4 +20,10 @@ public interface CustomerServiceCommonService {
*/
List
<
Long
>
getSetupIdListFromStaticCondition
(
List
<
String
>
expressList
);
/**
* 获取存储列表
*
* @return {@link GenericsResult}<{@link CommonOptionResponseVO}>
*/
GenericsResult
<
List
<
CommonOptionResponseVO
>>
getStoreList
();
}
src/main/java/com/yaoyaozw/customer/service/RegisterUserEntityService.java
浏览文件 @
1bed98b9
...
...
@@ -24,13 +24,21 @@ public interface RegisterUserEntityService extends IService<RegisterUserEntity>{
List
<
CrowdPackageUserVO
>
getUserMatchDynamicExpress
(
List
<
String
>
dynamicExpressList
,
String
openId
);
/**
* 从包中获取
用户列表(现在已经在人群包内的)
* 从包中获取
公众号列表
*
* @param packageId 包id
* @return {@link List}<{@link RegisterUserEntity}>
*/
List
<
Long
>
getAccountIdListFromPackage
(
Long
packageId
);
/**
* 得到当前包用户列表中
*
* @param packageId 包id
* @return {@link List}<{@link CrowdPackageUserVO}>
*/
List
<
CrowdPackageUserVO
>
getCurrentInPackUserList
(
Long
packageId
);
}
src/main/java/com/yaoyaozw/customer/service/impl/CrowdPackageServiceImpl.java
浏览文件 @
1bed98b9
...
...
@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yaoyaozw.customer.common.BaseResult
;
import
com.yaoyaozw.customer.common.GenericsResult
;
import
com.yaoyaozw.customer.components.CustomerServiceCommonAsyncComponent
;
import
com.yaoyaozw.customer.components.SnowflakeComponent
;
import
com.yaoyaozw.customer.components.TokenManager
;
import
com.yaoyaozw.customer.constants.CrowdPackageCommonConstant
;
...
...
@@ -63,6 +64,8 @@ public class CrowdPackageServiceImpl extends ServiceImpl<MaterialCrowdPackageMap
private
RegisterUserEntityMapper
userEntityMapper
;
@Autowired
private
RedisTemplate
redisTemplate
;
@Autowired
private
CustomerServiceCommonAsyncComponent
asyncComponent
;
@Override
...
...
@@ -86,6 +89,9 @@ public class CrowdPackageServiceImpl extends ServiceImpl<MaterialCrowdPackageMap
boolean
result
=
super
.
saveOrUpdate
(
crowdPackage
);
// TODO: 2022/9/26 添加人群包人群的更新
if
(
result
&&
ObjectUtil
.
isNotNull
(
name
))
{
asyncComponent
.
addMatchUserIntoPackage
(
id
,
true
);
}
return
result
?
new
GenericsResult
<>(
new
CrowdPackageCommonIdVO
(
crowdPackage
.
getId
(),
null
))
:
new
GenericsResult
<>(
false
,
"新增人群包失败!"
);
}
...
...
@@ -232,10 +238,10 @@ public class CrowdPackageServiceImpl extends ServiceImpl<MaterialCrowdPackageMap
@Override
public
BaseResult
updateUserPackageBatch
(
List
<
String
>
openIdList
)
{
List
<
CrowdPackage
>
packageList
=
super
.
list
();
return
n
ull
;
for
(
String
openId
:
openIdList
)
{
this
.
updateUserPackageBelong
(
openId
);
}
return
n
ew
BaseResult
().
success
()
;
}
/**
...
...
src/main/java/com/yaoyaozw/customer/service/impl/CustomerGraphicsServiceImpl.java
浏览文件 @
1bed98b9
package
com
.
yaoyaozw
.
customer
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.yaoyaozw.customer.common.BaseResult
;
import
com.yaoyaozw.customer.common.GenericsResult
;
import
com.yaoyaozw.customer.components.CustomerServiceCommonAsyncComponent
;
import
com.yaoyaozw.customer.components.SnowflakeComponent
;
import
com.yaoyaozw.customer.components.TokenManager
;
import
com.yaoyaozw.customer.constants.CrowdPackageCommonConstant
;
import
com.yaoyaozw.customer.constants.CustomerCommonConstant
;
import
com.yaoyaozw.customer.dto.customer.CustomerMessageQueryDTO
;
import
com.yaoyaozw.customer.dto.customer.CustomerMessageSaveDTO
;
import
com.yaoyaozw.customer.dto.customer.CustomerReferralDTO
;
import
com.yaoyaozw.customer.entity.CrowdPackageCondition
;
import
com.yaoyaozw.customer.entity.CrowdPackageConditionMatch
;
import
com.yaoyaozw.customer.entity.ReferralEntity
;
import
com.yaoyaozw.customer.mapper.KanbanCommonMapper
;
import
com.yaoyaozw.customer.service.CrowdPackageConditionMatchService
;
import
com.yaoyaozw.customer.service.CrowdPackageConditionService
;
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.CustomerMessageDetailVO
;
import
com.yaoyaozw.customer.vo.customer.CustomerMessageListVO
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
import
java.util.List
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yaoyaozw.customer.entity.CustomerGraphics
;
import
com.yaoyaozw.customer.mapper.CustomerGraphicsMapper
;
import
com.yaoyaozw.customer.service.CustomerGraphicsService
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
/**
* 客户图形服务impl
...
...
@@ -46,6 +57,12 @@ public class CustomerGraphicsServiceImpl extends ServiceImpl<CustomerGraphicsMap
private
CustomerServiceCommonAsyncComponent
commonAsyncComponent
;
@Autowired
private
ReferralEntityService
referralEntityService
;
@Autowired
private
CrowdPackageConditionService
conditionService
;
@Autowired
private
SnowflakeComponent
snowflakeComponent
;
@Autowired
private
KanbanCommonMapper
kanbanCommonMapper
;
@Override
public
BaseResult
insertCustomerMessage
(
CustomerMessageSaveDTO
saveDto
)
{
...
...
@@ -54,34 +71,133 @@ public class CustomerGraphicsServiceImpl extends ServiceImpl<CustomerGraphicsMap
LOCAL_LOG
.
info
(
"处理主体数据"
);
CustomerGraphics
customerGraphics
=
new
CustomerGraphics
();
BeanUtil
.
copyProperties
(
saveDto
,
customerGraphics
);
customerGraphics
.
initOperateInfo
(
tokenManager
.
getUserIdFromToken
(),
true
);
super
.
save
(
customerGraphics
);
customerGraphics
.
initOperateInfo
(
tokenManager
.
getUserIdFromToken
(),
ObjectUtil
.
isNull
(
saveDto
.
getId
()));
if
(
ObjectUtil
.
isNull
(
customerGraphics
.
getId
()))
{
long
id
=
snowflakeComponent
.
snowflakeId
();
customerGraphics
.
setId
(
id
);
}
super
.
saveOrUpdate
(
customerGraphics
);
// 处理活动数据
ReferralEntity
referralEntity
=
new
ReferralEntity
();
BeanUtil
.
copyProperties
(
saveDto
.
getCustomerReferralDto
(),
referralEntity
);
referralEntity
.
setMaterialGraphicsId
(
customerGraphics
.
getId
());
referralEntityService
.
save
(
referralEntity
);
// 保存链接数据
referralEntityService
.
saveOrUpdate
(
referralEntity
);
return
new
BaseResult
().
success
();
}
@Override
public
BaseResult
updateCustomerMessage
(
CustomerMessageSaveDTO
saveDto
)
{
return
null
;
public
GenericsResult
<
CustomerMessageDetailVO
>
getCustomerMessageDetail
(
Long
id
)
{
// 获取主体数据
CustomerGraphics
customerGraphics
=
super
.
getById
(
id
);
if
(
ObjectUtil
.
isNull
(
customerGraphics
))
{
return
new
GenericsResult
<>(
false
,
"找不到主体数据"
);
}
CustomerMessageDetailVO
customerMessageDetailVO
=
new
CustomerMessageDetailVO
();
BeanUtil
.
copyProperties
(
customerGraphics
,
customerMessageDetailVO
);
// 获取链接数据
ReferralEntity
referralEntity
=
referralEntityService
.
getOne
(
new
QueryWrapper
<
ReferralEntity
>().
eq
(
"material_graphics_id"
,
id
).
isNull
(
"account_id"
));
CustomerReferralDTO
customerReferralDto
=
new
CustomerReferralDTO
();
if
(
ObjectUtil
.
isNull
(
referralEntity
))
{
return
new
GenericsResult
<>(
false
,
"找不到链接数据"
);
}
BeanUtil
.
copyProperties
(
referralEntity
,
customerReferralDto
);
customerMessageDetailVO
.
setCustomerReferralDto
(
customerReferralDto
);
return
new
GenericsResult
<>(
customerMessageDetailVO
);
}
@Override
public
GenericsResult
<
List
<
CustomerMessageListVO
>>
pageList
(
CustomerMessageQueryDTO
queryDto
)
{
return
null
;
public
GenericsResult
<
PageInfo
<
CustomerMessageListVO
>>
pageList
(
CustomerMessageQueryDTO
queryDto
)
{
PageHelper
.
startPage
(
queryDto
.
getCurrentPage
(),
queryDto
.
getPageSize
());
List
<
CustomerMessageListVO
>
list
=
baseMapper
.
pageList
(
queryDto
);
PageInfo
<
CustomerMessageListVO
>
pageList
=
new
PageInfo
<>(
list
);
return
new
GenericsResult
<>(
pageList
);
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseResult
removeCustomerMessage
(
Long
id
)
{
return
null
;
boolean
result
=
super
.
removeById
(
id
);
boolean
referralResult
=
referralEntityService
.
remove
(
new
QueryWrapper
<
ReferralEntity
>().
eq
(
"material_graphics_id"
,
id
));
if
(
result
&&
referralResult
)
{
// 删除成功
return
new
BaseResult
().
success
();
}
LOCAL_LOG
.
info
(
"主体删除结果: {}, 链接删除结果: {}, 删除失败,回滚事务"
,
result
,
referralResult
);
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
return
new
BaseResult
().
error
(
"删除异常"
);
}
@Override
public
BaseResult
setPack
(
Long
id
,
Long
packId
)
{
CustomerGraphics
byId
=
super
.
getById
(
id
);
if
(
ObjectUtil
.
isNull
(
byId
))
{
return
new
BaseResult
().
error
(
"无法获取主体数据"
);
}
byId
.
setPackId
(
packId
);
ReferralEntity
referralEntity
=
referralEntityService
.
getOne
(
new
QueryWrapper
<
ReferralEntity
>().
eq
(
"material_graphics_id"
,
id
).
isNull
(
"account_id"
));
LOCAL_LOG
.
info
(
"获取书城条件主体"
);
CrowdPackageCondition
storeCondition
=
conditionService
.
getOne
(
new
QueryWrapper
<
CrowdPackageCondition
>().
eq
(
"condition_key"
,
CrowdPackageCommonConstant
.
CONDITION_STORE_ID
).
eq
(
"front_type"
,
CrowdPackageCommonConstant
.
MULTIPLE_SELECT
)
);
// TODO: 2022/10/8 校验人群包设置条件
LOCAL_LOG
.
info
(
"获取人群包下的书城条件"
);
CrowdPackageConditionMatch
storeConditionMatch
=
matchService
.
getOne
(
new
QueryWrapper
<
CrowdPackageConditionMatch
>().
eq
(
"package_id"
,
packId
).
eq
(
"condition_id"
,
storeCondition
.
getId
())
);
Integer
newsType
=
referralEntity
.
getNewsType
();
if
(
CustomerCommonConstant
.
BOOK_NEWS_TYPE
.
equals
(
newsType
))
{
// 是推广链接
BaseResult
checkResult
=
this
.
checkExtendBook
(
referralEntity
.
getStoreType
(),
storeConditionMatch
);
if
(!
checkResult
.
getSuccess
())
{
return
checkResult
;
}
}
// TODO: 2022/10/8 根据人群包条件获取用户公众号,生成链接
byId
.
setPackId
(
packId
);
boolean
result
=
super
.
updateById
(
byId
);
if
(
result
)
{
return
new
BaseResult
().
success
();
}
return
new
BaseResult
().
error
(
"更新失败"
);
}
private
BaseResult
checkExtendBook
(
String
storeType
,
CrowdPackageConditionMatch
storeConditionMatch
)
{
// 判断有没有选书城条件
if
(
ObjectUtil
.
isNull
(
storeConditionMatch
))
{
// 没有的话不符合条件,返回
return
new
BaseResult
().
error
(
"所选人群包未设置书城条件"
);
}
String
operatorExpression
=
storeConditionMatch
.
getOperatorExpression
();
// 判断选了几个书城,如果超过1个,则不符合条件
if
(
operatorExpression
.
contains
(
CrowdPackageCommonConstant
.
COMMA_SEPARATOR
))
{
// 只要表达式包含了逗号,就说明选了不止一个书城条件
return
new
BaseResult
().
error
(
"所选人群包设置的书城条件超过1个"
);
}
// 确定只选了一个书城,判断设置的书是不是这个书城里的
LOCAL_LOG
.
info
(
"原始书城条件表达式: {}"
,
operatorExpression
);
operatorExpression
=
"where "
+
operatorExpression
.
replace
(
CrowdPackageCommonConstant
.
CONDITION_STORE_ID
,
"id"
);
LOCAL_LOG
.
info
(
"新的书城条件表达式: {}"
,
operatorExpression
);
String
storeTypeByExpression
=
kanbanCommonMapper
.
getStoreTypeByExpression
(
operatorExpression
);
LOCAL_LOG
.
info
(
"表达式获取到的书城: {}"
,
storeTypeByExpression
);
if
(
storeType
.
equals
(
storeTypeByExpression
))
{
return
new
BaseResult
().
success
();
}
return
new
BaseResult
().
error
(
"所选书籍不属于人群包指定书城"
);
}
}
src/main/java/com/yaoyaozw/customer/service/impl/CustomerServiceCommonServiceImpl.java
浏览文件 @
1bed98b9
package
com
.
yaoyaozw
.
customer
.
service
.
impl
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.yaoyaozw.customer.common.GenericsResult
;
import
com.yaoyaozw.customer.mapper.KanbanCommonMapper
;
import
com.yaoyaozw.customer.mapper.MaterialCommonMapper
;
import
com.yaoyaozw.customer.service.CustomerServiceCommonService
;
import
com.yaoyaozw.customer.vo.CommonOptionResponseVO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -18,6 +21,8 @@ public class CustomerServiceCommonServiceImpl implements CustomerServiceCommonSe
@Autowired
private
KanbanCommonMapper
kanbanCommonMapper
;
@Autowired
private
MaterialCommonMapper
materialCommonMapper
;
@Override
public
List
<
Long
>
getSetupIdListFromStaticCondition
(
List
<
String
>
expressList
)
{
...
...
@@ -26,4 +31,10 @@ public class CustomerServiceCommonServiceImpl implements CustomerServiceCommonSe
}
return
kanbanCommonMapper
.
getSetupIdListFromStaticCondition
(
expressList
);
}
@Override
public
GenericsResult
<
List
<
CommonOptionResponseVO
>>
getStoreList
()
{
List
<
CommonOptionResponseVO
>
storeList
=
materialCommonMapper
.
getStoreList
();
return
new
GenericsResult
<>(
storeList
);
}
}
src/main/java/com/yaoyaozw/customer/service/impl/RegisterUserEntityServiceImpl.java
浏览文件 @
1bed98b9
...
...
@@ -58,4 +58,9 @@ public class RegisterUserEntityServiceImpl extends ServiceImpl<RegisterUserEntit
public
List
<
Long
>
getAccountIdListFromPackage
(
Long
packageId
)
{
return
baseMapper
.
getAuthListFromPackage
(
packageId
);
}
@Override
public
List
<
CrowdPackageUserVO
>
getCurrentInPackUserList
(
Long
packageId
)
{
return
baseMapper
.
getCurrentInPackUserList
(
packageId
);
}
}
src/main/java/com/yaoyaozw/customer/vo/AuthInfoVO.java
0 → 100644
浏览文件 @
1bed98b9
package
com
.
yaoyaozw
.
customer
.
vo
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @author darker
* @date 2022/10/9 19:42
*/
@Data
public
class
AuthInfoVO
implements
Serializable
{
private
Long
id
;
private
String
accountId
;
private
String
accountName
;
private
String
storeType
;
private
String
storeTypeName
;
}
src/main/java/com/yaoyaozw/customer/vo/crowd/CrowdPackageConditionVO.java
浏览文件 @
1bed98b9
...
...
@@ -23,7 +23,7 @@ public class CrowdPackageConditionVO implements Serializable {
private
Long
id
;
@ApiModelProperty
(
"条件key"
)
private
String
C
onditionKey
;
private
String
c
onditionKey
;
@ApiModelProperty
(
"条件名称"
)
private
String
conditionName
;
...
...
@@ -37,4 +37,7 @@ public class CrowdPackageConditionVO implements Serializable {
@ApiModelProperty
(
"是否静态属性 0 - 否;1 - 是"
)
private
Integer
isStatic
;
@ApiModelProperty
(
"条件服务 为空不调接口"
)
private
String
sourceBaseService
;
}
src/main/java/com/yaoyaozw/customer/vo/customer/CrowdPackageUserVO.java
浏览文件 @
1bed98b9
...
...
@@ -17,10 +17,14 @@ public class CrowdPackageUserVO implements Serializable {
private
String
accountId
;
private
String
appId
;
private
String
openId
;
private
Long
setupId
;
private
String
inPackage
;
private
String
storeType
;
}
src/main/java/com/yaoyaozw/customer/vo/customer/CustomerMessageDetailVO.java
0 → 100644
浏览文件 @
1bed98b9
package
com
.
yaoyaozw
.
customer
.
vo
.
customer
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
com.fasterxml.jackson.databind.ser.std.ToStringSerializer
;
import
com.yaoyaozw.customer.dto.customer.CustomerReferralDTO
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @author darker
* @date 2022/10/8 17:13
*/
@Data
public
class
CustomerMessageDetailVO
implements
Serializable
{
@ApiModelProperty
(
"客服消息id"
)
@JsonSerialize
(
using
=
ToStringSerializer
.
class
)
private
Long
id
;
@ApiModelProperty
(
"标题"
)
private
String
name
;
@ApiModelProperty
(
"消息发送时间"
)
private
String
postTime
;
@ApiModelProperty
(
"是否支付 0-否 1-是"
)
private
Integer
isPay
;
@ApiModelProperty
(
"客服消息类型(图文、文本)"
)
private
String
type
;
@ApiModelProperty
(
"素材文本内容"
)
private
String
extendTitle
;
@ApiModelProperty
(
"素材图片路径"
)
private
String
coverUrl
;
@ApiModelProperty
(
"素材文本内容"
)
private
String
content
;
@ApiModelProperty
(
"链接相关内容"
)
private
CustomerReferralDTO
customerReferralDto
;
}
src/main/java/com/yaoyaozw/customer/vo/customer/CustomerMessageListVO.java
浏览文件 @
1bed98b9
package
com
.
yaoyaozw
.
customer
.
vo
.
customer
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
com.fasterxml.jackson.databind.ser.std.ToStringSerializer
;
import
com.yaoyaozw.customer.constants.CustomerCommonConstant
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -14,10 +17,11 @@ public class CustomerMessageListVO implements Serializable {
private
static
final
long
serialVersionUID
=
-
8057791504394044052L
;
@ApiModelProperty
(
"客服消息id"
)
@JsonSerialize
(
using
=
ToStringSerializer
.
class
)
private
Long
id
;
@ApiModelProperty
(
"标题"
)
private
String
titl
e
;
private
String
nam
e
;
@ApiModelProperty
(
"消息发送时间"
)
private
String
postTime
;
...
...
@@ -28,9 +32,6 @@ public class CustomerMessageListVO implements Serializable {
@ApiModelProperty
(
"推广标题"
)
private
String
extendTitle
;
@ApiModelProperty
(
"推广类型"
)
private
String
extendType
;
@ApiModelProperty
(
"人群包id"
)
private
Long
packId
;
...
...
@@ -46,4 +47,7 @@ public class CustomerMessageListVO implements Serializable {
@ApiModelProperty
(
"发送状态描述"
)
private
String
sendStatusStr
;
public
String
getType
()
{
return
CustomerCommonConstant
.
getCustomerType
(
this
.
type
);
}
}
src/main/resources/mapper/CustomerGraphicsMapper.xml
浏览文件 @
1bed98b9
...
...
@@ -17,4 +17,32 @@
<!--@mbg.generated-->
id, pack_id, post_time, create_user, gmt_create, modified_user, gmt_modified, is_deleted
</sql>
<select
id=
"pageList"
resultType=
"com.yaoyaozw.customer.vo.customer.CustomerMessageListVO"
>
select
cg.id,
cg.name,
cg.type,
cg.post_time as postTime,
cg.extend_title as extendTitle,
cg.send_status as sendStatus,
dic.dic_value as sendStatusStr,
cpm.id as packId,
cpm.package_name as packName,
cpm.crowd_num as peopleNum
from customer_graphics cg
left join crowd_package_main cpm
on cpm.id = cg.pack_id
left join sys_dictionary dic
on dic.dic_key = cg.send_status
and dic.group_id = 'CUSTOMER_SEND_STATUS'
and dic.level = 3
where cg.is_deleted = 0
</select>
</mapper>
\ No newline at end of file
src/main/resources/mapper/KanbanCommonMapper.xml
浏览文件 @
1bed98b9
...
...
@@ -24,4 +24,13 @@
</foreach>
</where>
</select>
<select
id=
"getStoreTypeByExpression"
resultType=
"java.lang.String"
>
select
store_type
from store_entity
${expression}
limit 1
</select>
</mapper>
\ No newline at end of file
src/main/resources/mapper/MaterialCommonMapper.xml
0 → 100644
浏览文件 @
1bed98b9
<?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.MaterialCommonMapper"
>
<select
id=
"getStoreList"
resultType=
"com.yaoyaozw.customer.vo.CommonOptionResponseVO"
>
select
`value` as `key`,
explanation as `name`
from account_dictionary
where type = 'StoreType'
</select>
<select
id=
"getAuthInfoList"
resultType=
"com.yaoyaozw.customer.vo.AuthInfoVO"
>
select
ai.id, ai.account_id as accountId,
ai.nick_name as accountName,
ai.store_type as storeType,
se.store_name as storeTypeName
from authorizer_info ai
left join store_entity se
on ai.store_type = se.store_type
where ai.account_id in
<foreach
collection=
"accountSet"
item=
"accountId"
separator=
","
open=
"("
close=
")"
>
#{accountId}
</foreach>
</select>
</mapper>
\ No newline at end of file
src/main/resources/mapper/RegisterUserEntityMapper.xml
浏览文件 @
1bed98b9
...
...
@@ -27,7 +27,8 @@
ai.account_id as accountId,
rue.setup_id as setupId,
rue.open_id as openId,
rue.in_package as inPackage
rue.in_package as inPackage,
ai.store_type as storeType
from register_user_entity rue
...
...
@@ -64,4 +65,24 @@
on rue.app_id = ai.appid
where find_in_set(#{packageId}, in_package)
</select>
<select
id=
"getCurrentInPackUserList"
resultType=
"com.yaoyaozw.customer.vo.customer.CrowdPackageUserVO"
>
select
rue.id,
ai.account_id as accountId,
rue.setup_id as setupId,
rue.open_id as openId,
rue.in_package as inPackage,
ai.store_type as storeType,
rue.app_id as appId
from register_user_entity rue
left join authorizer_info ai
on rue.app_id = ai.appid
where find_in_set(#{packageId}, rue.in_package)
</select>
</mapper>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论