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
f0881025
Commit
f0881025
authored
Feb 16, 2020
by
裴大威
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-zengpo-1002377' into 'master'
发送时判断是否需要发送h5页面链接 See merge request rays/pcloud-book!424
parents
6e41f8a3
e0726416
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
21 additions
and
11 deletions
+21
-11
PcloudRobotBizImpl.java
...cloud/book/pcloudkeyword/biz/impl/PcloudRobotBizImpl.java
+9
-6
PcloudRobotClassifyBizImpl.java
...ok/pcloudkeyword/biz/impl/PcloudRobotClassifyBizImpl.java
+2
-1
PcloudRobotClassifyDao.java
...pcloud/book/pcloudkeyword/dao/PcloudRobotClassifyDao.java
+1
-1
PcloudRobotClassifyDaoImpl.java
...ok/pcloudkeyword/dao/impl/PcloudRobotClassifyDaoImpl.java
+1
-1
ClassifyWelcomeDTO.java
...com/pcloud/book/pcloudkeyword/dto/ClassifyWelcomeDTO.java
+2
-0
PcloudRobotClassify.java
...pcloud/book/pcloudkeyword/entity/PcloudRobotClassify.java
+2
-0
PcloudRobotClassify.Mapper.xml
...urces/mapper/pcloudkeyword/PcloudRobotClassify.Mapper.xml
+4
-2
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/pcloudkeyword/biz/impl/PcloudRobotBizImpl.java
View file @
f0881025
...
...
@@ -209,11 +209,12 @@ public class PcloudRobotBizImpl implements PcloudRobotBiz {
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"robotWxId"
,
robotWxId
);
PcloudRobot
pcloudRobot
=
(
PcloudRobot
)
pcloudRobotDao
.
getBy
(
map
,
"getByRobotWxId"
);
PcloudRobotClassify
robotClassify
=
new
PcloudRobotClassify
();
if
(
pcloudRobot
!=
null
)
{
if
(
pcloudRobot
.
getRobotType
()
!=
null
)
{
if
(
pcloudRobot
.
getRobotType
()
!=
null
)
{
Integer
welcomeDuration
=
3
;
PcloudRobotClassify
robotClassify
=
pcloudRobotClassifyBiz
.
getClassifyById
(
pcloudRobot
.
getRobotType
().
longValue
());
if
(
robotClassify
!=
null
&&
robotClassify
.
getWelcomeDuration
()
!=
null
)
{
robotClassify
=
pcloudRobotClassifyBiz
.
getClassifyById
(
pcloudRobot
.
getRobotType
().
longValue
());
if
(
robotClassify
!=
null
&&
robotClassify
.
getWelcomeDuration
()
!=
null
)
{
welcomeDuration
=
robotClassify
.
getWelcomeDuration
();
}
List
<
PcloudRobotWelcome
>
robotWelcomeList
=
pcloudRobotWelcomeDao
.
getRobotWelcomeListByPcloudClassifyId
(
pcloudRobot
.
getRobotType
().
longValue
());
...
...
@@ -225,7 +226,7 @@ public class PcloudRobotBizImpl implements PcloudRobotBiz {
LOGGER
.
error
(
"线程睡眠出错=="
,
e
);
}
Integer
replyType
=
robotWelcome
.
getReplyType
();
if
(
WelcomeReplyTypeEnum
.
TEXT
.
value
.
equals
(
replyType
))
{
if
(
WelcomeReplyTypeEnum
.
TEXT
.
value
.
equals
(
replyType
))
{
SendTextMessageVO
sendTextMessageVO
=
new
SendTextMessageVO
();
sendTextMessageVO
.
setContent
(
robotWelcome
.
getContent
());
sendTextMessageVO
.
setAltId
(
robotWxId
);
...
...
@@ -233,7 +234,7 @@ public class PcloudRobotBizImpl implements PcloudRobotBiz {
sendTextMessageVO
.
setIp
(
ip
);
sendTextMessageVO
.
setCode
(
SendMessageTypeEnum
.
SELF
.
getCode
());
WxGroupSDK
.
sendTextMessage
(
sendTextMessageVO
);
}
else
if
(
WelcomeReplyTypeEnum
.
IMAGE
.
value
.
equals
(
replyType
))
{
}
else
if
(
WelcomeReplyTypeEnum
.
IMAGE
.
value
.
equals
(
replyType
))
{
SendPicMessageVO
sendPicMessageVO
=
new
SendPicMessageVO
();
sendPicMessageVO
.
setWxGroupId
(
userWxId
);
sendPicMessageVO
.
setAltId
(
robotWxId
);
...
...
@@ -241,7 +242,7 @@ public class PcloudRobotBizImpl implements PcloudRobotBiz {
sendPicMessageVO
.
setIp
(
ip
);
sendPicMessageVO
.
setCode
(
SendMessageTypeEnum
.
SELF
.
getCode
());
WxGroupSDK
.
sendPicMessage
(
sendPicMessageVO
);
}
else
if
(
WelcomeReplyTypeEnum
.
RESOURCE
.
value
.
equals
(
replyType
))
{
}
else
if
(
WelcomeReplyTypeEnum
.
RESOURCE
.
value
.
equals
(
replyType
))
{
SendFileVO
sendFileVO
=
new
SendFileVO
();
sendFileVO
.
setFileUrl
(
robotWelcome
.
getResourceUrl
());
sendFileVO
.
setFileName
(
robotWelcome
.
getResourceName
());
...
...
@@ -253,6 +254,7 @@ public class PcloudRobotBizImpl implements PcloudRobotBiz {
}
}
}
if
(
robotClassify
!=
null
&&
robotClassify
.
getIsOpenPushH5url
()
!=
null
&&
robotClassify
.
getIsOpenPushH5url
()
==
1
)
{
//发送H5链接
String
endUrl
=
wechatLinkPrefix
+
"/dialog"
+
"?book_group_id="
+
0
+
"&wxId="
+
userWxId
+
"&robotWxId="
+
robotWxId
;
String
resultUrl
=
UrlUtils
.
getShortUrl4Own
(
endUrl
);
...
...
@@ -265,6 +267,7 @@ public class PcloudRobotBizImpl implements PcloudRobotBiz {
sendTextMessageVO
.
setCode
(
SendMessageTypeEnum
.
SELF
.
getCode
());
WxGroupSDK
.
sendTextMessage
(
sendTextMessageVO
);
}
}
});
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/pcloudkeyword/biz/impl/PcloudRobotClassifyBizImpl.java
View file @
f0881025
...
...
@@ -74,6 +74,7 @@ public class PcloudRobotClassifyBizImpl implements PcloudRobotClassifyBiz {
public
ClassifyWelcomeDTO
getClassifyWelcome
(
Long
classifyId
)
{
ClassifyWelcomeDTO
classifyWelcomeDTO
=
new
ClassifyWelcomeDTO
();
PcloudRobotClassify
robotClassify
=
pcloudRobotClassifyDao
.
getById
(
classifyId
);
classifyWelcomeDTO
.
setIsOpenPushH5url
(
robotClassify
.
getIsOpenPushH5url
());
classifyWelcomeDTO
.
setWelcomeDuration
(
robotClassify
.
getWelcomeDuration
());
List
<
PcloudRobotWelcome
>
pcloudRobotWelcomeList
=
pcloudRobotWelcomeDao
.
getRobotWelcomeListByPcloudClassifyId
(
classifyId
);
pcloudRobotSet
.
fillRobotWelcome
(
pcloudRobotWelcomeList
);
...
...
@@ -83,7 +84,7 @@ public class PcloudRobotClassifyBizImpl implements PcloudRobotClassifyBiz {
@Override
public
void
updateClassifyWelcome
(
ClassifyWelcomeDTO
classifyWelcomeDTO
)
{
pcloudRobotClassifyDao
.
updateWelcomeDuration
(
classifyWelcomeDTO
.
getPcloudClassifyId
(),
classifyWelcomeDTO
.
getWelcomeDuration
());
pcloudRobotClassifyDao
.
updateWelcomeDuration
(
classifyWelcomeDTO
.
getPcloudClassifyId
(),
classifyWelcomeDTO
.
getWelcomeDuration
()
,
classifyWelcomeDTO
.
getIsOpenPushH5url
()
);
List
<
PcloudRobotWelcome
>
robotWelcomeList
=
classifyWelcomeDTO
.
getPcloudRobotWelcomeList
();
pcloudRobotWelcomeDao
.
deleteByPcloudClassifyId
(
classifyWelcomeDTO
.
getPcloudClassifyId
());
if
(
ListUtils
.
isEmpty
(
robotWelcomeList
))
{
...
...
pcloud-service-book/src/main/java/com/pcloud/book/pcloudkeyword/dao/PcloudRobotClassifyDao.java
View file @
f0881025
...
...
@@ -12,5 +12,5 @@ public interface PcloudRobotClassifyDao extends BaseDao<PcloudRobotClassify> {
void
updateRobotClassifyKeywordClassify
(
Long
id
,
Long
keywordClassifyId
);
void
updateWelcomeDuration
(
Long
id
,
Integer
welcomeDuration
);
void
updateWelcomeDuration
(
Long
id
,
Integer
welcomeDuration
,
Integer
isOpenPushH5url
);
}
pcloud-service-book/src/main/java/com/pcloud/book/pcloudkeyword/dao/impl/PcloudRobotClassifyDaoImpl.java
View file @
f0881025
...
...
@@ -28,7 +28,7 @@ public class PcloudRobotClassifyDaoImpl extends BaseDaoImpl<PcloudRobotClassify>
}
@Override
public
void
updateWelcomeDuration
(
Long
id
,
Integer
welcomeDuration
)
{
public
void
updateWelcomeDuration
(
Long
id
,
Integer
welcomeDuration
,
Integer
isOpenPushH5url
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"id"
,
id
);
map
.
put
(
"welcomeDuration"
,
welcomeDuration
);
...
...
pcloud-service-book/src/main/java/com/pcloud/book/pcloudkeyword/dto/ClassifyWelcomeDTO.java
View file @
f0881025
...
...
@@ -17,6 +17,8 @@ public class ClassifyWelcomeDTO extends BaseDTO {
@ApiModelProperty
(
"欢迎语间隔时长"
)
private
Integer
welcomeDuration
;
private
Integer
isOpenPushH5url
;
private
List
<
PcloudRobotWelcome
>
pcloudRobotWelcomeList
;
}
pcloud-service-book/src/main/java/com/pcloud/book/pcloudkeyword/entity/PcloudRobotClassify.java
View file @
f0881025
...
...
@@ -18,6 +18,8 @@ public class PcloudRobotClassify extends BaseEntity {
private
Integer
welcomeDuration
;
private
Integer
isOpenPushH5url
;
@ApiModelProperty
(
"关键词分类ID"
)
private
Long
keywordClassifyId
;
}
pcloud-service-book/src/main/resources/mapper/pcloudkeyword/PcloudRobotClassify.Mapper.xml
View file @
f0881025
...
...
@@ -9,6 +9,7 @@
<result
column=
"qrcode_url"
property=
"qrcodeUrl"
jdbcType=
"VARCHAR"
/>
<result
column=
"keyword_classify_id"
property=
"keywordClassifyId"
jdbcType=
"VARCHAR"
/>
<result
column=
"welcome_duration"
property=
"welcomeDuration"
jdbcType=
"INTEGER"
/>
<result
column=
"is_open_push_h5url"
property=
"isOpenPushH5url"
jdbcType=
"INTEGER"
/>
</resultMap>
<resultMap
id=
"pageResultMap"
type=
"com.pcloud.book.pcloudkeyword.facade.response.PcloudRobotClassifyResponseVO"
>
...
...
@@ -19,7 +20,7 @@
select=
"com.pcloud.book.pcloudkeyword.dao.impl.PcloudRobotDaoImpl.getRobotCountByClassifyId"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, classify_name, link_url, qrcode_url,keyword_classify_id, is_delete, welcome_duration
id, classify_name, link_url, qrcode_url,keyword_classify_id, is_delete, welcome_duration
,is_open_push_h5url
</sql>
<insert
id=
"insert"
parameterType=
"com.pcloud.book.pcloudkeyword.entity.PcloudRobotClassify"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
...
...
@@ -81,7 +82,8 @@
<update
id=
"updateWelcomeDuration"
parameterType=
"map"
>
update pcloud_robot_classify
set welcome_duration = #{welcomeDuration}
set welcome_duration = #{welcomeDuration},
is_open_push_h5url=#{isOpenPushH5url}
where id=#{id}
</update>
...
...
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