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
163a1be3
Commit
163a1be3
authored
Feb 26, 2020
by
阮思源
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat-1002450' into 'master'
【1002450】跳转衔接语支持录入图片 See merge request rays/pcloud-book!474
parents
bf5050dd
1b7c570c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
6 deletions
+47
-6
PersonalStageJumpBizImpl.java
...book/personalstage/biz/impl/PersonalStageJumpBizImpl.java
+23
-1
PersonalStageJumpLinkup.java
...ud/book/personalstage/entity/PersonalStageJumpLinkup.java
+7
-0
BaseStageJumpRequestVO.java
...book/personalstage/vo/request/BaseStageJumpRequestVO.java
+2
-0
PersonalStageJumpLinkup.xml
...esources/mapper/personalstage/PersonalStageJumpLinkup.xml
+15
-5
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/personalstage/biz/impl/PersonalStageJumpBizImpl.java
View file @
163a1be3
...
...
@@ -7,6 +7,7 @@ import com.pcloud.book.book.entity.Book;
import
com.pcloud.book.consumer.wechatgroup.WechatGroupConsr
;
import
com.pcloud.book.group.biz.WeixinQrcodeBiz
;
import
com.pcloud.book.guide.biz.PcloudGuideBiz
;
import
com.pcloud.book.keywords.enums.ReplyTypeEnum
;
import
com.pcloud.book.mq.delay.DelayMessageSender
;
import
com.pcloud.book.pcloudkeyword.dao.PcloudRobotClassifyDao
;
import
com.pcloud.book.pcloudkeyword.dao.PcloudRobotDao
;
...
...
@@ -45,6 +46,7 @@ import com.pcloud.common.utils.string.StringUtil;
import
com.pcloud.wechatgroup.group.dto.GroupRobotDTO
;
import
com.pcloud.wechatgroup.group.dto.GroupUserDTO
;
import
com.sdk.wxgroup.SendMessageTypeEnum
;
import
com.sdk.wxgroup.SendPicMessageVO
;
import
com.sdk.wxgroup.SendTextMessageVO
;
import
com.sdk.wxgroup.WxGroupSDK
;
import
org.slf4j.Logger
;
...
...
@@ -348,7 +350,7 @@ public class PersonalStageJumpBizImpl implements PersonalStageJumpBiz {
// 如果下一个阶段是空,则已完成
if
(
null
==
jumpKeywordDto
.
getAfterPersonalStageId
()
||
jumpKeywordDto
.
getAfterPersonalStageId
()
<=
0
){
// 更新到完成状态
updateStageToComplete
(
currentStageUser
);
//
updateStageToComplete(currentStageUser);
return
true
;
}
GroupRobotDTO
groupRobotDTO
=
wechatGroupConsr
.
getGroupRobotByWxId
(
robotWxId
);
...
...
@@ -373,6 +375,7 @@ public class PersonalStageJumpBizImpl implements PersonalStageJumpBiz {
LOGGER
.
info
(
"没有该跳转衔接语!"
);
return
;
}
if
(
ReplyTypeEnum
.
TEXT
.
value
.
equals
(
jumpLinkup
.
getReplyType
())){
SendTextMessageVO
sendTextMessageVO
=
new
SendTextMessageVO
();
sendTextMessageVO
.
setContent
(
personalStageBiz
.
replaceProjectProgressUrl
(
jumpLinkup
.
getLinkupContent
(),
linkupDelayDTO
.
getRobotId
(),
linkupDelayDTO
.
getWxId
(),
linkupDelayDTO
.
getPersonalStageUserId
()));
sendTextMessageVO
.
setAltId
(
linkupDelayDTO
.
getRobotId
());
...
...
@@ -380,6 +383,15 @@ public class PersonalStageJumpBizImpl implements PersonalStageJumpBiz {
sendTextMessageVO
.
setIp
(
linkupDelayDTO
.
getIp
());
sendTextMessageVO
.
setCode
(
SendMessageTypeEnum
.
SELF
.
getCode
());
WxGroupSDK
.
sendTextMessage
(
sendTextMessageVO
);
}
else
if
(
ReplyTypeEnum
.
IMAGE
.
value
.
equals
(
jumpLinkup
.
getReplyType
()))
{
SendPicMessageVO
sendPicMessageVO
=
new
SendPicMessageVO
();
sendPicMessageVO
.
setWxGroupId
(
dto
.
getKey
());
sendPicMessageVO
.
setAltId
(
linkupDelayDTO
.
getRobotId
());
sendPicMessageVO
.
setPicUrl
(
jumpLinkup
.
getPicUrl
());
sendPicMessageVO
.
setIp
(
linkupDelayDTO
.
getIp
());
sendPicMessageVO
.
setCode
(
SendMessageTypeEnum
.
SELF
.
getCode
());
WxGroupSDK
.
sendPicMessage
(
sendPicMessageVO
);
}
}
@ParamLog
(
"处理用户提交表单阶段跳转"
)
...
...
@@ -547,6 +559,7 @@ public class PersonalStageJumpBizImpl implements PersonalStageJumpBiz {
delayMessageSender
.
send
(
delayQueueDTO
);
LOGGER
.
info
(
"增加跳转衔接语延时"
+
delayQueueDTO
.
toString
());
}
else
{
if
(
ReplyTypeEnum
.
TEXT
.
value
.
equals
(
jumpLinkup
.
getReplyType
())){
SendTextMessageVO
sendTextMessageVO
=
new
SendTextMessageVO
();
sendTextMessageVO
.
setContent
(
personalStageBiz
.
replaceProjectProgressUrl
(
jumpLinkup
.
getLinkupContent
(),
robotWxId
,
userWxId
,
personalStageUserId
));
sendTextMessageVO
.
setAltId
(
robotWxId
);
...
...
@@ -554,6 +567,15 @@ public class PersonalStageJumpBizImpl implements PersonalStageJumpBiz {
sendTextMessageVO
.
setIp
(
ip
);
sendTextMessageVO
.
setCode
(
SendMessageTypeEnum
.
SELF
.
getCode
());
WxGroupSDK
.
sendTextMessage
(
sendTextMessageVO
);
}
else
if
(
ReplyTypeEnum
.
IMAGE
.
value
.
equals
(
jumpLinkup
.
getReplyType
()))
{
SendPicMessageVO
sendPicMessageVO
=
new
SendPicMessageVO
();
sendPicMessageVO
.
setWxGroupId
(
userWxId
);
sendPicMessageVO
.
setAltId
(
robotWxId
);
sendPicMessageVO
.
setPicUrl
(
jumpLinkup
.
getPicUrl
());
sendPicMessageVO
.
setIp
(
ip
);
sendPicMessageVO
.
setCode
(
SendMessageTypeEnum
.
SELF
.
getCode
());
WxGroupSDK
.
sendPicMessage
(
sendPicMessageVO
);
}
}
}
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/personalstage/entity/PersonalStageJumpLinkup.java
View file @
163a1be3
...
...
@@ -18,4 +18,10 @@ public class PersonalStageJumpLinkup extends BaseEntity {
@ApiModelProperty
(
"距离阶段开始时间"
)
private
Integer
toStageStartTime
;
@ApiModelProperty
(
"类型:1:文字;2:图片;"
)
private
Integer
replyType
;
@ApiModelProperty
(
"图片链接"
)
private
String
picUrl
;
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/personalstage/vo/request/BaseStageJumpRequestVO.java
View file @
163a1be3
...
...
@@ -82,6 +82,8 @@ public abstract class BaseStageJumpRequestVO extends BaseRequestVO {
jumpLinkup
.
setLinkupContent
(
linkup
.
getLinkupContent
());
jumpLinkup
.
setPersonalStageJumpId
(
personalStageJumpId
);
jumpLinkup
.
setToStageStartTime
(
linkup
.
getToStageStartTime
());
jumpLinkup
.
setReplyType
((
null
==
linkup
.
getReplyType
()
||
linkup
.
getReplyType
()
==
0
?
1
:
linkup
.
getReplyType
()));
jumpLinkup
.
setPicUrl
(
linkup
.
getPicUrl
());
jumpLinkups
.
add
(
jumpLinkup
);
}
return
jumpLinkups
;
...
...
pcloud-service-book/src/main/resources/mapper/personalstage/PersonalStageJumpLinkup.xml
View file @
163a1be3
...
...
@@ -7,10 +7,12 @@
<result
property=
"personalStageJumpId"
column=
"personal_stage_jump_id"
jdbcType=
"BIGINT"
/>
<result
property=
"linkupContent"
column=
"linkup_content"
jdbcType=
"VARCHAR"
/>
<result
property=
"toStageStartTime"
column=
"to_stage_start_time"
jdbcType=
"INTEGER"
/>
<result
property=
"replyType"
column=
"reply_type"
jdbcType=
"INTEGER"
/>
<result
property=
"picUrl"
column=
"pic_url"
jdbcType=
"VARCHAR"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, personal_stage_jump_id, linkup_content, to_stage_start_time
id, personal_stage_jump_id, linkup_content, to_stage_start_time
, reply_type, pic_url
</sql>
<select
id=
"getById"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.Long"
>
...
...
@@ -52,12 +54,16 @@
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
personal_stage_jump_id,
linkup_content,
to_stage_start_time
to_stage_start_time,
reply_type,
pic_url
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
#{personalStageJumpId,jdbcType=BIGINT},
#{linkupContent,jdbcType=VARCHAR},
#{toStageStartTime,jdbcType=INTEGER}
#{toStageStartTime,jdbcType=INTEGER},
#{replyType,jdbcType=INTEGER},
#{picUrl,jdbcType=VARCHAR}
</trim>
</insert>
...
...
@@ -66,14 +72,18 @@
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
personal_stage_jump_id,
linkup_content,
to_stage_start_time
to_stage_start_time,
reply_type,
pic_url
</trim>
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
#{item.personalStageJumpId,jdbcType=BIGINT},
#{item.linkupContent,jdbcType=VARCHAR},
#{item.toStageStartTime,jdbcType=INTEGER}
#{item.toStageStartTime,jdbcType=INTEGER},
#{item.replyType,jdbcType=INTEGER},
#{item.picUrl,jdbcType=VARCHAR}
</trim>
</foreach>
</insert>
...
...
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