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
19cf9948
Commit
19cf9948
authored
Sep 19, 2019
by
裴大威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat 1001745
parent
a39836b0
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
210 additions
and
28 deletions
+210
-28
SendDefaultGuideMessageDTO.java
...com/pcloud/book/group/dto/SendDefaultGuideMessageDTO.java
+34
-0
SendGuideMessageDTO.java
...n/java/com/pcloud/book/group/dto/SendGuideMessageDTO.java
+35
-0
SendWeixinRequestTools.java
...a/com/pcloud/book/group/tools/SendWeixinRequestTools.java
+83
-18
BookGuideBizImpl.java
...a/com/pcloud/book/keywords/biz/impl/BookGuideBizImpl.java
+27
-2
KeywordDTO.java
...rc/main/java/com/pcloud/book/keywords/dto/KeywordDTO.java
+17
-0
BookKeyword.Mapper.xml
...src/main/resources/mapper/keywords/BookKeyword.Mapper.xml
+14
-8
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/group/dto/SendDefaultGuideMessageDTO.java
0 → 100644
View file @
19cf9948
package
com
.
pcloud
.
book
.
group
.
dto
;
import
com.pcloud.book.keywords.dto.KeywordDTO
;
import
com.pcloud.book.keywords.dto.KeywordStatusDTO
;
import
com.pcloud.channelcenter.wechat.dto.AccountSettingDto
;
import
java.util.List
;
import
lombok.Data
;
@Data
public
class
SendDefaultGuideMessageDTO
{
private
String
groupName
;
private
String
robotId
;
private
String
weixinGroupId
;
private
Boolean
isHaveKeywords
;
private
Boolean
isGroupRobot
;
private
List
<
KeywordDTO
>
keywords
;
private
KeywordStatusDTO
dto
;
private
GroupClassifyQrcodeDTO
classifyQrcodeInfo
;
private
String
ip
;
private
AccountSettingDto
accountSettingDto
;
}
pcloud-service-book/src/main/java/com/pcloud/book/group/dto/SendGuideMessageDTO.java
0 → 100644
View file @
19cf9948
package
com
.
pcloud
.
book
.
group
.
dto
;
import
com.pcloud.book.keywords.dto.KeywordDTO
;
import
com.pcloud.book.keywords.dto.KeywordStatusDTO
;
import
com.pcloud.book.keywords.vo.ReplyMessageVO
;
import
com.pcloud.channelcenter.wechat.dto.AccountSettingDto
;
import
java.util.List
;
import
lombok.Data
;
@Data
public
class
SendGuideMessageDTO
{
private
List
<
ReplyMessageVO
>
replyMessages
;
private
String
robotId
;
private
String
weixinGroupId
;
private
Boolean
isGroupRobot
;
private
List
<
KeywordDTO
>
keywords
;
private
KeywordStatusDTO
dto
;
private
String
ip
;
private
Integer
code
;
private
AccountSettingDto
accountSettingDto
;
private
GroupClassifyQrcodeDTO
classifyQrcodeInfo
;
}
pcloud-service-book/src/main/java/com/pcloud/book/group/tools/SendWeixinRequestTools.java
View file @
19cf9948
package
com
.
pcloud
.
book
.
group
.
tools
;
package
com
.
pcloud
.
book
.
group
.
tools
;
import
com.pcloud.book.clock.dto.BookClockKeywordDTO
;
import
com.pcloud.book.clock.dto.BookClockKeywordDTO
;
import
com.pcloud.book.group.dto.GroupClassifyQrcodeDTO
;
import
com.pcloud.book.group.dto.SendDefaultGuideMessageDTO
;
import
com.pcloud.book.group.dto.SendGuideMessageDTO
;
import
com.pcloud.book.group.dto.SyncWeixinGroupIdRequestDTO
;
import
com.pcloud.book.group.dto.SyncWeixinGroupIdRequestDTO
;
import
com.pcloud.book.group.dto.UpdateQrDTO
;
import
com.pcloud.book.group.dto.UpdateQrDTO
;
import
com.pcloud.book.keywords.dto.KeywordDTO
;
import
com.pcloud.book.keywords.dto.KeywordDTO
;
...
@@ -15,6 +18,7 @@ import com.pcloud.common.core.aspect.ParamLog;
...
@@ -15,6 +18,7 @@ import com.pcloud.common.core.aspect.ParamLog;
import
com.pcloud.common.utils.BeanUtils
;
import
com.pcloud.common.utils.BeanUtils
;
import
com.pcloud.common.utils.ListUtils
;
import
com.pcloud.common.utils.ListUtils
;
import
com.pcloud.common.utils.cache.redis.JedisClusterUtils
;
import
com.pcloud.common.utils.cache.redis.JedisClusterUtils
;
import
com.pcloud.common.utils.httpclient.UrlUtils
;
import
com.pcloud.common.utils.string.StringUtil
;
import
com.pcloud.common.utils.string.StringUtil
;
import
com.sdk.wxgroup.ChangeNameVO
;
import
com.sdk.wxgroup.ChangeNameVO
;
import
com.sdk.wxgroup.SendArticleMessageVO
;
import
com.sdk.wxgroup.SendArticleMessageVO
;
...
@@ -32,7 +36,11 @@ import java.util.ArrayList;
...
@@ -32,7 +36,11 @@ import java.util.ArrayList;
import
java.util.Iterator
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.Set
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
import
javax.ws.rs.HEAD
;
/**
/**
* @author lily
* @author lily
...
@@ -135,11 +143,19 @@ public class SendWeixinRequestTools {
...
@@ -135,11 +143,19 @@ public class SendWeixinRequestTools {
}
}
@ParamLog
(
"发送欢迎语消息"
)
@ParamLog
(
"发送欢迎语消息"
)
public
static
void
sendGuideMessage
(
List
<
ReplyMessageVO
>
replyMessages
,
String
robotId
,
String
weixinGroupId
,
Boolean
isGroupRobot
,
List
<
KeywordDTO
>
keywords
,
KeywordStatusDTO
dto
,
String
ip
,
Integer
code
)
{
public
static
void
sendGuideMessage
(
SendGuideMessageDTO
dto
)
{
//JedisClusterUtils.del("BOOK:WEIXINGROUP:GUIDEUSER" + weixinGroupId);
if
(
Objects
.
isNull
(
dto
)
||
CollectionUtils
.
isEmpty
(
dto
.
getReplyMessages
()))
{
if
(
ListUtils
.
isEmpty
(
replyMessages
))
{
return
;
return
;
}
}
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
();
String
ip
=
dto
.
getIp
();
Integer
code
=
dto
.
getCode
();
int
i
=
0
;
int
i
=
0
;
for
(
ReplyMessageVO
replyMessageVO
:
replyMessages
)
{
for
(
ReplyMessageVO
replyMessageVO
:
replyMessages
)
{
SendMessageDTO
sendMessageDTO
=
new
SendMessageDTO
();
SendMessageDTO
sendMessageDTO
=
new
SendMessageDTO
();
...
@@ -152,16 +168,34 @@ public class SendWeixinRequestTools {
...
@@ -152,16 +168,34 @@ public class SendWeixinRequestTools {
String
s
=
nickNameStr
+
" "
+
sendMessageDTO
.
getContent
();
String
s
=
nickNameStr
+
" "
+
sendMessageDTO
.
getContent
();
StringBuilder
sb
=
new
StringBuilder
();
StringBuilder
sb
=
new
StringBuilder
();
if
(!
CollectionUtils
.
isEmpty
(
keywords
)
&&
isGroupRobot
)
{
if
(!
CollectionUtils
.
isEmpty
(
keywords
)
&&
isGroupRobot
)
{
sb
.
append
(
"\n\n在群内回复以下关键词,领取任务或资源:\n"
);
sb
.
append
(
"\n\n本群配有以下资源服务,戳链接立即获取:\n"
);
for
(
KeywordDTO
keyword
:
keywords
)
{
List
<
KeywordDTO
>
collect
=
keywords
.
stream
().
filter
(
p
->
ReplyTypeEnum
.
IMAGE
.
value
.
equals
(
p
.
getReplyType
())).
collect
(
Collectors
.
toList
());
// 关键词长度和欢迎语长度之和超过300会拆分成两条,若拆分之后关键词长度还是大于300则只发300以内的部分
// 1001745 包含图片则不合并关键词详情
if
((
s
.
length
()
+
sb
.
length
())
>=
1000
&&
(
sb
.
length
()
+
(
keyword
.
getKeywords
()
+
"\n"
).
length
())
>=
977
)
{
if
(
CollectionUtils
.
isEmpty
(
collect
)){
break
;
for
(
KeywordDTO
keyword
:
keywords
)
{
if
((
s
.
length
()
+
sb
.
length
())
>=
1000
&&
(
sb
.
length
()
+
(
keyword
.
getKeywords
()
+
"\n"
).
length
())
>=
950
)
{
break
;
}
sb
.
append
(
"【"
).
append
(
keyword
.
getKeywords
()).
append
(
"】\n"
);
if
(
ReplyTypeEnum
.
TEXT
.
value
.
equals
(
keyword
.
getReplyType
()))
{
sb
.
append
(
" "
).
append
(
keyword
.
getContent
()).
append
(
"\n"
);
}
if
(
ReplyTypeEnum
.
LINK
.
value
.
equals
(
keyword
.
getReplyType
())
||
ReplyTypeEnum
.
APP
.
value
.
equals
(
keyword
.
getReplyType
()))
{
String
linkUrl
=
SendWeixinRequestTools
.
splitUrlNew
(
dto
.
getAccountSettingDto
(),
keyword
.
getLinkUrl
(),
classifyQrcodeInfo
.
getBookGroupId
(),
classifyQrcodeInfo
.
getClassifyId
(),
classifyQrcodeInfo
.
getGroupQrcodeId
());
sb
.
append
(
" "
).
append
(
keyword
.
getDescription
()).
append
(
keyword
.
getContent
()).
append
(
UrlUtils
.
getShortUrl4Own
(
linkUrl
)).
append
(
"\n"
);
}
}
}
else
{
for
(
KeywordDTO
keyword
:
keywords
)
{
if
((
s
.
length
()
+
sb
.
length
())
>=
1000
&&
(
sb
.
length
()
+
(
keyword
.
getKeywords
()
+
"\n"
).
length
())
>=
977
)
{
break
;
}
sb
.
append
(
"【"
).
append
(
keyword
.
getKeywords
()).
append
(
"】"
);
}
}
sb
.
append
(
"【"
).
append
(
keyword
.
getKeywords
()).
append
(
"】"
);
}
}
}
}
StringBuilder
groupKeyword
=
getGroupKeyword
(
dto
,
sb
);
StringBuilder
groupKeyword
=
getGroupKeyword
(
keywordStatusDTO
,
sb
);
groupKeyword
.
append
(
"\n"
).
append
(
"后续也可以回复【】里的关键词,再次领取"
);
// 1001692 自定义欢迎语+关键词文案,如果超过300字,关键词拆分出来发
// 1001692 自定义欢迎语+关键词文案,如果超过300字,关键词拆分出来发
if
(
s
.
length
()
+
groupKeyword
.
length
()
>=
1000
)
{
if
(
s
.
length
()
+
groupKeyword
.
length
()
>=
1000
)
{
sendMessageDTO
.
setContent
(
s
);
sendMessageDTO
.
setContent
(
s
);
...
@@ -292,7 +326,7 @@ public class SendWeixinRequestTools {
...
@@ -292,7 +326,7 @@ public class SendWeixinRequestTools {
return
url
;
return
url
;
}
}
if
(
url
.
startsWith
(
"*"
))
{
if
(
url
.
startsWith
(
"*"
))
{
String
endUrl
=
url
.
substring
(
url
.
indexOf
(
"/"
)
,
url
.
length
()
);
String
endUrl
=
url
.
substring
(
url
.
indexOf
(
"/"
));
if
(
accountSettingDto
.
getRandom
()
==
null
)
{
if
(
accountSettingDto
.
getRandom
()
==
null
)
{
resultUrl
=
protocol
+
"app."
+
accountSettingDto
.
getFirstDomain
()
+
"/"
+
url
.
substring
(
1
,
url
.
indexOf
(
"/"
))
+
"/W"
resultUrl
=
protocol
+
"app."
+
accountSettingDto
.
getFirstDomain
()
+
"/"
+
url
.
substring
(
1
,
url
.
indexOf
(
"/"
))
+
"/W"
+
accountSettingDto
.
getAccountSettingId
()
+
endUrl
;
+
accountSettingDto
.
getAccountSettingId
()
+
endUrl
;
...
@@ -370,7 +404,19 @@ public class SendWeixinRequestTools {
...
@@ -370,7 +404,19 @@ public class SendWeixinRequestTools {
// WxGroupSDK.sendTextMessage(sendTextMessageVO);
// WxGroupSDK.sendTextMessage(sendTextMessageVO);
}
}
public
static
void
sendDefaultMessage
(
String
groupName
,
String
robotId
,
String
weixinGroupId
,
Boolean
isHaveKeywords
,
Boolean
isGroupRobot
,
List
<
KeywordDTO
>
keywords
,
KeywordStatusDTO
dto
,
String
ip
)
{
/**
* 发送默认欢迎语
*/
public
static
void
sendDefaultMessage
(
SendDefaultGuideMessageDTO
dto
)
{
String
groupName
=
dto
.
getGroupName
();
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
();
String
ip
=
dto
.
getIp
();
StringBuilder
content
=
new
StringBuilder
(
getNickNameStr
(
weixinGroupId
));
StringBuilder
content
=
new
StringBuilder
(
getNickNameStr
(
weixinGroupId
));
if
(
StringUtil
.
isEmpty
(
groupName
))
{
if
(
StringUtil
.
isEmpty
(
groupName
))
{
content
.
append
(
" 欢迎加入本群!"
);
content
.
append
(
" 欢迎加入本群!"
);
...
@@ -383,15 +429,34 @@ public class SendWeixinRequestTools {
...
@@ -383,15 +429,34 @@ public class SendWeixinRequestTools {
}
}
StringBuilder
sb
=
new
StringBuilder
();
StringBuilder
sb
=
new
StringBuilder
();
if
(!
CollectionUtils
.
isEmpty
(
keywords
)
&&
isGroupRobot
)
{
if
(!
CollectionUtils
.
isEmpty
(
keywords
)
&&
isGroupRobot
)
{
sb
.
append
(
"\n\n在群内回复以下关键词,领取任务或资源:\n"
);
sb
.
append
(
"\n\n本群配有以下资源服务,戳链接立即获取:\n"
);
for
(
KeywordDTO
keyword
:
keywords
)
{
List
<
KeywordDTO
>
collect
=
keywords
.
stream
().
filter
(
p
->
ReplyTypeEnum
.
IMAGE
.
value
.
equals
(
p
.
getReplyType
())).
collect
(
Collectors
.
toList
());
if
((
content
.
length
()
+
sb
.
length
())
>=
1000
&&
(
sb
.
length
()
+
(
keyword
.
getKeywords
()
+
"\n"
).
length
())
>=
977
)
{
// 1001745 包含图片则不合并关键词详情
break
;
if
(
CollectionUtils
.
isEmpty
(
collect
)){
for
(
KeywordDTO
keyword
:
keywords
)
{
if
((
content
.
length
()
+
sb
.
length
())
>=
1000
&&
(
sb
.
length
()
+
(
keyword
.
getKeywords
()
+
"\n"
).
length
())
>=
950
)
{
break
;
}
sb
.
append
(
"【"
).
append
(
keyword
.
getKeywords
()).
append
(
"】\n"
);
if
(
ReplyTypeEnum
.
TEXT
.
value
.
equals
(
keyword
.
getReplyType
()))
{
sb
.
append
(
" "
).
append
(
keyword
.
getContent
()).
append
(
"\n"
);
}
if
(
ReplyTypeEnum
.
LINK
.
value
.
equals
(
keyword
.
getReplyType
())
||
ReplyTypeEnum
.
APP
.
value
.
equals
(
keyword
.
getReplyType
()))
{
String
linkUrl
=
SendWeixinRequestTools
.
splitUrlNew
(
dto
.
getAccountSettingDto
(),
keyword
.
getLinkUrl
(),
classifyQrcodeInfo
.
getBookGroupId
(),
classifyQrcodeInfo
.
getClassifyId
(),
classifyQrcodeInfo
.
getGroupQrcodeId
());
sb
.
append
(
" "
).
append
(
keyword
.
getDescription
()).
append
(
keyword
.
getContent
()).
append
(
UrlUtils
.
getShortUrl4Own
(
linkUrl
)).
append
(
"\n"
);
}
}
}
else
{
for
(
KeywordDTO
keyword
:
keywords
)
{
if
((
content
.
length
()
+
sb
.
length
())
>=
1000
&&
(
sb
.
length
()
+
(
keyword
.
getKeywords
()
+
"\n"
).
length
())
>=
977
)
{
break
;
}
sb
.
append
(
"【"
).
append
(
keyword
.
getKeywords
()).
append
(
"】"
);
}
}
sb
.
append
(
"【"
).
append
(
keyword
.
getKeywords
()).
append
(
"】"
);
}
}
}
}
StringBuilder
groupKeyword
=
getGroupKeyword
(
dto
,
sb
);
StringBuilder
groupKeyword
=
getGroupKeyword
(
keywordStatusDTO
,
sb
);
groupKeyword
.
append
(
"\n"
).
append
(
"后续也可以回复【】里的关键词,再次领取"
);
// 1001692 自定义欢迎语+关键词文案,如果超过300字,关键词拆分出来发
// 1001692 自定义欢迎语+关键词文案,如果超过300字,关键词拆分出来发
if
((
content
.
length
()
+
sb
.
length
())
>=
1000
)
{
if
((
content
.
length
()
+
sb
.
length
())
>=
1000
)
{
sendTextMessage
(
content
.
toString
(),
robotId
,
weixinGroupId
,
ip
);
sendTextMessage
(
content
.
toString
(),
robotId
,
weixinGroupId
,
ip
);
...
...
pcloud-service-book/src/main/java/com/pcloud/book/keywords/biz/impl/BookGuideBizImpl.java
View file @
19cf9948
...
@@ -17,6 +17,8 @@ import com.pcloud.book.group.dto.GroupClassifyQrcodeDTO;
...
@@ -17,6 +17,8 @@ import com.pcloud.book.group.dto.GroupClassifyQrcodeDTO;
import
com.pcloud.book.group.dto.GroupQrcodeDTO
;
import
com.pcloud.book.group.dto.GroupQrcodeDTO
;
import
com.pcloud.book.group.dto.JoinGroupCipherDTO
;
import
com.pcloud.book.group.dto.JoinGroupCipherDTO
;
import
com.pcloud.book.group.dto.PushAddUserMessageDTO
;
import
com.pcloud.book.group.dto.PushAddUserMessageDTO
;
import
com.pcloud.book.group.dto.SendDefaultGuideMessageDTO
;
import
com.pcloud.book.group.dto.SendGuideMessageDTO
;
import
com.pcloud.book.group.entity.AppTouchRecord
;
import
com.pcloud.book.group.entity.AppTouchRecord
;
import
com.pcloud.book.group.entity.GroupQrcode
;
import
com.pcloud.book.group.entity.GroupQrcode
;
import
com.pcloud.book.group.enums.TouchTypeEnum
;
import
com.pcloud.book.group.enums.TouchTypeEnum
;
...
@@ -375,17 +377,40 @@ public class BookGuideBizImpl implements BookGuideBiz {
...
@@ -375,17 +377,40 @@ public class BookGuideBizImpl implements BookGuideBiz {
log
.
info
(
"[wechatGroupConsr.isGroupRobot] robotId:{} groupRobot:{}"
,
robotId
,
groupRobot
);
log
.
info
(
"[wechatGroupConsr.isGroupRobot] robotId:{} groupRobot:{}"
,
robotId
,
groupRobot
);
//如果设置了群学习报告,加一个群学习报告的关键词
//如果设置了群学习报告,加一个群学习报告的关键词
KeywordStatusDTO
dto
=
pushLearningReport
(
classifyQrcodeInfo
,
robotId
,
weixinGroupId
,
pushAddUserMessageDTO
.
getIp
());
KeywordStatusDTO
dto
=
pushLearningReport
(
classifyQrcodeInfo
,
robotId
,
weixinGroupId
,
pushAddUserMessageDTO
.
getIp
());
AccountSettingDto
accountSettingDto
=
qrcodeSceneConsr
.
getWechatInfo
(
classifyQrcodeInfo
.
getChannelId
());
if
(
ListUtils
.
isEmpty
(
replyMessages
))
{
if
(
ListUtils
.
isEmpty
(
replyMessages
))
{
//获取群名称
//获取群名称
GroupQrcodeBaseInfoVO
groupInfo
=
groupQrcodeBiz
.
getBaseById
(
classifyQrcodeInfo
.
getGroupQrcodeId
());
GroupQrcodeBaseInfoVO
groupInfo
=
groupQrcodeBiz
.
getBaseById
(
classifyQrcodeInfo
.
getGroupQrcodeId
());
//推送消息 刘娜需求 1001282 群不推送关键词
//推送消息 刘娜需求 1001282 群不推送关键词
// 若非之前的机器人则不回复普通关键词
// 若非之前的机器人则不回复普通关键词
SendWeixinRequestTools
.
sendDefaultMessage
(
groupInfo
==
null
?
""
:
groupInfo
.
getGroupName
(),
robotId
,
weixinGroupId
,
isHaveKeywords
,
groupRobot
,
keywords
,
dto
,
pushAddUserMessageDTO
.
getIp
());
SendDefaultGuideMessageDTO
sendGuideMessageDTO
=
new
SendDefaultGuideMessageDTO
();
sendGuideMessageDTO
.
setClassifyQrcodeInfo
(
classifyQrcodeInfo
);
sendGuideMessageDTO
.
setGroupName
(
groupInfo
==
null
?
""
:
groupInfo
.
getGroupName
());
sendGuideMessageDTO
.
setRobotId
(
robotId
);
sendGuideMessageDTO
.
setWeixinGroupId
(
weixinGroupId
);
sendGuideMessageDTO
.
setIsHaveKeywords
(
isHaveKeywords
);
sendGuideMessageDTO
.
setIsGroupRobot
(
groupRobot
);
sendGuideMessageDTO
.
setKeywords
(
keywords
);
sendGuideMessageDTO
.
setDto
(
dto
);
sendGuideMessageDTO
.
setIp
(
pushAddUserMessageDTO
.
getIp
());
sendGuideMessageDTO
.
setAccountSettingDto
(
accountSettingDto
);
SendWeixinRequestTools
.
sendDefaultMessage
(
sendGuideMessageDTO
);
}
else
{
}
else
{
//处理链接
//处理链接
handleUrl
(
replyMessages
,
wechatInfo
,
classifyQrcodeInfo
);
handleUrl
(
replyMessages
,
wechatInfo
,
classifyQrcodeInfo
);
//推送消息
//推送消息
SendWeixinRequestTools
.
sendGuideMessage
(
replyMessages
,
robotId
,
weixinGroupId
,
groupRobot
,
keywords
,
dto
,
pushAddUserMessageDTO
.
getIp
(),
SendMessageTypeEnum
.
GROUP
.
getCode
());
SendGuideMessageDTO
sendGuideMessageDTO
=
new
SendGuideMessageDTO
();
sendGuideMessageDTO
.
setClassifyQrcodeInfo
(
classifyQrcodeInfo
);
sendGuideMessageDTO
.
setReplyMessages
(
replyMessages
);
sendGuideMessageDTO
.
setRobotId
(
robotId
);
sendGuideMessageDTO
.
setWeixinGroupId
(
weixinGroupId
);
sendGuideMessageDTO
.
setIsGroupRobot
(
groupRobot
);
sendGuideMessageDTO
.
setKeywords
(
keywords
);
sendGuideMessageDTO
.
setDto
(
dto
);
sendGuideMessageDTO
.
setIp
(
pushAddUserMessageDTO
.
getIp
());
sendGuideMessageDTO
.
setCode
(
SendMessageTypeEnum
.
GROUP
.
getCode
());
sendGuideMessageDTO
.
setAccountSettingDto
(
accountSettingDto
);
SendWeixinRequestTools
.
sendGuideMessage
(
sendGuideMessageDTO
);
//新增欢迎语应用触发记录
//新增欢迎语应用触发记录
addGuideAppTouchRecord
(
replyMessages
,
weixinGroupId
,
classifyQrcodeInfo
.
getBookGroupId
(),
classifyQrcodeInfo
.
getClassifyId
());
addGuideAppTouchRecord
(
replyMessages
,
weixinGroupId
,
classifyQrcodeInfo
.
getBookGroupId
(),
classifyQrcodeInfo
.
getClassifyId
());
}
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/keywords/dto/KeywordDTO.java
View file @
19cf9948
...
@@ -31,6 +31,23 @@ public class KeywordDTO implements Serializable {
...
@@ -31,6 +31,23 @@ public class KeywordDTO implements Serializable {
@ApiModelProperty
(
"引导语"
)
@ApiModelProperty
(
"引导语"
)
private
String
guide
;
private
String
guide
;
@ApiModelProperty
(
"关键词应用/作品id"
)
private
Long
serveId
;
@ApiModelProperty
(
"应用/作品"
)
private
String
serveType
;
@ApiModelProperty
(
"关键词连接"
)
private
String
linkUrl
;
@ApiModelProperty
(
"关键词内容"
)
private
String
content
;
@ApiModelProperty
(
"关键词描述"
)
private
String
description
;
@ApiModelProperty
(
"回复类型"
)
private
Integer
replyType
;
}
}
pcloud-service-book/src/main/resources/mapper/keywords/BookKeyword.Mapper.xml
View file @
19cf9948
...
@@ -133,17 +133,23 @@
...
@@ -133,17 +133,23 @@
order by bk.rank ASC, bk.update_time desc, bk.id DESC
order by bk.rank ASC, bk.update_time desc, bk.id DESC
</select>
</select>
<select
id=
"listFiveKeyword"
resultType=
"
k
eywordDTO"
parameterType=
"map"
>
<select
id=
"listFiveKeyword"
resultType=
"
com.pcloud.book.keywords.dto.K
eywordDTO"
parameterType=
"map"
>
SELECT
SELECT
k.keywords,
k.keywords,
k.id keywordId,
k.id keywordId,
bk.is_warehouse as isWarehouse,
bk.is_warehouse as isWarehouse,
bk.warehouse_id as warehouseId,
bk.warehouse_id as warehouseId,
k.guide
k.guide,
k.content,
k.description,
k.link_url as linkUrl,
k.serve_id AS serveId,
k.serve_type AS serveType,
k.reply_type AS replyType
FROM
FROM
book_keyword bk
book_keyword bk
JOIN
JOIN
keyword k ON bk.keyword_id = k.id
keyword k ON bk.keyword_id = k.id
WHERE
WHERE
bk.is_delete = 0
bk.is_delete = 0
AND
AND
...
...
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