Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_ht
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pseer
gxpt_ht
Commits
bcb2760a
Commit
bcb2760a
authored
Mar 19, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
换房新增历史订单
parent
a360b3d0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+13
-2
SOrderMapper.xml
...-system/src/main/resources/mapper/system/SOrderMapper.xml
+1
-0
No files found.
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
bcb2760a
...
@@ -577,6 +577,11 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -577,6 +577,11 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
@Override
@Override
public
Boolean
changeRoom
(
SOrderDto
dto
)
{
public
Boolean
changeRoom
(
SOrderDto
dto
)
{
SOrder
sOrder
=
getById
(
dto
.
getId
());
SOrder
sOrder
=
getById
(
dto
.
getId
());
SOrder
oldSOrder
=
new
SOrder
();
LambdaQueryWrapper
<
SRoom
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
SRoom:
:
getStoreId
,
sOrder
.
getStoreId
());
List
<
SRoom
>
list
=
roomService
.
list
(
queryWrapper
);
BeanUtils
.
copyProperties
(
sOrder
,
oldSOrder
);
LambdaQueryWrapper
<
SOrder
>
sOrderLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
SOrder
>
sOrderLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
sOrderLambdaQueryWrapper
.
notIn
(
SOrder:
:
getRefundStatus
,
RefundStatusEnum
.
getRefundedStatus
());
sOrderLambdaQueryWrapper
.
notIn
(
SOrder:
:
getRefundStatus
,
RefundStatusEnum
.
getRefundedStatus
());
sOrderLambdaQueryWrapper
.
in
(
SOrder:
:
getStatus
,
OrderStatusEnum
.
getUnfinishOrderStatus
());
sOrderLambdaQueryWrapper
.
in
(
SOrder:
:
getStatus
,
OrderStatusEnum
.
getUnfinishOrderStatus
());
...
@@ -619,8 +624,14 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -619,8 +624,14 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
sRoom
.
setStatus
(
RoomStatusEnum
.
HOLD
.
getValue
());
sRoom
.
setStatus
(
RoomStatusEnum
.
HOLD
.
getValue
());
roomService
.
updateById
(
sRoom
);
roomService
.
updateById
(
sRoom
);
}
}
sOrder
.
setRoomId
(
dto
.
getRoomId
());
sOrder
.
setIsDelete
(
YesNoEnum
.
yes
.
getIndex
());
return
updateById
(
sOrder
);
;
sOrder
.
setRemark
(
"订单:"
+
sOrder
.
getOrderNo
()
+
"由原来的"
+
list
.
stream
().
filter
(
item
->
item
.
getId
().
equals
(
sOrder
.
getRoomId
())).
findFirst
().
orElse
(
null
).
getName
()
+
"换到"
+
list
.
stream
().
filter
(
item
->
item
.
getId
().
equals
(
dto
.
getRoomId
())).
findFirst
().
orElse
(
null
).
getName
()
+
"房间"
);
sOrder
.
setCreateTime
(
new
Date
());
save
(
sOrder
);
oldSOrder
.
setRoomId
(
dto
.
getRoomId
());
return
updateById
(
oldSOrder
);
}
}
@Override
@Override
...
...
share-system/src/main/resources/mapper/system/SOrderMapper.xml
View file @
bcb2760a
...
@@ -84,6 +84,7 @@
...
@@ -84,6 +84,7 @@
<select
id=
"selectSOrderList"
parameterType=
"SOrder"
resultMap=
"SOrderResult"
>
<select
id=
"selectSOrderList"
parameterType=
"SOrder"
resultMap=
"SOrderResult"
>
<include
refid=
"selectSOrderVo"
/>
<include
refid=
"selectSOrderVo"
/>
where pay_status = 1
where pay_status = 1
and is_delete = 0
<if
test=
"orderNo != null and orderNo != ''"
>
and order_no = #{orderNo}
</if>
<if
test=
"orderNo != null and orderNo != ''"
>
and order_no = #{orderNo}
</if>
<if
test=
"outTradeNo != null and outTradeNo != ''"
>
and out_trade_no = #{outTradeNo}
</if>
<if
test=
"outTradeNo != null and outTradeNo != ''"
>
and out_trade_no = #{outTradeNo}
</if>
<if
test=
"orderType != null and orderType != ''"
>
and order_type = #{orderType}
</if>
<if
test=
"orderType != null and orderType != ''"
>
and order_type = #{orderType}
</if>
...
...
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