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
48bbc96e
Commit
48bbc96e
authored
Jul 21, 2019
by
周健威
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/base-modify' into base-modify
parents
6bd474c4
973f614c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
2 deletions
+29
-2
AppUserSellingWaterBiz.java
...ub/wxiaoqi/security/admin/biz/AppUserSellingWaterBiz.java
+6
-1
MyWaterBiz.java
...ava/com/github/wxiaoqi/security/admin/biz/MyWaterBiz.java
+23
-1
No files found.
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/AppUserSellingWaterBiz.java
View file @
48bbc96e
...
...
@@ -146,8 +146,13 @@ public class AppUserSellingWaterBiz extends BaseBiz<AppUserSellingWaterMapper, A
sellingWater
.
setCommission
(
commission
);
insertSelective
(
sellingWater
);
log
.
info
(
"购买计算用户拥成功----payOrderWater--------userId==="
+
userId
+
"----type===="
+
type
);
if
(
type
!=
null
&&
type
==
3
){
if
(
type
==
null
){
continue
;
}
if
(
type
==
3
){
finishOrderWater
(
orderWaterDTO
);
}
else
if
(
type
==
2
){
myWaterBiz
.
updMyWalletUnbooked
(
userId
,
commission
);
}
}
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/MyWaterBiz.java
View file @
48bbc96e
...
...
@@ -72,7 +72,11 @@ public class MyWaterBiz extends BaseBiz<MyWalletMapper, MyWallet>{
if
(
lastTime
!=
null
&&(
lastTime
==
0
||
isToday
(
lastTime
))){
todayAmount
=
wallet
.
getTodayAmount
().
add
(
amount
);
}
unbooked
=
wallet
.
getUnbooked
().
subtract
(
unbooked
);
//只有拥金才会未入账
if
(
wallet
.
getUnbooked
().
compareTo
(
amount
)>
0
&&
walletDetail
.
getSource
()!=
null
&&
walletDetail
.
getSource
()==
1
){
unbooked
=
wallet
.
getUnbooked
().
subtract
(
amount
);
}
}
log
.
info
(
"---我的钱包入账----userId==="
+
userId
+
"----balance===="
+
balance
+
"----totalAmount===="
+
totalAmount
+
"---todayAmount==="
+
todayAmount
+
"---unbooked=="
+
unbooked
);
...
...
@@ -81,6 +85,7 @@ public class MyWaterBiz extends BaseBiz<MyWalletMapper, MyWallet>{
walletDetailBiz
.
insertSelective
(
walletDetail
);
Long
time
=
System
.
currentTimeMillis
();
wallet
.
setBalance
(
balance
);
wallet
.
setUnbooked
(
unbooked
);
wallet
.
setTodayAmount
(
todayAmount
);
wallet
.
setTotalAmount
(
totalAmount
);
wallet
.
setUnbooked
(
unbooked
);
...
...
@@ -111,6 +116,23 @@ public class MyWaterBiz extends BaseBiz<MyWalletMapper, MyWallet>{
return
isToday
;
}
//钱包未入账的添加
public
void
updMyWalletUnbooked
(
Integer
userId
,
BigDecimal
amount
){
MyWallet
wallet
=
new
MyWallet
();
wallet
.
setUserId
(
userId
);
wallet
=
selectOne
(
wallet
);
if
(
wallet
==
null
){
wallet
=
new
MyWallet
();
wallet
.
setUserId
(
userId
);
wallet
.
setUnbooked
(
amount
);
insertSelective
(
wallet
);
}
else
{
BigDecimal
unbooked
=
wallet
.
getUnbooked
().
add
(
amount
);
wallet
.
setUnbooked
(
unbooked
);
mapper
.
updMyWater
(
wallet
);
}
}
@Transactional
(
rollbackFor
=
Exception
.
class
,
propagation
=
Propagation
.
REQUIRED
)
public
int
createWalletByUserId
(
Integer
userId
){
MyWallet
myWallet
=
new
MyWallet
();
...
...
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