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
ede647c3
Commit
ede647c3
authored
Feb 06, 2025
by
王祖波
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据导出消息
parent
e362a1cc
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
5 deletions
+21
-5
NoticeMessageTypeEnum.java
...om/gic/haoban/manage/api/enums/NoticeMessageTypeEnum.java
+3
-1
NoticeMessageUtil.java
.../gic/haoban/manage/api/util/notify/NoticeMessageUtil.java
+11
-3
NoticeMessageHandler.java
.../manage/service/service/message/NoticeMessageHandler.java
+5
-0
NotityTest.java
haoban-manage3-service/src/test/java/NotityTest.java
+2
-1
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/enums/NoticeMessageTypeEnum.java
View file @
ede647c3
...
@@ -99,7 +99,9 @@ public enum NoticeMessageTypeEnum {
...
@@ -99,7 +99,9 @@ public enum NoticeMessageTypeEnum {
CASH_APPLY_OFFLINE_SUCCESS_NOTIFY
(
7003
,
"提现通知"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"cash_apply_offline_success_notify"
,
"/pages/route/index?pageType="
,
"hbapp_withdraw_list"
,
"cashApplyOfflineSuccessNotify"
,
"haobanNotice"
),
CASH_APPLY_OFFLINE_SUCCESS_NOTIFY
(
7003
,
"提现通知"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"cash_apply_offline_success_notify"
,
"/pages/route/index?pageType="
,
"hbapp_withdraw_list"
,
"cashApplyOfflineSuccessNotify"
,
"haobanNotice"
),
AUTHORIZED_LOGIN_NOTIFY
(
8001
,
"账号授权通知"
,
NoticeMessageCategoryTypeEnum
.
AUTHORIZED
.
getType
(),
"authorized_login_notify"
,
"/pages/route/index?pageType="
,
"hbapp_video_auth"
,
"authorizedLoginNotify"
,
"haobanNotice"
),
AUTHORIZED_LOGIN_NOTIFY
(
8001
,
"账号授权通知"
,
NoticeMessageCategoryTypeEnum
.
AUTHORIZED
.
getType
(),
"authorized_login_notify"
,
"/pages/route/index?pageType="
,
"hbapp_video_auth"
,
"authorizedLoginNotify"
,
"haobanNotice"
),
AUTHORIZED_LOGOUT_NOTIFY
(
8002
,
"账号异常退出登录通知"
,
NoticeMessageCategoryTypeEnum
.
AUTHORIZED
.
getType
(),
"authorized_logout_notify"
,
"/pages/route/index?pageType="
,
"hbapp_video_auth"
,
"authorizedLogoutNotify"
,
"haobanNotice"
);
AUTHORIZED_LOGOUT_NOTIFY
(
8002
,
"账号异常退出登录通知"
,
NoticeMessageCategoryTypeEnum
.
AUTHORIZED
.
getType
(),
"authorized_logout_notify"
,
"/pages/route/index?pageType="
,
"hbapp_video_auth"
,
"authorizedLogoutNotify"
,
"haobanNotice"
),
DATA_EXPORT_NOTIFY
(
9001
,
"数据导出通知"
,
NoticeMessageCategoryTypeEnum
.
OTHER
.
getType
(),
"data_export_notify"
,
"/pages/route/index?pageType="
,
"hbapp_data_export"
,
"dataExportNotify"
,
"haobanNotice"
);
/**
/**
* 消息类型
* 消息类型
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/util/notify/NoticeMessageUtil.java
View file @
ede647c3
package
com
.
gic
.
haoban
.
manage
.
api
.
util
.
notify
;
package
com
.
gic
.
haoban
.
manage
.
api
.
util
.
notify
;
import
cn.hutool.core.date.DateUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.commons.util.GICMQClientUtil
;
import
com.gic.commons.util.GICMQClientUtil
;
import
com.gic.haoban.manage.api.dto.notify.qdto.NoticeMessageQDTO
;
import
com.gic.haoban.manage.api.dto.notify.qdto.NoticeMessageQDTO
;
...
@@ -12,9 +13,7 @@ import org.slf4j.Logger;
...
@@ -12,9 +13,7 @@ import org.slf4j.Logger;
import
java.io.UnsupportedEncodingException
;
import
java.io.UnsupportedEncodingException
;
import
java.net.URLEncoder
;
import
java.net.URLEncoder
;
import
java.nio.charset.StandardCharsets
;
import
java.nio.charset.StandardCharsets
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.List
;
import
java.util.Map
;
import
static
org
.
slf4j
.
LoggerFactory
.
getLogger
;
import
static
org
.
slf4j
.
LoggerFactory
.
getLogger
;
...
@@ -145,6 +144,15 @@ public class NoticeMessageUtil {
...
@@ -145,6 +144,15 @@ public class NoticeMessageUtil {
}
}
}
}
public
static
void
sendDataExportNotify
(
String
enterpriseId
,
String
clerkId
,
String
taskName
,
Date
exportTime
)
{
Map
<
String
,
String
>
contentMap
=
new
HashMap
<
String
,
String
>();
contentMap
.
put
(
"taskName"
,
taskName
);
contentMap
.
put
(
"exportTime"
,
DateUtil
.
formatDateTime
(
exportTime
));
Map
<
String
,
Object
>
extendContent
=
new
HashMap
<>();
NoticeMessageUtil
.
sendNoticeMessage
(
enterpriseId
,
clerkId
,
NoticeMessageTypeEnum
.
DATA_EXPORT_NOTIFY
.
getType
(),
null
,
contentMap
,
extendContent
);
}
/**
/**
* 构建小程序跳转url
* 构建小程序跳转url
* @param messageTypeEnum
* @param messageTypeEnum
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/message/NoticeMessageHandler.java
View file @
ede647c3
...
@@ -3,6 +3,8 @@ package com.gic.haoban.manage.service.service.message;
...
@@ -3,6 +3,8 @@ package com.gic.haoban.manage.service.service.message;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.commons.util.GICMQClientUtil
;
import
com.gic.commons.util.GICMQClientUtil
;
import
com.gic.haoban.manage.api.enums.NoticeMessageTypeEnum
;
import
com.gic.haoban.manage.api.util.notify.NoticeMessageUtil
;
import
com.gic.message.center.api.subscribe.model.NoticeMessageForm
;
import
com.gic.message.center.api.subscribe.model.NoticeMessageForm
;
import
com.gic.mq.sdk.GicMQClient
;
import
com.gic.mq.sdk.GicMQClient
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
...
@@ -11,6 +13,9 @@ import org.springframework.stereotype.Service;
...
@@ -11,6 +13,9 @@ import org.springframework.stereotype.Service;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.time.LocalTime
;
import
java.time.LocalTime
;
import
java.time.temporal.ChronoUnit
;
import
java.time.temporal.ChronoUnit
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.Map
;
import
static
org
.
slf4j
.
LoggerFactory
.
getLogger
;
import
static
org
.
slf4j
.
LoggerFactory
.
getLogger
;
...
...
haoban-manage3-service/src/test/java/NotityTest.java
View file @
ede647c3
...
@@ -10,6 +10,7 @@ import com.gic.haoban.manage.api.enums.NoticeMessageTypeEnum;
...
@@ -10,6 +10,7 @@ import com.gic.haoban.manage.api.enums.NoticeMessageTypeEnum;
import
com.gic.haoban.manage.api.service.CheckQywxSettingApiService
;
import
com.gic.haoban.manage.api.service.CheckQywxSettingApiService
;
import
com.gic.haoban.manage.api.service.QywxTagApiService
;
import
com.gic.haoban.manage.api.service.QywxTagApiService
;
import
com.gic.haoban.manage.api.service.notify.NoticeMessageApiService
;
import
com.gic.haoban.manage.api.service.notify.NoticeMessageApiService
;
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.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.wechat.api.dto.qdto.group.QywxGroupMessageQDTO
;
import
com.gic.wechat.api.dto.qdto.group.QywxGroupMessageQDTO
;
...
@@ -79,7 +80,7 @@ public class NotityTest {
...
@@ -79,7 +80,7 @@ public class NotityTest {
@Test
@Test
public
void
test2
()
{
public
void
test2
()
{
NoticeMessageUtil
.
sendDataExportNotify
(
"ff8080815dacd3a2015dacd3ef5c0000"
,
"26efaa8144e14f60b2f4d48ffe9f708c"
,
"导出测试"
,
DateUtil
.
date
());
}
}
...
...
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