Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
platform
/
platform-execute-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 699bfd2f
authored
Jan 02, 2024
by
Hayreal
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
sop触达中心-执行sop企微任务
1 parent
95f0899e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
platform-execute/src/main/java/cn/com/glsx/execute/modules/service/sopTask/ExecuteTaskService.java
platform-execute/src/main/java/cn/com/glsx/execute/modules/service/sopTask/ExecuteTaskService.java
View file @
699bfd2
...
@@ -140,16 +140,12 @@ public class ExecuteTaskService {
...
@@ -140,16 +140,12 @@ public class ExecuteTaskService {
for
(
AttContent
attContent
:
contentList
)
{
for
(
AttContent
attContent
:
contentList
)
{
UpLoadMediaToWorkWechatRequestDTO
workWechatDTO
=
new
UpLoadMediaToWorkWechatRequestDTO
();
UpLoadMediaToWorkWechatRequestDTO
workWechatDTO
=
new
UpLoadMediaToWorkWechatRequestDTO
();
Integer
attType
=
attContent
.
getAttType
();
Integer
attType
=
attContent
.
getAttType
();
if
(
attType
.
equals
(
TEXT
)
||
attType
.
equals
(
FILE
))
{
if
(
attType
.
equals
(
URI
))
{
workWechatDTO
.
setContent
(
attContent
.
getAttContent
());
continue
;
}
else
if
(
attType
.
equals
(
URI
))
{
// 构建短链
// 构建短链
workWechatDTO
.
setContent
(
buildShortURL
(
attContent
.
getAttContent
()));
workWechatDTO
.
setContent
(
buildShortURL
(
attContent
.
getAttContent
()));
continue
;
continue
;
}
else
{
}
else
{
JSONObject
attContentJSON
=
JSONObject
.
parseObject
(
attContent
.
getAttContent
());
workWechatDTO
.
setContent
(
attContent
.
getAttContent
());
workWechatDTO
.
setContent
(
attContentJSON
.
get
(
"pic_url"
).
toString
());
}
}
workWechatDTO
.
setMerchantId
(
merchantId
);
workWechatDTO
.
setMerchantId
(
merchantId
);
workWechatDTO
.
setAttType
(
attType
);
workWechatDTO
.
setAttType
(
attType
);
...
@@ -168,7 +164,7 @@ public class ExecuteTaskService {
...
@@ -168,7 +164,7 @@ public class ExecuteTaskService {
*/
*/
public
String
buildShortURL
(
String
attContent
)
{
public
String
buildShortURL
(
String
attContent
)
{
GenerateUrlRequest
request
=
new
GenerateUrlRequest
();
GenerateUrlRequest
request
=
new
GenerateUrlRequest
();
request
.
setUrl
(
JSONObject
.
parseObject
(
attContent
).
get
(
"url"
).
toString
()
);
request
.
setUrl
(
attContent
);
return
shortUrlService
.
generate
(
request
);
return
shortUrlService
.
generate
(
request
);
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment