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
eba9f8ac
Commit
eba9f8ac
authored
Sep 07, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除无效代码
parent
2cdeac4d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 additions
and
82 deletions
+1
-82
StaffDepartmentRelatedApiService.java
.../manage/api/service/StaffDepartmentRelatedApiService.java
+0
-11
NoticeMessageUtil.java
.../gic/haoban/manage/api/util/notify/NoticeMessageUtil.java
+1
-45
StaffDepartmentRelatedApiServiceImpl.java
...ervice/out/impl/StaffDepartmentRelatedApiServiceImpl.java
+0
-26
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/StaffDepartmentRelatedApiService.java
View file @
eba9f8ac
...
@@ -81,15 +81,4 @@ public interface StaffDepartmentRelatedApiService {
...
@@ -81,15 +81,4 @@ public interface StaffDepartmentRelatedApiService {
*/
*/
void
sendBindAuditMessage
(
String
auditId
,
String
staffId
,
String
clerkId
,
String
reason
,
boolean
isRefuse
);
void
sendBindAuditMessage
(
String
auditId
,
String
staffId
,
String
clerkId
,
String
reason
,
boolean
isRefuse
);
/**
* 新增导购
*
* @param auditId
* @param staffId
* @param clerkId
* @param reason
* @param isRefuse
*/
void
sendClerkAddAuditMessage
(
String
auditId
,
String
staffId
,
String
clerkId
,
String
reason
,
boolean
isRefuse
);
}
}
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/util/notify/NoticeMessageUtil.java
View file @
eba9f8ac
...
@@ -5,12 +5,9 @@ import com.gic.commons.util.GICMQClientUtil;
...
@@ -5,12 +5,9 @@ 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
;
import
com.gic.haoban.manage.api.enums.NoticeMessageTypeEnum
;
import
com.gic.haoban.manage.api.enums.NoticeMessageTypeEnum
;
import
com.gic.mq.sdk.GicMQClient
;
import
com.gic.mq.sdk.GicMQClient
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
static
org
.
slf4j
.
LoggerFactory
.
getLogger
;
import
static
org
.
slf4j
.
LoggerFactory
.
getLogger
;
...
@@ -55,54 +52,13 @@ public class NoticeMessageUtil {
...
@@ -55,54 +52,13 @@ public class NoticeMessageUtil {
logger
.
info
(
"发送消息:{}"
,
ret
);
logger
.
info
(
"发送消息:{}"
,
ret
);
GicMQClient
clientInstance
=
GICMQClientUtil
.
getClientInstance
();
GicMQClient
clientInstance
=
GICMQClientUtil
.
getClientInstance
();
try
{
try
{
// com.gic.haoban.manage.api.service.notify.NoticeMessageApiService.run
clientInstance
.
sendMessage
(
NOTICE_MESSAGE
,
ret
);
clientInstance
.
sendMessage
(
NOTICE_MESSAGE
,
ret
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
info
(
"发送消息异常:{}"
,
e
);
logger
.
info
(
"发送消息异常:{}"
,
e
);
}
}
}
}
/**
* 发送消息 对象里面的字段 解析
* enterpriseId 企业id
* clerkId 执行人导购
* messageType 消息类型 NoticeMessageTypeEnum
* optTargetId 操作对象
* fieldMap 解析模板的字段
* extendField 拓展字段给前端使用 没有可以为null
* @param list
*/
public
static
void
sendNoticeMessageBatch
(
List
<
NoticeMessageQDTO
>
list
)
{
if
(
CollectionUtils
.
isEmpty
(
list
))
{
logger
.
info
(
"没有哦需要发送的消息"
);
return
;
}
List
<
String
>
ret
=
new
ArrayList
<
String
>();
for
(
NoticeMessageQDTO
noticeMessageQDTO
:
list
)
{
String
retStr
=
JSONObject
.
toJSONString
(
noticeMessageQDTO
);
if
(
StringUtils
.
isAnyBlank
(
noticeMessageQDTO
.
getEnterpriseId
(),
noticeMessageQDTO
.
getClerkId
()))
{
logger
.
info
(
"参数不存在:{}"
,
retStr
);
throw
new
RuntimeException
(
"必传参数没传:"
+
noticeMessageQDTO
.
getClerkId
());
}
NoticeMessageTypeEnum
messageTypeEnum
=
NoticeMessageTypeEnum
.
getByType
(
noticeMessageQDTO
.
getMessageType
());
if
(
messageTypeEnum
==
null
)
{
logger
.
info
(
"类型不存在:{}"
,
retStr
);
throw
new
RuntimeException
(
"消息类型不存在"
);
}
ret
.
add
(
retStr
);
logger
.
info
(
"发送消息单条:{}"
,
retStr
);
}
logger
.
info
(
"批量发送消息:{}"
,
ret
.
size
());
GicMQClient
clientInstance
=
GICMQClientUtil
.
getClientInstance
();
try
{
clientInstance
.
sendBatchMessages
(
NOTICE_MESSAGE
,
ret
);
}
catch
(
Exception
e
)
{
logger
.
info
(
"发送消息异常:{}"
,
e
);
}
}
/**
/**
* 发送消息 使用staffId发送
* 发送消息 使用staffId发送
*
*
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffDepartmentRelatedApiServiceImpl.java
View file @
eba9f8ac
...
@@ -16,7 +16,6 @@ import com.gic.haoban.manage.api.util.notify.NoticeMessageUtil;
...
@@ -16,7 +16,6 @@ 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.dao.mapper.StaffDepartmentRelatedMapper
;
import
com.gic.haoban.manage.service.dao.mapper.StaffDepartmentRelatedMapper
;
import
com.gic.haoban.manage.service.dao.mapper.TabHaobanStaffClerkRelationMapper
;
import
com.gic.haoban.manage.service.dao.mapper.TabHaobanStaffClerkRelationMapper
;
import
com.gic.haoban.manage.service.dao.mapper.WxEnterpriseMapper
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaffClerkRelation
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaffClerkRelation
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaffDepartmentRelated
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaffDepartmentRelated
;
import
com.gic.haoban.manage.service.service.StaffDepartmentRelatedService
;
import
com.gic.haoban.manage.service.service.StaffDepartmentRelatedService
;
...
@@ -49,8 +48,6 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
...
@@ -49,8 +48,6 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
@Autowired
@Autowired
private
QywxSuiteApiService
qywxSuiteApiService
;
private
QywxSuiteApiService
qywxSuiteApiService
;
@Autowired
@Autowired
private
WxEnterpriseMapper
wxEnterpriseMapper
;
@Autowired
private
Config
config
;
private
Config
config
;
@Autowired
@Autowired
private
TabHaobanStaffClerkRelationMapper
tabHaobanStaffClerkRelationMapper
;
private
TabHaobanStaffClerkRelationMapper
tabHaobanStaffClerkRelationMapper
;
...
@@ -519,27 +516,4 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
...
@@ -519,27 +516,4 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
}
}
}
}
@Override
public
void
sendClerkAddAuditMessage
(
String
auditId
,
String
staffId
,
String
clerkId
,
String
reason
,
boolean
isRefuse
)
{
ClerkDTO
clerkDTO
=
clerkService
.
getClerkByClerkId
(
clerkId
);
if
(
clerkDTO
==
null
)
{
return
;
}
StaffDTO
staffDTO
=
staffApiService
.
selectById
(
staffId
);
//字段
Map
<
String
,
String
>
params
=
new
HashMap
<
String
,
String
>();
params
.
put
(
"staffName"
,
staffDTO
.
getStaffName
());
params
.
put
(
"clerkCode"
,
clerkDTO
.
getClerkCode
());
params
.
put
(
"reason"
,
reason
);
//参数
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"storeId"
,
clerkDTO
.
getStoreId
());
//发送消息
if
(
isRefuse
)
{
NoticeMessageUtil
.
sendNoticeMessageByStaff
(
clerkDTO
.
getEnterpriseId
(),
staffId
,
clerkId
,
NoticeMessageTypeEnum
.
STORE_ACCOUNT_REFUSE
.
getType
(),
auditId
,
params
,
jsonObject
);
}
else
{
NoticeMessageUtil
.
sendNoticeMessageByStaff
(
clerkDTO
.
getEnterpriseId
(),
staffId
,
clerkId
,
NoticeMessageTypeEnum
.
STORE_ACCOUNT_AGREE
.
getType
(),
auditId
,
params
,
jsonObject
);
}
}
}
}
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