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
dad77e76
Commit
dad77e76
authored
Nov 12, 2019
by
阮思源
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat-1001863' into 'master'
把关键词相应和入群欢迎语的关键词校验是否个人号去掉 See merge request rays/pcloud-book!227
parents
4aa48381
55702f91
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
16 deletions
+4
-16
SendWeixinRequestTools.java
...a/com/pcloud/book/group/tools/SendWeixinRequestTools.java
+4
-6
BookGuideBizImpl.java
...a/com/pcloud/book/keywords/biz/impl/BookGuideBizImpl.java
+0
-4
BookKeywordBizImpl.java
...com/pcloud/book/keywords/biz/impl/BookKeywordBizImpl.java
+0
-6
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/group/tools/SendWeixinRequestTools.java
View file @
dad77e76
...
...
@@ -320,7 +320,6 @@ public class SendWeixinRequestTools {
String
robotId
=
dto
.
getRobotId
();
String
weixinGroupId
=
dto
.
getWeixinGroupId
();
Boolean
isHaveKeywords
=
dto
.
getIsHaveKeywords
();
Boolean
isGroupRobot
=
dto
.
getIsGroupRobot
();
List
<
KeywordDTO
>
keywords
=
dto
.
getKeywords
();
KeywordStatusDTO
keywordStatusDTO
=
dto
.
getDto
();
GroupClassifyQrcodeDTO
classifyQrcodeInfo
=
dto
.
getClassifyQrcodeInfo
();
...
...
@@ -336,7 +335,7 @@ public class SendWeixinRequestTools {
content
.
append
(
"本群目的为学习交流和学习辅导,线上资源和工具为图书的增值服务,可根据实际情况配合图书一起使用。"
);
}
StringBuilder
sb
=
new
StringBuilder
();
boolean
isOld
=
createGuideMessageBase
(
isGroupRobot
,
keywords
,
classifyQrcodeInfo
,
sb
,
dto
.
getAccountSettingDto
(),
content
.
length
());
boolean
isOld
=
createGuideMessageBase
(
keywords
,
classifyQrcodeInfo
,
sb
,
dto
.
getAccountSettingDto
(),
content
.
length
());
StringBuilder
groupKeyword
=
createGroupKeyword
(
keywordStatusDTO
,
classifyQrcodeInfo
,
sb
,
isOld
,
dto
.
getAccountSettingDto
());
// 1001692 自定义欢迎语+关键词文案,如果超过300字,关键词拆分出来发
if
((
content
.
length
()
+
sb
.
length
())
>=
1000
)
{
...
...
@@ -355,7 +354,6 @@ public class SendWeixinRequestTools {
List
<
ReplyMessageVO
>
replyMessages
=
dto
.
getReplyMessages
();
String
robotId
=
dto
.
getRobotId
();
String
weixinGroupId
=
dto
.
getWeixinGroupId
();
Boolean
isGroupRobot
=
dto
.
getIsGroupRobot
();
List
<
KeywordDTO
>
keywords
=
dto
.
getKeywords
();
KeywordStatusDTO
keywordStatusDTO
=
dto
.
getDto
();
GroupClassifyQrcodeDTO
classifyQrcodeInfo
=
dto
.
getClassifyQrcodeInfo
();
...
...
@@ -372,7 +370,7 @@ public class SendWeixinRequestTools {
if
(
ReplyTypeEnum
.
TEXT
.
value
.
equals
(
sendMessageDTO
.
getReplyType
()))
{
String
s
=
nickNameStr
+
" "
+
sendMessageDTO
.
getContent
();
StringBuilder
sb
=
new
StringBuilder
();
boolean
isOld
=
createGuideMessageBase
(
isGroupRobot
,
keywords
,
classifyQrcodeInfo
,
sb
,
dto
.
getAccountSettingDto
(),
s
.
length
());
boolean
isOld
=
createGuideMessageBase
(
keywords
,
classifyQrcodeInfo
,
sb
,
dto
.
getAccountSettingDto
(),
s
.
length
());
StringBuilder
groupKeyword
=
createGroupKeyword
(
keywordStatusDTO
,
classifyQrcodeInfo
,
sb
,
isOld
,
dto
.
getAccountSettingDto
());
// 1001692 自定义欢迎语+关键词文案,如果超过300字,关键词拆分出来发
if
(
s
.
length
()
+
groupKeyword
.
length
()
>=
1000
)
{
...
...
@@ -401,9 +399,9 @@ public class SendWeixinRequestTools {
}
private
static
boolean
createGuideMessageBase
(
Boolean
isGroupRobot
,
List
<
KeywordDTO
>
keywords
,
GroupClassifyQrcodeDTO
classifyQrcodeInfo
,
StringBuilder
sb
,
AccountSettingDto
accountSettingDto
,
int
length
)
{
private
static
boolean
createGuideMessageBase
(
List
<
KeywordDTO
>
keywords
,
GroupClassifyQrcodeDTO
classifyQrcodeInfo
,
StringBuilder
sb
,
AccountSettingDto
accountSettingDto
,
int
length
)
{
boolean
isOld
=
true
;
boolean
haveKeyword
=
!
CollectionUtils
.
isEmpty
(
keywords
)
&&
isGroupRobot
;
boolean
haveKeyword
=
!
CollectionUtils
.
isEmpty
(
keywords
);
if
(
haveKeyword
)
{
List
<
KeywordDTO
>
collect
=
keywords
.
stream
()
.
filter
(
p
->
(
ReplyTypeEnum
.
IMAGE
.
value
.
equals
(
p
.
getReplyType
())
||
ReplyTypeEnum
.
TEXT
.
value
.
equals
(
p
.
getReplyType
())))
...
...
pcloud-service-book/src/main/java/com/pcloud/book/keywords/biz/impl/BookGuideBizImpl.java
View file @
dad77e76
...
...
@@ -394,8 +394,6 @@ public class BookGuideBizImpl implements BookGuideBiz {
//获取关键词信息(改成10个了,20190911周磊改成不限制了,但是开发要求必须要加限制,所以先限制40个) 刘娜需求 1001282 群不推送关键词
List
<
KeywordDTO
>
keywords
=
bookKeywordBiz
.
listFiveKeyword
(
classifyQrcodeInfo
.
getClassifyId
(),
classifyQrcodeInfo
.
getBookGroupId
());
Boolean
isHaveKeywords
=
!
ListUtils
.
isEmpty
(
keywords
);
final
Boolean
groupRobot
=
wechatGroupConsr
.
isGroupRobot
(
robotId
);
log
.
info
(
"[wechatGroupConsr.isGroupRobot] robotId:{} groupRobot:{}"
,
robotId
,
groupRobot
);
//如果设置了群学习报告,加一个群学习报告的关键词
KeywordStatusDTO
dto
=
pushLearningReport
(
classifyQrcodeInfo
,
robotId
,
weixinGroupId
,
pushAddUserMessageDTO
.
getIp
());
AccountSettingDto
accountSettingDto
=
qrcodeSceneConsr
.
getWechatInfo
(
classifyQrcodeInfo
.
getChannelId
());
...
...
@@ -410,7 +408,6 @@ public class BookGuideBizImpl implements BookGuideBiz {
sendGuideMessageDTO
.
setRobotId
(
robotId
);
sendGuideMessageDTO
.
setWeixinGroupId
(
weixinGroupId
);
sendGuideMessageDTO
.
setIsHaveKeywords
(
isHaveKeywords
);
sendGuideMessageDTO
.
setIsGroupRobot
(
groupRobot
);
sendGuideMessageDTO
.
setKeywords
(
keywords
);
sendGuideMessageDTO
.
setDto
(
dto
);
sendGuideMessageDTO
.
setIp
(
pushAddUserMessageDTO
.
getIp
());
...
...
@@ -425,7 +422,6 @@ public class BookGuideBizImpl implements BookGuideBiz {
sendGuideMessageDTO
.
setReplyMessages
(
replyMessages
);
sendGuideMessageDTO
.
setRobotId
(
robotId
);
sendGuideMessageDTO
.
setWeixinGroupId
(
weixinGroupId
);
sendGuideMessageDTO
.
setIsGroupRobot
(
groupRobot
);
sendGuideMessageDTO
.
setKeywords
(
keywords
);
sendGuideMessageDTO
.
setDto
(
dto
);
sendGuideMessageDTO
.
setIp
(
pushAddUserMessageDTO
.
getIp
());
...
...
pcloud-service-book/src/main/java/com/pcloud/book/keywords/biz/impl/BookKeywordBizImpl.java
View file @
dad77e76
...
...
@@ -688,12 +688,6 @@ public class BookKeywordBizImpl implements BookKeywordBiz {
final
String
content
=
sendTextDTO
.
getTextContent
().
trim
();
final
String
weixinGroupId
=
sendTextDTO
.
getWechatGroupId
();
String
robotId
=
sendTextDTO
.
getWxId
();
// 若非之前的机器人则不回复普通关键词
final
Boolean
groupRobot
=
wechatGroupConsr
.
isGroupRobot
(
robotId
);
log
.
info
(
"[wechatGroupConsr.isGroupRobot] robotId:{} groupRobot:{}"
,
robotId
,
groupRobot
);
if
(!
groupRobot
)
{
return
;
}
//通过群id获取对应基本信息
GroupClassifyQrcodeDTO
classifyQrcodeInfo
=
bookGroupClassifyBiz
.
getClassifyQrcodeInfo
(
weixinGroupId
);
if
(
classifyQrcodeInfo
==
null
)
{
...
...
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