Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
1fa4baa3
Commit
1fa4baa3
authored
Apr 28, 2020
by
邓实川
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
企业套餐剩余数量bug修复
parent
bb14a1d4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
22 deletions
+17
-22
src/main/java/cn/timer/api/controller/qyzx/QyzxBusinessController.java
+17
-22
No files found.
src/main/java/cn/timer/api/controller/qyzx/QyzxBusinessController.java
View file @
1fa4baa3
...
...
@@ -11,6 +11,7 @@ import java.util.ArrayList;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
javax.transaction.Transactional
;
...
...
@@ -78,30 +79,21 @@ public class QyzxBusinessController {
.
selectList
(
new
LambdaQueryWrapper
<
QyzxRemainingQuantity
>().
eq
(
QyzxRemainingQuantity:
:
getIsDelete
,
0
)
.
eq
(
QyzxRemainingQuantity:
:
getOrgCode
,
userBean
.
getOrgCode
())
.
eq
(
QyzxRemainingQuantity:
:
getPmid
,
1
).
select
(
QyzxRemainingQuantity:
:
getRemainder
));
Integer
remainder1
=
null
;
for
(
QyzxRemainingQuantity
qyzxRemainingQuantity
:
qyzxRemainingQuantitys1
)
{
remainder1
=
qyzxRemainingQuantity
.
getRemainder
();
if
(
qyzxRemainingQuantitys1
.
size
()
>
1
)
{
remainder1
+=
remainder1
;
}
}
Integer
sum1
=
qyzxRemainingQuantitys1
.
stream
()
.
collect
(
Collectors
.
summingInt
(
QyzxRemainingQuantity:
:
getRemainder
));
List
<
QyzxRemainingQuantity
>
qyzxRemainingQuantitys2
=
QyzxRemainingQuantity
.
builder
().
build
()
.
selectList
(
new
LambdaQueryWrapper
<
QyzxRemainingQuantity
>().
eq
(
QyzxRemainingQuantity:
:
getIsDelete
,
0
)
.
eq
(
QyzxRemainingQuantity:
:
getOrgCode
,
userBean
.
getOrgCode
())
.
eq
(
QyzxRemainingQuantity:
:
getPmid
,
2
).
select
(
QyzxRemainingQuantity:
:
getRemainder
));
Integer
remainder2
=
null
;
for
(
QyzxRemainingQuantity
qyzxRemainingQuantity
:
qyzxRemainingQuantitys2
)
{
remainder2
=
qyzxRemainingQuantity
.
getRemainder
();
if
(
qyzxRemainingQuantitys2
.
size
()
>
1
)
{
remainder2
+=
remainder2
;
}
}
Integer
sum2
=
qyzxRemainingQuantitys2
.
stream
()
.
collect
(
Collectors
.
summingInt
(
QyzxRemainingQuantity:
:
getRemainder
));
Map
<
String
,
Object
>
map1
=
new
HashMap
<
String
,
Object
>();
map1
.
put
(
"message"
,
remainder
1
);
map1
.
put
(
"message"
,
sum
1
);
Map
<
String
,
Object
>
map2
=
new
HashMap
<
String
,
Object
>();
map2
.
put
(
"contract"
,
remainder
2
);
map2
.
put
(
"contract"
,
sum
2
);
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<
Map
<
String
,
Object
>>();
list
.
add
(
map1
);
...
...
@@ -114,8 +106,9 @@ public class QyzxBusinessController {
public
Result
<
List
<
QyzxPayContent
>>
getPayListwithContract
(
@CurrentUser
UserBean
userBean
)
{
List
<
QyzxPayContent
>
list
=
QyzxPayContent
.
builder
().
build
()
.
selectList
(
new
LambdaQueryWrapper
<
QyzxPayContent
>().
eq
(
QyzxPayContent:
:
getPmid
,
1
).
select
(
QyzxPayContent:
:
getContent
,
QyzxPayContent:
:
getNowPrice
,
QyzxPayContent:
:
getOriginalPrice
,
QyzxPayContent:
:
getSpecification
,
QyzxPayContent:
:
getExpiration
));
QyzxPayContent:
:
getId
,
QyzxPayContent:
:
getContent
,
QyzxPayContent:
:
getNowPrice
,
QyzxPayContent:
:
getOriginalPrice
,
QyzxPayContent:
:
getSpecification
,
QyzxPayContent:
:
getExpiration
));
return
ResultUtil
.
data
(
list
,
"获取成功"
);
}
...
...
@@ -124,8 +117,9 @@ public class QyzxBusinessController {
public
Result
<
List
<
QyzxPayContent
>>
getPayListWithMsg
(
@CurrentUser
UserBean
userBean
)
{
List
<
QyzxPayContent
>
list
=
QyzxPayContent
.
builder
().
build
()
.
selectList
(
new
LambdaQueryWrapper
<
QyzxPayContent
>().
eq
(
QyzxPayContent:
:
getPmid
,
2
).
select
(
QyzxPayContent:
:
getContent
,
QyzxPayContent:
:
getNowPrice
,
QyzxPayContent:
:
getOriginalPrice
,
QyzxPayContent:
:
getSpecification
,
QyzxPayContent:
:
getExpiration
));
QyzxPayContent:
:
getId
,
QyzxPayContent:
:
getContent
,
QyzxPayContent:
:
getNowPrice
,
QyzxPayContent:
:
getOriginalPrice
,
QyzxPayContent:
:
getSpecification
,
QyzxPayContent:
:
getExpiration
));
return
ResultUtil
.
data
(
list
,
"获取成功"
);
}
...
...
@@ -134,8 +128,9 @@ public class QyzxBusinessController {
public
Result
<
List
<
QyzxPayContent
>>
getPayListWithSystem
(
@CurrentUser
UserBean
userBean
)
{
List
<
QyzxPayContent
>
list
=
QyzxPayContent
.
builder
().
build
()
.
selectList
(
new
LambdaQueryWrapper
<
QyzxPayContent
>().
eq
(
QyzxPayContent:
:
getPmid
,
3
).
select
(
QyzxPayContent:
:
getContent
,
QyzxPayContent:
:
getNowPrice
,
QyzxPayContent:
:
getOriginalPrice
,
QyzxPayContent:
:
getSpecification
,
QyzxPayContent:
:
getExpiration
));
QyzxPayContent:
:
getId
,
QyzxPayContent:
:
getContent
,
QyzxPayContent:
:
getNowPrice
,
QyzxPayContent:
:
getOriginalPrice
,
QyzxPayContent:
:
getSpecification
,
QyzxPayContent:
:
getExpiration
));
return
ResultUtil
.
data
(
list
,
"获取成功"
);
}
...
...
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