Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haoban3.0
haoban-manage3.0
Commits
f9cd43d2
Commit
f9cd43d2
authored
May 18, 2023
by
zhangzhendong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-消息中心' into 'master'
Feature 消息中心 See merge request
!1254
parents
5ac591a6
068d4d90
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
802 additions
and
76 deletions
+802
-76
NoticeMessageQDTO.java
...com/gic/haoban/manage/api/dto/qdto/NoticeMessageQDTO.java
+350
-0
NoticeMessageTypeEnum.java
...om/gic/haoban/manage/api/enums/NoticeMessageTypeEnum.java
+84
-50
NoticeMessageApiService.java
...an/manage/api/service/notify/NoticeMessageApiService.java
+10
-0
pom.xml
haoban-manage3-service/pom.xml
+6
-0
MaterialReportContext.java
...ervice/pojo/bo/content/context/MaterialReportContext.java
+12
-4
MaterialReportBuilder.java
...ervice/service/content/adaptor/MaterialReportBuilder.java
+5
-1
PotentialCustomerNotifyBuilder.java
...rvice/content/adaptor/PotentialCustomerNotifyBuilder.java
+29
-3
MaterialReportServiceImpl.java
...rvice/service/content/impl/MaterialReportServiceImpl.java
+72
-4
PotentialCustomerServiceImpl.java
...ce/service/content/impl/PotentialCustomerServiceImpl.java
+8
-1
NoticeMessageHandler.java
.../manage/service/service/message/NoticeMessageHandler.java
+43
-0
NoticeMessageApiServiceImpl.java
...rvice/service/notify/out/NoticeMessageApiServiceImpl.java
+152
-4
MessageApiServiceImpl.java
...anage/service/service/out/impl/MessageApiServiceImpl.java
+6
-1
StaffDepartmentRelatedApiServiceImpl.java
...ervice/out/impl/StaffDepartmentRelatedApiServiceImpl.java
+1
-1
ApolloUtils.java
.../java/com/gic/haoban/manage/service/util/ApolloUtils.java
+17
-0
GroupMessageServiceTest.java
...anage3-service/src/test/java/GroupMessageServiceTest.java
+2
-2
MaterialReportServiceTest.java
...age3-service/src/test/java/MaterialReportServiceTest.java
+1
-1
NotityTest.java
haoban-manage3-service/src/test/java/NotityTest.java
+3
-3
test.java
haoban-manage3-service/src/test/java/test.java
+1
-1
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/qdto/NoticeMessageQDTO.java
0 → 100644
View file @
f9cd43d2
package
com
.
gic
.
haoban
.
manage
.
api
.
dto
.
qdto
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* Created By MBG-GUI-EXTENSION https://github.com/spawpaw/mybatis-generator-gui-extension
* Description:
* 好办消息通知
*
* @author fdh
*/
public
class
NoticeMessageQDTO
implements
Serializable
{
/**
*
*/
private
Long
noticeMessageId
;
/**
* 企业id
*/
private
String
enterpriseId
;
/**
* 门店id
*/
private
String
storeId
;
/**
* 导购id
*/
private
String
clerkId
;
/**
* 类别 0客户相关、1任务相关、2活动相关、3其他
*/
private
Integer
categoryType
;
/**
* 消息类型
*/
private
Integer
messageType
;
private
String
templateCode
;
/**
* 标题
*/
private
String
title
;
/**
* 描述
*/
private
String
description
;
/**
* 关联的具体业务消息id
*/
private
String
relationId
;
/**
* 消息带的参数信息
*/
private
String
messageContent
;
/**
* 0 未读 1已读
*/
private
Integer
readFlag
;
/**
* 状态 0删除 1正常
*/
private
Integer
deleteFlag
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 更新时间
*/
private
Date
updateTime
;
/**
*/
private
static
final
long
serialVersionUID
=
1L
;
public
String
getTemplateCode
()
{
return
templateCode
;
}
public
void
setTemplateCode
(
String
templateCode
)
{
this
.
templateCode
=
templateCode
;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.notice_message_id
*
* @return the value of tab_haoban_notice_message.notice_message_id
*/
public
Long
getNoticeMessageId
()
{
return
noticeMessageId
;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.notice_message_id
*
* @param noticeMessageId the value for tab_haoban_notice_message.notice_message_id
*/
public
void
setNoticeMessageId
(
Long
noticeMessageId
)
{
this
.
noticeMessageId
=
noticeMessageId
;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.enterprise_id
*
* @return the value of tab_haoban_notice_message.enterprise_id
*/
public
String
getEnterpriseId
()
{
return
enterpriseId
;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.enterprise_id
*
* @param enterpriseId the value for tab_haoban_notice_message.enterprise_id
*/
public
void
setEnterpriseId
(
String
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.store_id
*
* @return the value of tab_haoban_notice_message.store_id
*/
public
String
getStoreId
()
{
return
storeId
;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.store_id
*
* @param storeId the value for tab_haoban_notice_message.store_id
*/
public
void
setStoreId
(
String
storeId
)
{
this
.
storeId
=
storeId
;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.clerk_id
*
* @return the value of tab_haoban_notice_message.clerk_id
*/
public
String
getClerkId
()
{
return
clerkId
;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.clerk_id
*
* @param clerkId the value for tab_haoban_notice_message.clerk_id
*/
public
void
setClerkId
(
String
clerkId
)
{
this
.
clerkId
=
clerkId
;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.category_type
*
* @return the value of tab_haoban_notice_message.category_type
*/
public
Integer
getCategoryType
()
{
return
categoryType
;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.category_type
*
* @param categoryType the value for tab_haoban_notice_message.category_type
*/
public
void
setCategoryType
(
Integer
categoryType
)
{
this
.
categoryType
=
categoryType
;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.message_type
*
* @return the value of tab_haoban_notice_message.message_type
*/
public
Integer
getMessageType
()
{
return
messageType
;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.message_type
*
* @param messageType the value for tab_haoban_notice_message.message_type
*/
public
void
setMessageType
(
Integer
messageType
)
{
this
.
messageType
=
messageType
;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.title
*
* @return the value of tab_haoban_notice_message.title
*/
public
String
getTitle
()
{
return
title
;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.title
*
* @param title the value for tab_haoban_notice_message.title
*/
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.description
*
* @return the value of tab_haoban_notice_message.description
*/
public
String
getDescription
()
{
return
description
;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.description
*
* @param description the value for tab_haoban_notice_message.description
*/
public
void
setDescription
(
String
description
)
{
this
.
description
=
description
;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.relation_id
*
* @return the value of tab_haoban_notice_message.relation_id
*/
public
String
getRelationId
()
{
return
relationId
;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.relation_id
*
* @param relationId the value for tab_haoban_notice_message.relation_id
*/
public
void
setRelationId
(
String
relationId
)
{
this
.
relationId
=
relationId
;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.message_content
*
* @return the value of tab_haoban_notice_message.message_content
*/
public
String
getMessageContent
()
{
return
messageContent
;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.message_content
*
* @param messageContent the value for tab_haoban_notice_message.message_content
*/
public
void
setMessageContent
(
String
messageContent
)
{
this
.
messageContent
=
messageContent
;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.read_flag
*
* @return the value of tab_haoban_notice_message.read_flag
*/
public
Integer
getReadFlag
()
{
return
readFlag
;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.read_flag
*
* @param readFlag the value for tab_haoban_notice_message.read_flag
*/
public
void
setReadFlag
(
Integer
readFlag
)
{
this
.
readFlag
=
readFlag
;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.delete_flag
*
* @return the value of tab_haoban_notice_message.delete_flag
*/
public
Integer
getDeleteFlag
()
{
return
deleteFlag
;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.delete_flag
*
* @param deleteFlag the value for tab_haoban_notice_message.delete_flag
*/
public
void
setDeleteFlag
(
Integer
deleteFlag
)
{
this
.
deleteFlag
=
deleteFlag
;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.create_time
*
* @return the value of tab_haoban_notice_message.create_time
*/
public
Date
getCreateTime
()
{
return
createTime
;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.create_time
*
* @param createTime the value for tab_haoban_notice_message.create_time
*/
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.update_time
*
* @return the value of tab_haoban_notice_message.update_time
*/
public
Date
getUpdateTime
()
{
return
updateTime
;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.update_time
*
* @param updateTime the value for tab_haoban_notice_message.update_time
*/
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
}
\ No newline at end of file
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/enums/NoticeMessageTypeEnum.java
View file @
f9cd43d2
...
@@ -3,109 +3,127 @@ package com.gic.haoban.manage.api.enums;
...
@@ -3,109 +3,127 @@ package com.gic.haoban.manage.api.enums;
/**
/**
* Created by hua on 2021/12/17.
* Created by hua on 2021/12/17.
*/
*/
@Deprecated
public
enum
NoticeMessageTypeEnum
{
public
enum
NoticeMessageTypeEnum
{
ACTIVITY_START
(
1001
,
"活动开始通知"
,
NoticeMessageCategoryTypeEnum
.
ACTIVITY
.
getType
(),
"activity_start"
,
"/pages/route/index?pageType="
,
"hbapp_activity_detail"
),
ACTIVITY_START
(
1001
,
"活动开始通知"
,
NoticeMessageCategoryTypeEnum
.
ACTIVITY
.
getType
(),
"activity_start"
,
"/pages/route/index?pageType="
,
"hbapp_activity_detail"
,
"activityStart"
,
"haobanNotice"
),
ACTIVITY_NEW
(
1002
,
"活动上新通知"
,
NoticeMessageCategoryTypeEnum
.
ACTIVITY
.
getType
(),
"activity_new"
,
"/pages/route/index?pageType="
,
"hbapp_activity_detail"
),
ACTIVITY_NEW
(
1002
,
"活动上新通知"
,
NoticeMessageCategoryTypeEnum
.
ACTIVITY
.
getType
(),
"activity_new"
,
"/pages/route/index?pageType="
,
"hbapp_activity_detail"
,
"activityNew"
,
"haobanNotice"
),
ACTIVITY_DEL
(
1003
,
"活动删除通知"
,
NoticeMessageCategoryTypeEnum
.
ACTIVITY
.
getType
(),
"activity_del"
,
"/pages/route/index"
,
""
),
ACTIVITY_DEL
(
1003
,
"活动删除通知"
,
NoticeMessageCategoryTypeEnum
.
ACTIVITY
.
getType
(),
"activity_del"
,
"/pages/route/index"
,
""
,
"activityDelete"
,
"haobanNotice"
),
ACTIVITY_OFFLINE
(
1004
,
"活动下线通知"
,
NoticeMessageCategoryTypeEnum
.
ACTIVITY
.
getType
(),
"activity_offline"
,
"/pages/route/index?pageType="
,
"hbapp_activity_ranking"
),
ACTIVITY_OFFLINE
(
1004
,
"活动下线通知"
,
NoticeMessageCategoryTypeEnum
.
ACTIVITY
.
getType
(),
"activity_offline"
,
"/pages/route/index?pageType="
,
"hbapp_activity_ranking"
,
"activityDown"
,
"haobanNotice"
),
ACTIVITY_END
(
1005
,
"活动结束通知"
,
NoticeMessageCategoryTypeEnum
.
ACTIVITY
.
getType
(),
"activity_end"
,
"/pages/route/index?pageType="
,
"hbapp_activity_ranking"
),
ACTIVITY_END
(
1005
,
"活动结束通知"
,
NoticeMessageCategoryTypeEnum
.
ACTIVITY
.
getType
(),
"activity_end"
,
"/pages/route/index?pageType="
,
"hbapp_activity_ranking"
,
"activityEnd"
,
"haobanNotice"
),
ACTIVITY_RANK
(
1006
,
"活动排名通知"
,
NoticeMessageCategoryTypeEnum
.
ACTIVITY
.
getType
(),
"activity_rank"
,
"/pages/route/index?pageType="
,
"hbapp_activity_ranking"
),
ACTIVITY_RANK
(
1006
,
"活动排名通知"
,
NoticeMessageCategoryTypeEnum
.
ACTIVITY
.
getType
(),
"activity_rank"
,
"/pages/route/index?pageType="
,
"hbapp_activity_ranking"
,
"activityRank"
,
"haobanNotice"
),
ACTIVITY_AWARD
(
1007
,
"活动奖励通知"
,
NoticeMessageCategoryTypeEnum
.
ACTIVITY
.
getType
(),
"activity_award"
,
"/pages/route/index?pageType="
,
"hbapp_activity_ranking"
),
ACTIVITY_AWARD
(
1007
,
"活动奖励通知"
,
NoticeMessageCategoryTypeEnum
.
ACTIVITY
.
getType
(),
"activity_award"
,
"/pages/route/index?pageType="
,
"hbapp_activity_ranking"
,
"activityReward"
,
"haobanNotice"
),
TEL_TASK_CREATE
(
2001
,
"话务任务通知"
,
NoticeMessageCategoryTypeEnum
.
TASK
.
getType
(),
"task_create"
,
"/pages/route/index?pageType="
,
"hbapp_task_list_new"
),
TEL_TASK_CREATE
(
2001
,
"话务任务通知"
,
NoticeMessageCategoryTypeEnum
.
TASK
.
getType
(),
"task_create"
,
"/pages/route/index?pageType="
,
"hbapp_task_list_new"
,
"TelServiceTask"
,
"haobanNotice"
),
TEL_TASK_OVERDUE
(
2002
,
"话务任务逾期推送"
,
NoticeMessageCategoryTypeEnum
.
TASK
.
getType
(),
"task_overdue"
,
"/pages/route/index?pageType="
,
"hbapp_marketing_task_list"
),
TEL_TASK_OVERDUE
(
2002
,
"话务任务逾期推送"
,
NoticeMessageCategoryTypeEnum
.
TASK
.
getType
(),
"task_overdue"
,
"/pages/route/index?pageType="
,
"hbapp_marketing_task_list"
,
"TelServiceTaskExceedTime"
,
"haobanNotice"
),
//没集成 还没有
//没集成 还没有
TEL_TASK_INVALID
(
2003
,
"话务任务逾期失效通知"
,
NoticeMessageCategoryTypeEnum
.
TASK
.
getType
(),
"task_nvalid"
,
"/pages/route/index?pageType="
,
"hbapp_marketing_task_list"
),
TEL_TASK_INVALID
(
2003
,
"话务任务逾期失效通知"
,
NoticeMessageCategoryTypeEnum
.
TASK
.
getType
(),
"task_nvalid"
,
"/pages/route/index?pageType="
,
"hbapp_marketing_task_list"
,
"TelServiceTaskExceedTimeLoseEfficacy"
,
"haobanNotice"
),
GROUP_TASK_CREATE
(
2004
,
"群发任务通知"
,
NoticeMessageCategoryTypeEnum
.
TASK
.
getType
(),
"group_task_create"
,
"/pages/route/index?pageType="
,
"hbapp_marketing_task_list"
),
GROUP_TASK_CREATE
(
2004
,
"群发任务通知"
,
NoticeMessageCategoryTypeEnum
.
TASK
.
getType
(),
"group_task_create"
,
"/pages/route/index?pageType="
,
"hbapp_marketing_task_list"
,
"groupTask"
,
"haobanNotice"
),
GROUP_TASK_OVERDUE
(
2005
,
"群发任务逾期通知"
,
NoticeMessageCategoryTypeEnum
.
TASK
.
getType
(),
"group_task_overdue"
,
"/pages/route/index?pageType="
,
"hbapp_marketing_task_list"
),
GROUP_TASK_OVERDUE
(
2005
,
"群发任务逾期通知"
,
NoticeMessageCategoryTypeEnum
.
TASK
.
getType
(),
"group_task_overdue"
,
"/pages/route/index?pageType="
,
"hbapp_marketing_task_list"
,
"groupTaskExceedTime"
,
"haobanNotice"
),
//没集成 还没有
//没集成 还没有
GROUP_TASK_INVALID
(
2006
,
"群发任务逾期失效通知"
,
NoticeMessageCategoryTypeEnum
.
TASK
.
getType
(),
"group_task_invalid"
,
"/pages/route/index?pageType="
,
"hbapp_marketing_task_list"
),
GROUP_TASK_INVALID
(
2006
,
"群发任务逾期失效通知"
,
NoticeMessageCategoryTypeEnum
.
TASK
.
getType
(),
"group_task_invalid"
,
"/pages/route/index?pageType="
,
"hbapp_marketing_task_list"
,
"groupTaskExceedTimeLoseEfficacy"
,
"haobanNotice"
),
PERFORMANCE_TASK_CREATE
(
2007
,
"指标任务通知"
,
NoticeMessageCategoryTypeEnum
.
TASK
.
getType
(),
"performance_task_create"
,
"/pages/route/index?pageType="
,
"hbapp_task_kpi_detail"
),
PERFORMANCE_TASK_CREATE
(
2007
,
"指标任务通知"
,
NoticeMessageCategoryTypeEnum
.
TASK
.
getType
(),
"performance_task_create"
,
"/pages/route/index?pageType="
,
"hbapp_task_kpi_detail"
,
"targetTask"
,
"haobanNotice"
),
EVALUATE_TASK_CREATE
(
2008
,
"不良评价通知"
,
NoticeMessageCategoryTypeEnum
.
TASK
.
getType
(),
"evaluate_task_create"
,
"/pages/route/index?pageType="
,
"hbapp_task_detail"
),
EVALUATE_TASK_CREATE
(
2008
,
"不良评价通知"
,
NoticeMessageCategoryTypeEnum
.
TASK
.
getType
(),
"evaluate_task_create"
,
"/pages/route/index?pageType="
,
"hbapp_task_detail"
,
"badEvaluate"
,
"haobanNotice"
),
PERFORMANCE_TASK_CHANGE
(
2009
,
"指标任务通知"
,
NoticeMessageCategoryTypeEnum
.
TASK
.
getType
(),
"performance_task_change"
,
"/pages/route/index?pageType="
,
"hbapp_task_kpi_detail"
),
PERFORMANCE_TASK_CHANGE
(
2009
,
"指标任务通知"
,
NoticeMessageCategoryTypeEnum
.
TASK
.
getType
(),
"performance_task_change"
,
"/pages/route/index?pageType="
,
"hbapp_task_kpi_detail"
,
"targetTaskByStoreManage"
,
"haobanNotice"
),
TASK_TRANS
(
2010
,
"话务任务通知"
,
NoticeMessageCategoryTypeEnum
.
TASK
.
getType
(),
"task_trans"
,
"/pages/route/index?pageType="
,
"hbapp_task_list_new"
),
TASK_TRANS
(
2010
,
"话务任务通知"
,
NoticeMessageCategoryTypeEnum
.
TASK
.
getType
(),
"task_trans"
,
"/pages/route/index?pageType="
,
"hbapp_task_list_new"
,
"TelServiceTaskByStoreManage"
,
"haobanNotice"
),
STORE_ACCOUNT
(
3001
,
"账号申请"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"store_account"
,
"/pages/route/index?pageType="
,
"store_relate_store_record_list"
),
STORE_ACCOUNT
(
3001
,
"账号申请"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"store_account"
,
"/pages/route/index?pageType="
,
"store_relate_store_record_list"
,
"accountApplication"
,
"haobanNotice"
),
MEMBER_FACE
(
3002
,
"账号申请"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"member_face"
,
"/pages/route/index?pageType="
,
"hbapp_customer_edit_tag"
),
//
STORE_ACCOUNT_REFUSE
(
3010
,
"账号申请"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"store_account_refuse"
,
"/pages/route/index?pageType="
,
"store_relate_store_record_list"
),
MEMBER_FACE
(
3002
,
"账号申请"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"member_face"
,
"/pages/route/index?pageType="
,
"hbapp_customer_edit_tag"
,
""
,
"haobanNotice"
),
STORE_ACCOUNT_AGREE
(
3011
,
"账号申请"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"store_account_agree"
,
"/pages/route/index?pageType="
,
"store_relate_store_record_list"
),
CLERK_ADD_REFUSE
(
3020
,
"导购新增通知"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"clerk_add_refuse"
,
"/pages/route/index?pageType="
,
"store_relate_store_record_list"
),
//下面两个使用staff发送
CLERK_ADD_AGREE
(
3021
,
"导购新增通知"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"clerk_add_agree"
,
"/pages/route/index?pageType="
,
"store_relate_store_record_list"
),
STORE_ACCOUNT_REFUSE
(
3010
,
"账号申请"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"store_account_refuse"
,
"/pages/route/index?pageType="
,
"store_relate_store_record_list"
,
"refuseAccountApplication"
,
"haobanNotice"
),
CLERK_DEL_REFUSE
(
3022
,
"导购删除通知"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"clerk_del_refuse"
,
"/pages/route/index?pageType="
,
"store_relate_store_record_list"
),
STORE_ACCOUNT_AGREE
(
3011
,
"账号申请"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"store_account_agree"
,
"/pages/route/index?pageType="
,
"store_relate_store_record_list"
,
"agreeAccountApplication"
,
"haobanNotice"
),
CLERK_DEL_AGREE
(
3023
,
"导购删除通知"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"clerk_del_agree"
,
"/pages/route/index?pageType="
,
"store_relate_store_record_list"
),
STORE_EDIT_REFUSE
(
3024
,
"门店信息修改通知"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"store_edit_refuse"
,
"/pages/route/index?pageType="
,
"store_detail"
),
STORE_EDIT_AGREE
(
3025
,
"门店信息修改通知"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"store_edit_agree"
,
"/pages/route/index?pageType="
,
"store_detail"
),
DAILY_REPORT
(
3031
,
"云日报通知"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"daily_report"
,
"/pages/route/index?pageType="
,
"hbapp_task_daily_report_detail"
),
DAILY_REPORT_TRANS
(
3033
,
"云日报通知"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"daily_report_trans"
,
"/pages/route/index?pageType="
,
"hbapp_task_daily_report_detail"
),
CASH_OUT_REFUSE
(
3040
,
"提现通知"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"cash_out_refuse"
,
"/pages/route/index?pageType="
,
"hbapp_withdraw_list"
),
CLERK_ADD_REFUSE
(
3020
,
"导购新增通知"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"clerk_add_refuse"
,
"/pages/route/index?pageType="
,
"store_relate_store_record_list"
,
"refuseAddClerk"
,
"haobanNotice"
),
CLERK_ADD_AGREE
(
3021
,
"导购新增通知"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"clerk_add_agree"
,
"/pages/route/index?pageType="
,
"store_relate_store_record_list"
,
"agreeAddClerk"
,
"haobanNotice"
),
//
CLERK_DEL_REFUSE
(
3022
,
"导购删除通知"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"clerk_del_refuse"
,
"/pages/route/index?pageType="
,
"store_relate_store_record_list"
,
"refuseDeleteClerk"
,
"haobanNotice"
),
CLERK_DEL_AGREE
(
3023
,
"导购删除通知"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"clerk_del_agree"
,
"/pages/route/index?pageType="
,
"store_relate_store_record_list"
,
"agreeDeleteClerk"
,
"haobanNotice"
),
STORE_EDIT_REFUSE
(
3024
,
"门店信息修改通知"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"store_edit_refuse"
,
"/pages/route/index?pageType="
,
"store_detail"
,
"refuseStoreInfoUpdate"
,
"haobanNotice"
),
STORE_EDIT_AGREE
(
3025
,
"门店信息修改通知"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"store_edit_agree"
,
"/pages/route/index?pageType="
,
"store_detail"
,
"agreeStoreInfoUpdate"
,
"haobanNotice"
),
DAILY_REPORT
(
3031
,
"云日报通知"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"daily_report"
,
"/pages/route/index?pageType="
,
"hbapp_task_daily_report_detail"
,
"cloudDailyForStoreManage"
,
"haobanNotice"
),
DAILY_REPORT_TRANS
(
3033
,
"云日报通知"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"daily_report_trans"
,
"/pages/route/index?pageType="
,
"hbapp_task_daily_report_detail"
,
"cloudDailyForClerk"
,
"haobanNotice"
),
CASH_OUT_REFUSE
(
3040
,
"提现通知"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"cash_out_refuse"
,
"/pages/route/index?pageType="
,
"hbapp_withdraw_list"
,
"CashWithdrawal"
,
"haobanNotice"
),
OFFLINE_PRE
(
3041
,
"预约提醒"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"task_overdue"
,
"/pages/route/index?pageType="
,
"hbapp_appointment_list"
),
OFFLINE_PRE
(
3041
,
"预约提醒"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"task_overdue"
,
"/pages/route/index?pageType="
,
"hbapp_appointment_list"
,
"offlinePre"
,
"haobanNotice"
),
CUSTOMER_MOVE
(
3052
,
"客户变动通知"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"customer_move"
,
"/pages/route/index?pageType="
,
"hbapp_customer_list"
),
CUSTOMER_MOVE
(
3052
,
"客户变动通知"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"customer_move"
,
"/pages/route/index?pageType="
,
"hbapp_customer_list"
,
"assignCustomers"
,
"haobanNotice"
),
CUSTOMER_MOVED
(
3053
,
"客户变动通知"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"customer_moved"
,
"/pages/route/index?pageType="
,
"hbapp_customer_list"
),
CUSTOMER_MOVED
(
3053
,
"客户变动通知"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"customer_moved"
,
"/pages/route/index?pageType="
,
"hbapp_customer_list"
,
"removeCustomer"
,
"haobanNotice"
),
CUSTOMER_UNBIND
(
3054
,
"客户变动通知"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"customer_unbind"
,
"/pages/route/index?pageType="
,
"hbapp_customer_list"
),
CUSTOMER_UNBIND
(
3054
,
"客户变动通知"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"customer_unbind"
,
"/pages/route/index?pageType="
,
"hbapp_customer_list"
,
""
,
""
),
CUSTOMER_ORDER_CREATE
(
4001
,
"客户下单通知"
,
NoticeMessageCategoryTypeEnum
.
CUSTOMER
.
getType
(),
"customer_order_create"
,
"/pages/route/index?pageType="
,
"hbapp_customer_order_detail"
),
CUSTOMER_ORDER_CREATE
(
4001
,
"客户下单通知"
,
NoticeMessageCategoryTypeEnum
.
CUSTOMER
.
getType
(),
"customer_order_create"
,
"/pages/route/index?pageType="
,
"hbapp_customer_order_detail"
,
"customerBuyOrder"
,
"haobanNotice"
),
CUSTOMER_ORDER_REFUND
(
4002
,
"客户退单通知"
,
NoticeMessageCategoryTypeEnum
.
CUSTOMER
.
getType
(),
"customer_order_refund"
,
"/pages/route/index?pageType="
,
"hbapp_withdraw_list"
),
//
CUSTOMER_ORDER_LOOK
(
4003
,
"客户浏览通知"
,
NoticeMessageCategoryTypeEnum
.
CUSTOMER
.
getType
(),
"customer_order_look"
,
"/pages/route/index?pageType="
,
"hbapp_customer_look_goods"
),
CUSTOMER_ORDER_REFUND
(
4002
,
"客户退单通知"
,
NoticeMessageCategoryTypeEnum
.
CUSTOMER
.
getType
(),
"customer_order_refund"
,
"/pages/route/index?pageType="
,
"hbapp_withdraw_list"
,
"customerChargebackOrder"
,
"haobanNotice"
),
CUSTOMER_GET_COUPON
(
4004
,
"客户领券通知"
,
NoticeMessageCategoryTypeEnum
.
CUSTOMER
.
getType
(),
"customer_get_coupon"
,
"/pages/route/index?pageType="
,
"hbapp_customer_detail"
),
CUSTOMER_ORDER_LOOK
(
4003
,
"客户浏览通知"
,
NoticeMessageCategoryTypeEnum
.
CUSTOMER
.
getType
(),
"customer_order_look"
,
"/pages/route/index?pageType="
,
"hbapp_customer_look_goods"
,
"customerBrowsing"
,
"haobanNotice"
),
CUSTOMER_APPLY_ORDER_REFUND
(
4005
,
"客户申请退单通知"
,
NoticeMessageCategoryTypeEnum
.
CUSTOMER
.
getType
(),
"customer_apply_order_refund"
,
"/pages/route/index?pageType="
,
"hbapp_customer_order_detail"
),
CUSTOMER_GET_COUPON
(
4004
,
"客户领券通知"
,
NoticeMessageCategoryTypeEnum
.
CUSTOMER
.
getType
(),
"customer_get_coupon"
,
"/pages/route/index?pageType="
,
"hbapp_customer_detail"
,
"customerGetCoupon"
,
"haobanNotice"
),
CUSTOMER_SUCCESS_ORDER_REFUND
(
4006
,
"客户成功退单通知"
,
NoticeMessageCategoryTypeEnum
.
CUSTOMER
.
getType
(),
"customer_success_order_refund"
,
"/pages/route/index?pageType="
,
"hbapp_user_bill_detail"
),
CUSTOMER_APPLY_ORDER_REFUND
(
4005
,
"客户申请退单通知"
,
NoticeMessageCategoryTypeEnum
.
CUSTOMER
.
getType
(),
"customer_apply_order_refund"
,
"/pages/route/index?pageType="
,
"hbapp_customer_order_detail"
,
"customerApplyChargebackOrder"
,
"haobanNotice"
),
CUSTOMER_SUCCESS_ORDER_REFUND
(
4006
,
"客户成功退单通知"
,
NoticeMessageCategoryTypeEnum
.
CUSTOMER
.
getType
(),
"customer_success_order_refund"
,
"/pages/route/index?pageType="
,
"hbapp_user_bill_detail"
,
"customerChargebackOrderSuccess"
,
"haobanNotice"
),
// 订单- 待发货订单提醒
// 订单- 待发货订单提醒
ORDER_TAKE
(
5000
,
"待自提订单提醒"
,
NoticeMessageCategoryTypeEnum
.
ORDER
.
getType
(),
"order_take"
,
"/pages/route/index?pageType="
,
"hbapp_order_verfication"
),
ORDER_TAKE
(
5000
,
"待自提订单提醒"
,
NoticeMessageCategoryTypeEnum
.
ORDER
.
getType
(),
"order_take"
,
"/pages/route/index?pageType="
,
"hbapp_order_verfication"
,
"toBePickUpOrderRemind"
,
"haobanNotice"
),
ORDER_PAY
(
5001
,
"待发货订单提醒"
,
NoticeMessageCategoryTypeEnum
.
ORDER
.
getType
(),
"order_pay"
,
"/pages/route/index?pageType="
,
"hbapp_order_center"
),
ORDER_PAY
(
5001
,
"待发货订单提醒"
,
NoticeMessageCategoryTypeEnum
.
ORDER
.
getType
(),
"order_pay"
,
"/pages/route/index?pageType="
,
"hbapp_order_center"
,
"reminderForPendingOrders"
,
"haobanNotice"
),
REFUND_AUDIT
(
5010
,
"售后待审核提醒"
,
NoticeMessageCategoryTypeEnum
.
REFUND
.
getType
(),
"refund_audit"
,
"/pages/route/index?pageType="
,
"hbapp_order_center"
),
REFUND_AUDIT
(
5010
,
"新增售后提醒"
,
NoticeMessageCategoryTypeEnum
.
REFUND
.
getType
(),
"refund_audit"
,
"/pages/route/index?pageType="
,
"hbapp_order_center"
,
"afterSalesReviewReminder"
,
"haobanNotice"
),
REFUND_MEMBER_CANCEL
(
5011
,
"买家取消售后提醒"
,
NoticeMessageCategoryTypeEnum
.
REFUND
.
getType
(),
"refund_member_cancel"
,
"/pages/route/index?pageType="
,
"hbapp_order_center"
),
REFUND_MEMBER_CANCEL
(
5011
,
"买家取消售后提醒"
,
NoticeMessageCategoryTypeEnum
.
REFUND
.
getType
(),
"refund_member_cancel"
,
"/pages/route/index?pageType="
,
"hbapp_order_center"
,
"afterSalesCancelReminder"
,
"haobanNotice"
),
REFUND_DELIVER
(
5013
,
"买家寄出退换货提醒"
,
NoticeMessageCategoryTypeEnum
.
REFUND
.
getType
(),
"refund_deliver"
,
"/pages/route/index?pageType="
,
"hbapp_order_center"
),
REFUND_DELIVER
(
5013
,
"买家寄出退换货提醒"
,
NoticeMessageCategoryTypeEnum
.
REFUND
.
getType
(),
"refund_deliver"
,
"/pages/route/index?pageType="
,
"hbapp_order_center"
,
"buyerSendsBackRemind"
,
"haobanNotice"
),
MATERIAL_NEW_NOTIFY
(
6001
,
"素材上新通知"
,
NoticeMessageCategoryTypeEnum
.
MATERIAL
.
getType
(),
"material_new_notify"
,
"/pages/route/index?pageType="
,
"hbapp_material_center"
),
//
MATERIAL_REPORT_NOTIFY
(
6002
,
"素材周报/月报通知"
,
NoticeMessageCategoryTypeEnum
.
MATERIAL
.
getType
(),
"material_week_notify"
,
"/pages/route/index?pageType="
,
"hbapp_mate_report"
),
MATERIAL_NEW_NOTIFY
(
6001
,
"素材上新通知"
,
NoticeMessageCategoryTypeEnum
.
MATERIAL
.
getType
(),
"material_new_notify"
,
"/pages/route/index?pageType="
,
"hbapp_material_center"
,
"materialsNotice"
,
"clerkMaterialsNotice"
),
MATERIAL_REPORT_NOTIFY_WEEK
(
6002
,
"素材周报通知"
,
NoticeMessageCategoryTypeEnum
.
MATERIAL
.
getType
(),
"material_week_notify"
,
"/pages/route/index?pageType="
,
"hbapp_mate_report"
,
"materialWeek"
,
"clerkMaterialsReport"
),
MATERIAL_REPORT_NOTIFY_MONTH
(
6004
,
"素材月报通知"
,
NoticeMessageCategoryTypeEnum
.
MATERIAL
.
getType
(),
"material_month_notify"
,
"/pages/route/index?pageType="
,
"hbapp_mate_report"
,
"materialMonth"
,
"clerkMaterialsReport"
),
POTENTIAL_CUSTOMER_NOTIFY
(
6003
,
"销售线索通知"
,
NoticeMessageCategoryTypeEnum
.
POTENTIAL_CUSTOMER
.
getType
(),
"potential_customer_notify"
,
"/pages/route/index?pageType="
,
"hbapp_sales_clue_center"
);
POTENTIAL_CUSTOMER_NOTIFY
(
6003
,
"销售线索通知"
,
NoticeMessageCategoryTypeEnum
.
POTENTIAL_CUSTOMER
.
getType
(),
"potential_customer_notify"
,
"/pages/route/index?pageType="
,
"hbapp_sales_clue_center"
,
"salesLeadNotice"
,
"haobanNotice"
);
/**
/**
* 消息类型
* 消息类型
*/
*/
@Deprecated
private
int
type
;
private
int
type
;
/**
/**
* 消息名称
* 消息名称
*/
*/
@Deprecated
private
String
name
;
private
String
name
;
/**
/**
* 大类
* 大类
*/
*/
@Deprecated
private
int
category
;
private
int
category
;
/**
/**
* 模板类型
* 模板类型
*/
*/
@Deprecated
private
String
templateCode
;
private
String
templateCode
;
/**
/**
* 活动页面
* 活动页面
*/
*/
@Deprecated
private
String
pageUrl
;
private
String
pageUrl
;
/**
/**
* 前端的页面类型
* 前端的页面类型
*/
*/
@Deprecated
private
String
pageType
;
private
String
pageType
;
NoticeMessageTypeEnum
(
int
type
,
String
name
,
int
category
,
String
templateCode
,
String
pageUrl
,
String
pageType
)
{
private
String
messageCode
;
private
String
routerCode
;
NoticeMessageTypeEnum
(
int
type
,
String
name
,
int
category
,
String
templateCode
,
String
pageUrl
,
String
pageType
,
String
messageCode
,
String
routerCode
)
{
this
.
type
=
type
;
this
.
type
=
type
;
this
.
name
=
name
;
this
.
name
=
name
;
this
.
category
=
category
;
this
.
category
=
category
;
this
.
templateCode
=
templateCode
;
this
.
templateCode
=
templateCode
;
this
.
pageUrl
=
pageUrl
;
this
.
pageUrl
=
pageUrl
;
this
.
pageType
=
pageType
;
this
.
pageType
=
pageType
;
this
.
messageCode
=
messageCode
;
this
.
routerCode
=
routerCode
;
}
}
...
@@ -165,4 +183,20 @@ public enum NoticeMessageTypeEnum {
...
@@ -165,4 +183,20 @@ public enum NoticeMessageTypeEnum {
}
}
return
null
;
return
null
;
}
}
public
String
getMessageCode
()
{
return
messageCode
;
}
public
void
setMessageCode
(
String
messageCode
)
{
this
.
messageCode
=
messageCode
;
}
public
String
getRouterCode
()
{
return
routerCode
;
}
public
void
setRouterCode
(
String
routerCode
)
{
this
.
routerCode
=
routerCode
;
}
}
}
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/notify/NoticeMessageApiService.java
View file @
f9cd43d2
...
@@ -5,6 +5,7 @@ import com.gic.api.base.commons.Page;
...
@@ -5,6 +5,7 @@ import com.gic.api.base.commons.Page;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.haoban.manage.api.dto.notify.dto.NoticeMessageInfoDTO
;
import
com.gic.haoban.manage.api.dto.notify.dto.NoticeMessageInfoDTO
;
import
com.gic.haoban.manage.api.dto.notify.qdto.NotifyMessageBatchQDTO
;
import
com.gic.haoban.manage.api.dto.notify.qdto.NotifyMessageBatchQDTO
;
import
com.gic.haoban.manage.api.dto.qdto.NoticeMessageQDTO
;
import
java.util.List
;
import
java.util.List
;
...
@@ -82,4 +83,12 @@ public interface NoticeMessageApiService {
...
@@ -82,4 +83,12 @@ public interface NoticeMessageApiService {
*/
*/
public
ServiceResponse
<
Boolean
>
updateWriteFlagByClerkId
(
String
enterpriseId
,
String
clerkId
,
int
categoryType
);
public
ServiceResponse
<
Boolean
>
updateWriteFlagByClerkId
(
String
enterpriseId
,
String
clerkId
,
int
categoryType
);
/**
* 新增好办内部通知
*
* @param qdto
* @return
*/
public
ServiceResponse
<
Boolean
>
addOrCreateNoticeMessage
(
List
<
NoticeMessageQDTO
>
qdto
);
}
}
\ No newline at end of file
haoban-manage3-service/pom.xml
View file @
f9cd43d2
...
@@ -196,6 +196,12 @@
...
@@ -196,6 +196,12 @@
<artifactId>
gic-order-api
</artifactId>
<artifactId>
gic-order-api
</artifactId>
<version>
${gic-order-api}
</version>
<version>
${gic-order-api}
</version>
</dependency>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
gic-message-center-api
</artifactId>
<version>
${gic-message-center-api}
</version>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/pojo/bo/content/context/MaterialReportContext.java
View file @
f9cd43d2
...
@@ -2,8 +2,10 @@ package com.gic.haoban.manage.service.pojo.bo.content.context;
...
@@ -2,8 +2,10 @@ package com.gic.haoban.manage.service.pojo.bo.content.context;
import
cn.hutool.core.date.DateTime
;
import
cn.hutool.core.date.DateTime
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
import
com.gic.haoban.manage.api.enums.NoticeMessageTypeEnum
;
import
com.gic.haoban.manage.api.enums.content.MaterialReportType
;
import
com.gic.haoban.manage.api.enums.content.MaterialReportType
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaff
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaff
;
import
com.gic.haoban.manage.service.pojo.bo.NoticeMessageBO
;
import
com.gic.haoban.manage.service.pojo.bo.NoticeMessageBO
;
...
@@ -13,11 +15,11 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -13,11 +15,11 @@ import lombok.extern.slf4j.Slf4j;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
static
com
.
gic
.
haoban
.
manage
.
api
.
enums
.
NoticeMessageTypeEnum
.
MATERIAL_REPORT_NOTIFY
;
/**
/**
* @Author MUSI
* @Author MUSI
...
@@ -106,16 +108,22 @@ public class MaterialReportContext {
...
@@ -106,16 +108,22 @@ public class MaterialReportContext {
log
.
info
(
"成员{}为区经角色, 不发送小程序消息通知 "
,
this
.
staffId
);
log
.
info
(
"成员{}为区经角色, 不发送小程序消息通知 "
,
this
.
staffId
);
return
Collections
.
emptyList
();
return
Collections
.
emptyList
();
}
}
final
NoticeMessageTypeEnum
noticeMessageTypeEnum
=
MaterialReportType
.
WEEK
.
getCode
().
equals
(
this
.
getReportType
())
?
NoticeMessageTypeEnum
.
MATERIAL_REPORT_NOTIFY_WEEK
:
NoticeMessageTypeEnum
.
MATERIAL_REPORT_NOTIFY_MONTH
;
if
(
ObjectUtil
.
isNull
(
noticeMessageTypeEnum
)){
return
new
ArrayList
<>();
}
return
this
.
staffClerkRelations
return
this
.
staffClerkRelations
.
stream
()
.
stream
()
.
map
(
item
->
{
.
map
(
item
->
{
NoticeMessageBO
noticeMessageBO
=
new
NoticeMessageBO
();
NoticeMessageBO
noticeMessageBO
=
new
NoticeMessageBO
();
noticeMessageBO
.
setCategoryType
(
MATERIAL_REPORT_NOTIFY
.
getCategory
());
noticeMessageBO
.
setCategoryType
(
noticeMessageTypeEnum
.
getCategory
());
noticeMessageBO
.
setMessageType
(
MATERIAL_REPORT_NOTIFY
.
getType
());
noticeMessageBO
.
setMessageType
(
noticeMessageTypeEnum
.
getType
());
noticeMessageBO
.
setClerkId
(
StringUtils
.
isNotBlank
(
item
.
getClerkId
())
?
item
.
getClerkId
()
:
"-1"
);
noticeMessageBO
.
setClerkId
(
StringUtils
.
isNotBlank
(
item
.
getClerkId
())
?
item
.
getClerkId
()
:
"-1"
);
noticeMessageBO
.
setStoreId
(
StringUtils
.
isNotBlank
(
item
.
getStoreId
())
?
item
.
getStoreId
()
:
"-1"
);
noticeMessageBO
.
setStoreId
(
StringUtils
.
isNotBlank
(
item
.
getStoreId
())
?
item
.
getStoreId
()
:
"-1"
);
noticeMessageBO
.
setTitle
(
this
.
getMessageTitle
());
noticeMessageBO
.
setTitle
(
this
.
getMessageTitle
());
noticeMessageBO
.
setTemplateCode
(
MATERIAL_REPORT_NOTIFY
.
getTemplateCode
());
noticeMessageBO
.
setTemplateCode
(
noticeMessageTypeEnum
.
getTemplateCode
());
noticeMessageBO
.
setDescription
(
this
.
getMessageDesc
());
noticeMessageBO
.
setDescription
(
this
.
getMessageDesc
());
noticeMessageBO
.
setEnterpriseId
(
this
.
enterpriseId
);
noticeMessageBO
.
setEnterpriseId
(
this
.
enterpriseId
);
noticeMessageBO
.
setRelationId
(
this
.
clerkId
);
noticeMessageBO
.
setRelationId
(
this
.
clerkId
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/content/adaptor/MaterialReportBuilder.java
View file @
f9cd43d2
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
content
.
adaptor
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
content
.
adaptor
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseQwDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseQwDTO
;
...
@@ -22,6 +23,7 @@ import org.apache.commons.lang3.StringUtils;
...
@@ -22,6 +23,7 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Optional
;
import
java.util.Optional
;
...
@@ -198,7 +200,9 @@ public class MaterialReportBuilder {
...
@@ -198,7 +200,9 @@ public class MaterialReportBuilder {
articleInfo
.
setTitle
(
context
.
getMessageTitle
());
articleInfo
.
setTitle
(
context
.
getMessageTitle
());
articleInfo
.
setDescription
(
context
.
getMessageDesc
());
articleInfo
.
setDescription
(
context
.
getMessageDesc
());
String
extendParams
=
StringUtils
.
isNotBlank
(
context
.
getMainStoreId
())
?
context
.
getMainStoreId
()
:
context
.
getEnterpriseId
();
String
extendParams
=
StringUtils
.
isNotBlank
(
context
.
getMainStoreId
())
?
context
.
getMainStoreId
()
:
context
.
getEnterpriseId
();
articleInfo
.
setPagepath
(
NoticeMessageUtil
.
buildMiniAppUrl
(
NoticeMessageTypeEnum
.
MATERIAL_REPORT_NOTIFY
,
context
.
extendParams
(
extendParams
)));
final
NoticeMessageTypeEnum
noticeMessageTypeEnum
=
MaterialReportType
.
WEEK
.
getCode
().
equals
(
context
.
getReportType
())
?
NoticeMessageTypeEnum
.
MATERIAL_REPORT_NOTIFY_WEEK
:
NoticeMessageTypeEnum
.
MATERIAL_REPORT_NOTIFY_MONTH
;
articleInfo
.
setPagepath
(
NoticeMessageUtil
.
buildMiniAppUrl
(
noticeMessageTypeEnum
,
context
.
extendParams
(
extendParams
)));
articleInfo
.
setPicurl
(
context
.
getMaterialReportUrl
());
articleInfo
.
setPicurl
(
context
.
getMaterialReportUrl
());
newsSendMessage
.
setArticleMessages
(
Collections
.
singletonList
(
articleInfo
));
newsSendMessage
.
setArticleMessages
(
Collections
.
singletonList
(
articleInfo
));
return
newsSendMessage
;
return
newsSendMessage
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/content/adaptor/PotentialCustomerNotifyBuilder.java
View file @
f9cd43d2
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
content
.
adaptor
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
content
.
adaptor
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.commons.util.UniqueIdUtils
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.StaffDTO
;
import
com.gic.haoban.manage.api.dto.StaffDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseQwDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseQwDTO
;
...
@@ -15,7 +16,10 @@ import com.gic.haoban.manage.service.pojo.bo.content.context.PotentialCustomerNo
...
@@ -15,7 +16,10 @@ import com.gic.haoban.manage.service.pojo.bo.content.context.PotentialCustomerNo
import
com.gic.haoban.manage.service.service.ClerkMainStoreRelatedService
;
import
com.gic.haoban.manage.service.service.ClerkMainStoreRelatedService
;
import
com.gic.haoban.manage.service.service.StaffClerkRelationService
;
import
com.gic.haoban.manage.service.service.StaffClerkRelationService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.message.NoticeMessageHandler
;
import
com.gic.haoban.manage.service.service.notify.NoticeMessageService
;
import
com.gic.haoban.manage.service.service.notify.NoticeMessageService
;
import
com.gic.haoban.manage.service.util.ApolloUtils
;
import
com.gic.message.center.api.subscribe.model.NoticeMessageForm
;
import
com.gic.wechat.api.dto.qywx.ItemDTO
;
import
com.gic.wechat.api.dto.qywx.ItemDTO
;
import
com.gic.wechat.api.dto.qywx.QywxXcxSendMessageDTO
;
import
com.gic.wechat.api.dto.qywx.QywxXcxSendMessageDTO
;
import
com.gic.wechat.api.service.qywx.QywxSuiteApiService
;
import
com.gic.wechat.api.service.qywx.QywxSuiteApiService
;
...
@@ -28,6 +32,7 @@ import org.springframework.stereotype.Component;
...
@@ -28,6 +32,7 @@ import org.springframework.stereotype.Component;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -60,6 +65,8 @@ public class PotentialCustomerNotifyBuilder {
...
@@ -60,6 +65,8 @@ public class PotentialCustomerNotifyBuilder {
private
Config
config
;
private
Config
config
;
@Autowired
@Autowired
private
StaffApiService
staffApiService
;
private
StaffApiService
staffApiService
;
@Autowired
private
NoticeMessageHandler
noticeMessageHandler
;
/**
/**
* 获取企业下所有导购id
* 获取企业下所有导购id
...
@@ -189,10 +196,29 @@ public class PotentialCustomerNotifyBuilder {
...
@@ -189,10 +196,29 @@ public class PotentialCustomerNotifyBuilder {
log
.
info
(
"企业信息不存在 {}"
,
staffClerkRelation
.
getWxEnterpriseId
());
log
.
info
(
"企业信息不存在 {}"
,
staffClerkRelation
.
getWxEnterpriseId
());
continue
;
continue
;
}
}
QywxXcxSendMessageDTO
messageDTO
=
this
.
buildApplicationMessage
(
staffClerkRelation
,
wxEnterpriseQwDTO
,
if
(!
ApolloUtils
.
useMessageCenter
()){
log
.
info
(
"消息中心-走老版消息通知"
);
/* 消息中心修改此处*/
QywxXcxSendMessageDTO
messageDTO
=
this
.
buildApplicationMessage
(
staffClerkRelation
,
wxEnterpriseQwDTO
,
customerStaticsBOMap
.
get
(
staffClerkRelation
.
getClerkId
()).
getNum
(),
context
.
buildExtendParams
(
staffClerkRelation
.
getStoreId
(),
staffClerkRelation
.
getClerkId
()));
customerStaticsBOMap
.
get
(
staffClerkRelation
.
getClerkId
()).
getNum
(),
context
.
buildExtendParams
(
staffClerkRelation
.
getStoreId
(),
staffClerkRelation
.
getClerkId
()));
boolean
sendMessage
=
qywxSuiteApiService
.
sendMessage
(
wxEnterpriseQwDTO
.
getThirdCorpid
(),
wxEnterpriseQwDTO
.
getSelf3thSecret
(),
messageDTO
,
wxEnterpriseQwDTO
.
isSelf
(),
wxEnterpriseQwDTO
.
getUrlHost
());
boolean
sendMessage
=
qywxSuiteApiService
.
sendMessage
(
wxEnterpriseQwDTO
.
getThirdCorpid
(),
wxEnterpriseQwDTO
.
getSelf3thSecret
(),
messageDTO
,
wxEnterpriseQwDTO
.
isSelf
(),
wxEnterpriseQwDTO
.
getUrlHost
());
log
.
info
(
"发送销售线索应用消息结果 {}"
,
sendMessage
);
log
.
info
(
"发送销售线索应用消息结果 {}"
,
sendMessage
);
}
else
{
Map
<
String
,
String
>
variableMap
=
new
HashMap
<>();
variableMap
.
put
(
"memberNum"
,
customerStaticsBOMap
.
get
(
staffClerkRelation
.
getClerkId
()).
getNum
().
toString
());
variableMap
.
put
(
"page"
,
NoticeMessageUtil
.
buildMiniAppUrl
(
NoticeMessageTypeEnum
.
POTENTIAL_CUSTOMER_NOTIFY
,
context
.
buildExtendParams
(
staffClerkRelation
.
getStoreId
(),
staffClerkRelation
.
getClerkId
())));
noticeMessageHandler
.
sendMessage
(
NoticeMessageForm
.
builder
()
.
messageCode
(
NoticeMessageTypeEnum
.
POTENTIAL_CUSTOMER_NOTIFY
.
getMessageCode
())
.
mqRouterCode
(
NoticeMessageTypeEnum
.
POTENTIAL_CUSTOMER_NOTIFY
.
getRouterCode
())
.
businessId
(
"-1"
)
.
createTime
(
new
Date
())
.
enterpriseId
(
context
.
getEnterpriseId
())
.
uniqueKey
(
UniqueIdUtils
.
uniqueLongHex
())
.
userIdList
(
Collections
.
singletonList
(
staffClerkRelation
.
getClerkId
()))
.
variableMap
(
variableMap
).
build
());
}
}
}
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/content/impl/MaterialReportServiceImpl.java
View file @
f9cd43d2
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
content
.
impl
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
content
.
impl
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.commons.util.UniqueIdUtils
;
import
com.gic.enterprise.api.dto.EnterpriseDTO
;
import
com.gic.enterprise.api.dto.EnterpriseDTO
;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseQwDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseQwDTO
;
import
com.gic.haoban.manage.api.enums.NoticeMessageTypeEnum
;
import
com.gic.haoban.manage.api.enums.content.MaterialReportType
;
import
com.gic.haoban.manage.api.util.notify.NoticeMessageUtil
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaff
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaff
;
import
com.gic.haoban.manage.service.pojo.bo.NoticeMessageBO
;
import
com.gic.haoban.manage.service.pojo.bo.NoticeMessageBO
;
...
@@ -12,7 +18,11 @@ import com.gic.haoban.manage.service.service.StaffService;
...
@@ -12,7 +18,11 @@ import com.gic.haoban.manage.service.service.StaffService;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.content.MaterialReportService
;
import
com.gic.haoban.manage.service.service.content.MaterialReportService
;
import
com.gic.haoban.manage.service.service.content.adaptor.MaterialReportBuilder
;
import
com.gic.haoban.manage.service.service.content.adaptor.MaterialReportBuilder
;
import
com.gic.haoban.manage.service.service.message.NoticeMessageHandler
;
import
com.gic.haoban.manage.service.service.notify.NoticeMessageService
;
import
com.gic.haoban.manage.service.service.notify.NoticeMessageService
;
import
com.gic.haoban.manage.service.util.ApolloUtils
;
import
com.gic.message.center.api.subscribe.model.NoticeMessageForm
;
import
com.gic.wechat.api.dto.qywx.QywxNewsArticleMessageDTO
;
import
com.gic.wechat.api.dto.qywx.QywxNewsSendMessageDTO
;
import
com.gic.wechat.api.dto.qywx.QywxNewsSendMessageDTO
;
import
com.gic.wechat.api.service.qywx.QywxSuiteApiService
;
import
com.gic.wechat.api.service.qywx.QywxSuiteApiService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -21,7 +31,12 @@ import org.apache.commons.lang3.StringUtils;
...
@@ -21,7 +31,12 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* @Author MUSI
* @Author MUSI
...
@@ -49,6 +64,9 @@ public class MaterialReportServiceImpl implements MaterialReportService {
...
@@ -49,6 +64,9 @@ public class MaterialReportServiceImpl implements MaterialReportService {
@Autowired
@Autowired
private
Config
config
;
private
Config
config
;
@Autowired
private
NoticeMessageHandler
noticeMessageHandler
;
/**
/**
* 素材周报/月报
* 素材周报/月报
...
@@ -87,13 +105,24 @@ public class MaterialReportServiceImpl implements MaterialReportService {
...
@@ -87,13 +105,24 @@ public class MaterialReportServiceImpl implements MaterialReportService {
materialReportBuilder
.
buildMaterialReportData
(
context
);
materialReportBuilder
.
buildMaterialReportData
(
context
);
// 保存小程序消息
// 保存小程序消息
List
<
NoticeMessageBO
>
noticeMessageBos
=
context
.
buildNotifyMessageBos
();
List
<
NoticeMessageBO
>
noticeMessageBos
=
context
.
buildNotifyMessageBos
();
if
(
CollectionUtils
.
isNotEmpty
(
noticeMessageBos
))
{
noticeMessageService
.
addNoticeMessageBatch
(
noticeMessageBos
);
if
(!
ApolloUtils
.
useMessageCenter
()){
log
.
info
(
"消息中心-走老版消息通知"
);
/*消息中心修改此处*/
if
(
CollectionUtils
.
isNotEmpty
(
noticeMessageBos
))
{
noticeMessageService
.
addNoticeMessageBatch
(
noticeMessageBos
);
}
}
}
if
(
StringUtils
.
isBlank
(
context
.
getClerkId
()))
{
if
(
StringUtils
.
isBlank
(
context
.
getClerkId
()))
{
log
.
info
(
"成员{}在企业{}中不存在主门店, 不推送企微应用消息"
,
staffId
,
enterpriseId
);
log
.
info
(
"成员{}在企业{}中不存在主门店, 不推送企微应用消息"
,
staffId
,
enterpriseId
);
if
(
ApolloUtils
.
useMessageCenter
())
{
noticeMessageService
.
addNoticeMessageBatch
(
noticeMessageBos
);
}
return
;
return
;
}
}
// 发送企微消息
// 发送企微消息
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
staffInfo
.
getWxEnterpriseId
());
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
staffInfo
.
getWxEnterpriseId
());
QywxNewsSendMessageDTO
newsSendMessageDTO
=
materialReportBuilder
.
buildQywxNewsMessage
(
context
,
qwDTO
);
QywxNewsSendMessageDTO
newsSendMessageDTO
=
materialReportBuilder
.
buildQywxNewsMessage
(
context
,
qwDTO
);
...
@@ -102,7 +131,46 @@ public class MaterialReportServiceImpl implements MaterialReportService {
...
@@ -102,7 +131,46 @@ public class MaterialReportServiceImpl implements MaterialReportService {
return
;
return
;
}
}
log
.
info
(
"发送企业图文消息参数{}"
,
JSON
.
toJSONString
(
newsSendMessageDTO
));
log
.
info
(
"发送企业图文消息参数{}"
,
JSON
.
toJSONString
(
newsSendMessageDTO
));
boolean
result
=
qywxSuiteApiService
.
sendMessage
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelf3thSecret
(),
newsSendMessageDTO
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
log
.
info
(
"成员{}发送素材企微使用报告结果 {}"
,
staffId
,
result
);
if
(!
ApolloUtils
.
useMessageCenter
()){
log
.
info
(
"消息中心-走老版消息通知"
);
/*消息中心修改此处*/
boolean
result
=
qywxSuiteApiService
.
sendMessage
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelf3thSecret
(),
newsSendMessageDTO
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
log
.
info
(
"成员{}发送素材企微使用报告结果 {}"
,
staffId
,
result
);
return
;
}
else
{
Map
<
String
,
String
>
variableMap
=
new
HashMap
<>();
QywxNewsArticleMessageDTO
qywxNewsArticleMessageDTO
=
newsSendMessageDTO
.
getArticleMessages
().
get
(
0
);
variableMap
.
put
(
"image"
,
qywxNewsArticleMessageDTO
.
getPicurl
());
variableMap
.
put
(
"page"
,
qywxNewsArticleMessageDTO
.
getPagepath
());
variableMap
.
put
(
"templateTitle"
,
qywxNewsArticleMessageDTO
.
getTitle
());
variableMap
.
put
(
"templateDescription"
,
qywxNewsArticleMessageDTO
.
getDescription
());
variableMap
.
put
(
"haobanNoticeMessageList"
,
JSONObject
.
toJSONString
(
noticeMessageBos
));
NoticeMessageTypeEnum
noticeMessageTypeEnum
=
null
;
if
(
MaterialReportType
.
WEEK
.
getCode
().
equals
(
context
.
getReportType
()))
{
noticeMessageTypeEnum
=
NoticeMessageTypeEnum
.
MATERIAL_REPORT_NOTIFY_WEEK
;
}
else
if
(
MaterialReportType
.
MONTH
.
getCode
().
equals
(
context
.
getReportType
()))
{
noticeMessageTypeEnum
=
NoticeMessageTypeEnum
.
MATERIAL_REPORT_NOTIFY_MONTH
;
}
if
(
ObjectUtil
.
isNull
(
noticeMessageTypeEnum
)){
log
.
info
(
"枚举不存在 context:{}"
,
JSONObject
.
toJSONString
(
context
));
return
;
}
noticeMessageHandler
.
sendMessage
(
NoticeMessageForm
.
builder
()
.
messageCode
(
noticeMessageTypeEnum
.
getMessageCode
())
.
mqRouterCode
(
noticeMessageTypeEnum
.
getRouterCode
())
.
businessId
(
"-1"
)
.
createTime
(
new
Date
())
.
enterpriseId
(
context
.
getEnterpriseId
())
.
uniqueKey
(
UniqueIdUtils
.
uniqueLongHex
())
.
userIdList
(
context
.
getClerkId
()
==
null
?
new
ArrayList
<>()
:
Collections
.
singletonList
(
context
.
getClerkId
()))
.
variableMap
(
variableMap
).
build
());
}
/*boolean result = qywxSuiteApiService.sendMessage(qwDTO.getThirdCorpid(), qwDTO.getSelf3thSecret(), newsSendMessageDTO,qwDTO.isSelf(),qwDTO.getUrlHost());
log.info("成员{}发送素材企微使用报告结果 {}", staffId, result);*/
}
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/content/impl/PotentialCustomerServiceImpl.java
View file @
f9cd43d2
...
@@ -21,6 +21,7 @@ import com.gic.haoban.manage.service.service.content.InteractRecordService;
...
@@ -21,6 +21,7 @@ import com.gic.haoban.manage.service.service.content.InteractRecordService;
import
com.gic.haoban.manage.service.service.content.PotentialCustomerService
;
import
com.gic.haoban.manage.service.service.content.PotentialCustomerService
;
import
com.gic.haoban.manage.service.service.content.adaptor.InteractRecordMessageBuilder
;
import
com.gic.haoban.manage.service.service.content.adaptor.InteractRecordMessageBuilder
;
import
com.gic.haoban.manage.service.service.content.adaptor.PotentialCustomerNotifyBuilder
;
import
com.gic.haoban.manage.service.service.content.adaptor.PotentialCustomerNotifyBuilder
;
import
com.gic.haoban.manage.service.util.ApolloUtils
;
import
com.gic.member.api.dto.es.MemberDataDTO
;
import
com.gic.member.api.dto.es.MemberDataDTO
;
import
com.gic.member.api.service.MemberOutApiService
;
import
com.gic.member.api.service.MemberOutApiService
;
import
com.gic.search.engine.api.constant.MemberDataEnum
;
import
com.gic.search.engine.api.constant.MemberDataEnum
;
...
@@ -263,7 +264,13 @@ public class PotentialCustomerServiceImpl implements PotentialCustomerService {
...
@@ -263,7 +264,13 @@ public class PotentialCustomerServiceImpl implements PotentialCustomerService {
// 区经 忽略
// 区经 忽略
potentialCustomerNotifyBuilder
.
filterAreaManage
(
context
);
potentialCustomerNotifyBuilder
.
filterAreaManage
(
context
);
// 构建应用内消息
// 构建应用内消息
potentialCustomerNotifyBuilder
.
sendHaoBanNotifyMessage
(
context
);
/*消息中心修改此处*/
if
(!
ApolloUtils
.
useMessageCenter
()){
log
.
info
(
"消息中心-走老版消息通知"
);
/*消息中心修改此处*/
potentialCustomerNotifyBuilder
.
sendHaoBanNotifyMessage
(
context
);
}
// 如果该导购id是成员在主门店时的导购id 发送应用消息
// 如果该导购id是成员在主门店时的导购id 发送应用消息
// 如果本批数据中无成员主门店数据 则不发送
// 如果本批数据中无成员主门店数据 则不发送
potentialCustomerNotifyBuilder
.
sendApplicationMessage
(
context
);
potentialCustomerNotifyBuilder
.
sendApplicationMessage
(
context
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/message/NoticeMessageHandler.java
0 → 100644
View file @
f9cd43d2
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
message
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.commons.util.GICMQClientUtil
;
import
com.gic.haoban.manage.service.service.notify.out.NoticeMessageApiServiceImpl
;
import
com.gic.message.center.api.subscribe.model.NoticeMessageForm
;
import
com.gic.mq.sdk.GicMQClient
;
import
org.slf4j.Logger
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
static
org
.
slf4j
.
LoggerFactory
.
getLogger
;
/**
* @description: 企业微信通知消息发送处理类
* @author: 巴弗
* @createDate: 2023/4/21 14:03
*/
@Service
public
class
NoticeMessageHandler
{
private
static
final
Logger
logger
=
getLogger
(
NoticeMessageHandler
.
class
);
/**
* 发送小程序消息
*/
public
void
sendMessage
(
NoticeMessageForm
noticeMessageForm
){
logger
.
info
(
"消息中心发送消息实体:{}"
,
JSONObject
.
toJSONString
(
noticeMessageForm
));
if
(
ObjectUtil
.
isEmpty
(
noticeMessageForm
.
getMessageCode
())
||
ObjectUtil
.
isEmpty
(
noticeMessageForm
.
getMqRouterCode
()))
{
logger
.
info
(
"消息中心发送消息实体 messageCode 或 mqRouterCode 不存在"
);
}
GicMQClient
client
=
GICMQClientUtil
.
getClientInstance
();
try
{
client
.
sendMessage
(
noticeMessageForm
.
getMqRouterCode
(),
JSONObject
.
toJSONString
(
noticeMessageForm
));
}
catch
(
Exception
e
)
{
logger
.
error
(
"消息中心发送消息实体发送异常 "
,
e
);
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/notify/out/NoticeMessageApiServiceImpl.java
View file @
f9cd43d2
...
@@ -9,18 +9,25 @@ import java.util.*;
...
@@ -9,18 +9,25 @@ import java.util.*;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
cn.hutool.core.collection.ListUtil
;
import
cn.hutool.core.collection.ListUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.clerk.api.dto.ClerkListDTO
;
import
com.gic.clerk.api.dto.ClerkListDTO
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.GICMQClientUtil
;
import
com.gic.commons.util.GICMQClientUtil
;
import
com.gic.commons.util.UniqueIdUtils
;
import
com.gic.haoban.manage.api.dto.StaffDTO
;
import
com.gic.haoban.manage.api.dto.StaffDTO
;
import
com.gic.haoban.manage.api.dto.notify.dto.NotifyMessageMQDTO
;
import
com.gic.haoban.manage.api.dto.notify.dto.NotifyMessageMQDTO
;
import
com.gic.haoban.manage.api.dto.notify.qdto.NotifyMessageBatchQDTO
;
import
com.gic.haoban.manage.api.dto.notify.qdto.NotifyMessageBatchQDTO
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.StaffClerkRelationApiService
;
import
com.gic.haoban.manage.api.service.StaffClerkRelationApiService
;
import
com.gic.haoban.manage.api.service.WxEnterpriseRelatedApiService
;
import
com.gic.haoban.manage.api.service.WxEnterpriseRelatedApiService
;
import
com.gic.haoban.manage.api.util.notify.NoticeMessageUtil
;
import
com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise
;
import
com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise
;
import
com.gic.haoban.manage.service.service.WxEnterpriseRelatedService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseRelatedService
;
import
com.gic.haoban.manage.service.service.message.NoticeMessageHandler
;
import
com.gic.haoban.manage.service.util.ApolloUtils
;
import
com.gic.message.center.api.subscribe.model.NoticeMessageForm
;
import
com.gic.wechat.api.dto.qywx.QywxTemplateCardSendMessageDTO
;
import
com.gic.wechat.api.dto.qywx.QywxTemplateCardSendMessageDTO
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.MapUtils
;
import
org.apache.commons.collections.MapUtils
;
...
@@ -92,8 +99,12 @@ public class NoticeMessageApiServiceImpl implements NoticeMessageApiService {
...
@@ -92,8 +99,12 @@ public class NoticeMessageApiServiceImpl implements NoticeMessageApiService {
@Autowired
@Autowired
private
ClerkService
clerkService
;
private
ClerkService
clerkService
;
@Override
@Autowired
public
void
noticeMessageMq
(
String
json
)
{
private
NoticeMessageHandler
noticeMessageHandler
;
/*消息中心修改此处
@Override*/
public
void
noticeMessageMq_old
(
String
json
)
{
logger
.
info
(
"通知消息:{}"
,
json
);
logger
.
info
(
"通知消息:{}"
,
json
);
NoticeMessageQDTO
messageQDTO
=
JSONObject
.
parseObject
(
json
,
NoticeMessageQDTO
.
class
);
NoticeMessageQDTO
messageQDTO
=
JSONObject
.
parseObject
(
json
,
NoticeMessageQDTO
.
class
);
NoticeMessageTypeEnum
messageTypeEnum
=
NoticeMessageTypeEnum
.
getByType
(
messageQDTO
.
getMessageType
());
NoticeMessageTypeEnum
messageTypeEnum
=
NoticeMessageTypeEnum
.
getByType
(
messageQDTO
.
getMessageType
());
...
@@ -147,6 +158,61 @@ public class NoticeMessageApiServiceImpl implements NoticeMessageApiService {
...
@@ -147,6 +158,61 @@ public class NoticeMessageApiServiceImpl implements NoticeMessageApiService {
}
}
@Override
@Override
public
void
noticeMessageMq
(
String
json
)
{
if
(!
ApolloUtils
.
useMessageCenter
()){
logger
.
info
(
"消息中心-走老版消息通知"
);
this
.
noticeMessageMq_old
(
json
);
return
;
}
NoticeMessageQDTO
messageQDTO
=
JSONObject
.
parseObject
(
json
,
NoticeMessageQDTO
.
class
);
logger
.
info
(
"messageType:{},消息中心测试通知消息:{}"
,
messageQDTO
.
getMessageType
(),
json
);
String
staffId
=
null
;
StaffClerkRelationDTO
clerkRelationDTO
=
null
;
if
(
StringUtils
.
isNotBlank
(
messageQDTO
.
getStaffId
()))
{
TabHaobanStaff
haobanStaff
=
staffService
.
selectById
(
messageQDTO
.
getStaffId
());
staffId
=
haobanStaff
!=
null
?
haobanStaff
.
getStaffId
()
:
null
;
}
if
(
StringUtils
.
isNotEmpty
(
messageQDTO
.
getClerkId
()))
{
clerkRelationDTO
=
staffClerkRelationService
.
getByClerkId
(
messageQDTO
.
getClerkId
());
}
if
(
staffId
==
null
&&
clerkRelationDTO
==
null
)
{
logger
.
info
(
"没有导购:{}"
,
messageQDTO
.
getClerkId
());
return
;
}
try
{
Map
<
String
,
String
>
variableMap
=
messageQDTO
.
getContentMap
();
variableMap
.
put
(
"pageParams"
,
JSONObject
.
toJSONString
(
messageQDTO
.
getExtendContent
()));
variableMap
.
put
(
"templateTitle"
,
messageQDTO
.
getTitle
());
NoticeMessageTypeEnum
noticeMessageTypeEnum
=
NoticeMessageTypeEnum
.
getByType
(
messageQDTO
.
getMessageType
());
if
(
ObjectUtil
.
isNull
(
noticeMessageTypeEnum
))
{
return
;
}
NoticeMessageForm
build
=
NoticeMessageForm
.
builder
()
.
messageCode
(
noticeMessageTypeEnum
.
getMessageCode
())
.
mqRouterCode
(
noticeMessageTypeEnum
.
getRouterCode
())
.
businessId
(
messageQDTO
.
getOptTargetId
())
.
createTime
(
new
Date
())
.
enterpriseId
(
messageQDTO
.
getEnterpriseId
())
.
uniqueKey
(
UniqueIdUtils
.
uniqueLongHex
())
.
variableMap
(
variableMap
).
build
();
if
(
clerkRelationDTO
!=
null
){
build
.
setUserIdList
(
Collections
.
singletonList
(
clerkRelationDTO
.
getClerkId
()));
}
else
{
build
.
setStaffIdList
(
Collections
.
singletonList
(
staffId
));
}
noticeMessageHandler
.
sendMessage
(
build
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"发送消息通知失败"
,
e
);
}
}
@Override
public
void
run
(
String
json
)
{
public
void
run
(
String
json
)
{
this
.
noticeMessageMq
(
json
);
this
.
noticeMessageMq
(
json
);
}
}
...
@@ -154,11 +220,17 @@ public class NoticeMessageApiServiceImpl implements NoticeMessageApiService {
...
@@ -154,11 +220,17 @@ public class NoticeMessageApiServiceImpl implements NoticeMessageApiService {
@Override
@Override
public
void
noticeMessageBatchMq
(
String
json
)
{
public
void
noticeMessageBatchMq
(
String
json
)
{
NotifyMessageBatchQDTO
notifyMessageBatchQDTO
=
JSONObject
.
parseObject
(
json
,
NotifyMessageBatchQDTO
.
class
);
NotifyMessageBatchQDTO
notifyMessageBatchQDTO
=
JSONObject
.
parseObject
(
json
,
NotifyMessageBatchQDTO
.
class
);
if
(!
ApolloUtils
.
useMessageCenter
()){
logger
.
info
(
"消息中心-走老版消息通知"
);
this
.
batchSendMessage_old
(
notifyMessageBatchQDTO
);
return
;
}
batchSendMessage
(
notifyMessageBatchQDTO
);
batchSendMessage
(
notifyMessageBatchQDTO
);
}
}
@Override
/*消息中心修改此处
public
ServiceResponse
<
Void
>
batchSendMessage
(
NotifyMessageBatchQDTO
notifyMessageBatchQDTO
)
{
@Override*/
public
ServiceResponse
<
Void
>
batchSendMessage_old
(
NotifyMessageBatchQDTO
notifyMessageBatchQDTO
)
{
String
enterpriseId
=
notifyMessageBatchQDTO
.
getEnterpriseId
();
String
enterpriseId
=
notifyMessageBatchQDTO
.
getEnterpriseId
();
List
<
String
>
storeIdList
=
notifyMessageBatchQDTO
.
getStoreIdList
();
List
<
String
>
storeIdList
=
notifyMessageBatchQDTO
.
getStoreIdList
();
if
(
CollectionUtils
.
isEmpty
(
storeIdList
))
{
if
(
CollectionUtils
.
isEmpty
(
storeIdList
))
{
...
@@ -209,7 +281,76 @@ public class NoticeMessageApiServiceImpl implements NoticeMessageApiService {
...
@@ -209,7 +281,76 @@ public class NoticeMessageApiServiceImpl implements NoticeMessageApiService {
return
ServiceResponse
.
success
();
return
ServiceResponse
.
success
();
}
}
@Override
public
ServiceResponse
<
Void
>
batchSendMessage
(
NotifyMessageBatchQDTO
notifyMessageBatchQDTO
)
{
logger
.
info
(
"消息中心测试通知消息:{}"
,
JSONObject
.
toJSONString
(
notifyMessageBatchQDTO
));
String
enterpriseId
=
notifyMessageBatchQDTO
.
getEnterpriseId
();
List
<
String
>
storeIdList
=
notifyMessageBatchQDTO
.
getStoreIdList
();
if
(
CollectionUtils
.
isEmpty
(
storeIdList
))
{
logger
.
info
(
"门店列表为空"
);
return
ServiceResponse
.
success
();
}
int
count
=
wxEnterpriseRelatedService
.
getRelationCount
(
enterpriseId
);
if
(
count
==
0
)
{
logger
.
info
(
"商户未关联好办或都已停用enterpriseId={}"
,
enterpriseId
);
return
ServiceResponse
.
success
();
}
List
<
String
>
clerkIdList
=
clerkService
.
getclerkListByStoreIds
(
storeIdList
);
if
(
CollectionUtils
.
isEmpty
(
clerkIdList
))
{
logger
.
info
(
"门店导购列表为空"
);
return
ServiceResponse
.
success
();
}
List
<
StaffClerkRelationDTO
>
relationList
=
staffClerkRelationService
.
listByClerkIds
(
clerkIdList
);
if
(
CollectionUtils
.
isEmpty
(
relationList
))
{
logger
.
info
(
"成员关联列表为空"
);
return
ServiceResponse
.
success
();
}
try
{
//TODO 这里有个回调未处理
Map
<
String
,
String
>
variableMap
=
notifyMessageBatchQDTO
.
getContentMap
();
variableMap
.
put
(
"pageParams"
,
JSONObject
.
toJSONString
(
notifyMessageBatchQDTO
.
getExtendContent
()));
variableMap
.
put
(
"extendContent"
,
JSONObject
.
toJSONString
(
notifyMessageBatchQDTO
.
getExtendContent
()));
variableMap
.
put
(
"templateTitle"
,
notifyMessageBatchQDTO
.
getTitle
());
NoticeMessageTypeEnum
noticeMessageTypeEnum
=
NoticeMessageTypeEnum
.
getByType
(
notifyMessageBatchQDTO
.
getMessageType
());
if
(
ObjectUtil
.
isNull
(
noticeMessageTypeEnum
))
{
return
ServiceResponse
.
failure
(
"-1"
,
"模版枚举不存在"
);
}
noticeMessageHandler
.
sendMessage
(
NoticeMessageForm
.
builder
()
.
messageCode
(
noticeMessageTypeEnum
.
getMessageCode
())
.
mqRouterCode
(
noticeMessageTypeEnum
.
getRouterCode
())
.
businessId
(
notifyMessageBatchQDTO
.
getOptTargetId
())
.
createTime
(
new
Date
())
.
enterpriseId
(
notifyMessageBatchQDTO
.
getEnterpriseId
())
.
uniqueKey
(
UniqueIdUtils
.
uniqueLongHex
())
.
userIdList
(
relationList
.
stream
().
map
(
StaffClerkRelationDTO:
:
getClerkId
).
distinct
().
collect
(
Collectors
.
toList
()))
.
variableMap
(
variableMap
).
build
());
}
catch
(
Exception
e
)
{
logger
.
error
(
"发送消息通知失败"
,
e
);
}
return
ServiceResponse
.
success
();
}
private
String
getUrlParams
(
Map
<
String
,
Object
>
extendContent
)
{
String
data
=
extendContent
!=
null
?
JSONObject
.
toJSONString
(
extendContent
)
:
null
;
if
(
StringUtils
.
isNotBlank
(
data
))
{
try
{
data
=
URLEncoder
.
encode
(
data
,
StandardCharsets
.
UTF_8
.
name
());
}
catch
(
UnsupportedEncodingException
e
)
{
logger
.
error
(
e
.
getMessage
());
}
}
return
data
;
}
private
void
sendMessage
(
NotifyMessageBatchQDTO
notifyMessageBatchQDTO
,
List
<
StaffClerkRelationDTO
>
list
,
Set
<
String
>
userIdSet
,
WxEnterpriseQwDTO
qwDTO
)
{
private
void
sendMessage
(
NotifyMessageBatchQDTO
notifyMessageBatchQDTO
,
List
<
StaffClerkRelationDTO
>
list
,
Set
<
String
>
userIdSet
,
WxEnterpriseQwDTO
qwDTO
)
{
//企业微信模板
//企业微信模板
List
<
TemplateContentBO
>
contentList
=
getDescriotion
(
notifyMessageBatchQDTO
);
List
<
TemplateContentBO
>
contentList
=
getDescriotion
(
notifyMessageBatchQDTO
);
//好办模板
//好办模板
...
@@ -324,6 +465,13 @@ public class NoticeMessageApiServiceImpl implements NoticeMessageApiService {
...
@@ -324,6 +465,13 @@ public class NoticeMessageApiServiceImpl implements NoticeMessageApiService {
return
ServiceResponse
.
success
(
true
);
return
ServiceResponse
.
success
(
true
);
}
}
@Override
public
ServiceResponse
<
Boolean
>
addOrCreateNoticeMessage
(
List
<
com
.
gic
.
haoban
.
manage
.
api
.
dto
.
qdto
.
NoticeMessageQDTO
>
qdto
)
{
noticeMessageService
.
addNoticeMessageBatch
(
EntityUtil
.
changeEntityListByJSON
(
NoticeMessageBO
.
class
,
qdto
));
return
ServiceResponse
.
success
();
}
/**
/**
* 获取详情
* 获取详情
*
*
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MessageApiServiceImpl.java
View file @
f9cd43d2
...
@@ -574,6 +574,7 @@ public class MessageApiServiceImpl implements MessageApiService {
...
@@ -574,6 +574,7 @@ public class MessageApiServiceImpl implements MessageApiService {
}
}
@Override
@Override
@Deprecated
public
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
<
Void
>
sendPreMessage
(
String
enterpriseId
,
String
storeId
,
public
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
<
Void
>
sendPreMessage
(
String
enterpriseId
,
String
storeId
,
String
message
)
{
String
message
)
{
log
.
info
(
"线下预约通知,storeId={}"
,
storeId
);
log
.
info
(
"线下预约通知,storeId={}"
,
storeId
);
...
@@ -680,7 +681,11 @@ public class MessageApiServiceImpl implements MessageApiService {
...
@@ -680,7 +681,11 @@ public class MessageApiServiceImpl implements MessageApiService {
Map
<
String
,
String
>
map
=
new
HashMap
<>();
Map
<
String
,
String
>
map
=
new
HashMap
<>();
if
(
CollectionUtils
.
isNotEmpty
(
valueList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
valueList
))
{
for
(
int
i
=
0
;
i
<
valueList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
valueList
.
size
();
i
++)
{
map
.
put
(
""
+
(
i
+
1
),
valueList
.
get
(
i
));
String
key
=
""
+
(
i
+
1
);
map
.
put
(
key
,
valueList
.
get
(
i
));
if
(
key
.
equals
(
"1"
))
{
map
.
put
(
"goodsName"
,
valueList
.
get
(
i
));
}
}
}
}
}
MemberDataDTO
member
=
this
.
findMember
(
enterpriseId
,
memberId
);
MemberDataDTO
member
=
this
.
findMember
(
enterpriseId
,
memberId
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffDepartmentRelatedApiServiceImpl.java
View file @
f9cd43d2
...
@@ -213,7 +213,7 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
...
@@ -213,7 +213,7 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
,
NoticeMessageTypeEnum
.
CLERK_DEL_AGREE
.
getType
(),
null
,
params
,
jsonObject
);
,
NoticeMessageTypeEnum
.
CLERK_DEL_AGREE
.
getType
(),
null
,
params
,
jsonObject
);
}
else
{
}
else
{
NoticeMessageUtil
.
sendNoticeMessage
(
tab
.
getEnterpriseId
(),
tab
.
getClerkId
()
NoticeMessageUtil
.
sendNoticeMessage
(
tab
.
getEnterpriseId
(),
tab
.
getClerkId
()
,
NoticeMessageTypeEnum
.
CLERK_DEL_
AGRE
E
.
getType
(),
null
,
params
,
jsonObject
);
,
NoticeMessageTypeEnum
.
CLERK_DEL_
REFUS
E
.
getType
(),
null
,
params
,
jsonObject
);
}
}
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/util/ApolloUtils.java
0 → 100644
View file @
f9cd43d2
package
com
.
gic
.
haoban
.
manage
.
service
.
util
;
import
com.ctrip.framework.apollo.Config
;
import
com.ctrip.framework.apollo.ConfigService
;
public
class
ApolloUtils
{
/**
* 旧的调用发送,是否采用新的消息中心开关1:是 0:否
* @return
*/
public
static
boolean
useMessageCenter
()
{
Config
config
=
ConfigService
.
getConfig
(
"COMMON.gic-properties"
);
String
messageCenterSwitch
=
config
.
getProperty
(
"messageCenterSwitch"
,
"0"
);
return
"1"
.
equals
(
messageCenterSwitch
);
}
}
haoban-manage3-service/src/test/java/GroupMessageServiceTest.java
View file @
f9cd43d2
...
@@ -116,8 +116,8 @@ public class GroupMessageServiceTest {
...
@@ -116,8 +116,8 @@ public class GroupMessageServiceTest {
qywxMomentInfoQDTO
.
setEndTime
(
1681906519L
);
qywxMomentInfoQDTO
.
setEndTime
(
1681906519L
);
qywxMomentInfoQDTO
.
setCreatorId
(
"wo59NLDQAAbjSBA575NouC1pUYQgCOtw"
);
qywxMomentInfoQDTO
.
setCreatorId
(
"wo59NLDQAAbjSBA575NouC1pUYQgCOtw"
);
qywxMomentInfoQDTO
.
setPageSize
(
20
);
qywxMomentInfoQDTO
.
setPageSize
(
20
);
ServiceResponse
<
QywxMomentRespDTO
>
serviceResponse
=
qywxSuiteApiService
.
queryQywxMomentList
(
qywxMomentInfoQDTO
);
//
ServiceResponse<QywxMomentRespDTO> serviceResponse = qywxSuiteApiService.queryQywxMomentList(qywxMomentInfoQDTO);
System
.
out
.
println
(
JSON
.
toJSONString
(
serviceResponse
));
//
System.out.println(JSON.toJSONString(serviceResponse));
}
}
@Test
@Test
...
...
haoban-manage3-service/src/test/java/MaterialReportServiceTest.java
View file @
f9cd43d2
...
@@ -103,7 +103,7 @@ public class MaterialReportServiceTest {
...
@@ -103,7 +103,7 @@ public class MaterialReportServiceTest {
// params.put("t", 1);
// params.put("t", 1);
// params.put("d", "04");
// params.put("d", "04");
String
s
=
params
.
toJSONString
();
String
s
=
params
.
toJSONString
();
String
s1
=
NoticeMessageUtil
.
buildMiniAppUrl
(
NoticeMessageTypeEnum
.
MATERIAL_REPORT_NOTIFY
,
s
);
String
s1
=
NoticeMessageUtil
.
buildMiniAppUrl
(
NoticeMessageTypeEnum
.
MATERIAL_REPORT_NOTIFY
_MONTH
,
s
);
System
.
out
.
println
(
"/pages/route/index?pageType=hbapp_material_report&data="
.
length
());
System
.
out
.
println
(
"/pages/route/index?pageType=hbapp_material_report&data="
.
length
());
System
.
out
.
println
(
s1
);
System
.
out
.
println
(
s1
);
System
.
out
.
println
(
s1
.
length
());
System
.
out
.
println
(
s1
.
length
());
...
...
haoban-manage3-service/src/test/java/NotityTest.java
View file @
f9cd43d2
...
@@ -124,8 +124,8 @@ public class NotityTest {
...
@@ -124,8 +124,8 @@ public class NotityTest {
articleInfo
.
setPicurl
(
"https://platform-1251519181.cos.ap-shanghai.myqcloud.com/image/newdmwltest/enterprise_common-e1e8b3d46fdb4486ad545aae6cba67a1.png"
);
articleInfo
.
setPicurl
(
"https://platform-1251519181.cos.ap-shanghai.myqcloud.com/image/newdmwltest/enterprise_common-e1e8b3d46fdb4486ad545aae6cba67a1.png"
);
messageDTO
.
setArticleMessages
(
Arrays
.
asList
(
articleInfo
));
messageDTO
.
setArticleMessages
(
Arrays
.
asList
(
articleInfo
));
boolean
b
=
qywxSuiteApiService
.
sendMessage
(
corpid
,
config
.
getWxSuiteid
(),
messageDTO
);
/*
boolean b = qywxSuiteApiService.sendMessage(corpid, config.getWxSuiteid(), messageDTO);
System
.
out
.
println
(
b
);
System.out.println(b);
*/
}
}
@Test
@Test
...
@@ -138,7 +138,7 @@ public class NotityTest {
...
@@ -138,7 +138,7 @@ public class NotityTest {
search
.
setSuiteid
(
config
.
getWxSuiteid
());
search
.
setSuiteid
(
config
.
getWxSuiteid
());
search
.
setChatType
(
"single"
);
search
.
setChatType
(
"single"
);
Date
date
=
DateUtils
.
addDays
(
new
Date
(),
-
1
);
Date
date
=
DateUtils
.
addDays
(
new
Date
(),
-
1
);
ServiceResponse
<
QywxGroupMsgResp
>
serviceResponse
=
qywxSuiteApiService
.
queryQywxGroupMessageList
(
search
);
//
ServiceResponse<QywxGroupMsgResp> serviceResponse = qywxSuiteApiService.queryQywxGroupMessageList(search);
}
}
...
...
haoban-manage3-service/src/test/java/test.java
View file @
f9cd43d2
...
@@ -69,7 +69,7 @@ public class test {
...
@@ -69,7 +69,7 @@ public class test {
// params.put("t", 1);
// params.put("t", 1);
// params.put("d", "04");
// params.put("d", "04");
String
s
=
params
.
toJSONString
();
String
s
=
params
.
toJSONString
();
String
s1
=
NoticeMessageUtil
.
buildMiniAppUrl
(
NoticeMessageTypeEnum
.
MATERIAL_REPORT_NOTIFY
,
s
);
String
s1
=
NoticeMessageUtil
.
buildMiniAppUrl
(
NoticeMessageTypeEnum
.
MATERIAL_REPORT_NOTIFY
_MONTH
,
s
);
System
.
out
.
println
(
"/pages/route/index?pageType=hbapp_material_report&data="
.
length
());
System
.
out
.
println
(
"/pages/route/index?pageType=hbapp_material_report&data="
.
length
());
System
.
out
.
println
(
s1
);
System
.
out
.
println
(
s1
);
System
.
out
.
println
(
s1
.
length
());
System
.
out
.
println
(
s1
.
length
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment