Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
haoban3.0
haoban-manage3.0
Commits
232e0f1d
Commit
232e0f1d
authored
Oct 29, 2024
by
王祖波
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
区分群发和朋友圈
parent
0dcd72cb
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
7 deletions
+39
-7
CombinedQDTO.java
...com/gic/haoban/manage/api/qdto/combined/CombinedQDTO.java
+16
-1
ImageCombined.java
...haoban/manage/service/context/combined/ImageCombined.java
+4
-4
MaterialServiceImpl.java
...oban/manage/service/service/impl/MaterialServiceImpl.java
+7
-1
MaterialApiServiceImpl.java
...nage/service/service/out/impl/MaterialApiServiceImpl.java
+1
-1
CombinedQO.java
...ava/com/gic/haoban/manage/web/qo/combined/CombinedQO.java
+11
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/qdto/combined/CombinedQDTO.java
View file @
232e0f1d
...
@@ -26,6 +26,11 @@ public class CombinedQDTO implements Serializable {
...
@@ -26,6 +26,11 @@ public class CombinedQDTO implements Serializable {
*/
*/
private
String
lineTwo
;
private
String
lineTwo
;
/**
* 1群发 2朋友圈
*/
private
Integer
mediaType
;
public
String
getImageUrl
()
{
public
String
getImageUrl
()
{
return
imageUrl
;
return
imageUrl
;
}
}
...
@@ -66,8 +71,18 @@ public class CombinedQDTO implements Serializable {
...
@@ -66,8 +71,18 @@ public class CombinedQDTO implements Serializable {
this
.
lineTwo
=
lineTwo
;
this
.
lineTwo
=
lineTwo
;
}
}
public
Integer
getMediaType
()
{
return
mediaType
;
}
public
void
setMediaType
(
Integer
mediaType
)
{
this
.
mediaType
=
mediaType
;
}
public
String
getUnionString
()
{
public
String
getUnionString
()
{
return
this
.
getImageUrl
()
+
this
.
getQrCodeUrl
()
+
this
.
getShowStyle
()
+
this
.
getLineOne
()
+
this
.
getLineTwo
();
return
this
.
getImageUrl
()
+
this
.
getQrCodeUrl
()
+
this
.
getShowStyle
()
+
this
.
getLineOne
()
+
this
.
getLineTwo
()
+
this
.
getMediaType
()
;
}
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/context/combined/ImageCombined.java
View file @
232e0f1d
...
@@ -52,11 +52,11 @@ public class ImageCombined {
...
@@ -52,11 +52,11 @@ public class ImageCombined {
private
static
final
int
QR_WIDTH_REFERENCE
=
136
;
private
static
final
int
QR_WIDTH_REFERENCE
=
136
;
private
static
final
String
LARGE_IMAGE_URL
=
"https://
jhdmyx-1251519181.cos.ap-shanghai.myqcloud.com/image/material_content-191564494842458980f5c5ae685d3440
.jpg?imageView2/2/w/1080/h/10800/format/jpg"
;
private
static
final
String
LARGE_IMAGE_URL
=
"https://
revan-1251519181.cos.ap-shanghai.myqcloud.com/image/material_content-29dd73e4f9fb4a9eaf38ae1a3158bc91
.jpg?imageView2/2/w/1080/h/10800/format/jpg"
;
private
static
final
String
QR_CODE_URL
=
"https://gicinner-1251519181.cos.ap-shanghai.myqcloud.com/image/material_content-4ffc77073ca1476fb264bf1be9f11383.png"
;
private
static
final
String
QR_CODE_URL
=
"https://gicinner-1251519181.cos.ap-shanghai.myqcloud.com/image/material_content-4ffc77073ca1476fb264bf1be9f11383.png"
;
private
static
final
String
STORE_NAME
=
"
门店CCA门店CCA门店CCA门店CCA门店CCA门店CCA
"
;
private
static
final
String
STORE_NAME
=
"
杭州大厦
"
;
private
static
final
String
GUIDE_NAME
=
"
宇智222为您推荐门店CCA门店CCA门店CCA门店CCA门店CCA
"
;
private
static
final
String
GUIDE_NAME
=
"
翁坚鹏为您推荐
"
;
private
static
final
String
OUTPUT_PATH
=
"/Users/wang/Downloads/output_image
5
.jpg"
;
private
static
final
String
OUTPUT_PATH
=
"/Users/wang/Downloads/output_image
6
.jpg"
;
static
{
static
{
ImageIO
.
scanForPlugins
();
// 初始化图像插件
ImageIO
.
scanForPlugins
();
// 初始化图像插件
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/MaterialServiceImpl.java
View file @
232e0f1d
...
@@ -367,7 +367,13 @@ public class MaterialServiceImpl implements MaterialService {
...
@@ -367,7 +367,13 @@ public class MaterialServiceImpl implements MaterialService {
}
else
{
}
else
{
arr
=
imageUrl
.
split
(
"/"
);
arr
=
imageUrl
.
split
(
"/"
);
}
}
JSONResponse
json
=
qywxSuiteApiService
.
uploadAttachment
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelf3thSecret
(),
combinedImageData
,
arr
[
arr
.
length
-
1
],
QywxMediaTypeEnum
.
IMAGE
.
getCode
(),
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
JSONResponse
json
=
null
;
Integer
mediaType
=
combinedQDTO
.
getMediaType
();
if
(
Objects
.
equals
(
1
,
mediaType
))
{
json
=
qywxSuiteApiService
.
uploadMedia
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelf3thSecret
(),
combinedImageData
,
arr
[
arr
.
length
-
1
],
QywxMediaTypeEnum
.
IMAGE
.
getCode
(),
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
}
else
if
(
Objects
.
equals
(
2
,
mediaType
))
{
json
=
qywxSuiteApiService
.
uploadAttachment
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelf3thSecret
(),
combinedImageData
,
arr
[
arr
.
length
-
1
],
QywxMediaTypeEnum
.
IMAGE
.
getCode
(),
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
}
return
json
;
return
json
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
info
(
"合成图片获取媒体id异常"
,
e
);
logger
.
info
(
"合成图片获取媒体id异常"
,
e
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MaterialApiServiceImpl.java
View file @
232e0f1d
...
@@ -523,7 +523,7 @@ public class MaterialApiServiceImpl implements MaterialApiService {
...
@@ -523,7 +523,7 @@ public class MaterialApiServiceImpl implements MaterialApiService {
if
(
StringUtils
.
isAnyBlank
(
combinedQDTO
.
getImageUrl
(),
combinedQDTO
.
getQrCodeUrl
()))
{
if
(
StringUtils
.
isAnyBlank
(
combinedQDTO
.
getImageUrl
(),
combinedQDTO
.
getQrCodeUrl
()))
{
return
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
.
failure
(
"9999"
,
"参数异常"
)
;
return
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
.
failure
(
"9999"
,
"参数异常"
)
;
}
}
String
unionString
=
combinedQDTO
.
getUnionString
();
String
unionString
=
combinedQDTO
.
getUnionString
()
+
wxEnterpriseId
;
String
key
=
ImageCombined
.
IMAGE_REDIS_KEY
+
UUID
.
nameUUIDFromBytes
(
unionString
.
getBytes
(
StandardCharsets
.
UTF_8
));
String
key
=
ImageCombined
.
IMAGE_REDIS_KEY
+
UUID
.
nameUUIDFromBytes
(
unionString
.
getBytes
(
StandardCharsets
.
UTF_8
));
String
cache
=
(
String
)
RedisUtil
.
getCache
(
key
);
String
cache
=
(
String
)
RedisUtil
.
getCache
(
key
);
if
(
StringUtils
.
isNotBlank
(
cache
))
{
if
(
StringUtils
.
isNotBlank
(
cache
))
{
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/qo/combined/CombinedQO.java
View file @
232e0f1d
...
@@ -26,6 +26,10 @@ public class CombinedQO implements Serializable {
...
@@ -26,6 +26,10 @@ public class CombinedQO implements Serializable {
* 第二行文字
* 第二行文字
*/
*/
private
String
lineTwo
;
private
String
lineTwo
;
/**
* 1群发 2朋友圈
*/
private
Integer
mediaType
;
public
String
getWxEnterpriseId
()
{
public
String
getWxEnterpriseId
()
{
return
wxEnterpriseId
;
return
wxEnterpriseId
;
...
@@ -75,5 +79,12 @@ public class CombinedQO implements Serializable {
...
@@ -75,5 +79,12 @@ public class CombinedQO implements Serializable {
this
.
lineTwo
=
lineTwo
;
this
.
lineTwo
=
lineTwo
;
}
}
public
Integer
getMediaType
()
{
return
mediaType
;
}
public
void
setMediaType
(
Integer
mediaType
)
{
this
.
mediaType
=
mediaType
;
}
}
}
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