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
bd1c0493
Commit
bd1c0493
authored
Aug 20, 2019
by
裴大威
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ruansiyuan'
parents
fd5657a4
bc14ac29
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
11 deletions
+43
-11
BookKeywordBizImpl.java
...com/pcloud/book/keywords/biz/impl/BookKeywordBizImpl.java
+34
-10
ReplyKeywordDTO.java
...in/java/com/pcloud/book/keywords/dto/ReplyKeywordDTO.java
+6
-0
BookKeyword.Mapper.xml
...src/main/resources/mapper/keywords/BookKeyword.Mapper.xml
+3
-1
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/keywords/biz/impl/BookKeywordBizImpl.java
View file @
bd1c0493
...
...
@@ -38,7 +38,14 @@ import com.pcloud.book.keywords.entity.BookKeyword;
import
com.pcloud.book.keywords.entity.BookKeywordRecord
;
import
com.pcloud.book.keywords.entity.Keyword
;
import
com.pcloud.book.keywords.enums.ReplyTypeEnum
;
import
com.pcloud.book.keywords.vo.*
;
import
com.pcloud.book.keywords.vo.DeleteKeywordVO
;
import
com.pcloud.book.keywords.vo.KeywordVO
;
import
com.pcloud.book.keywords.vo.ListKeywordParam
;
import
com.pcloud.book.keywords.vo.ListKeywordVO
;
import
com.pcloud.book.keywords.vo.QrWeixinParam
;
import
com.pcloud.book.keywords.vo.SetKeywordVO
;
import
com.pcloud.book.keywords.vo.SetRankVO
;
import
com.pcloud.book.keywords.vo.UpdateKeywordVO
;
import
com.pcloud.channelcenter.base.constants.ChannelEnum
;
import
com.pcloud.channelcenter.qrcode.service.QrcodeSceneService
;
import
com.pcloud.channelcenter.qrcode.vo.MessageBookVO
;
...
...
@@ -71,7 +78,6 @@ import java.util.ArrayList;
import
java.util.Comparator
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
...
...
@@ -480,14 +486,23 @@ public class BookKeywordBizImpl implements BookKeywordBiz {
// 处理链接地址
Long
classifyId
=
keywordClassifyIdMap
.
get
(
replyKeywordDTO
.
getKeywordId
());
final
GroupClassifyQrcodeDTO
dto
=
classifyMap
.
get
(
classifyId
);
if
(
null
==
dto
)
{
log
.
info
(
"[关键词消息回复] 分类信息为空 replyKeywordDTO:{}; classifyMap:{}"
,
replyKeywordDTO
,
classifyMap
);
continue
;
}
final
boolean
isApp
=
ReplyTypeEnum
.
APP
.
value
.
equals
(
replyKeywordDTO
.
getReplyType
());
final
boolean
isLink
=
ReplyTypeEnum
.
LINK
.
value
.
equals
(
replyKeywordDTO
.
getReplyType
());
Long
qrcodeId
=
classifyToQrcodeMap
.
get
(
dto
.
getClassifyId
());
GroupQrcodeBaseInfoVO
qrcodeInfo
=
groupQrcodeDao
.
getBaseById
(
qrcodeId
);
if
(
ReplyTypeEnum
.
APP
.
value
.
equals
(
replyKeywordDTO
.
getReplyType
())
||
ReplyTypeEnum
.
LINK
.
value
.
equals
(
replyKeywordDTO
.
getReplyType
()))
{
if
(
null
==
dto
)
{
log
.
info
(
"[关键词消息回复] 分类信息为空 replyKeywordDTO:{}; classifyMap:{}"
,
replyKeywordDTO
,
classifyMap
);
continue
;
if
(
isApp
||
isLink
)
{
Long
channelId
=
dto
.
getChannelId
();
if
(
isApp
)
{
final
AppDto
app
=
appConsr
.
getBaseById
(
replyKeywordDTO
.
getServeId
());
if
(
null
!=
app
)
{
channelId
=
app
.
getChannelId
();
}
}
AccountSettingDto
accountSettingDto
=
qrcodeSceneConsr
.
getWechatInfo
(
dto
.
getChannelId
()
);
AccountSettingDto
accountSettingDto
=
qrcodeSceneConsr
.
getWechatInfo
(
channelId
);
String
linkUrl
=
SendWeixinRequestTools
.
splitUrlNew
(
accountSettingDto
,
replyKeywordDTO
.
getLinkUrl
(),
dto
.
getBookGroupId
(),
dto
.
getClassifyId
(),
qrcodeId
);
replyKeywordDTO
.
setLinkUrl
(
linkUrl
);
if
(!
StringUtil
.
isEmpty
(
linkUrl
))
{
...
...
@@ -523,7 +538,6 @@ public class BookKeywordBizImpl implements BookKeywordBiz {
sb
.
append
(
dto
.
getKeywords
()).
append
(
":"
).
append
(
dto
.
getContent
()).
append
(
"\n"
);
}
else
if
(
ReplyTypeEnum
.
IMAGE
.
value
.
equals
(
dto
.
getReplyType
()))
{
SendWeixinRequestTools
.
sendKeywordMessage
(
dto
,
robotId
,
userWxId
,
ip
,
code
);
continue
;
}
}
d
.
setContent
(
sb
.
toString
());
...
...
@@ -579,8 +593,18 @@ public class BookKeywordBizImpl implements BookKeywordBiz {
}
log
.
info
(
"[关键词回复原始数据] : sendKeywordMessage replyKeywordDTO :{}, robotId:{}, weixinGroupId:{}"
,
replyKeywordDTO
,
robotId
,
weixinGroupId
);
// 处理链接地址
if
(
ReplyTypeEnum
.
APP
.
value
.
equals
(
replyKeywordDTO
.
getReplyType
())
||
ReplyTypeEnum
.
LINK
.
value
.
equals
(
replyKeywordDTO
.
getReplyType
()))
{
AccountSettingDto
accountSettingDto
=
qrcodeSceneConsr
.
getWechatInfo
(
classifyQrcodeInfo
.
getChannelId
());
final
boolean
isApp
=
ReplyTypeEnum
.
APP
.
value
.
equals
(
replyKeywordDTO
.
getReplyType
());
final
boolean
isLink
=
ReplyTypeEnum
.
LINK
.
value
.
equals
(
replyKeywordDTO
.
getReplyType
());
if
(
isApp
||
isLink
)
{
Long
channelId
=
classifyQrcodeInfo
.
getChannelId
();
// 如果是app则取app的channelId
if
(
isApp
)
{
final
AppDto
app
=
appConsr
.
getBaseById
(
replyKeywordDTO
.
getServeId
());
if
(
null
!=
app
)
{
channelId
=
app
.
getChannelId
();
}
}
AccountSettingDto
accountSettingDto
=
qrcodeSceneConsr
.
getWechatInfo
(
channelId
);
String
linkUrl
=
SendWeixinRequestTools
.
splitUrlNew
(
accountSettingDto
,
replyKeywordDTO
.
getLinkUrl
(),
classifyQrcodeInfo
.
getBookGroupId
(),
classifyQrcodeInfo
.
getClassifyId
(),
classifyQrcodeInfo
.
getGroupQrcodeId
());
replyKeywordDTO
.
setLinkUrl
(
linkUrl
);
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/keywords/dto/ReplyKeywordDTO.java
View file @
bd1c0493
...
...
@@ -48,4 +48,10 @@ public class ReplyKeywordDTO implements Serializable {
@ApiModelProperty
(
"短链接地址"
)
private
String
shortLinkUrl
;
@ApiModelProperty
(
"应用/作品id"
)
private
Long
serveId
;
@ApiModelProperty
(
"应用/作品"
)
private
String
serveType
;
}
pcloud-service-book/src/main/resources/mapper/keywords/BookKeyword.Mapper.xml
View file @
bd1c0493
...
...
@@ -163,7 +163,9 @@
k.pic_url picUrl,
bk.is_warehouse as isWarehouse,
bk.warehouse_id as warehouseId,
k.reply_type replyType
k.reply_type replyType,
k.serve_id as serveId,
k.serve_type as serveType
FROM
book_keyword bk
JOIN
...
...
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