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
161649dc
Commit
161649dc
authored
Aug 14, 2019
by
阮思源
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改下
parent
6616a6ca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
BookGuideBizImpl.java
...a/com/pcloud/book/keywords/biz/impl/BookGuideBizImpl.java
+7
-5
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/keywords/biz/impl/BookGuideBizImpl.java
View file @
161649dc
...
...
@@ -118,6 +118,8 @@ public class BookGuideBizImpl implements BookGuideBiz {
return
;
}
final
JoinGroupCipherDTO
dto
=
joinGroupCipherDao
.
getDTOByCipher
(
cipher
);
//获取群
final
String
wxGroupId
=
bookGroupClassifyBiz
.
getWxGroupIdByClassifyIdAndWechatId
(
dto
.
getClassifyId
(),
dto
.
getWechatUserId
());
if
(
agreeAddUserDTO
.
getFirst
()
!=
null
&&
agreeAddUserDTO
.
getFirst
())
{
// 如果是第一次就只发欢迎文案
SendTextMessageVO
vo
=
new
SendTextMessageVO
();
...
...
@@ -134,12 +136,11 @@ public class BookGuideBizImpl implements BookGuideBiz {
// 根据暗号获取分类id和bookGroupId推送关键词欢迎语
List
<
KeywordDTO
>
keywords
=
bookKeywordBiz
.
listFiveKeyword
(
dto
.
getClassifyId
(),
dto
.
getBookGroupId
());
//发主打资源
sendMainKeyword
(
keywords
,
agreeAddUserDTO
,
dto
);
sendMainKeyword
(
keywords
,
agreeAddUserDTO
,
dto
,
wxGroupId
);
//发关键词列表
SendWeixinRequestTools
.
sendKeywordsInfo
(
keywords
,
agreeAddUserDTO
.
getRobotWxId
(),
agreeAddUserDTO
.
getUserWxId
(),
agreeAddUserDTO
.
getIp
());
}
// 拉群
final
String
wxGroupId
=
bookGroupClassifyBiz
.
getWxGroupIdByClassifyIdAndWechatId
(
dto
.
getClassifyId
(),
dto
.
getWechatUserId
());
final
Integer
peopleCounts
=
WxGroupSDK
.
getPeopleCounts
(
wxGroupId
,
agreeAddUserDTO
.
getRobotWxId
(),
agreeAddUserDTO
.
getIp
());
// 邀请好友进群有次数限制,目前测试为每天只能拉30-40人就操作频繁,所以在此加判断,超过30人或者群人数超过30人就发送邀请链接
final
String
num
=
JedisClusterUtils
.
get
(
BookConstant
.
WXGROUP_ADD_USER_NUM
+
agreeAddUserDTO
.
getRobotWxId
());
...
...
@@ -178,17 +179,18 @@ public class BookGuideBizImpl implements BookGuideBiz {
}
@ParamLog
(
"发送主打资源"
)
private
void
sendMainKeyword
(
List
<
KeywordDTO
>
keywords
,
AgreeAddUserDTO
agreeAddUserDTO
,
JoinGroupCipherDTO
dto
)
{
private
void
sendMainKeyword
(
List
<
KeywordDTO
>
keywords
,
AgreeAddUserDTO
agreeAddUserDTO
,
JoinGroupCipherDTO
dto
,
String
wxGroupId
)
{
if
(!
ListUtils
.
isEmpty
(
keywords
))
{
KeywordDTO
keywordDTO
=
keywords
.
get
(
0
);
Keyword
keyword
=
keywordDao
.
getById
(
keywordDTO
.
getKeywordId
());
if
(
keyword
!=
null
)
{
GroupQrcodeDTO
groupQrcodeInfo
=
groupQrcodeDao
.
getGroupQrcodeInfo
(
wxGroupId
);
if
(
keyword
!=
null
&&
groupQrcodeInfo
!=
null
)
{
ReplyKeywordDTO
replyKeywordDTO
=
new
ReplyKeywordDTO
();
BeanUtils
.
copyProperties
(
keyword
,
replyKeywordDTO
);
if
(
ReplyTypeEnum
.
APP
.
value
.
equals
(
replyKeywordDTO
.
getReplyType
())
||
ReplyTypeEnum
.
LINK
.
value
.
equals
(
replyKeywordDTO
.
getReplyType
()))
{
BookGroupDTO
bookGroupDTO
=
bookGroupDao
.
getDTOById
(
dto
.
getBookGroupId
());
AccountSettingDto
accountSettingDto
=
qrcodeSceneConsr
.
getWechatInfo
(
bookGroupDTO
.
getChannelId
());
String
linkUrl
=
SendWeixinRequestTools
.
splitUrlNew
(
accountSettingDto
,
replyKeywordDTO
.
getLinkUrl
(),
dto
.
getBookGroupId
(),
dto
.
getClassifyId
(),
dto
.
getQrcode
Id
());
String
linkUrl
=
SendWeixinRequestTools
.
splitUrlNew
(
accountSettingDto
,
replyKeywordDTO
.
getLinkUrl
(),
dto
.
getBookGroupId
(),
dto
.
getClassifyId
(),
groupQrcodeInfo
.
get
Id
());
replyKeywordDTO
.
setLinkUrl
(
linkUrl
);
}
SendWeixinRequestTools
.
sendKeywordMessage
(
replyKeywordDTO
,
agreeAddUserDTO
.
getRobotWxId
(),
agreeAddUserDTO
.
getRobotWxId
(),
agreeAddUserDTO
.
getIp
(),
SendMessageTypeEnum
.
SELF
.
getCode
());
...
...
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