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
89e09493
Commit
89e09493
authored
Mar 05, 2023
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
通知
parent
9b9ecece
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
38 deletions
+37
-38
MessageApiService.java
.../com/gic/haoban/manage/api/service/MessageApiService.java
+5
-9
MessageApiServiceImpl.java
...anage/service/service/out/impl/MessageApiServiceImpl.java
+32
-29
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/MessageApiService.java
View file @
89e09493
...
@@ -53,17 +53,13 @@ public interface MessageApiService {
...
@@ -53,17 +53,13 @@ public interface MessageApiService {
/**
/**
*
*
* @Title: sendOrderMessage
* @Title: sendOrderMessage
* @Description: TODO(这里用一句话描述这个方法的作用)
* @Description: 订单发送好办通知
* @author xugh
* @param relationId 关联ID
* @param enterpriseId
* @param valueList 有变量的情况按顺序传参
* @param templateCode
* @param clerkId
* @param memberId
* @param valueList
* @return
* @return
* @throws
* @throws
*/
*/
ServiceResponse
<
Void
>
sendOrderMessage
(
String
enterpriseId
,
NoticeMessageTypeEnum
noticeType
,
String
orderId
,
String
clerkId
,
String
member
Id
,
ServiceResponse
<
Void
>
sendOrderMessage
(
String
enterpriseId
,
NoticeMessageTypeEnum
noticeType
,
String
relation
Id
,
List
<
String
>
valueList
);
String
clerkId
,
String
memberId
,
List
<
String
>
valueList
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MessageApiServiceImpl.java
View file @
89e09493
...
@@ -122,7 +122,7 @@ public class MessageApiServiceImpl implements MessageApiService {
...
@@ -122,7 +122,7 @@ public class MessageApiServiceImpl implements MessageApiService {
@Autowired
@Autowired
private
GroupChatService
groupChatService
;
private
GroupChatService
groupChatService
;
@Autowired
@Autowired
private
MemberService
memberService
;
private
MemberService
memberService
;
@Override
@Override
public
void
wxMessageReceive
(
QywxCallBackDTO
qywxCallBackDTO
)
{
public
void
wxMessageReceive
(
QywxCallBackDTO
qywxCallBackDTO
)
{
...
@@ -584,42 +584,45 @@ public class MessageApiServiceImpl implements MessageApiService {
...
@@ -584,42 +584,45 @@ public class MessageApiServiceImpl implements MessageApiService {
@Override
@Override
public
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
<
Void
>
sendOrderMessage
(
String
enterpriseId
,
public
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
<
Void
>
sendOrderMessage
(
String
enterpriseId
,
NoticeMessageTypeEnum
noticeType
,
String
orderId
,
String
clerkId
,
String
memberId
,
List
<
String
>
valueList
)
{
NoticeMessageTypeEnum
noticeType
,
String
relationId
,
String
clerkId
,
String
memberId
,
log
.
info
(
"订单消息通知={},{},{}"
,
memberId
,
clerkId
,
orderId
);
List
<
String
>
valueList
)
{
log
.
info
(
"订单消息通知={},{},{}"
,
memberId
,
clerkId
,
relationId
);
List
<
NoticeMessageQDTO
>
list
=
new
ArrayList
<>();
List
<
NoticeMessageQDTO
>
list
=
new
ArrayList
<>();
if
(
StringUtils
.
isAnyBlank
(
enterpriseId
,
clerkId
,
memberId
))
{
if
(
StringUtils
.
isAnyBlank
(
enterpriseId
,
clerkId
,
memberId
))
{
return
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
.
failure
(
"9999"
,
"必传参数没传"
);
return
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
.
failure
(
"9999"
,
"必传参数没传"
);
}
}
NoticeMessageTypeEnum
messageTypeEnum
=
NoticeMessageTypeEnum
.
getByType
(
noticeType
.
getType
());
NoticeMessageTypeEnum
messageTypeEnum
=
NoticeMessageTypeEnum
.
getByType
(
noticeType
.
getType
());
if
(
messageTypeEnum
==
null
)
{
if
(
messageTypeEnum
==
null
)
{
return
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
.
failure
(
"9999"
,
"消息类型不存在"
);
return
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
.
failure
(
"9999"
,
"消息类型不存在"
);
}
}
ClerkDTO
clerkDTO
=
this
.
clerkService
.
getclerkById
(
clerkId
)
;
ClerkDTO
clerkDTO
=
this
.
clerkService
.
getclerkById
(
clerkId
);
if
(
null
==
clerkDTO
)
{
if
(
null
==
clerkDTO
)
{
return
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
.
failure
(
"9999"
,
"导购查不到"
);
return
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
.
failure
(
"9999"
,
"导购查不到"
);
}
}
Map
<
String
,
Object
>
extendContent
=
new
HashMap
<>();
Map
<
String
,
Object
>
extendContent
=
new
HashMap
<>();
if
(
messageTypeEnum
.
getCategory
()==
5
)
{
if
(
messageTypeEnum
.
getCategory
()
==
5
)
{
if
(
messageTypeEnum
.
equals
(
NoticeMessageTypeEnum
.
ORDER_PAY
))
{
if
(
messageTypeEnum
.
equals
(
NoticeMessageTypeEnum
.
ORDER_PAY
))
{
extendContent
.
put
(
"currentTab "
,
0
)
;
extendContent
.
put
(
"currentTab "
,
0
);
}
else
{
}
else
{
extendContent
.
put
(
"currentTab "
,
1
)
;
extendContent
.
put
(
"currentTab "
,
1
);
}
}
}
}
Map
<
String
,
String
>
map
=
this
.
toMapValue
(
memberId
,
valueList
);
Map
<
String
,
String
>
map
=
this
.
toMapValue
(
memberId
,
valueList
);
NoticeMessageQDTO
qdto
=
this
.
getDTO
(
enterpriseId
,
clerkId
,
orderId
,
noticeType
,
map
,
extendContent
)
;
NoticeMessageQDTO
qdto
=
this
.
getDTO
(
enterpriseId
,
clerkId
,
relationId
,
noticeType
,
map
,
extendContent
)
;
list
.
add
(
qdto
);
list
.
add
(
qdto
);
String
storeId
=
clerkDTO
.
getStoreId
()
;
String
storeId
=
clerkDTO
.
getStoreId
();
ClerkDTO
dz
=
this
.
clerkService
.
getClerkLeaderByStoreId
(
storeId
);
ClerkDTO
dz
=
this
.
clerkService
.
getClerkLeaderByStoreId
(
storeId
);
if
(
null
!=
dz
&&
!
dz
.
getClerkId
().
equals
(
clerkId
))
{
if
(
null
!=
dz
&&
!
dz
.
getClerkId
().
equals
(
clerkId
))
{
NoticeMessageQDTO
dzQdto
=
this
.
getDTO
(
enterpriseId
,
dz
.
getClerkId
(),
orderId
,
noticeType
,
map
,
extendContent
)
;
NoticeMessageQDTO
dzQdto
=
this
.
getDTO
(
enterpriseId
,
dz
.
getClerkId
(),
relationId
,
noticeType
,
map
,
extendContent
);
list
.
add
(
dzQdto
);
list
.
add
(
dzQdto
);
}
}
NoticeMessageUtil
.
sendNoticeMessageBatch
(
list
);
NoticeMessageUtil
.
sendNoticeMessageBatch
(
list
);
return
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
.
success
();
return
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
.
success
();
}
}
private
NoticeMessageQDTO
getDTO
(
String
enterpriseId
,
String
clerkId
,
String
orderId
,
NoticeMessageTypeEnum
noticeType
,
Map
<
String
,
String
>
map
,
Map
<
String
,
Object
>
extendContent
)
{
private
NoticeMessageQDTO
getDTO
(
String
enterpriseId
,
String
clerkId
,
String
orderId
,
NoticeMessageTypeEnum
noticeType
,
Map
<
String
,
String
>
map
,
Map
<
String
,
Object
>
extendContent
)
{
NoticeMessageQDTO
qdto
=
new
NoticeMessageQDTO
();
NoticeMessageQDTO
qdto
=
new
NoticeMessageQDTO
();
qdto
.
setEnterpriseId
(
enterpriseId
);
qdto
.
setEnterpriseId
(
enterpriseId
);
qdto
.
setClerkId
(
clerkId
);
qdto
.
setClerkId
(
clerkId
);
...
@@ -628,19 +631,19 @@ public class MessageApiServiceImpl implements MessageApiService {
...
@@ -628,19 +631,19 @@ public class MessageApiServiceImpl implements MessageApiService {
qdto
.
setOptTargetId
(
orderId
);
qdto
.
setOptTargetId
(
orderId
);
qdto
.
setCheckFlag
(
true
);
qdto
.
setCheckFlag
(
true
);
qdto
.
setExtendContent
(
extendContent
);
qdto
.
setExtendContent
(
extendContent
);
return
qdto
;
return
qdto
;
}
}
private
Map
<
String
,
String
>
toMapValue
(
String
memberId
,
List
<
String
>
valueList
)
{
private
Map
<
String
,
String
>
toMapValue
(
String
memberId
,
List
<
String
>
valueList
)
{
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
))
;
map
.
put
(
""
+
(
i
+
1
),
valueList
.
get
(
i
))
;
}
}
}
}
MemberDTO
member
=
this
.
memberService
.
getMember
(
memberId
)
;
MemberDTO
member
=
this
.
memberService
.
getMember
(
memberId
);
String
name
=
member
.
getThirdNickname
()
;
String
name
=
member
.
getThirdNickname
();
map
.
put
(
"memberName"
,
name
)
;
map
.
put
(
"memberName"
,
name
);
return
map
;
return
map
;
}
}
}
}
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