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
b842e438
Commit
b842e438
authored
Mar 25, 2020
by
裴大威
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix-1002594new' into 'master'
qq欢迎语没有发出来bug修复 See merge request rays/pcloud-book!580
parents
8c878638
90833c23
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
7 deletions
+30
-7
BookGuideBizImpl.java
...a/com/pcloud/book/keywords/biz/impl/BookGuideBizImpl.java
+1
-1
PcloudRobotBizImpl.java
...cloud/book/pcloudkeyword/biz/impl/PcloudRobotBizImpl.java
+29
-6
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/keywords/biz/impl/BookGuideBizImpl.java
View file @
b842e438
...
@@ -291,7 +291,7 @@ public class BookGuideBizImpl implements BookGuideBiz {
...
@@ -291,7 +291,7 @@ public class BookGuideBizImpl implements BookGuideBiz {
}
}
}
else
{
}
else
{
//qq同意加好友 并发送欢迎语
//qq同意加好友 并发送欢迎语
PcloudRobot
pcloudRobot
=
pcloudRobotDao
.
getByWxId
(
agreeAddUserDTO
.
getR
obotWxId
());
PcloudRobot
pcloudRobot
=
pcloudRobotDao
.
getByWxId
(
agreeAddUserDTO
.
getR
eceiverId
().
toString
());
if
(
pcloudRobot
!=
null
){
if
(
pcloudRobot
!=
null
){
//删除需求单记录
//删除需求单记录
//TODO
//TODO
...
...
pcloud-service-book/src/main/java/com/pcloud/book/pcloudkeyword/biz/impl/PcloudRobotBizImpl.java
View file @
b842e438
...
@@ -943,7 +943,13 @@ wechatGroupConsr.sendMessage(JSON.toJSONString(sendFileVO));
...
@@ -943,7 +943,13 @@ wechatGroupConsr.sendMessage(JSON.toJSONString(sendFileVO));
if
(
getUserTdState
(
receiverId
.
toString
(),
userId
.
toString
())
==
1
)
{
if
(
getUserTdState
(
receiverId
.
toString
(),
userId
.
toString
())
==
1
)
{
return
;
return
;
}
}
pcloudRobotSet
.
fillRobotWelcome
(
robotWelcomeListByPcloudClassifyId
);
for
(
PcloudRobotWelcome
pcloudRobotWelcome:
robotWelcomeListByPcloudClassifyId
)
{
for
(
PcloudRobotWelcome
pcloudRobotWelcome:
robotWelcomeListByPcloudClassifyId
)
{
try
{
Thread
.
sleep
(
1000
*
pcloudRobotWelcome
.
getWelcomeDuration
());
}
catch
(
InterruptedException
e
)
{
LOGGER
.
error
(
"线程睡眠出错=="
,
e
);
}
PrivateMsgSendVO
privateMsgSendVO
=
new
PrivateMsgSendVO
();
PrivateMsgSendVO
privateMsgSendVO
=
new
PrivateMsgSendVO
();
privateMsgSendVO
.
setSenderQQCode
(
Long
.
valueOf
(
receiverId
));
privateMsgSendVO
.
setSenderQQCode
(
Long
.
valueOf
(
receiverId
));
privateMsgSendVO
.
setReceiverQQCode
(
Long
.
valueOf
(
userId
));
privateMsgSendVO
.
setReceiverQQCode
(
Long
.
valueOf
(
userId
));
...
@@ -952,30 +958,47 @@ wechatGroupConsr.sendMessage(JSON.toJSONString(sendFileVO));
...
@@ -952,30 +958,47 @@ wechatGroupConsr.sendMessage(JSON.toJSONString(sendFileVO));
String
message
=
new
MessageBuilder
().
add
(
new
ComponentText
(
pcloudRobotWelcome
.
getContent
())).
toString
();
// 文本消息
String
message
=
new
MessageBuilder
().
add
(
new
ComponentText
(
pcloudRobotWelcome
.
getContent
())).
toString
();
// 文本消息
privateMsgSendVO
.
setMessage
(
message
);
privateMsgSendVO
.
setMessage
(
message
);
wechatGroupConsr
.
sendMessage4QQ
(
privateMsgSendVO
);
wechatGroupConsr
.
sendMessage4QQ
(
privateMsgSendVO
);
return
;
continue
;
}
}
if
(
WelcomeReplyTypeEnum
.
IMAGE
.
value
.
equals
(
pcloudRobotWelcome
.
getReplyType
()))
{
if
(
WelcomeReplyTypeEnum
.
IMAGE
.
value
.
equals
(
pcloudRobotWelcome
.
getReplyType
()))
{
// 构造一个图片消息
// 构造一个图片消息
String
message
=
new
MessageBuilder
().
add
(
new
ComponentImage
(
pcloudRobotWelcome
.
getPicUrl
()))
.
toString
();
// 图片消息
String
message
=
new
MessageBuilder
().
add
(
new
ComponentImage
(
pcloudRobotWelcome
.
getPicUrl
()))
.
toString
();
// 图片消息
privateMsgSendVO
.
setMessage
(
message
);
privateMsgSendVO
.
setMessage
(
message
);
wechatGroupConsr
.
sendMessage4QQ
(
privateMsgSendVO
);
wechatGroupConsr
.
sendMessage4QQ
(
privateMsgSendVO
);
return
;
continue
;
}
}
if
(
WelcomeReplyTypeEnum
.
AUDIO
.
value
.
equals
(
pcloudRobotWelcome
.
getReplyType
()))
{
if
(
WelcomeReplyTypeEnum
.
AUDIO
.
value
.
equals
(
pcloudRobotWelcome
.
getReplyType
()))
{
// 构造一个
图片
消息
// 构造一个
音频
消息
String
message
=
new
MessageBuilder
().
add
(
new
ComponentRecord
(
pcloudRobotWelcome
.
getResourceUrl
(),
false
)).
toString
();
// 音频消息
String
message
=
new
MessageBuilder
().
add
(
new
ComponentRecord
(
pcloudRobotWelcome
.
getResourceUrl
(),
false
)).
toString
();
// 音频消息
privateMsgSendVO
.
setMessage
(
message
);
privateMsgSendVO
.
setMessage
(
message
);
wechatGroupConsr
.
sendMessage4QQ
(
privateMsgSendVO
);
wechatGroupConsr
.
sendMessage4QQ
(
privateMsgSendVO
);
return
;
continue
;
}
}
if
(
WelcomeReplyTypeEnum
.
RESOURCE
.
value
.
equals
(
pcloudRobotWelcome
.
getReplyType
()))
{
if
(
WelcomeReplyTypeEnum
.
RESOURCE
.
value
.
equals
(
pcloudRobotWelcome
.
getReplyType
()))
{
// 构造一个
图片
消息
// 构造一个
资源文件
消息
String
message
=
new
MessageBuilder
().
add
(
new
ComponentRecord
(
pcloudRobotWelcome
.
getResourceId
().
toString
(),
false
)).
toString
();
// 资源文件消息
String
message
=
new
MessageBuilder
().
add
(
new
ComponentRecord
(
pcloudRobotWelcome
.
getResourceId
().
toString
(),
false
)).
toString
();
// 资源文件消息
privateMsgSendVO
.
setMessage
(
message
);
privateMsgSendVO
.
setMessage
(
message
);
wechatGroupConsr
.
sendMessage4QQ
(
privateMsgSendVO
);
wechatGroupConsr
.
sendMessage4QQ
(
privateMsgSendVO
);
return
;
continue
;
}
}
}
}
try
{
Thread
.
sleep
(
1000
*
5
);
}
catch
(
InterruptedException
e
)
{
LOGGER
.
error
(
"线程睡眠出错=="
,
e
);
}
if
(
robotWelcomeListByPcloudClassifyId
!=
null
&&
robotWelcomeListByPcloudClassifyId
.
size
()
>
0
&&
robotWelcomeListByPcloudClassifyId
.
get
(
0
).
getIsOpenPushH5url
()
==
1
)
{
//发送H5链接
PrivateMsgSendVO
privateMsgSendVO
=
new
PrivateMsgSendVO
();
privateMsgSendVO
.
setSenderQQCode
(
Long
.
valueOf
(
receiverId
));
privateMsgSendVO
.
setReceiverQQCode
(
Long
.
valueOf
(
userId
));
String
endUrl
=
wechatLinkPrefix
+
"/dialog"
+
"?book_group_id="
+
0
+
"&wxId="
+
userId
+
"&robotWxId="
+
receiverId
;
String
resultUrl
=
UrlUtils
.
getShortUrl4Own
(
endUrl
);
String
h5Content
=
"你可以通过点击"
+
resultUrl
+
",或者输入【】内关键词唤醒我\n"
+
"小睿会在这里时时陪伴你"
;
String
message
=
new
MessageBuilder
().
add
(
new
ComponentText
(
h5Content
)).
toString
();
// 文本消息
privateMsgSendVO
.
setMessage
(
message
);
wechatGroupConsr
.
sendMessage4QQ
(
privateMsgSendVO
);
}
}
}
...
...
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