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
96940a93
Commit
96940a93
authored
Nov 06, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
保证金
parent
aee26c6d
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
237 additions
and
267 deletions
+237
-267
ch-dao/src/main/java/com/wwdz/ch/db/domain/openShop/UserAccount.java
...main/java/com/wwdz/ch/db/domain/openShop/UserAccount.java
+12
-1
ch-dao/src/main/java/com/wwdz/ch/db/domain/openShop/UserAccountExample.java
...va/com/wwdz/ch/db/domain/openShop/UserAccountExample.java
+132
-0
ch-dao/src/main/java/com/wwdz/ch/db/impl/openShop/UserAccountDaoImpl.java
...java/com/wwdz/ch/db/impl/openShop/UserAccountDaoImpl.java
+31
-0
ch-dao/src/main/java/com/wwdz/ch/db/mapper/openShop/UserAccountMapper.java
...ava/com/wwdz/ch/db/mapper/openShop/UserAccountMapper.java
+2
-0
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/openShop/UserAccountMapper.xml
...rces/com/wwdz/ch/db/mapper/openShop/UserAccountMapper.xml
+27
-264
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/openShop/AuctionEarnestServiceImpl.java
...m/wwdz/ch/wx/impl/openShop/AuctionEarnestServiceImpl.java
+21
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/openShop/AuctionEarnestService.java
...om/wwdz/ch/wx/service/openShop/AuctionEarnestService.java
+12
-2
No files found.
ch-dao/src/main/java/com/wwdz/ch/db/domain/openShop/UserAccount.java
View file @
96940a93
...
@@ -4,6 +4,8 @@ import java.io.Serializable;
...
@@ -4,6 +4,8 @@ import java.io.Serializable;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.Date
;
import
com.xxdxxs.entity.Entity
;
import
lombok.Data
;
import
lombok.Data
;
/**
/**
...
@@ -11,7 +13,7 @@ import lombok.Data;
...
@@ -11,7 +13,7 @@ import lombok.Data;
* @date 2024/11/06
* @date 2024/11/06
*/
*/
@Data
@Data
public
class
UserAccount
implements
Serializable
{
public
class
UserAccount
implements
Entity
{
private
Long
id
;
private
Long
id
;
/**
/**
...
@@ -49,6 +51,11 @@ public class UserAccount implements Serializable {
...
@@ -49,6 +51,11 @@ public class UserAccount implements Serializable {
*/
*/
private
Long
earnestAmount
;
private
Long
earnestAmount
;
/**
* 保证金可用额度
*/
private
Long
earnestUsableAmount
;
/**
/**
* 创建时间
* 创建时间
*/
*/
...
@@ -75,6 +82,7 @@ public class UserAccount implements Serializable {
...
@@ -75,6 +82,7 @@ public class UserAccount implements Serializable {
sb
.
append
(
", introduceAmount="
).
append
(
introduceAmount
);
sb
.
append
(
", introduceAmount="
).
append
(
introduceAmount
);
sb
.
append
(
", introduceWaitEntryAmount="
).
append
(
introduceWaitEntryAmount
);
sb
.
append
(
", introduceWaitEntryAmount="
).
append
(
introduceWaitEntryAmount
);
sb
.
append
(
", earnestAmount="
).
append
(
earnestAmount
);
sb
.
append
(
", earnestAmount="
).
append
(
earnestAmount
);
sb
.
append
(
", earnestUsableAmount="
).
append
(
earnestUsableAmount
);
sb
.
append
(
", createTime="
).
append
(
createTime
);
sb
.
append
(
", createTime="
).
append
(
createTime
);
sb
.
append
(
", updateTime="
).
append
(
updateTime
);
sb
.
append
(
", updateTime="
).
append
(
updateTime
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
...
@@ -102,6 +110,7 @@ public class UserAccount implements Serializable {
...
@@ -102,6 +110,7 @@ public class UserAccount implements Serializable {
&&
(
this
.
getIntroduceAmount
()
==
null
?
other
.
getIntroduceAmount
()
==
null
:
this
.
getIntroduceAmount
().
equals
(
other
.
getIntroduceAmount
()))
&&
(
this
.
getIntroduceAmount
()
==
null
?
other
.
getIntroduceAmount
()
==
null
:
this
.
getIntroduceAmount
().
equals
(
other
.
getIntroduceAmount
()))
&&
(
this
.
getIntroduceWaitEntryAmount
()
==
null
?
other
.
getIntroduceWaitEntryAmount
()
==
null
:
this
.
getIntroduceWaitEntryAmount
().
equals
(
other
.
getIntroduceWaitEntryAmount
()))
&&
(
this
.
getIntroduceWaitEntryAmount
()
==
null
?
other
.
getIntroduceWaitEntryAmount
()
==
null
:
this
.
getIntroduceWaitEntryAmount
().
equals
(
other
.
getIntroduceWaitEntryAmount
()))
&&
(
this
.
getEarnestAmount
()
==
null
?
other
.
getEarnestAmount
()
==
null
:
this
.
getEarnestAmount
().
equals
(
other
.
getEarnestAmount
()))
&&
(
this
.
getEarnestAmount
()
==
null
?
other
.
getEarnestAmount
()
==
null
:
this
.
getEarnestAmount
().
equals
(
other
.
getEarnestAmount
()))
&&
(
this
.
getEarnestUsableAmount
()
==
null
?
other
.
getEarnestUsableAmount
()
==
null
:
this
.
getEarnestUsableAmount
().
equals
(
other
.
getEarnestUsableAmount
()))
&&
(
this
.
getCreateTime
()
==
null
?
other
.
getCreateTime
()
==
null
:
this
.
getCreateTime
().
equals
(
other
.
getCreateTime
()))
&&
(
this
.
getCreateTime
()
==
null
?
other
.
getCreateTime
()
==
null
:
this
.
getCreateTime
().
equals
(
other
.
getCreateTime
()))
&&
(
this
.
getUpdateTime
()
==
null
?
other
.
getUpdateTime
()
==
null
:
this
.
getUpdateTime
().
equals
(
other
.
getUpdateTime
()));
&&
(
this
.
getUpdateTime
()
==
null
?
other
.
getUpdateTime
()
==
null
:
this
.
getUpdateTime
().
equals
(
other
.
getUpdateTime
()));
}
}
...
@@ -118,6 +127,7 @@ public class UserAccount implements Serializable {
...
@@ -118,6 +127,7 @@ public class UserAccount implements Serializable {
result
=
prime
*
result
+
((
getIntroduceAmount
()
==
null
)
?
0
:
getIntroduceAmount
().
hashCode
());
result
=
prime
*
result
+
((
getIntroduceAmount
()
==
null
)
?
0
:
getIntroduceAmount
().
hashCode
());
result
=
prime
*
result
+
((
getIntroduceWaitEntryAmount
()
==
null
)
?
0
:
getIntroduceWaitEntryAmount
().
hashCode
());
result
=
prime
*
result
+
((
getIntroduceWaitEntryAmount
()
==
null
)
?
0
:
getIntroduceWaitEntryAmount
().
hashCode
());
result
=
prime
*
result
+
((
getEarnestAmount
()
==
null
)
?
0
:
getEarnestAmount
().
hashCode
());
result
=
prime
*
result
+
((
getEarnestAmount
()
==
null
)
?
0
:
getEarnestAmount
().
hashCode
());
result
=
prime
*
result
+
((
getEarnestUsableAmount
()
==
null
)
?
0
:
getEarnestUsableAmount
().
hashCode
());
result
=
prime
*
result
+
((
getCreateTime
()
==
null
)
?
0
:
getCreateTime
().
hashCode
());
result
=
prime
*
result
+
((
getCreateTime
()
==
null
)
?
0
:
getCreateTime
().
hashCode
());
result
=
prime
*
result
+
((
getUpdateTime
()
==
null
)
?
0
:
getUpdateTime
().
hashCode
());
result
=
prime
*
result
+
((
getUpdateTime
()
==
null
)
?
0
:
getUpdateTime
().
hashCode
());
return
result
;
return
result
;
...
@@ -139,6 +149,7 @@ public class UserAccount implements Serializable {
...
@@ -139,6 +149,7 @@ public class UserAccount implements Serializable {
introduceAmount
(
"introduce_amount"
,
"introduceAmount"
,
"BIGINT"
,
false
),
introduceAmount
(
"introduce_amount"
,
"introduceAmount"
,
"BIGINT"
,
false
),
introduceWaitEntryAmount
(
"introduce_wait_entry_amount"
,
"introduceWaitEntryAmount"
,
"BIGINT"
,
false
),
introduceWaitEntryAmount
(
"introduce_wait_entry_amount"
,
"introduceWaitEntryAmount"
,
"BIGINT"
,
false
),
earnestAmount
(
"earnest_amount"
,
"earnestAmount"
,
"BIGINT"
,
false
),
earnestAmount
(
"earnest_amount"
,
"earnestAmount"
,
"BIGINT"
,
false
),
earnestUsableAmount
(
"earnest_usable_amount"
,
"earnestUsableAmount"
,
"BIGINT"
,
false
),
createTime
(
"create_time"
,
"createTime"
,
"TIMESTAMP"
,
false
),
createTime
(
"create_time"
,
"createTime"
,
"TIMESTAMP"
,
false
),
updateTime
(
"update_time"
,
"updateTime"
,
"TIMESTAMP"
,
false
);
updateTime
(
"update_time"
,
"updateTime"
,
"TIMESTAMP"
,
false
);
...
...
ch-dao/src/main/java/com/wwdz/ch/db/domain/openShop/UserAccountExample.java
View file @
96940a93
...
@@ -1204,6 +1204,138 @@ public class UserAccountExample {
...
@@ -1204,6 +1204,138 @@ public class UserAccountExample {
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andEarnestUsableAmountIsNull
()
{
addCriterion
(
"earnest_usable_amount is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEarnestUsableAmountIsNotNull
()
{
addCriterion
(
"earnest_usable_amount is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEarnestUsableAmountEqualTo
(
Long
value
)
{
addCriterion
(
"earnest_usable_amount ="
,
value
,
"earnestUsableAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_account
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andEarnestUsableAmountEqualToColumn
(
UserAccount
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"earnest_usable_amount = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andEarnestUsableAmountNotEqualTo
(
Long
value
)
{
addCriterion
(
"earnest_usable_amount <>"
,
value
,
"earnestUsableAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_account
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andEarnestUsableAmountNotEqualToColumn
(
UserAccount
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"earnest_usable_amount <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andEarnestUsableAmountGreaterThan
(
Long
value
)
{
addCriterion
(
"earnest_usable_amount >"
,
value
,
"earnestUsableAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_account
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andEarnestUsableAmountGreaterThanColumn
(
UserAccount
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"earnest_usable_amount > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andEarnestUsableAmountGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"earnest_usable_amount >="
,
value
,
"earnestUsableAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_account
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andEarnestUsableAmountGreaterThanOrEqualToColumn
(
UserAccount
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"earnest_usable_amount >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andEarnestUsableAmountLessThan
(
Long
value
)
{
addCriterion
(
"earnest_usable_amount <"
,
value
,
"earnestUsableAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_account
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andEarnestUsableAmountLessThanColumn
(
UserAccount
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"earnest_usable_amount < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andEarnestUsableAmountLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"earnest_usable_amount <="
,
value
,
"earnestUsableAmount"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_account
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andEarnestUsableAmountLessThanOrEqualToColumn
(
UserAccount
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"earnest_usable_amount <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andEarnestUsableAmountIn
(
List
<
Long
>
values
)
{
addCriterion
(
"earnest_usable_amount in"
,
values
,
"earnestUsableAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEarnestUsableAmountNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"earnest_usable_amount not in"
,
values
,
"earnestUsableAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEarnestUsableAmountBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"earnest_usable_amount between"
,
value1
,
value2
,
"earnestUsableAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andEarnestUsableAmountNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"earnest_usable_amount not between"
,
value1
,
value2
,
"earnestUsableAmount"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIsNull
()
{
public
Criteria
andCreateTimeIsNull
()
{
addCriterion
(
"create_time is null"
);
addCriterion
(
"create_time is null"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
...
...
ch-dao/src/main/java/com/wwdz/ch/db/impl/openShop/UserAccountDaoImpl.java
0 → 100644
View file @
96940a93
package
com.wwdz.ch.db.impl.openShop
;
import
com.wwdz.ch.db.dao.openShop.UserAccountDao
;
import
com.wwdz.ch.db.domain.openShop.UserAccount
;
import
com.wwdz.ch.db.mapper.UserMapper
;
import
com.wwdz.ch.db.mapper.openShop.UserAccountMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Repository
;
@Repository
public
class
UserAccountDaoImpl
implements
UserAccountDao
{
@Autowired
UserAccountMapper
userAccountMapper
;
@Override
public
boolean
insert
(
UserAccount
userAccount
)
{
return
false
;
}
@Override
public
boolean
update
(
UserAccount
userAccount
)
{
return
false
;
}
@Override
public
UserAccount
findByUserId
(
long
userId
)
{
return
null
;
}
}
ch-dao/src/main/java/com/wwdz/ch/db/mapper/openShop/UserAccountMapper.java
View file @
96940a93
...
@@ -3,8 +3,10 @@ package com.wwdz.ch.db.mapper.openShop;
...
@@ -3,8 +3,10 @@ package com.wwdz.ch.db.mapper.openShop;
import
com.wwdz.ch.db.domain.openShop.UserAccount
;
import
com.wwdz.ch.db.domain.openShop.UserAccount
;
import
com.wwdz.ch.db.domain.openShop.UserAccountExample
;
import
com.wwdz.ch.db.domain.openShop.UserAccountExample
;
import
java.util.List
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
@Mapper
public
interface
UserAccountMapper
{
public
interface
UserAccountMapper
{
long
countByExample
(
UserAccountExample
example
);
long
countByExample
(
UserAccountExample
example
);
...
...
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/openShop/UserAccountMapper.xml
View file @
96940a93
This diff is collapsed.
Click to expand it.
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/openShop/AuctionEarnestServiceImpl.java
View file @
96940a93
...
@@ -8,9 +8,11 @@ import com.wwdz.ch.core.util.IdUtils;
...
@@ -8,9 +8,11 @@ import com.wwdz.ch.core.util.IdUtils;
import
com.wwdz.ch.core.util.PriceUtil
;
import
com.wwdz.ch.core.util.PriceUtil
;
import
com.wwdz.ch.db.dao.openShop.EarnestOrderDao
;
import
com.wwdz.ch.db.dao.openShop.EarnestOrderDao
;
import
com.wwdz.ch.db.dao.openShop.EarnestRecordDao
;
import
com.wwdz.ch.db.dao.openShop.EarnestRecordDao
;
import
com.wwdz.ch.db.dao.openShop.UserAccountDao
;
import
com.wwdz.ch.db.domain.openShop.EarnestOrder
;
import
com.wwdz.ch.db.domain.openShop.EarnestOrder
;
import
com.wwdz.ch.db.dto.request.distribution.DistributionOrderRequestDto
;
import
com.wwdz.ch.db.dto.request.distribution.DistributionOrderRequestDto
;
import
com.wwdz.ch.db.dto.request.openShop.EarnestOrderRequestDto
;
import
com.wwdz.ch.db.dto.request.openShop.EarnestOrderRequestDto
;
import
com.wwdz.ch.db.dto.request.openShop.EarnestRecordRequestDto
;
import
com.wwdz.ch.wx.service.openShop.AuctionEarnestService
;
import
com.wwdz.ch.wx.service.openShop.AuctionEarnestService
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -32,6 +34,9 @@ public class AuctionEarnestServiceImpl implements AuctionEarnestService {
...
@@ -32,6 +34,9 @@ public class AuctionEarnestServiceImpl implements AuctionEarnestService {
@Autowired
@Autowired
WxPayServiceApi
wxPayServiceApi
;
WxPayServiceApi
wxPayServiceApi
;
@Autowired
UserAccountDao
userAccountDao
;
@Override
@Override
public
Result
payEarnest
(
EarnestOrderRequestDto
dto
)
{
public
Result
payEarnest
(
EarnestOrderRequestDto
dto
)
{
try
{
try
{
...
@@ -74,4 +79,20 @@ public class AuctionEarnestServiceImpl implements AuctionEarnestService {
...
@@ -74,4 +79,20 @@ public class AuctionEarnestServiceImpl implements AuctionEarnestService {
}
}
return
Result
.
failed
();
return
Result
.
failed
();
}
}
@Override
public
Result
occupyEarnest
(
EarnestRecordRequestDto
dto
)
{
try
{
return
Result
.
success
();
}
catch
(
Exception
e
)
{
logger
.
error
(
"占用保证金失败 error : {}"
,
e
);
}
return
Result
.
failed
();
}
@Override
public
Result
releaseEarnest
(
EarnestRecordRequestDto
dto
)
{
return
null
;
}
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/openShop/AuctionEarnestService.java
View file @
96940a93
...
@@ -2,6 +2,7 @@ package com.wwdz.ch.wx.service.openShop;
...
@@ -2,6 +2,7 @@ package com.wwdz.ch.wx.service.openShop;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.db.dto.request.openShop.EarnestOrderRequestDto
;
import
com.wwdz.ch.db.dto.request.openShop.EarnestOrderRequestDto
;
import
com.wwdz.ch.db.dto.request.openShop.EarnestRecordRequestDto
;
public
interface
AuctionEarnestService
{
public
interface
AuctionEarnestService
{
...
@@ -13,7 +14,6 @@ public interface AuctionEarnestService {
...
@@ -13,7 +14,6 @@ public interface AuctionEarnestService {
Result
payEarnest
(
EarnestOrderRequestDto
dto
);
Result
payEarnest
(
EarnestOrderRequestDto
dto
);
/**
/**
* 获取支付参数
* 获取支付参数
* 预支付并返回支付所需要的前端参数
* 预支付并返回支付所需要的前端参数
...
@@ -21,6 +21,16 @@ public interface AuctionEarnestService {
...
@@ -21,6 +21,16 @@ public interface AuctionEarnestService {
*/
*/
Result
getPayParam
(
EarnestOrderRequestDto
dto
);
Result
getPayParam
(
EarnestOrderRequestDto
dto
);
/**
* 占用保证金
* @return
*/
Result
occupyEarnest
(
EarnestRecordRequestDto
dto
);
/**
* 释放保证金
* @param dto
* @return
*/
Result
releaseEarnest
(
EarnestRecordRequestDto
dto
);
}
}
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