Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
O
operate-customer-service
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
沈振路
operate-customer-service
Commits
d4df957e
提交
d4df957e
authored
11月 03, 2022
作者:
沈振路
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'customer_service_SZlu'
上级
d8b1645f
8ca04e2d
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
31 行增加
和
10 行删除
+31
-10
CustomerDelayGraphicsController.java
.../customer/controller/CustomerDelayGraphicsController.java
+5
-2
CrowdPackage.java
src/main/java/com/yaoyaozw/customer/entity/CrowdPackage.java
+4
-2
CustomerGraphicsDelayService.java
...oyaozw/customer/service/CustomerGraphicsDelayService.java
+3
-1
CrowdPackageConditionMatchServiceImpl.java
...r/service/impl/CrowdPackageConditionMatchServiceImpl.java
+5
-3
CustomerGraphicsDelayServiceImpl.java
...stomer/service/impl/CustomerGraphicsDelayServiceImpl.java
+14
-2
没有找到文件。
src/main/java/com/yaoyaozw/customer/controller/CustomerDelayGraphicsController.java
浏览文件 @
d4df957e
...
...
@@ -68,8 +68,11 @@ public class CustomerDelayGraphicsController {
@ApiOperation
(
"复用"
)
@PostMapping
(
"/copy"
)
public
BaseResult
copy
(
@RequestParam
String
appId
,
@RequestBody
List
<
String
>
targetAppList
)
{
return
customerGraphicsDelayService
.
copy
(
appId
,
targetAppList
);
public
BaseResult
copy
(
@RequestParam
String
appId
,
@RequestParam
(
required
=
false
)
String
bookId
,
@RequestParam
(
required
=
false
)
String
bookName
,
@RequestBody
List
<
String
>
targetAppList
)
{
return
customerGraphicsDelayService
.
copy
(
appId
,
bookId
,
bookName
,
targetAppList
);
}
@ApiOperation
(
"所有公众号"
)
...
...
src/main/java/com/yaoyaozw/customer/entity/CrowdPackage.java
浏览文件 @
d4df957e
...
...
@@ -89,10 +89,12 @@ public class CrowdPackage implements Serializable {
this
.
id
=
id
;
this
.
packageName
=
packageName
;
if
(
ObjectUtil
.
isNotNull
(
activeTimeMin
))
{
this
.
activeTimeMin
=
activeTimeMin
.
longValue
()
*
CrowdPackageCommonConstant
.
HOUR_TO_MILLION_RATE
;
Double
v
=
activeTimeMin
*
CrowdPackageCommonConstant
.
HOUR_TO_MILLION_RATE
;
this
.
activeTimeMin
=
v
.
longValue
();
}
if
(
ObjectUtil
.
isNotNull
(
activeTimeMax
))
{
this
.
activeTimeMax
=
activeTimeMax
.
longValue
()
*
CrowdPackageCommonConstant
.
HOUR_TO_MILLION_RATE
;
Double
v
=
(
activeTimeMax
*
CrowdPackageCommonConstant
.
HOUR_TO_MILLION_RATE
);
this
.
activeTimeMax
=
v
.
longValue
();
}
}
...
...
src/main/java/com/yaoyaozw/customer/service/CustomerGraphicsDelayService.java
浏览文件 @
d4df957e
...
...
@@ -88,10 +88,12 @@ public interface CustomerGraphicsDelayService extends IService<CustomerGraphicsD
* 复制
*
* @param appId 应用程序id
* @param bookId 选择目标书
* @param bookName 书名
* @param targetAppList 目标应用程序列表
* @return {@link BaseResult}
*/
BaseResult
copy
(
String
appId
,
List
<
String
>
targetAppList
);
BaseResult
copy
(
String
appId
,
String
bookId
,
String
bookName
,
List
<
String
>
targetAppList
);
/**
* 获得认证列表
...
...
src/main/java/com/yaoyaozw/customer/service/impl/CrowdPackageConditionMatchServiceImpl.java
浏览文件 @
d4df957e
...
...
@@ -53,6 +53,9 @@ public class CrowdPackageConditionMatchServiceImpl extends ServiceImpl<MaterialC
List
<
Long
>
setupIdList
=
commonService
.
getSetupIdListFromStaticCondition
(
staticConditionList
);
long
getSetupIdTime
=
System
.
currentTimeMillis
();
LOCAL_LOG
.
info
(
"获取SetupId列表耗时 {}ms, setupId列表长度: {}"
,
getSetupIdTime
-
getConditionTime
,
setupIdList
.
size
());
if
(
CollectionUtil
.
isEmpty
(
setupIdList
))
{
return
new
ArrayList
<>();
}
// 根据动态条件获取用户列表
List
<
CrowdPackageUserVO
>
userList
=
userEntityService
.
getUserMatchDynamicExpress
(
nonStaticConditionList
,
openId
);
...
...
@@ -60,9 +63,8 @@ public class CrowdPackageConditionMatchServiceImpl extends ServiceImpl<MaterialC
LOCAL_LOG
.
info
(
"获取SetupId列表符合动态条件的用户耗时 {}ms, 符合动态条件的用户: {}个"
,
dynamicUserTime
-
getSetupIdTime
,
userList
.
size
());
// 筛选所属setupId在列表中的用户
if
(
CollectionUtil
.
isNotEmpty
(
setupIdList
))
{
userList
=
userList
.
stream
().
filter
(
item
->
setupIdList
.
contains
(
item
.
getSetupId
())).
collect
(
Collectors
.
toList
());
}
userList
=
userList
.
stream
().
filter
(
item
->
setupIdList
.
contains
(
item
.
getSetupId
())).
collect
(
Collectors
.
toList
());
long
allUserTime
=
System
.
currentTimeMillis
();
LOCAL_LOG
.
info
(
"获取符合全部条件的用户耗时: {}ms, 符合全部条件的用户: {}个"
,
allUserTime
-
dynamicUserTime
,
userList
.
size
());
...
...
src/main/java/com/yaoyaozw/customer/service/impl/CustomerGraphicsDelayServiceImpl.java
浏览文件 @
d4df957e
...
...
@@ -31,6 +31,7 @@ import com.yaoyaozw.customer.vo.kanban.CommonOptionResponseVO;
import
com.yaoyaozw.customer.vo.customer.CustomerDelayGraphicsDetailVO
;
import
com.yaoyaozw.customer.vo.customer.CustomerDelayItemVO
;
import
com.yaoyaozw.customer.vo.customer.CustomerDelayListVO
;
import
jodd.util.StringUtil
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -43,6 +44,7 @@ import java.text.SimpleDateFormat;
import
java.util.*
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
/**
* @author darker
...
...
@@ -236,7 +238,7 @@ public class CustomerGraphicsDelayServiceImpl extends ServiceImpl<CustomerGraphi
}
@Override
public
BaseResult
copy
(
String
appId
,
List
<
String
>
targetAppList
)
{
public
BaseResult
copy
(
String
appId
,
String
bookId
,
String
bookName
,
List
<
String
>
targetAppList
)
{
List
<
AuthorizerInfo
>
authorizerInfoList
=
authorizerInfoService
.
list
();
Map
<
String
,
AuthorizerInfo
>
authMap
=
authorizerInfoList
.
stream
().
collect
(
Collectors
.
toMap
(
AuthorizerInfo:
:
getAppid
,
Function
.
identity
()));
...
...
@@ -252,7 +254,17 @@ public class CustomerGraphicsDelayServiceImpl extends ServiceImpl<CustomerGraphi
List
<
Long
>
sourceMainIdList
=
sourceCustomerList
.
stream
().
map
(
CustomerGraphicsDelay:
:
getId
).
collect
(
Collectors
.
toList
());
// 获取原始链接素材 图文只有一条、文本有多条
List
<
ReferralEntity
>
referralEntityList
=
referralEntityService
.
list
(
new
QueryWrapper
<
ReferralEntity
>().
in
(
"material_graphics_id"
,
sourceMainIdList
).
orderByAsc
(
"gmt_create"
).
orderByAsc
(
"sort"
));
Map
<
Long
,
List
<
ReferralEntity
>>
referralGroupMap
=
referralEntityList
.
stream
().
collect
(
Collectors
.
groupingBy
(
ReferralEntity:
:
getMaterialGraphicsId
));
// 分组链接,如果复用时选择了书,则需要为原本的所有书进行重新赋值
Stream
<
ReferralEntity
>
stream
=
referralEntityList
.
stream
();
if
(
StringUtil
.
isNotBlank
(
bookId
))
{
stream
=
stream
.
peek
(
item
->
{
if
(
StringUtil
.
isNotBlank
(
item
.
getBookId
()))
{
item
.
setBookId
(
bookId
);
item
.
setBookName
(
bookName
);
}
});
}
Map
<
Long
,
List
<
ReferralEntity
>>
referralGroupMap
=
stream
.
collect
(
Collectors
.
groupingBy
(
ReferralEntity:
:
getMaterialGraphicsId
));
// 遍历处理
HashSet
<
String
>
storeTypeKeySet
=
CollectionUtil
.
newHashSet
(
sourceAuthInfo
.
getStoreType
());
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论