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
a7eb2ddb
Commit
a7eb2ddb
authored
Mar 01, 2020
by
裴大威
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat-1002472' into 'master'
书名替换 See merge request rays/pcloud-book!488
parents
b3d073e9
94481998
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
1 deletions
+23
-1
PersonalStageBizImpl.java
...oud/book/personalstage/biz/impl/PersonalStageBizImpl.java
+23
-1
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/personalstage/biz/impl/PersonalStageBizImpl.java
View file @
a7eb2ddb
...
...
@@ -594,6 +594,9 @@ public class PersonalStageBizImpl implements PersonalStageBiz {
Integer
type
=
item
.
getReplyType
();
if
(
ReplyTypeEnum
.
TEXT
.
value
.
equals
(
type
)&&
item
.
getContent
().
contains
(
USER_SEND_CONTENT
))
{
item
.
setContent
(
item
.
getContent
().
replace
(
USER_SEND_CONTENT
,
userSendContent
));
//保持用户输入的内容
String
key
=
"BOOK:USER_SEND_CONTENT:"
+
userWxId
+
"-"
+
robotId
;
JedisClusterUtils
.
setJson
(
key
,
userSendContent
);
}
}
return
itemNew
;
...
...
@@ -614,7 +617,26 @@ public class PersonalStageBizImpl implements PersonalStageBiz {
if
(
content
.
indexOf
(
PersonalStageConstant
.
PERSONAL_STAGE_PROJECT_PROGRESS_TEMPLATE
)
>
-
1
){
tryInsertNumber
(
personalStageUserId
);
String
longUrl
=
wechatLinkPrefix
.
concat
(
PersonalStageConstant
.
PERSONAL_STAGE_PROJECT_PROGRESS
).
concat
(
"?wxUserId="
+
userWxId
+
"&robotId="
+
robotId
+
"&personalStageUserId="
+
personalStageUserId
);
return
content
.
replace
(
PersonalStageConstant
.
PERSONAL_STAGE_PROJECT_PROGRESS_TEMPLATE
,
UrlUtils
.
getShortUrl4Own
(
longUrl
));
content
=
content
.
replace
(
PersonalStageConstant
.
PERSONAL_STAGE_PROJECT_PROGRESS_TEMPLATE
,
UrlUtils
.
getShortUrl4Own
(
longUrl
));
}
content
=
replaceUserSendContent
(
content
,
robotId
,
userWxId
);
return
content
;
}
/**
* 替换用户发送内容(书名)
* @param content
* @param robotId
* @param userWxId
* @return
*/
public
String
replaceUserSendContent
(
String
content
,
String
robotId
,
String
userWxId
)
{
if
(
content
.
indexOf
(
USER_SEND_CONTENT
)
>
-
1
){
String
key
=
"BOOK:USER_SEND_CONTENT:"
+
userWxId
+
"-"
+
robotId
;
String
userSendContent
=
JedisClusterUtils
.
getJson
(
key
,
String
.
class
);
if
(!
StringUtil
.
isEmpty
(
userSendContent
)){
content
=
content
.
replace
(
USER_SEND_CONTENT
,
userSendContent
);
}
}
return
content
;
}
...
...
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