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
dd7cc2f5
Commit
dd7cc2f5
authored
Nov 17, 2021
by
田超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bug/1031832' into 'master'
bug : [none] 版权保护导出加二维码名称 See merge request rays/pcloud-book!1456
parents
d3199502
4099dca1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
BookSceneAuthBizImpl.java
.../pcloud/book/copyright/biz/impl/BookSceneAuthBizImpl.java
+3
-2
CopyrightTools.java
.../java/com/pcloud/book/copyright/tools/CopyrightTools.java
+3
-3
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/copyright/biz/impl/BookSceneAuthBizImpl.java
View file @
dd7cc2f5
...
@@ -192,11 +192,12 @@ public class BookSceneAuthBizImpl implements BookSceneAuthBiz {
...
@@ -192,11 +192,12 @@ public class BookSceneAuthBizImpl implements BookSceneAuthBiz {
bookAuthCodes
.
add
(
bookAuthCode
);
bookAuthCodes
.
add
(
bookAuthCode
);
}
}
bookSceneAuthCodeDao
.
insert
(
bookAuthCodes
);
bookSceneAuthCodeDao
.
insert
(
bookAuthCodes
);
String
bookName
=
bookDto
.
getBookName
()
+
"_"
+
sceneDto
.
getSceneName
();
String
noticeUrl
;
String
noticeUrl
;
String
zipUrl
=
CopyrightTools
.
generateQrcode4ZipNew
(
bookAuthCodes
,
bookDto
.
getBookName
(),
sceneDto
.
getUrl
(),
authBookType
);
String
zipUrl
=
CopyrightTools
.
generateQrcode4ZipNew
(
bookAuthCodes
,
bookDto
.
getBookName
(),
sceneDto
.
get
SceneName
(),
sceneDto
.
get
Url
(),
authBookType
);
noticeUrl
=
zipUrl
;
noticeUrl
=
zipUrl
;
//发送站内信
//发送站内信
bookAuthInfoBiz
.
sendLetter
(
adviserId
,
book
Dto
.
getBookName
()
,
noticeUrl
,
commitTime
);
bookAuthInfoBiz
.
sendLetter
(
adviserId
,
book
Name
,
noticeUrl
,
commitTime
);
//新增导出记录
//新增导出记录
updateSuccessRecord
(
bookId
,
channelId
,
adviserId
,
num
,
noticeUrl
,
sceneId
);
updateSuccessRecord
(
bookId
,
channelId
,
adviserId
,
num
,
noticeUrl
,
sceneId
);
BookSceneAuth
authSceneInfo
=
bookSceneAuthDao
.
getAuthSceneInfo
(
bookId
,
sceneId
);
BookSceneAuth
authSceneInfo
=
bookSceneAuthDao
.
getAuthSceneInfo
(
bookId
,
sceneId
);
...
...
pcloud-service-book/src/main/java/com/pcloud/book/copyright/tools/CopyrightTools.java
View file @
dd7cc2f5
...
@@ -232,7 +232,7 @@ public class CopyrightTools {
...
@@ -232,7 +232,7 @@ public class CopyrightTools {
* @param sceneUrl
* @param sceneUrl
* @return
* @return
*/
*/
public
static
String
generateQrcode4ZipNew
(
List
<
BookSceneAuthCode
>
bookAuthCodes
,
String
fileName
,
String
sceneUrl
,
Integer
authBookType
)
{
public
static
String
generateQrcode4ZipNew
(
List
<
BookSceneAuthCode
>
bookAuthCodes
,
String
fileName
,
String
sceneName
,
String
sceneUrl
,
Integer
authBookType
)
{
fileName
=
FileUtils
.
formatName
(
fileName
);
fileName
=
FileUtils
.
formatName
(
fileName
);
String
tempZipName
=
fileName
+
"_"
+
LocalDateUtils
.
getYmdhmss
();
String
tempZipName
=
fileName
+
"_"
+
LocalDateUtils
.
getYmdhmss
();
String
zipFilePath
=
ZIP_FILE_PATH
+
tempZipName
+
".zip"
;
String
zipFilePath
=
ZIP_FILE_PATH
+
tempZipName
+
".zip"
;
...
@@ -261,7 +261,7 @@ public class CopyrightTools {
...
@@ -261,7 +261,7 @@ public class CopyrightTools {
}
}
}
}
// paintQrcodeText(bufferedImage, bookAuthCode.getFullCode());
// paintQrcodeText(bufferedImage, bookAuthCode.getFullCode());
File
file
=
new
File
(
fileFolderPath
+
"/"
+
bookAuthCode
.
getFullCode
()
+
".png"
);
File
file
=
new
File
(
fileFolderPath
+
"/"
+
sceneName
+
bookAuthCode
.
getFullCode
()
+
".png"
);
ImageIO
.
write
(
bufferedImage
,
ImageTypeEnum
.
PNG
.
value
,
file
);
ImageIO
.
write
(
bufferedImage
,
ImageTypeEnum
.
PNG
.
value
,
file
);
String
qrcodeUrl
=
QrcodeUtils
.
uploadImage
(
bufferedImage
);
String
qrcodeUrl
=
QrcodeUtils
.
uploadImage
(
bufferedImage
);
bookAuthCode
.
setUrl
(
content
);
bookAuthCode
.
setUrl
(
content
);
...
@@ -275,7 +275,7 @@ public class CopyrightTools {
...
@@ -275,7 +275,7 @@ public class CopyrightTools {
FileUtils
.
isDir
(
ZIP_FILE_PATH
);
FileUtils
.
isDir
(
ZIP_FILE_PATH
);
CompressUtils
.
zip
(
fileFolderPath
,
zipFilePath
);
CompressUtils
.
zip
(
fileFolderPath
,
zipFilePath
);
// 上传文件到服务器中
// 上传文件到服务器中
uploadResultInfo
=
OssUtils
.
uploadLocalFile4CustomName
(
zipFilePath
,
fileName
);
uploadResultInfo
=
OssUtils
.
uploadLocalFile4CustomName
(
zipFilePath
,
fileName
+
"_"
+
sceneName
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LOGGER
.
error
(
"【压缩】压缩失败,<ERROR>:"
+
e
.
getMessage
(),
e
);
LOGGER
.
error
(
"【压缩】压缩失败,<ERROR>:"
+
e
.
getMessage
(),
e
);
throw
new
FileException
(
FileException
.
ZIP_ERROR
,
"压缩失败!"
);
throw
new
FileException
(
FileException
.
ZIP_ERROR
,
"压缩失败!"
);
...
...
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