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
175df8c6
Commit
175df8c6
authored
Feb 03, 2020
by
阮思源
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat-addurl' into 'master'
欢迎语第一条加链接 See merge request rays/pcloud-book!340
parents
8c0322bf
c750476f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
BookGuideBizImpl.java
...a/com/pcloud/book/keywords/biz/impl/BookGuideBizImpl.java
+14
-0
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/keywords/biz/impl/BookGuideBizImpl.java
View file @
175df8c6
...
...
@@ -43,6 +43,7 @@ import com.pcloud.channelcenter.wechat.dto.AccountSettingDto;
import
com.pcloud.common.core.aspect.ParamLog
;
import
com.pcloud.common.utils.ListUtils
;
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.contentcenter.resource.dto.ResourceDTO
;
import
com.pcloud.wechatgroup.message.dto.AgreeAddUserDTO
;
...
...
@@ -121,6 +122,8 @@ public class BookGuideBizImpl implements BookGuideBiz {
private
String
envStr
;
@Autowired
private
SelfRobotKeywordReplyDao
selfRobotKeywordReplyDao
;
@Value
(
"${wechat.group.link.prefix}"
)
private
String
wechatGroupLinkPrefix
;
@ParamLog
(
"同意加好友发送欢迎语"
)
@Override
...
...
@@ -323,9 +326,20 @@ public class BookGuideBizImpl implements BookGuideBiz {
String
ip
=
agreeAddUserDTO
.
getIp
();
Integer
code
=
SendMessageTypeEnum
.
SELF
.
getCode
();
String
robotId
=
agreeAddUserDTO
.
getRobotWxId
();
int
i
=
0
;
for
(
BookGroupFriendGuide
bookGroupFriendGuide:
friendGuideList
){
i
=
i
+
1
;
Integer
type
=
bookGroupFriendGuide
.
getType
();
if
(
ReplyTypeEnum
.
TEXT
.
value
.
equals
(
type
))
{
if
(
i
==
friendGuideList
.
size
()){
String
content
=
bookGroupFriendGuide
.
getContent
();
if
(!
StringUtil
.
isEmpty
(
content
)){
String
endUrl
=
wechatGroupLinkPrefix
+
"/dialog"
+
"?book_group_id="
+
bookGroupId
+
"&wxId="
+
userWxId
+
"&robotWxId="
+
robotId
;
String
resultUrl
=
UrlUtils
.
getShortUrl4Own
(
endUrl
);
content
=
content
+
"\n你可以通过点击"
+
resultUrl
+
",或者输入【】内关键词唤醒我\n"
+
"小睿会在这里时时陪伴你"
;
bookGroupFriendGuide
.
setContent
(
content
);
}
}
SendTextMessageVO
sendTextMessageVO
=
new
SendTextMessageVO
();
sendTextMessageVO
.
setContent
(
bookGroupFriendGuide
.
getContent
());
sendTextMessageVO
.
setAltId
(
robotId
);
...
...
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