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
2b447198
Commit
2b447198
authored
Nov 07, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
保证金明细
parent
4701e3ff
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
6 deletions
+8
-6
ch-dao/src/main/java/com/wwdz/ch/db/dao/openShop/EarnestRecordDao.java
...in/java/com/wwdz/ch/db/dao/openShop/EarnestRecordDao.java
+1
-1
ch-dao/src/main/java/com/wwdz/ch/db/impl/openShop/UserAccountDaoImpl.java
...java/com/wwdz/ch/db/impl/openShop/UserAccountDaoImpl.java
+4
-1
ch-dao/src/main/java/com/wwdz/ch/db/mapper/openShop/EarnestRecordMapper.java
...a/com/wwdz/ch/db/mapper/openShop/EarnestRecordMapper.java
+0
-1
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/openShop/EarnestRecordMapper.xml
...es/com/wwdz/ch/db/mapper/openShop/EarnestRecordMapper.xml
+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
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/openShop/EarnestRecordServiceImpl.java
...om/wwdz/ch/wx/impl/openShop/EarnestRecordServiceImpl.java
+1
-1
No files found.
ch-dao/src/main/java/com/wwdz/ch/db/dao/openShop/EarnestRecordDao.java
View file @
2b447198
...
@@ -32,7 +32,7 @@ public interface EarnestRecordDao {
...
@@ -32,7 +32,7 @@ public interface EarnestRecordDao {
/**
/**
* 查询用户当前被占用的保证金
* 查询用户当前被占用的保证金
* @param
userId
* @param
dto
* @return
* @return
*/
*/
long
sumForOccupy
(
EarnestRecordRequestDto
dto
);
long
sumForOccupy
(
EarnestRecordRequestDto
dto
);
...
...
ch-dao/src/main/java/com/wwdz/ch/db/impl/openShop/UserAccountDaoImpl.java
View file @
2b447198
...
@@ -31,6 +31,9 @@ public class UserAccountDaoImpl implements UserAccountDao {
...
@@ -31,6 +31,9 @@ public class UserAccountDaoImpl implements UserAccountDao {
@Override
@Override
public
UserAccount
findByUserId
(
long
userId
)
{
public
UserAccount
findByUserId
(
long
userId
)
{
return
null
;
UserAccountExample
example
=
new
UserAccountExample
();
UserAccountExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andUserIdEqualTo
(
userId
);
return
userAccountMapper
.
selectOneByExample
(
example
);
}
}
}
}
ch-dao/src/main/java/com/wwdz/ch/db/mapper/openShop/EarnestRecordMapper.java
View file @
2b447198
...
@@ -70,7 +70,6 @@ public interface EarnestRecordMapper {
...
@@ -70,7 +70,6 @@ public interface EarnestRecordMapper {
int
updateByPrimaryKey
(
EarnestRecord
record
);
int
updateByPrimaryKey
(
EarnestRecord
record
);
/**
/**
* 统计用户被占用的保证金
* 统计用户被占用的保证金
* @param example
* @param example
...
...
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/openShop/EarnestRecordMapper.xml
View file @
2b447198
...
@@ -388,7 +388,7 @@
...
@@ -388,7 +388,7 @@
</select>
</select>
<select
id=
"sumForOccupy"
parameterType=
"com.wwdz.ch.db.domain.openShop.EarnestRecordExample"
resultType=
"java.lang.Long"
>
<select
id=
"sumForOccupy"
parameterType=
"com.wwdz.ch.db.domain.openShop.EarnestRecordExample"
resultType=
"java.lang.Long"
>
select
IFNULL(sum(amount), 0) as amount from earnest_order
select
IFNULL(sum(amount), 0) as amount from earnest_record
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
<include
refid=
"Example_Where_Clause"
/>
</if>
</if>
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/openShop/AuctionEarnestServiceImpl.java
View file @
2b447198
...
@@ -132,7 +132,7 @@ public class AuctionEarnestServiceImpl implements AuctionEarnestService {
...
@@ -132,7 +132,7 @@ public class AuctionEarnestServiceImpl implements AuctionEarnestService {
//换算成对应占用的保证金
//换算成对应占用的保证金
long
occupyAmount
=
earnestAmount
.
longValue
();
long
occupyAmount
=
earnestAmount
.
longValue
();
earnestRecord
.
setUserId
(
dto
.
getUserId
());
earnestRecord
.
setUserId
(
dto
.
getUserId
());
earnestRecord
.
setAmount
(
-
earnestAmount
.
longValue
());
earnestRecord
.
setAmount
(
earnestAmount
.
longValue
());
earnestRecord
.
setItemId
(
dto
.
getItemId
());
earnestRecord
.
setItemId
(
dto
.
getItemId
());
earnestRecord
.
setSpecialPerformanceId
(
dto
.
getSpecialPerformanceId
());
earnestRecord
.
setSpecialPerformanceId
(
dto
.
getSpecialPerformanceId
());
earnestRecord
.
setEntryType
(
EarnestEnum
.
EntryEnum
.
DEDUCT
.
getCode
());
earnestRecord
.
setEntryType
(
EarnestEnum
.
EntryEnum
.
DEDUCT
.
getCode
());
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/openShop/EarnestRecordServiceImpl.java
View file @
2b447198
...
@@ -86,7 +86,7 @@ public class EarnestRecordServiceImpl implements EarnestRecordService {
...
@@ -86,7 +86,7 @@ public class EarnestRecordServiceImpl implements EarnestRecordService {
earnestRecordRequestDto
.
setUserId
(
dto
.
getUserId
());
earnestRecordRequestDto
.
setUserId
(
dto
.
getUserId
());
earnestRecordRequestDto
.
setType
(
EarnestEnum
.
TypeEnum
.
OCCUPY
.
getCode
());
earnestRecordRequestDto
.
setType
(
EarnestEnum
.
TypeEnum
.
OCCUPY
.
getCode
());
earnestRecordRequestDto
.
setState
(
EarnestEnum
.
StateEnum
.
VALID
.
getCode
());
earnestRecordRequestDto
.
setState
(
EarnestEnum
.
StateEnum
.
VALID
.
getCode
());
long
occupyAmount
=
Math
.
abs
(
earnestRecordDao
.
sumForOccupy
(
earnestRecordRequestDto
)
);
long
occupyAmount
=
earnestRecordDao
.
sumForOccupy
(
earnestRecordRequestDto
);
//已用保证金
//已用保证金
map
.
put
(
"usedEarnestAmount"
,
PriceUtil
.
convertPriceFenToYuan
(
occupyAmount
));
map
.
put
(
"usedEarnestAmount"
,
PriceUtil
.
convertPriceFenToYuan
(
occupyAmount
));
//已用出价,需要在保证金:出价额度 = 1:20
//已用出价,需要在保证金:出价额度 = 1:20
...
...
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