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 c36cd5de
authored
Jan 05, 2024
by
Hayreal
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
sop触达中心-执行sop企微任务
1 parent
4acdec5a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
2 deletions
platform-execute-api/src/main/java/cn/com/glsx/execute/modules/model/sopTask/AttContent.java
platform-execute/src/main/java/cn/com/glsx/execute/modules/service/sopTask/ExecuteTaskService.java
platform-execute/src/test/java/cn/com/glsx/cn/com/glsx/sopTask/ExecuteTaskServiceTest.java
platform-execute-api/src/main/java/cn/com/glsx/execute/modules/model/sopTask/AttContent.java
View file @
c36cd5d
...
@@ -13,6 +13,10 @@ public class AttContent implements Serializable {
...
@@ -13,6 +13,10 @@ public class AttContent implements Serializable {
@Schema
(
name
=
"mediaId"
,
description
=
"企微素材ID(不用传,用于保存企微返回数据)"
)
@Schema
(
name
=
"mediaId"
,
description
=
"企微素材ID(不用传,用于保存企微返回数据)"
)
private
String
mediaId
;
private
String
mediaId
;
@JsonProperty
(
"thumbMediaId"
)
@Schema
(
name
=
"thumbMediaId"
,
description
=
"企微素材视频封面ID(不用传,用于保存企微返回数据)"
)
private
String
thumbMediaId
;
@JsonProperty
(
"attType"
)
@JsonProperty
(
"attType"
)
@Schema
(
name
=
"attType"
,
description
=
"文本类型:1.文本 2.图片 3.视频 4.小程序 5.文件 6.URI"
)
@Schema
(
name
=
"attType"
,
description
=
"文本类型:1.文本 2.图片 3.视频 4.小程序 5.文件 6.URI"
)
private
Integer
attType
;
private
Integer
attType
;
...
@@ -20,4 +24,8 @@ public class AttContent implements Serializable {
...
@@ -20,4 +24,8 @@ public class AttContent implements Serializable {
@JsonProperty
(
"attContent"
)
@JsonProperty
(
"attContent"
)
@Schema
(
name
=
"attContent"
,
description
=
"文本内容 attType=4时传小程序参数"
)
@Schema
(
name
=
"attContent"
,
description
=
"文本内容 attType=4时传小程序参数"
)
private
String
attContent
;
private
String
attContent
;
@JsonProperty
(
"firstOfVideo"
)
@Schema
(
name
=
"firstOfVideo"
,
description
=
"视频封面 attType=3时传视频封面图片地址"
)
private
String
firstOfVideo
;
}
}
platform-execute/src/main/java/cn/com/glsx/execute/modules/service/sopTask/ExecuteTaskService.java
View file @
c36cd5d
...
@@ -154,6 +154,10 @@ public class ExecuteTaskService {
...
@@ -154,6 +154,10 @@ public class ExecuteTaskService {
throw
new
AdminException
(
ResultEnum
.
UPLOAD_MEDIA_FAIL
);
throw
new
AdminException
(
ResultEnum
.
UPLOAD_MEDIA_FAIL
);
}
}
attContent
.
setMediaId
(
mediaId
);
attContent
.
setMediaId
(
mediaId
);
if
(
attType
.
equals
(
VEDIO
)){
String
firstOfVideoMediaId
=
workWechatService
.
uploadMediaGetMediaId
(
workWechatDTO
);
attContent
.
setThumbMediaId
(
firstOfVideoMediaId
);
}
}
}
return
contentList
;
return
contentList
;
}
}
...
@@ -194,7 +198,6 @@ public class ExecuteTaskService {
...
@@ -194,7 +198,6 @@ public class ExecuteTaskService {
// 授权商户号
// 授权商户号
sendWorkDTO
.
setMerchantId
(
request
.
getSupMerchantNo
());
sendWorkDTO
.
setMerchantId
(
request
.
getSupMerchantNo
());
try
{
try
{
log
.
info
(
"朋友圈参数详情:{}"
,
JSONObject
.
toJSONString
(
sendWorkDTO
));
RopResponseDTO
<
AddWorkWechatMomentTaskResponseDTO
>
sendResponse
=
workWechatService
.
addMomentTask
(
sendWorkDTO
);
RopResponseDTO
<
AddWorkWechatMomentTaskResponseDTO
>
sendResponse
=
workWechatService
.
addMomentTask
(
sendWorkDTO
);
log
.
info
(
"send qy wechatmoment sendResult:{}"
,
JSONObject
.
toJSONString
(
JSONObject
.
toJSONString
(
sendResponse
)));
log
.
info
(
"send qy wechatmoment sendResult:{}"
,
JSONObject
.
toJSONString
(
JSONObject
.
toJSONString
(
sendResponse
)));
ExecuteSopTaskResponse
result
=
new
ExecuteSopTaskResponse
();
ExecuteSopTaskResponse
result
=
new
ExecuteSopTaskResponse
();
...
...
platform-execute/src/test/java/cn/com/glsx/cn/com/glsx/sopTask/ExecuteTaskServiceTest.java
View file @
c36cd5d
...
@@ -27,7 +27,7 @@ public class ExecuteTaskServiceTest extends BaseTest {
...
@@ -27,7 +27,7 @@ public class ExecuteTaskServiceTest extends BaseTest {
List
<
AttContent
>
list
=
new
ArrayList
<>();
List
<
AttContent
>
list
=
new
ArrayList
<>();
AttContent
contentImage
=
new
AttContent
();
AttContent
contentImage
=
new
AttContent
();
contentImage
.
setAttContent
(
"http
s://wx.glsx.com.cn/upload/biz/24dba7b5-33cc-4735-b8ae-e9f31ca124af.jp
g"
);
contentImage
.
setAttContent
(
"http
://img01.glsx.com.cn/upload/biz/dracMini-qy-10004.pn
g"
);
contentImage
.
setAttType
(
DracConstant
.
AttType
.
IMAGE
);
contentImage
.
setAttType
(
DracConstant
.
AttType
.
IMAGE
);
list
.
add
(
contentImage
);
list
.
add
(
contentImage
);
...
...
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