Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
lwby_copyright_book_data
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
maliang
lwby_copyright_book_data
Commits
1a349026
Commit
1a349026
authored
May 08, 2020
by
maliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上传bug修复
parent
8548aeb3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
7 deletions
+19
-7
CopyrightDao.java
src/main/java/com/boot/security/server/dao/CopyrightDao.java
+2
-2
CopyrightBookServiceImpl.java
...ecurity/server/service/impl/CopyrightBookServiceImpl.java
+9
-3
CopyrightMapper.xml
src/main/resources/mybatis-mappers/CopyrightMapper.xml
+8
-2
No files found.
src/main/java/com/boot/security/server/dao/CopyrightDao.java
View file @
1a349026
...
...
@@ -15,9 +15,9 @@ public interface CopyrightDao {
List
<
Long
>
selectUserAll
();
List
<
BaseSettlement
>
selectTableListMonth
(
@Param
(
"copyrightId"
)
List
<
BaseSettlement
>
copyrightId
,
@Param
(
"page"
)
Integer
page
,
@Param
(
"limit"
)
Integer
limit
);
List
<
BaseSettlement
>
selectTableListMonth
(
@Param
(
"copyrightId"
)
List
<
BaseSettlement
>
copyrightId
,
@Param
(
"page"
)
Integer
page
,
@Param
(
"limit"
)
Integer
limit
,
@Param
(
"status"
)
Integer
status
);
Integer
selectTableListMonthCount
(
@Param
(
"copyrightId"
)
List
<
BaseSettlement
>
copyrightId
);
Integer
selectTableListMonthCount
(
@Param
(
"copyrightId"
)
List
<
BaseSettlement
>
copyrightId
,
@Param
(
"status"
)
Integer
status
);
List
<
BaseSettlement
>
selectBookInfo
(
@Param
(
"copyrightId"
)
List
<
BaseSettlement
>
copyrightId
,
@Param
(
"page"
)
Integer
page
,
@Param
(
"limit"
)
Integer
limit
);
...
...
src/main/java/com/boot/security/server/service/impl/CopyrightBookServiceImpl.java
View file @
1a349026
...
...
@@ -17,10 +17,11 @@ import java.util.List;
public
class
CopyrightBookServiceImpl
implements
CopyrightBookService
{
@Autowired
CopyrightDao
copyrightDao
;
@Override
public
String
selectSettlement
(
Integer
copyrightId
,
Integer
page
,
Integer
limit
)
{
Integer
user
Id
=
copyrightDao
.
selectRoleId
(
UserUtil
.
getLoginUser
().
getId
());
Integer
role
Id
=
copyrightDao
.
selectRoleId
(
UserUtil
.
getLoginUser
().
getId
());
Integer
status
=
null
;
List
<
BaseSettlement
>
baseSettlementList
=
new
ArrayList
<>();
if
(
copyrightId
==
null
||
copyrightId
==
0
){
baseSettlementList
=
copyrightDao
.
selectCopyrightById
(
UserUtil
.
getLoginUser
().
getId
());
...
...
@@ -29,7 +30,11 @@ public class CopyrightBookServiceImpl implements CopyrightBookService {
baseSettlement
.
setCopyrightId
(
copyrightId
);
baseSettlementList
.
add
(
baseSettlement
);
}
List
<
BaseSettlement
>
baseSettlements
=
copyrightDao
.
selectTableListMonth
(
baseSettlementList
,
page
-
1
,
limit
);
if
(
roleId
!=
3
){
status
=
1
;
}
List
<
BaseSettlement
>
baseSettlements
=
copyrightDao
.
selectTableListMonth
(
baseSettlementList
,
page
-
1
,
limit
,
status
);
DecimalFormat
df
=
new
DecimalFormat
(
"#.00"
);
for
(
BaseSettlement
baseSettlement
:
baseSettlements
)
{
Double
totalAmount
=
baseSettlement
.
getTotalAmount
();
...
...
@@ -133,6 +138,7 @@ public class CopyrightBookServiceImpl implements CopyrightBookService {
baseSettlement
.
setCopyrightId
(
copyrightId
);
baseSettlementList
.
add
(
baseSettlement
);
}
List
<
BaseSettlement
>
baseSettlements
=
copyrightDao
.
selectBookDetail
(
baseSettlementList
,
bookId
,
bookName
,
startTime
,
endTime
,
page
-
1
,
limit
);
DecimalFormat
df
=
new
DecimalFormat
(
"#.00"
);
for
(
BaseSettlement
baseSettlement
:
baseSettlements
)
{
...
...
src/main/resources/mybatis-mappers/CopyrightMapper.xml
View file @
1a349026
...
...
@@ -17,6 +17,9 @@
#{item.copyrightId}
</foreach>
</if>
<if
test=
"status != null and status!='' "
>
and a.release_status = #{status}
</if>
ORDER BY a.total_amount DESC
limit #{page},#{limit};
</select>
...
...
@@ -35,6 +38,9 @@
#{item.copyrightId}
</foreach>
</if>
<if
test=
"status != null and status!='' "
>
and a.release_status = #{status}
</if>
ORDER BY a.total_amount DESC ;
</select>
...
...
@@ -91,7 +97,7 @@
from bi_report.report_books_settlement_month a
WHERE
<![CDATA[
a.report_date>
=
#{startTime}
and a.report_date
<
= #{endTime}
a.report_date>
=
'2020-04'
and a.report_date
<
= #{endTime}
]]>
<if
test=
"bookId != null and bookId!='' "
>
and b.book_id = #{bookId}
...
...
@@ -113,7 +119,7 @@
from bi_report.report_books_settlement_month a
WHERE
<![CDATA[
a.report_date>
=
#{startTime}
and a.report_date
<
= #{endTime}
a.report_date>
=
'2020-04'
and a.report_date
<
= #{endTime}
]]>
<if
test=
"bookId != null and bookId!='' "
>
and b.book_id = #{bookId}
...
...
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