Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
T
tamp_fund
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周鹏
tamp_fund
Commits
543d2a6d
Commit
543d2a6d
authored
Apr 24, 2022
by
刘基明
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v3.2.0_download_pdf' into 'dev'
pdf 下载 See merge request
!11
parents
16bbc09e
31f3dc33
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
DownloadPdfService.java
src/main/java/com/tanpu/fund/service/DownloadPdfService.java
+6
-2
No files found.
src/main/java/com/tanpu/fund/service/DownloadPdfService.java
View file @
543d2a6d
...
...
@@ -7,18 +7,21 @@ import org.apache.commons.collections4.CollectionUtils;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
java.util.List
;
@Service
public
class
DownloadPdfService
{
@Resource
private
ReportDownloadSummaryMapper
reportDownloadSummaryMapper
;
private
static
final
Integer
onceAddTimes
=
200
;
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
emptyStandardVipCount
(
String
userId
)
{
List
<
ReportDownloadSummary
>
reportDownloadSummaries
=
reportDownloadSummaryMapper
.
selectList
(
new
LambdaQueryWrapper
<
ReportDownloadSummary
>().
eq
(
ReportDownloadSummary:
:
getUserId
,
userId
));
LambdaQueryWrapper
<
ReportDownloadSummary
>
qw
=
new
LambdaQueryWrapper
<>();
List
<
ReportDownloadSummary
>
reportDownloadSummaries
=
reportDownloadSummaryMapper
.
selectList
(
qw
.
eq
(
ReportDownloadSummary:
:
getUserId
,
userId
));
if
(
CollectionUtils
.
isEmpty
(
reportDownloadSummaries
)){
ReportDownloadSummary
entity
=
ReportDownloadSummary
.
builder
().
userId
(
userId
).
stdVipLimit
(
0
).
build
();
reportDownloadSummaryMapper
.
insert
(
entity
);
...
...
@@ -31,7 +34,8 @@ public class DownloadPdfService {
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
addStandardVipCount
(
String
userId
)
{
List
<
ReportDownloadSummary
>
reportDownloadSummaries
=
reportDownloadSummaryMapper
.
selectList
(
new
LambdaQueryWrapper
<
ReportDownloadSummary
>().
eq
(
ReportDownloadSummary:
:
getUserId
,
userId
));
LambdaQueryWrapper
<
ReportDownloadSummary
>
qw
=
new
LambdaQueryWrapper
<>();
List
<
ReportDownloadSummary
>
reportDownloadSummaries
=
reportDownloadSummaryMapper
.
selectList
(
qw
.
eq
(
ReportDownloadSummary:
:
getUserId
,
userId
));
if
(
CollectionUtils
.
isEmpty
(
reportDownloadSummaries
)){
ReportDownloadSummary
entity
=
ReportDownloadSummary
.
builder
().
userId
(
userId
).
stdVipLimit
(
onceAddTimes
).
build
();
reportDownloadSummaryMapper
.
insert
(
entity
);
...
...
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