Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
O
operate-customer-service
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
沈振路
operate-customer-service
Commits
b835bc88
提交
b835bc88
authored
9月 28, 2022
作者:
沈振路
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
人群包列表标签列
上级
392d9e31
显示空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
100 行增加
和
2 行删除
+100
-2
CustomerServiceApplication.java
...ava/com/yaoyaozw/customer/CustomerServiceApplication.java
+2
-0
CustomerServiceCommonAsyncComponent.java
...tomer/components/CustomerServiceCommonAsyncComponent.java
+19
-0
ThreadConfig.java
...main/java/com/yaoyaozw/customer/configs/ThreadConfig.java
+45
-0
CustomerMessageSaveDTO.java
...aoyaozw/customer/dto/customer/CustomerMessageSaveDTO.java
+5
-0
CrowdPackageConditionMatch.java
.../yaoyaozw/customer/entity/CrowdPackageConditionMatch.java
+6
-0
CrowdPackageServiceImpl.java
...oyaozw/customer/service/impl/CrowdPackageServiceImpl.java
+2
-1
CustomerGraphicsServiceImpl.java
...zw/customer/service/impl/CustomerGraphicsServiceImpl.java
+4
-0
CrowdPackageListVO.java
...va/com/yaoyaozw/customer/vo/crowd/CrowdPackageListVO.java
+10
-0
MaterialCrowdPackageMapper.xml
src/main/resources/mapper/MaterialCrowdPackageMapper.xml
+7
-1
没有找到文件。
src/main/java/com/yaoyaozw/customer/CustomerServiceApplication.java
浏览文件 @
b835bc88
...
@@ -3,6 +3,7 @@ package com.yaoyaozw.customer;
...
@@ -3,6 +3,7 @@ package com.yaoyaozw.customer;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
/**
/**
...
@@ -12,6 +13,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
...
@@ -12,6 +13,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
@SpringBootApplication
@SpringBootApplication
@EnableScheduling
@EnableScheduling
@MapperScan
(
"com.yaoyaozw.customer.mapper"
)
@MapperScan
(
"com.yaoyaozw.customer.mapper"
)
@EnableAsync
public
class
CustomerServiceApplication
{
public
class
CustomerServiceApplication
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
CustomerServiceApplication
.
class
,
args
);
SpringApplication
.
run
(
CustomerServiceApplication
.
class
,
args
);
...
...
src/main/java/com/yaoyaozw/customer/components/CustomerServiceCommonAsyncComponent.java
0 → 100644
浏览文件 @
b835bc88
package
com
.
yaoyaozw
.
customer
.
components
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Component
;
/**
* @author darker
* @date 2022/9/28 15:16
*/
@Component
public
class
CustomerServiceCommonAsyncComponent
{
@Async
(
"myExecutor"
)
public
void
updateUserPackage
()
{
}
}
src/main/java/com/yaoyaozw/customer/configs/ThreadConfig.java
0 → 100644
浏览文件 @
b835bc88
package
com
.
yaoyaozw
.
customer
.
configs
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor
;
import
java.util.concurrent.ThreadPoolExecutor
;
/**
* @author darker
* @date 2022/8/2 15:01
*/
@Configuration
@EnableAsync
public
class
ThreadConfig
{
/** 核心线程数(默认线程数) */
private
static
final
int
CORE_POOL_SIZE
=
15
;
/** 最大线程数 */
private
static
final
int
MAX_POOL_SIZE
=
50
;
/** 允许线程空闲时间(单位:默认为秒) */
private
static
final
int
KEEP_ALIVE_TIME
=
60
;
/** 缓冲队列大小 */
private
static
final
int
QUEUE_CAPACITY
=
100
;
/** 线程池名前缀 */
private
static
final
String
THREAD_NAME_PREFIX
=
"Async-Service-"
;
@Bean
(
"myExecutor"
)
public
ThreadPoolTaskExecutor
myExecutor
()
{
ThreadPoolTaskExecutor
executor
=
new
ThreadPoolTaskExecutor
();
executor
.
setCorePoolSize
(
CORE_POOL_SIZE
);
executor
.
setMaxPoolSize
(
MAX_POOL_SIZE
);
executor
.
setQueueCapacity
(
QUEUE_CAPACITY
);
executor
.
setKeepAliveSeconds
(
KEEP_ALIVE_TIME
);
executor
.
setThreadNamePrefix
(
THREAD_NAME_PREFIX
);
// 线程池对拒绝任务的处理策略
// CallerRunsPolicy:由调用线程(提交任务的线程)处理该任务
executor
.
setRejectedExecutionHandler
(
new
ThreadPoolExecutor
.
CallerRunsPolicy
());
// 初始化
executor
.
initialize
();
return
executor
;
}
}
src/main/java/com/yaoyaozw/customer/dto/customer/CustomerMessageSaveDTO.java
浏览文件 @
b835bc88
...
@@ -15,10 +15,15 @@ import java.io.Serializable;
...
@@ -15,10 +15,15 @@ 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"
)
private
Long
packageId
;
@ApiModelProperty
(
"客服消息名称"
)
@ApiModelProperty
(
"客服消息名称"
)
private
String
messageName
;
private
String
messageName
;
@ApiModelProperty
(
"消息发送时间"
)
private
String
postTime
;
@ApiModelProperty
(
"客服消息类型(图文、文本)"
)
@ApiModelProperty
(
"客服消息类型(图文、文本)"
)
private
Integer
messageType
;
private
Integer
messageType
;
...
...
src/main/java/com/yaoyaozw/customer/entity/CrowdPackageConditionMatch.java
浏览文件 @
b835bc88
...
@@ -58,6 +58,12 @@ public class CrowdPackageConditionMatch implements Serializable {
...
@@ -58,6 +58,12 @@ public class CrowdPackageConditionMatch implements Serializable {
@TableField
(
"operator_description"
)
@TableField
(
"operator_description"
)
private
String
operatorDescription
;
private
String
operatorDescription
;
/**
* 是否是静态条件
*/
@TableField
(
"is_static"
)
private
Integer
isStatic
;
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
}
}
src/main/java/com/yaoyaozw/customer/service/impl/CrowdPackageServiceImpl.java
浏览文件 @
b835bc88
...
@@ -198,6 +198,7 @@ public class CrowdPackageServiceImpl extends ServiceImpl<MaterialCrowdPackageMap
...
@@ -198,6 +198,7 @@ public class CrowdPackageServiceImpl extends ServiceImpl<MaterialCrowdPackageMap
if
(
ObjectUtil
.
isNull
(
conditionInfo
))
{
if
(
ObjectUtil
.
isNull
(
conditionInfo
))
{
throw
new
RuntimeException
(
"无法获取条件"
);
throw
new
RuntimeException
(
"无法获取条件"
);
}
}
match
.
setIsStatic
(
conditionInfo
.
getIsStatic
());
String
conditionType
=
conditionInfo
.
getConditionType
();
String
conditionType
=
conditionInfo
.
getConditionType
();
LOCAL_LOG
.
info
(
"当前条件类型: {}"
,
conditionType
);
LOCAL_LOG
.
info
(
"当前条件类型: {}"
,
conditionType
);
// 是需要比较的类型, 获取对应的比较符号的数据
// 是需要比较的类型, 获取对应的比较符号的数据
...
@@ -290,7 +291,7 @@ public class CrowdPackageServiceImpl extends ServiceImpl<MaterialCrowdPackageMap
...
@@ -290,7 +291,7 @@ public class CrowdPackageServiceImpl extends ServiceImpl<MaterialCrowdPackageMap
if
(
ObjectUtil
.
isNull
(
responseVo
)
||
CollectionUtil
.
isEmpty
(
responseVo
.
getOptionList
()))
{
if
(
ObjectUtil
.
isNull
(
responseVo
)
||
CollectionUtil
.
isEmpty
(
responseVo
.
getOptionList
()))
{
throw
new
RuntimeException
(
"找不到条件的选项"
);
throw
new
RuntimeException
(
"找不到条件的选项"
);
}
}
StringBuilder
descriptionBuilder
=
new
StringBuilder
(
conditionInfo
.
getConditionName
()
+
"
范围
: "
);
StringBuilder
descriptionBuilder
=
new
StringBuilder
(
conditionInfo
.
getConditionName
()
+
": "
);
for
(
CommonOptionResponseVO
commonOptionResponseVo
:
responseVo
.
getOptionList
())
{
for
(
CommonOptionResponseVO
commonOptionResponseVo
:
responseVo
.
getOptionList
())
{
// 如果选中了这个选项,则拼接其name
// 如果选中了这个选项,则拼接其name
if
(
multipleOptions
.
contains
(
commonOptionResponseVo
.
getKey
()))
{
if
(
multipleOptions
.
contains
(
commonOptionResponseVo
.
getKey
()))
{
...
...
src/main/java/com/yaoyaozw/customer/service/impl/CustomerGraphicsServiceImpl.java
浏览文件 @
b835bc88
...
@@ -23,6 +23,10 @@ public class CustomerGraphicsServiceImpl extends ServiceImpl<CustomerGraphicsMap
...
@@ -23,6 +23,10 @@ public class CustomerGraphicsServiceImpl extends ServiceImpl<CustomerGraphicsMap
@Override
@Override
public
BaseResult
insertCustomerMessage
(
CustomerMessageSaveDTO
saveDto
)
{
public
BaseResult
insertCustomerMessage
(
CustomerMessageSaveDTO
saveDto
)
{
// TODO: 2022/9/28 根据人群包找到下面的人所在的公众号,进行链接获取
return
null
;
return
null
;
}
}
...
...
src/main/java/com/yaoyaozw/customer/vo/crowd/CrowdPackageListVO.java
浏览文件 @
b835bc88
package
com
.
yaoyaozw
.
customer
.
vo
.
crowd
;
package
com
.
yaoyaozw
.
customer
.
vo
.
crowd
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
com.fasterxml.jackson.databind.ser.std.ToStringSerializer
;
import
com.fasterxml.jackson.databind.ser.std.ToStringSerializer
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
...
@@ -23,6 +24,9 @@ public class CrowdPackageListVO implements Serializable {
...
@@ -23,6 +24,9 @@ public class CrowdPackageListVO implements Serializable {
@ApiModelProperty
(
"人群包名称"
)
@ApiModelProperty
(
"人群包名称"
)
private
String
packageName
;
private
String
packageName
;
@ApiModelProperty
(
"人群包标签"
)
private
String
packageLabel
;
@ApiModelProperty
(
"人群包中的人数"
)
@ApiModelProperty
(
"人群包中的人数"
)
private
Integer
numOfCrowdInPackage
;
private
Integer
numOfCrowdInPackage
;
...
@@ -41,4 +45,10 @@ public class CrowdPackageListVO implements Serializable {
...
@@ -41,4 +45,10 @@ public class CrowdPackageListVO implements Serializable {
@ApiModelProperty
(
"修改人"
)
@ApiModelProperty
(
"修改人"
)
private
String
modifiedUser
;
private
String
modifiedUser
;
public
String
getPackageLabel
()
{
if
(
ObjectUtil
.
isNull
(
this
.
packageLabel
))
{
return
null
;
}
return
packageLabel
.
replaceAll
(
","
,
"<br/>"
);
}
}
}
src/main/resources/mapper/MaterialCrowdPackageMapper.xml
浏览文件 @
b835bc88
...
@@ -20,7 +20,8 @@
...
@@ -20,7 +20,8 @@
cpm.id, cpm.package_name as packageName,
cpm.id, cpm.package_name as packageName,
cpm.crowd_num as numOfCrowdInPackage, cpm.last_count_time as lastCountTime,
cpm.crowd_num as numOfCrowdInPackage, cpm.last_count_time as lastCountTime,
cpm.create_time as createTime, cpm.modified_time as modifiedTime,
cpm.create_time as createTime, cpm.modified_time as modifiedTime,
cau.nick_name as createUser, mau.nick_name as modifiedUser
cau.nick_name as createUser, mau.nick_name as modifiedUser,
group_concat(concat('【', mat.operator_description, '】')) as packageLabel
from crowd_package_main cpm
from crowd_package_main cpm
left join acl_user cau
left join acl_user cau
...
@@ -29,8 +30,13 @@
...
@@ -29,8 +30,13 @@
left join acl_user mau
left join acl_user mau
on cpm.modified_user = mau.id
on cpm.modified_user = mau.id
left join crowd_package_condition_match mat
on cpm.id = mat.package_id
where cpm.package_name is not null
where cpm.package_name is not null
group by cpm.id
</select>
</select>
<delete
id=
"removeCondition"
>
<delete
id=
"removeCondition"
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论