Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
midjourney-proxy
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
徐少华
midjourney-proxy
Commits
b4486abf
Commit
b4486abf
authored
Aug 22, 2019
by
阮思源
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改群发逻辑,一个群获取一次小号
parent
b6071d83
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
PushBizImpl.java
.../main/java/com/pcloud/book/push/biz/impl/PushBizImpl.java
+10
-4
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/push/biz/impl/PushBizImpl.java
View file @
b4486abf
...
@@ -289,9 +289,17 @@ public class PushBizImpl implements PushBiz {
...
@@ -289,9 +289,17 @@ public class PushBizImpl implements PushBiz {
pushGroupRecord
.
setPushStatus
(
pushRecord
.
getPushStatus
());
pushGroupRecord
.
setPushStatus
(
pushRecord
.
getPushStatus
());
pushGroupRecords
.
add
(
pushGroupRecord
);
pushGroupRecords
.
add
(
pushGroupRecord
);
pushGroupRecordDao
.
insert
(
pushGroupRecord
);
pushGroupRecordDao
.
insert
(
pushGroupRecord
);
//获取群信息
GroupQrcode
groupQrcode
=
groupQrcodeDao
.
getById
(
pushGroup
.
getBookGroupQrcodeId
());
if
(
groupQrcode
==
null
)
{
LOGGER
.
error
(
"未找到群信息!qrcodeId="
+
pushGroup
.
getBookGroupQrcodeId
());
continue
;
}
//获取机器人微信号
String
altId
=
wechatGroupConsr
.
getRobotIdByGroupId
(
groupQrcode
.
getWeixinGroupId
());
//遍历发送消息
//遍历发送消息
for
(
PushItem
pushItem
:
pushItemList
)
{
for
(
PushItem
pushItem
:
pushItemList
)
{
sendWechatMessage
(
pushGroup
,
pushItem
,
pushGroupRecord
.
getId
());
sendWechatMessage
(
pushGroup
,
pushItem
,
pushGroupRecord
.
getId
()
,
altId
);
}
}
}
}
}
}
...
@@ -300,7 +308,7 @@ public class PushBizImpl implements PushBiz {
...
@@ -300,7 +308,7 @@ public class PushBizImpl implements PushBiz {
* 发消息
* 发消息
*/
*/
@ParamLog
(
"发消息"
)
@ParamLog
(
"发消息"
)
private
void
sendWechatMessage
(
PushGroup
pushGroup
,
PushItem
pushItem
,
Long
pushGroupRecordId
)
{
private
void
sendWechatMessage
(
PushGroup
pushGroup
,
PushItem
pushItem
,
Long
pushGroupRecordId
,
String
altId
)
{
//获取群信息
//获取群信息
GroupQrcode
groupQrcode
=
groupQrcodeDao
.
getById
(
pushGroup
.
getBookGroupQrcodeId
());
GroupQrcode
groupQrcode
=
groupQrcodeDao
.
getById
(
pushGroup
.
getBookGroupQrcodeId
());
if
(
groupQrcode
==
null
)
{
if
(
groupQrcode
==
null
)
{
...
@@ -314,8 +322,6 @@ public class PushBizImpl implements PushBiz {
...
@@ -314,8 +322,6 @@ public class PushBizImpl implements PushBiz {
return
;
return
;
}
}
String
otherUrl
=
"book_group_id="
+
classifyDTO
.
getBookGroupId
()
+
"&classify_id="
+
classifyDTO
.
getId
()
+
"&qrcode_id="
+
pushGroup
.
getBookGroupQrcodeId
();
String
otherUrl
=
"book_group_id="
+
classifyDTO
.
getBookGroupId
()
+
"&classify_id="
+
classifyDTO
.
getId
()
+
"&qrcode_id="
+
pushGroup
.
getBookGroupQrcodeId
();
//获取机器人微信号
String
altId
=
wechatGroupConsr
.
getRobotIdByGroupId
(
groupId
);
if
(
groupQrcode
!=
null
&&
!
StringUtil
.
isEmpty
(
groupId
)
&&
!
StringUtil
.
isEmpty
(
altId
))
{
if
(
groupQrcode
!=
null
&&
!
StringUtil
.
isEmpty
(
groupId
)
&&
!
StringUtil
.
isEmpty
(
altId
))
{
Integer
itemType
=
pushItem
.
getItemType
();
Integer
itemType
=
pushItem
.
getItemType
();
if
(
ItemTypeEnum
.
TEXT
.
value
.
equals
(
itemType
))
{
if
(
ItemTypeEnum
.
TEXT
.
value
.
equals
(
itemType
))
{
...
...
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