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
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
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
<result
column=
"introduce_amount"
jdbcType=
"BIGINT"
property=
"introduceAmount"
/>
<result
column=
"introduce_amount"
jdbcType=
"BIGINT"
property=
"introduceAmount"
/>
<result
column=
"introduce_wait_entry_amount"
jdbcType=
"BIGINT"
property=
"introduceWaitEntryAmount"
/>
<result
column=
"introduce_wait_entry_amount"
jdbcType=
"BIGINT"
property=
"introduceWaitEntryAmount"
/>
<result
column=
"earnest_amount"
jdbcType=
"BIGINT"
property=
"earnestAmount"
/>
<result
column=
"earnest_amount"
jdbcType=
"BIGINT"
property=
"earnestAmount"
/>
<result
column=
"earnest_usable_amount"
jdbcType=
"BIGINT"
property=
"earnestUsableAmount"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
</resultMap>
...
@@ -73,7 +74,8 @@
...
@@ -73,7 +74,8 @@
</sql>
</sql>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, user_id, guarantee_amount, goods_amount, goods_wait_entry_amount, introduce_amount,
id, user_id, guarantee_amount, goods_amount, goods_wait_entry_amount, introduce_amount,
introduce_wait_entry_amount, earnest_amount, create_time, update_time
introduce_wait_entry_amount, earnest_amount, earnest_usable_amount, create_time,
update_time
</sql>
</sql>
<select
id=
"selectByExample"
parameterType=
"com.wwdz.ch.db.domain.openShop.UserAccountExample"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByExample"
parameterType=
"com.wwdz.ch.db.domain.openShop.UserAccountExample"
resultMap=
"BaseResultMap"
>
select
select
...
@@ -109,7 +111,8 @@
...
@@ -109,7 +111,8 @@
</when>
</when>
<otherwise>
<otherwise>
id, user_id, guarantee_amount, goods_amount, goods_wait_entry_amount, introduce_amount,
id, user_id, guarantee_amount, goods_amount, goods_wait_entry_amount, introduce_amount,
introduce_wait_entry_amount, earnest_amount, create_time, update_time
introduce_wait_entry_amount, earnest_amount, earnest_usable_amount, create_time,
update_time
</otherwise>
</otherwise>
</choose>
</choose>
from user_account
from user_account
...
@@ -141,7 +144,8 @@
...
@@ -141,7 +144,8 @@
</when>
</when>
<otherwise>
<otherwise>
id, user_id, guarantee_amount, goods_amount, goods_wait_entry_amount, introduce_amount,
id, user_id, guarantee_amount, goods_amount, goods_wait_entry_amount, introduce_amount,
introduce_wait_entry_amount, earnest_amount, create_time, update_time
introduce_wait_entry_amount, earnest_amount, earnest_usable_amount, create_time,
update_time
</otherwise>
</otherwise>
</choose>
</choose>
from user_account
from user_account
...
@@ -163,12 +167,12 @@
...
@@ -163,12 +167,12 @@
</selectKey>
</selectKey>
insert into user_account (user_id, guarantee_amount, goods_amount,
insert into user_account (user_id, guarantee_amount, goods_amount,
goods_wait_entry_amount, introduce_amount, introduce_wait_entry_amount,
goods_wait_entry_amount, introduce_amount, introduce_wait_entry_amount,
earnest_amount,
create_time, update_time
earnest_amount,
earnest_usable_amount, create_time,
)
update_time
)
values (#{userId,jdbcType=BIGINT}, #{guaranteeAmount,jdbcType=BIGINT}, #{goodsAmount,jdbcType=BIGINT},
values (#{userId,jdbcType=BIGINT}, #{guaranteeAmount,jdbcType=BIGINT}, #{goodsAmount,jdbcType=BIGINT},
#{goodsWaitEntryAmount,jdbcType=BIGINT}, #{introduceAmount,jdbcType=BIGINT}, #{introduceWaitEntryAmount,jdbcType=BIGINT},
#{goodsWaitEntryAmount,jdbcType=BIGINT}, #{introduceAmount,jdbcType=BIGINT}, #{introduceWaitEntryAmount,jdbcType=BIGINT},
#{earnestAmount,jdbcType=BIGINT}, #{
createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
#{earnestAmount,jdbcType=BIGINT}, #{
earnestUsableAmount,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
)
#{updateTime,jdbcType=TIMESTAMP}
)
</insert>
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.openShop.UserAccount"
>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.openShop.UserAccount"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
...
@@ -197,6 +201,9 @@
...
@@ -197,6 +201,9 @@
<if
test=
"earnestAmount != null"
>
<if
test=
"earnestAmount != null"
>
earnest_amount,
earnest_amount,
</if>
</if>
<if
test=
"earnestUsableAmount != null"
>
earnest_usable_amount,
</if>
<if
test=
"createTime != null"
>
<if
test=
"createTime != null"
>
create_time,
create_time,
</if>
</if>
...
@@ -226,6 +233,9 @@
...
@@ -226,6 +233,9 @@
<if
test=
"earnestAmount != null"
>
<if
test=
"earnestAmount != null"
>
#{earnestAmount,jdbcType=BIGINT},
#{earnestAmount,jdbcType=BIGINT},
</if>
</if>
<if
test=
"earnestUsableAmount != null"
>
#{earnestUsableAmount,jdbcType=BIGINT},
</if>
<if
test=
"createTime != null"
>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
#{createTime,jdbcType=TIMESTAMP},
</if>
</if>
...
@@ -267,6 +277,9 @@
...
@@ -267,6 +277,9 @@
<if
test=
"record.earnestAmount != null"
>
<if
test=
"record.earnestAmount != null"
>
earnest_amount = #{record.earnestAmount,jdbcType=BIGINT},
earnest_amount = #{record.earnestAmount,jdbcType=BIGINT},
</if>
</if>
<if
test=
"record.earnestUsableAmount != null"
>
earnest_usable_amount = #{record.earnestUsableAmount,jdbcType=BIGINT},
</if>
<if
test=
"record.createTime != null"
>
<if
test=
"record.createTime != null"
>
create_time = #{record.createTime,jdbcType=TIMESTAMP},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
</if>
...
@@ -288,6 +301,7 @@
...
@@ -288,6 +301,7 @@
introduce_amount = #{record.introduceAmount,jdbcType=BIGINT},
introduce_amount = #{record.introduceAmount,jdbcType=BIGINT},
introduce_wait_entry_amount = #{record.introduceWaitEntryAmount,jdbcType=BIGINT},
introduce_wait_entry_amount = #{record.introduceWaitEntryAmount,jdbcType=BIGINT},
earnest_amount = #{record.earnestAmount,jdbcType=BIGINT},
earnest_amount = #{record.earnestAmount,jdbcType=BIGINT},
earnest_usable_amount = #{record.earnestUsableAmount,jdbcType=BIGINT},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
...
@@ -318,6 +332,9 @@
...
@@ -318,6 +332,9 @@
<if
test=
"earnestAmount != null"
>
<if
test=
"earnestAmount != null"
>
earnest_amount = #{earnestAmount,jdbcType=BIGINT},
earnest_amount = #{earnestAmount,jdbcType=BIGINT},
</if>
</if>
<if
test=
"earnestUsableAmount != null"
>
earnest_usable_amount = #{earnestUsableAmount,jdbcType=BIGINT},
</if>
<if
test=
"createTime != null"
>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
</if>
...
@@ -336,6 +353,7 @@
...
@@ -336,6 +353,7 @@
introduce_amount = #{introduceAmount,jdbcType=BIGINT},
introduce_amount = #{introduceAmount,jdbcType=BIGINT},
introduce_wait_entry_amount = #{introduceWaitEntryAmount,jdbcType=BIGINT},
introduce_wait_entry_amount = #{introduceWaitEntryAmount,jdbcType=BIGINT},
earnest_amount = #{earnestAmount,jdbcType=BIGINT},
earnest_amount = #{earnestAmount,jdbcType=BIGINT},
earnest_usable_amount = #{earnestUsableAmount,jdbcType=BIGINT},
create_time = #{createTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
...
@@ -374,7 +392,8 @@
...
@@ -374,7 +392,8 @@
</when>
</when>
<otherwise>
<otherwise>
id, user_id, guarantee_amount, goods_amount, goods_wait_entry_amount, introduce_amount,
id, user_id, guarantee_amount, goods_amount, goods_wait_entry_amount, introduce_amount,
introduce_wait_entry_amount, earnest_amount, create_time, update_time
introduce_wait_entry_amount, earnest_amount, earnest_usable_amount, create_time,
update_time
</otherwise>
</otherwise>
</choose>
</choose>
from user_account
from user_account
...
@@ -386,260 +405,4 @@
...
@@ -386,260 +405,4 @@
</if>
</if>
limit 1
limit 1
</select>
</select>
<resultMap
id=
"BaseResultMap"
type=
"com.wwdz.ch.db.domain.openShop.UserAccount"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"user_id"
jdbcType=
"BIGINT"
property=
"userId"
/>
<result
column=
"guarantee_amount"
jdbcType=
"BIGINT"
property=
"guaranteeAmount"
/>
<result
column=
"item_income_amount"
jdbcType=
"BIGINT"
property=
"itemIncomeAmount"
/>
<result
column=
"introduce_amount"
jdbcType=
"BIGINT"
property=
"introduceAmount"
/>
<result
column=
"earnest_amount"
jdbcType=
"BIGINT"
property=
"earnestAmount"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Base_Column_List"
>
id, user_id, guarantee_amount, item_income_amount, introduce_amount, earnest_amount,
create_time, update_time
</sql>
<select
id=
"selectByExample"
parameterType=
"com.wwdz.ch.db.domain.openShop.UserAccountExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
'true' as QUERYID,
<include
refid=
"Base_Column_List"
/>
from user_account
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from user_account
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from user_account
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.wwdz.ch.db.domain.openShop.UserAccountExample"
>
delete from user_account
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.wwdz.ch.db.domain.openShop.UserAccount"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into user_account (user_id, guarantee_amount, item_income_amount,
introduce_amount, earnest_amount, create_time,
update_time)
values (#{userId,jdbcType=BIGINT}, #{guaranteeAmount,jdbcType=BIGINT}, #{itemIncomeAmount,jdbcType=BIGINT},
#{introduceAmount,jdbcType=BIGINT}, #{earnestAmount,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.openShop.UserAccount"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into user_account
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"userId != null"
>
user_id,
</if>
<if
test=
"guaranteeAmount != null"
>
guarantee_amount,
</if>
<if
test=
"itemIncomeAmount != null"
>
item_income_amount,
</if>
<if
test=
"introduceAmount != null"
>
introduce_amount,
</if>
<if
test=
"earnestAmount != null"
>
earnest_amount,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"userId != null"
>
#{userId,jdbcType=BIGINT},
</if>
<if
test=
"guaranteeAmount != null"
>
#{guaranteeAmount,jdbcType=BIGINT},
</if>
<if
test=
"itemIncomeAmount != null"
>
#{itemIncomeAmount,jdbcType=BIGINT},
</if>
<if
test=
"introduceAmount != null"
>
#{introduceAmount,jdbcType=BIGINT},
</if>
<if
test=
"earnestAmount != null"
>
#{earnestAmount,jdbcType=BIGINT},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.wwdz.ch.db.domain.openShop.UserAccountExample"
resultType=
"java.lang.Long"
>
select count(*) from user_account
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update user_account
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.userId != null"
>
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if
test=
"record.guaranteeAmount != null"
>
guarantee_amount = #{record.guaranteeAmount,jdbcType=BIGINT},
</if>
<if
test=
"record.itemIncomeAmount != null"
>
item_income_amount = #{record.itemIncomeAmount,jdbcType=BIGINT},
</if>
<if
test=
"record.introduceAmount != null"
>
introduce_amount = #{record.introduceAmount,jdbcType=BIGINT},
</if>
<if
test=
"record.earnestAmount != null"
>
earnest_amount = #{record.earnestAmount,jdbcType=BIGINT},
</if>
<if
test=
"record.createTime != null"
>
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.updateTime != null"
>
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update user_account
set id = #{record.id,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT},
guarantee_amount = #{record.guaranteeAmount,jdbcType=BIGINT},
item_income_amount = #{record.itemIncomeAmount,jdbcType=BIGINT},
introduce_amount = #{record.introduceAmount,jdbcType=BIGINT},
earnest_amount = #{record.earnestAmount,jdbcType=BIGINT},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.wwdz.ch.db.domain.openShop.UserAccount"
>
update user_account
<set>
<if
test=
"userId != null"
>
user_id = #{userId,jdbcType=BIGINT},
</if>
<if
test=
"guaranteeAmount != null"
>
guarantee_amount = #{guaranteeAmount,jdbcType=BIGINT},
</if>
<if
test=
"itemIncomeAmount != null"
>
item_income_amount = #{itemIncomeAmount,jdbcType=BIGINT},
</if>
<if
test=
"introduceAmount != null"
>
introduce_amount = #{introduceAmount,jdbcType=BIGINT},
</if>
<if
test=
"earnestAmount != null"
>
earnest_amount = #{earnestAmount,jdbcType=BIGINT},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.wwdz.ch.db.domain.openShop.UserAccount"
>
update user_account
set user_id = #{userId,jdbcType=BIGINT},
guarantee_amount = #{guaranteeAmount,jdbcType=BIGINT},
item_income_amount = #{itemIncomeAmount,jdbcType=BIGINT},
introduce_amount = #{introduceAmount,jdbcType=BIGINT},
earnest_amount = #{earnestAmount,jdbcType=BIGINT},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
</mapper>
\ No newline at end of file
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