Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform
Commits
05e16e40
Commit
05e16e40
authored
Jul 27, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
5b8e8fa1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
MyWalletBiz.java
...va/com/github/wxiaoqi/security/admin/biz/MyWalletBiz.java
+2
-2
MyWalletCathBiz.java
...om/github/wxiaoqi/security/admin/biz/MyWalletCathBiz.java
+2
-2
MyWalletCathMapper.java
...hub/wxiaoqi/security/admin/mapper/MyWalletCathMapper.java
+1
-1
MyWalletCathMapper.xml
...ce-admin/src/main/resources/mapper/MyWalletCathMapper.xml
+1
-1
No files found.
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/MyWalletBiz.java
View file @
05e16e40
...
...
@@ -214,7 +214,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> {
//每日次数
Integer
maxNumberOfDay
=
ruleVo
.
getMaxNumberOfDay
()==
null
?
0
:
ruleVo
.
getMaxNumberOfDay
();
//查询当日次数和金额
sumDto
=
myWalletCathBiz
.
sumCathAmount
(
1
);
sumDto
=
myWalletCathBiz
.
sumCathAmount
(
userId
,
1
);
BigDecimal
ramount
=
amount
.
add
(
sumDto
.
getSumAmount
());
if
(
amountOfDay
.
compareTo
(
BigDecimal
.
ZERO
)>
0
&&
ramount
.
compareTo
(
amountOfDay
)>
0
){
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
FAILED_CODE
,
"提现金额超过日额度"
+
amountOfDay
+
"元"
);
...
...
@@ -230,7 +230,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> {
Integer
maxNumberOfMonth
=
ruleVo
.
getMaxNumberOfMonth
();
//查询当月次数和金额
sumDto
=
myWalletCathBiz
.
sumCathAmount
(
2
);
sumDto
=
myWalletCathBiz
.
sumCathAmount
(
userId
,
2
);
BigDecimal
yamount
=
amount
.
add
(
sumDto
.
getSumAmount
());
if
(
amountOfMonth
.
compareTo
(
BigDecimal
.
ZERO
)>
0
&&
yamount
.
compareTo
(
amountOfMonth
)>
0
){
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
FAILED_CODE
,
"提现金额超过月额度"
+
amountOfMonth
+
"元"
);
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/MyWalletCathBiz.java
View file @
05e16e40
...
...
@@ -122,7 +122,7 @@ public class MyWalletCathBiz extends BaseBiz<MyWalletCathMapper, MyWalletCath> {
return
userIdAndPersonalConsumptionMap
;
}
public
WalletCathSumDto
sumCathAmount
(
Integer
type
){
return
mapper
.
sumCathAmount
(
type
);
public
WalletCathSumDto
sumCathAmount
(
Integer
userId
,
Integer
type
){
return
mapper
.
sumCathAmount
(
userId
,
type
);
}
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/mapper/MyWalletCathMapper.java
View file @
05e16e40
...
...
@@ -29,5 +29,5 @@ public interface MyWalletCathMapper extends Mapper<MyWalletCath> {
* @param type 1-日;2-月
* @return
*/
WalletCathSumDto
sumCathAmount
(
@Param
(
"type"
)
int
type
);
WalletCathSumDto
sumCathAmount
(
@Param
(
"
userId"
)
Integer
userId
,
@Param
(
"
type"
)
int
type
);
}
ace-modules/ace-admin/src/main/resources/mapper/MyWalletCathMapper.xml
View file @
05e16e40
...
...
@@ -38,7 +38,7 @@
<select
id=
"sumCathAmount"
resultType=
"com.github.wxiaoqi.security.admin.dto.WalletCathSumDto"
>
select IFNULL(SUM(amount),0) as sumAmount,COUNT(*) as `number` from my_wallet_cath
<where>
user_id=#{userId} and stauts in(0,1)
<choose>
<when
test=
"type ==1 "
>
AND date_format(from_unixtime(crt_time/1000),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d')
...
...
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