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
719b75c2
Commit
719b75c2
authored
Apr 23, 2023
by
songyinghui
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bugfix_multi_area' into developer
parents
faa5ccde
16525c02
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
4 deletions
+23
-4
MaterialReportContext.java
...ervice/pojo/bo/content/context/MaterialReportContext.java
+7
-2
MaterialReportBuilder.java
...ervice/service/content/adaptor/MaterialReportBuilder.java
+11
-2
MaterialReportServiceImpl.java
...rvice/service/content/impl/MaterialReportServiceImpl.java
+5
-0
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/pojo/bo/content/context/MaterialReportContext.java
View file @
719b75c2
...
...
@@ -62,6 +62,11 @@ public class MaterialReportContext {
private
String
clerkId
;
/**
* 是否是区经
*/
private
boolean
isManager
;
/**
* 主门店
*/
private
String
mainStoreId
;
...
...
@@ -97,8 +102,8 @@ public class MaterialReportContext {
log
.
info
(
"成员未绑定导购, staffId: {}"
,
this
.
staffId
);
return
Collections
.
emptyList
();
}
if
(
StringUtils
.
isBlank
(
this
.
mainStoreId
)
)
{
log
.
info
(
"成员
{} 没有主门店数据, 区经角色
不发送小程序消息通知 "
,
this
.
staffId
);
if
(
this
.
isManager
)
{
log
.
info
(
"成员
{}为区经角色,
不发送小程序消息通知 "
,
this
.
staffId
);
return
Collections
.
emptyList
();
}
return
this
.
staffClerkRelations
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/content/adaptor/MaterialReportBuilder.java
View file @
719b75c2
...
...
@@ -82,12 +82,17 @@ public class MaterialReportBuilder {
if
(
context
.
getStaffClerkRelations
().
size
()
==
1
)
{
StaffClerkRelationDTO
staffClerkRelationDTO
=
context
.
getStaffClerkRelations
().
get
(
0
);
if
(
staffClerkRelationDTO
.
getClerkType
()
!=
null
&&
staffClerkRelationDTO
.
getClerkType
()
==
2
)
{
log
.
info
(
"成员clerId:{}, staffId: {} 为区经角色"
,
staffClerkRelationDTO
.
getClerkId
(),
staffClerkRelationDTO
.
getStaffId
());
log
.
info
(
"成员cler
k
Id:{}, staffId: {} 为区经角色"
,
staffClerkRelationDTO
.
getClerkId
(),
staffClerkRelationDTO
.
getStaffId
());
// 区经无主门店
context
.
setClerkId
(
staffClerkRelationDTO
.
getClerkId
());
// 是区经角色
context
.
setManager
(
true
);
return
;
}
}
log
.
info
(
"成员{}为导购角色"
,
context
.
getStaffId
());
context
.
setManager
(
false
);
// 获取成员主门店
TabHaobanClerkMainStoreRelated
mainStoreInfo
=
clerkMainStoreRelatedService
.
getMainStoreByStaffId
(
context
.
getStaffId
(),
context
.
getStaffInfo
().
getWxEnterpriseId
());
if
(
mainStoreInfo
!=
null
)
{
context
.
setMainStoreId
(
mainStoreInfo
.
getStoreId
());
...
...
@@ -96,7 +101,7 @@ public class MaterialReportBuilder {
.
filter
(
item
->
StringUtils
.
equals
(
item
.
getStoreId
(),
mainStoreInfo
.
getStoreId
()))
.
findFirst
();
if
(!
mainClerkInfo
.
isPresent
())
{
log
.
info
(
"成员{}
与主门店{}不存在导购关联关系"
,
context
.
getStaffId
(),
context
.
getMainStor
eId
());
log
.
info
(
"成员{}
的主门店{}不在当前企业{}的绑定关系中"
,
context
.
getStaffId
(),
context
.
getMainStoreId
(),
context
.
getEnterpris
eId
());
return
;
}
// 成员在主门店时的clerkId
...
...
@@ -111,6 +116,10 @@ public class MaterialReportBuilder {
*/
public
void
buildMaterialReportData
(
MaterialReportContext
context
)
{
// 获取该导购/店长/区经 的周报/月报数据
if
(
StringUtils
.
isBlank
(
context
.
getClerkId
()))
{
log
.
info
(
"成员{} 默认主门店的clerkId不存在 不发送应用消息"
,
context
.
getStaffId
());
return
;
}
String
clerkId
=
context
.
getClerkId
();
String
enterpriseId
=
context
.
getEnterpriseId
();
MaterialDataAdaptor
.
MaterialDataResult
materialDataResult
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/content/impl/MaterialReportServiceImpl.java
View file @
719b75c2
...
...
@@ -18,6 +18,7 @@ import com.gic.wechat.api.dto.qywx.QywxNewsSendMessageDTO;
import
com.gic.wechat.api.service.qywx.QywxSuiteApiService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
...
...
@@ -90,6 +91,10 @@ public class MaterialReportServiceImpl implements MaterialReportService {
if
(
CollectionUtils
.
isNotEmpty
(
noticeMessageBos
))
{
noticeMessageService
.
addNoticeMessageBatch
(
noticeMessageBos
);
}
if
(
StringUtils
.
isBlank
(
context
.
getClerkId
()))
{
log
.
info
(
"成员{}在企业{}中不存在主门店, 不推送企微应用消息"
,
staffId
,
enterpriseId
);
return
;
}
// 发送企微消息
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
staffInfo
.
getWxEnterpriseId
());
QywxNewsSendMessageDTO
newsSendMessageDTO
=
materialReportBuilder
.
buildQywxNewsMessage
(
context
,
qwDTO
);
...
...
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