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
836d3b34
Commit
836d3b34
authored
Dec 18, 2018
by
lili
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
版权保护是否包含条形码条件
parent
f07e3fdb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
8 deletions
+26
-8
BookAuthInfoBizImpl.java
...m/pcloud/book/copyright/biz/impl/BookAuthInfoBizImpl.java
+15
-8
SetAuthOpenParam.java
...n/java/com/pcloud/book/copyright/vo/SetAuthOpenParam.java
+11
-0
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/copyright/biz/impl/BookAuthInfoBizImpl.java
View file @
836d3b34
...
@@ -115,14 +115,14 @@ public class BookAuthInfoBizImpl implements BookAuthInfoBiz {
...
@@ -115,14 +115,14 @@ public class BookAuthInfoBizImpl implements BookAuthInfoBiz {
//设置图书服务
//设置图书服务
bookAuthServeBiz
.
setBookAuthServes
(
setAuthOpenParam
.
getServes
(),
setAuthOpenParam
.
getBookId
(),
setAuthOpenParam
.
getChannelId
(),
adviserId
);
bookAuthServeBiz
.
setBookAuthServes
(
setAuthOpenParam
.
getServes
(),
setAuthOpenParam
.
getBookId
(),
setAuthOpenParam
.
getChannelId
(),
adviserId
);
//异步生成条形码并导出
//异步生成条形码并导出
asynExport
(
setAuthOpenParam
.
getBookId
(),
setAuthOpenParam
.
getChannelId
(),
adviserId
,
setAuthOpenParam
.
getCodeCount
());
asynExport
(
setAuthOpenParam
.
getBookId
(),
setAuthOpenParam
.
getChannelId
(),
adviserId
,
setAuthOpenParam
.
getCodeCount
()
,
setAuthOpenParam
.
getIsHaveBarCode
()
);
String
key
=
CopyrightConstants
.
BOOK_AUTH_INFO
+
bookAuthInfo
.
getBookId
()
+
"-"
+
bookAuthInfo
.
getChannelId
()
+
"-"
+
adviserId
;
String
key
=
CopyrightConstants
.
BOOK_AUTH_INFO
+
bookAuthInfo
.
getBookId
()
+
"-"
+
bookAuthInfo
.
getChannelId
()
+
"-"
+
adviserId
;
BookAuthInfoVO
bookAuth
=
bookAuthInfoDao
.
getInfoByBook
(
setAuthOpenParam
.
getBookId
(),
setAuthOpenParam
.
getChannelId
(),
adviserId
);
BookAuthInfoVO
bookAuth
=
bookAuthInfoDao
.
getInfoByBook
(
setAuthOpenParam
.
getBookId
(),
setAuthOpenParam
.
getChannelId
(),
adviserId
);
JedisClusterUtils
.
setJson
(
key
,
bookAuth
);
JedisClusterUtils
.
setJson
(
key
,
bookAuth
);
}
}
@ParamLog
(
"异步导出"
)
@ParamLog
(
"异步导出"
)
private
void
asynExport
(
Long
bookId
,
Long
channelId
,
Long
adviserId
,
Integer
codeCount
)
{
private
void
asynExport
(
Long
bookId
,
Long
channelId
,
Long
adviserId
,
Integer
codeCount
,
Integer
isHaveBarCode
)
{
EXECUTOR_SERVICE
.
execute
(()
->
{
EXECUTOR_SERVICE
.
execute
(()
->
{
String
commitTime
=
DateUtils
.
formatDate
(
new
Date
());
String
commitTime
=
DateUtils
.
formatDate
(
new
Date
());
try
{
try
{
...
@@ -150,13 +150,20 @@ public class BookAuthInfoBizImpl implements BookAuthInfoBiz {
...
@@ -150,13 +150,20 @@ public class BookAuthInfoBizImpl implements BookAuthInfoBiz {
bookAuthCodes
.
add
(
bookAuthCode
);
bookAuthCodes
.
add
(
bookAuthCode
);
}
}
bookAuthCodeBiz
.
insert
(
bookAuthCodes
);
bookAuthCodeBiz
.
insert
(
bookAuthCodes
);
String
url
=
generateExcel
(
bookAuthCodes
,
bookDto
.
getBookName
());
String
noticeUrl
=
""
;
String
zipUrl
=
CopyrightTools
.
generateBar4Zip
(
bookAuthCodes
,
bookDto
.
getBookName
(),
url
);
if
(
isHaveBarCode
==
null
||
isHaveBarCode
.
equals
(
0
)){
//发送站内信
String
url
=
generateExcel
(
bookAuthCodes
,
bookDto
.
getBookName
());
sendLetter
(
adviserId
,
bookDto
.
getBookName
(),
zipUrl
,
commitTime
);
String
zipUrl
=
CopyrightTools
.
generateBar4Zip
(
bookAuthCodes
,
bookDto
.
getBookName
(),
url
);
noticeUrl
=
zipUrl
;
}
else
{
String
url
=
generateExcel
(
bookAuthCodes
,
bookDto
.
getBookName
());
noticeUrl
=
url
;
}
//发送站内信
sendLetter
(
adviserId
,
bookDto
.
getBookName
(),
noticeUrl
,
commitTime
);
//新增导出记录
//新增导出记录
insertExportRecord
(
bookId
,
channelId
,
adviserId
,
num
,
zip
Url
);
insertExportRecord
(
bookId
,
channelId
,
adviserId
,
num
,
notice
Url
);
LOGGER
.
info
(
"url"
+
zip
Url
);
LOGGER
.
info
(
"url"
+
notice
Url
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LOGGER
.
error
(
"导出条形码失败"
+
e
.
getMessage
(),
e
);
LOGGER
.
error
(
"导出条形码失败"
+
e
.
getMessage
(),
e
);
}
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/copyright/vo/SetAuthOpenParam.java
View file @
836d3b34
...
@@ -43,6 +43,9 @@ public class SetAuthOpenParam implements Serializable {
...
@@ -43,6 +43,9 @@ public class SetAuthOpenParam implements Serializable {
@ApiModelProperty
(
"服务"
)
@ApiModelProperty
(
"服务"
)
private
List
<
ServeVO
>
serves
;
private
List
<
ServeVO
>
serves
;
@ApiModelProperty
(
"是否包含条形码"
)
private
Integer
isHaveBarCode
;
public
List
<
ServeVO
>
getServes
()
{
public
List
<
ServeVO
>
getServes
()
{
return
serves
;
return
serves
;
}
}
...
@@ -115,6 +118,14 @@ public class SetAuthOpenParam implements Serializable {
...
@@ -115,6 +118,14 @@ public class SetAuthOpenParam implements Serializable {
this
.
checkType
=
checkType
;
this
.
checkType
=
checkType
;
}
}
public
Integer
getIsHaveBarCode
()
{
return
isHaveBarCode
;
}
public
void
setIsHaveBarCode
(
Integer
isHaveBarCode
)
{
this
.
isHaveBarCode
=
isHaveBarCode
;
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"SetAuthOpenVO{"
+
return
"SetAuthOpenVO{"
+
...
...
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