Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
0532fa31
Commit
0532fa31
authored
Nov 11, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
使用明细
parent
c4945143
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
10 deletions
+6
-10
ch-core/src/main/java/com/wwdz/ch/core/consts/EarnestEnum.java
...re/src/main/java/com/wwdz/ch/core/consts/EarnestEnum.java
+1
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/openShop/AuctionEarnestServiceImpl.java
...m/wwdz/ch/wx/impl/openShop/AuctionEarnestServiceImpl.java
+1
-2
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/openShop/EarnestRecordServiceImpl.java
...om/wwdz/ch/wx/impl/openShop/EarnestRecordServiceImpl.java
+4
-7
No files found.
ch-core/src/main/java/com/wwdz/ch/core/consts/EarnestEnum.java
View file @
0532fa31
...
...
@@ -43,7 +43,7 @@ public class EarnestEnum {
public
enum
TypeEnum
{
GIFT
(
1
,
"赠送保证金"
),
PAY
(
2
,
"
缴纳
保证金"
),
PAY
(
2
,
"
充值
保证金"
),
WITHDRAW
(
3
,
"提取保证金"
),
OCCUPY
(
4
,
"占用出价额度"
),
RELEASE
(
5
,
"释放保证金"
),
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/openShop/AuctionEarnestServiceImpl.java
View file @
0532fa31
...
...
@@ -273,7 +273,7 @@ public class AuctionEarnestServiceImpl implements AuctionEarnestService {
//保证金扣除记录
EarnestRecord
earnestRecord
=
new
EarnestRecord
();
earnestRecord
.
setUserId
(
dto
.
getUserId
());
earnestRecord
.
setAmount
(
earnestAmount
.
longValue
()
);
earnestRecord
.
setAmount
(
occupyAmount
);
earnestRecord
.
setItemId
(
dto
.
getItemId
());
earnestRecord
.
setSpecialPerformanceId
(
dto
.
getSpecialPerformanceId
());
earnestRecord
.
setEntryType
(
EarnestEnum
.
EntryEnum
.
DEDUCT
.
getCode
());
...
...
@@ -283,7 +283,6 @@ public class AuctionEarnestServiceImpl implements AuctionEarnestService {
earnestRecord
.
setState
(
EarnestEnum
.
StateEnum
.
VALID
.
getCode
());
earnestRecordDao
.
insert
(
earnestRecord
);
//更新用户账户,更新保证金额度,先扣除赠送的保证金,额度不够再扣用户自己缴纳的
UserAccount
newUserAccount
=
new
UserAccount
();
newUserAccount
.
setUserId
(
dto
.
getUserId
());
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/openShop/EarnestRecordServiceImpl.java
View file @
0532fa31
...
...
@@ -77,15 +77,12 @@ public class EarnestRecordServiceImpl implements EarnestRecordService {
EarnestRecordVo
earnestRecordVo
=
new
EarnestRecordVo
();
EntityMapper
.
copyAttribute
(
earnestRecord
,
earnestRecordVo
);
earnestRecordVo
.
setTypeName
(
EarnestEnum
.
TypeEnum
.
getNameByCode
(
earnestRecord
.
getType
()));
earnestRecordVo
.
setAmount
(
PriceUtil
.
convertPriceFenToYuan
(
earnestRecord
.
getAmount
()));
//占用的额度
earnestRecordVo
.
setAmount
(
PriceUtil
.
convertPriceFenToYuan
(
earnestRecord
.
getAmount
()
*
CommConsts
.
EARNEST_TRANSFORM_AUCTION_REBATE
));
if
(
earnestRecord
.
getState
()
!=
EarnestEnum
.
StateEnum
.
VALID
.
getCode
())
{
earnestRecordVo
.
setStateName
(
EarnestEnum
.
StateEnum
.
getNameByCode
(
earnestRecord
.
getState
()));
if
(
earnestRecord
.
getState
()
==
EarnestEnum
.
StateEnum
.
DEDUCT
.
getCode
())
{
//算出被扣除的保证金金额
BigDecimal
earnestAmount
=
new
BigDecimal
(
String
.
valueOf
(
earnestRecord
.
getAmount
())).
multiply
(
new
BigDecimal
(
CommConsts
.
EARNEST_REBATE
));
//换算成对应占用的保证金
long
occupyAmount
=
earnestAmount
.
longValue
();
earnestRecordVo
.
setStateName
(
EarnestEnum
.
StateEnum
.
getNameByCode
(
earnestRecord
.
getState
())
+
"¥"
+
PriceUtil
.
convertPriceFenToYuan
(
occupyAmount
));
earnestRecordVo
.
setStateName
(
EarnestEnum
.
StateEnum
.
getNameByCode
(
earnestRecord
.
getState
())
+
"¥"
+
PriceUtil
.
convertPriceFenToYuan
(
earnestRecord
.
getAmount
()));
}
}
SupplierItem
supplierItem
=
supplierItemDao
.
findById
(
earnestRecord
.
getItemId
());
...
...
@@ -116,7 +113,7 @@ public class EarnestRecordServiceImpl implements EarnestRecordService {
map
.
put
(
"usedPayAmount"
,
"0"
);
}
else
{
map
.
put
(
"usedGiftAmount"
,
PriceUtil
.
convertPriceFenToYuan
(
giftAmount
));
map
.
put
(
"usedPayAmount"
,
PriceUtil
.
convertPriceFenToYuan
(
earnest
Amount
-
giftAmount
));
map
.
put
(
"usedPayAmount"
,
PriceUtil
.
convertPriceFenToYuan
(
occupy
Amount
-
giftAmount
));
}
return
Result
.
success
(
map
);
}
catch
(
Exception
e
)
{
...
...
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