Toggle navigation
Toggle navigation
This project
Loading...
Sign in
ufo
/
yohoufo-fore
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
mali
6 years ago
Commit
00c6090981d4d1abe9cb9254142e6b406cad75b9
1 parent
1d2f2f79
寄存订单试算
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
5 deletions
dal/src/main/java/com/yohoufo/dal/order/model/DepositOrder.java
dal/src/main/resources/META-INF/mybatis/order/DepositOrderMapper.xml
order/src/main/java/com/yohoufo/order/service/deposit/DepositOrderService.java
dal/src/main/java/com/yohoufo/dal/order/model/DepositOrder.java
View file @
00c6090
...
...
@@ -16,7 +16,7 @@ public class DepositOrder {
private
String
depositCode
;
private
BigDecimal
amount
;
private
BigDecimal
amount
;
// ×Ü·ÑÓÃ
private
Integer
payment
;
...
...
@@ -29,4 +29,8 @@ public class DepositOrder {
private
Integer
createTime
;
private
Integer
updateTime
;
private
BigDecimal
contractFee
;
//Î¥Ô¼·ÑÓÃ
private
BigDecimal
shipFee
;
//ÔË·Ñ
}
\ No newline at end of file
...
...
dal/src/main/resources/META-INF/mybatis/order/DepositOrderMapper.xml
View file @
00c6090
...
...
@@ -7,6 +7,8 @@
<result
column=
"order_code"
property=
"orderCode"
jdbcType=
"BIGINT"
/>
<result
column=
"deposit_code"
property=
"depositCode"
jdbcType=
"VARCHAR"
/>
<result
column=
"amount"
property=
"amount"
jdbcType=
"DECIMAL"
/>
<result
column=
"contract_fee"
property=
"contractFee"
jdbcType=
"DECIMAL"
/>
<result
column=
"ship_fee"
property=
"shipFee"
jdbcType=
"DECIMAL"
/>
<result
column=
"payment"
property=
"payment"
jdbcType=
"INTEGER"
/>
<result
column=
"client_type"
property=
"clientType"
jdbcType=
"INTEGER"
/>
<result
column=
"event_type"
property=
"eventType"
jdbcType=
"INTEGER"
/>
...
...
@@ -16,7 +18,7 @@
</resultMap>
<sql
id=
"Base_Column_List"
>
id, uid, order_code, deposit_code, amount, payment, client_type, event_type, status,
create_time, update_time
create_time, update_time
, ship_fee, contract_fee
</sql>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.Integer"
>
select
...
...
@@ -29,11 +31,11 @@
insert into deposit_order (id, uid, order_code,
deposit_code, amount, payment,
client_type, event_type, status,
create_time, update_time)
create_time, update_time
, contract_fee,ship_fee
)
values (#{id,jdbcType=INTEGER}, #{uid,jdbcType=INTEGER}, #{orderCode,jdbcType=BIGINT},
#{depositCode,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL}, #{payment,jdbcType=INTEGER},
#{clientType,jdbcType=INTEGER}, #{eventType,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
#{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER})
#{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER}
, #{contractFee,jdbcType=DECIMAL}, #{shipFee,jdbcType=DECIMAL}
)
</insert>
...
...
order/src/main/java/com/yohoufo/order/service/deposit/DepositOrderService.java
View file @
00c6090
...
...
@@ -113,7 +113,8 @@ public class DepositOrderService {
// 生成订单数据,insert db
int
now
=
(
int
)
(
System
.
currentTimeMillis
()/
1000
);
DepositOrder
depositOrder
=
DepositOrder
.
builder
().
uid
(
uid
).
amount
(
new
BigDecimal
(
30
)).
createTime
(
now
).
depositCode
(
req
.
getDepositCode
())
DepositOrder
depositOrder
=
DepositOrder
.
builder
().
uid
(
uid
).
amount
(
new
BigDecimal
(
30
))
.
contractFee
(
new
BigDecimal
(
15
)).
shipFee
(
new
BigDecimal
(
15
)).
createTime
(
now
).
depositCode
(
req
.
getDepositCode
())
.
eventType
(
DepositEventTypeEnum
.
DEPOSIT_RECALL_FEE
.
getCode
()).
orderCode
(
orderCode
).
payment
(
0
).
status
(
0
).
updateTime
(
now
).
build
();
LOG
.
info
(
"enter publishDepositOrder begin save depositOrder {} "
,
depositOrder
);
...
...
Please
register
or
login
to post a comment