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
04d634bc
Commit
04d634bc
authored
Mar 18, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改优惠卷作废,下单提示
parent
7c596eca
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
6 deletions
+28
-6
SOrderController.java
...in/java/share/web/controller/system/SOrderController.java
+1
-3
ISOrderService.java
...em/src/main/java/share/system/service/ISOrderService.java
+2
-1
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+25
-2
No files found.
share-admin/src/main/java/share/web/controller/system/SOrderController.java
View file @
04d634bc
...
@@ -46,9 +46,7 @@ public class SOrderController extends BaseController
...
@@ -46,9 +46,7 @@ public class SOrderController extends BaseController
@GetMapping
(
"/queryList"
)
@GetMapping
(
"/queryList"
)
public
TableDataInfo
queryOrderList
(
SOrder
sOrder
)
{
public
TableDataInfo
queryOrderList
(
SOrder
sOrder
)
{
startPage
();
return
sOrderService
.
queryOrderList
(
sOrder
);
List
<
SOrder
>
list
=
sOrderService
.
queryOrderList
(
sOrder
);
return
getDataTable
(
list
);
}
}
/**
/**
...
...
share-system/src/main/java/share/system/service/ISOrderService.java
View file @
04d634bc
package
share
.
system
.
service
;
package
share
.
system
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
share.common.core.page.TableDataInfo
;
import
share.common.vo.TableDataInfoVo
;
import
share.common.vo.TableDataInfoVo
;
import
share.system.domain.SConsumerCoupon
;
import
share.system.domain.SConsumerCoupon
;
import
share.system.domain.SOrder
;
import
share.system.domain.SOrder
;
...
@@ -202,7 +203,7 @@ public interface ISOrderService extends IService<SOrder>
...
@@ -202,7 +203,7 @@ public interface ISOrderService extends IService<SOrder>
*/
*/
int
refundOp
(
AdminRefundRequest
request
);
int
refundOp
(
AdminRefundRequest
request
);
List
<
SOrder
>
queryOrderList
(
SOrder
sOrder
);
TableDataInfo
queryOrderList
(
SOrder
sOrder
);
List
<
SRoomVo
>
changeRoomList
(
Long
id
);
List
<
SRoomVo
>
changeRoomList
(
Long
id
);
...
...
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
04d634bc
...
@@ -22,6 +22,7 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -22,6 +22,7 @@ import org.springframework.transaction.annotation.Transactional;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
share.common.constant.Constants
;
import
share.common.constant.Constants
;
import
share.common.core.page.PageDomain
;
import
share.common.core.page.PageDomain
;
import
share.common.core.page.TableDataInfo
;
import
share.common.core.page.TableSupport
;
import
share.common.core.page.TableSupport
;
import
share.common.core.redis.RedisUtil
;
import
share.common.core.redis.RedisUtil
;
import
share.common.enums.*
;
import
share.common.enums.*
;
...
@@ -492,8 +493,27 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -492,8 +493,27 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
}
}
@Override
@Override
public
List
<
SOrder
>
queryOrderList
(
SOrder
sOrder
)
{
public
TableDataInfo
queryOrderList
(
SOrder
sOrder
)
{
return
baseMapper
.
queryList
(
sOrder
.
getRoomId
());
List
<
SOrder
>
sOrderList
=
baseMapper
.
queryList
(
sOrder
.
getRoomId
());
List
<
SOrderVo
>
sOrderVos
=
convertDosToVos
(
sOrderList
);
List
<
SStore
>
list
=
storeService
.
list
();
List
<
SRoom
>
list1
=
roomService
.
list
();
sOrderVos
.
stream
().
forEach
(
vo
->
{
vo
.
setRoomName
(
list1
.
stream
().
filter
(
room
->
room
.
getId
().
equals
(
vo
.
getRoomId
())).
findFirst
().
get
().
getName
());
vo
.
setStoreName
(
list
.
stream
().
filter
(
store
->
store
.
getId
().
equals
(
vo
.
getStoreId
())).
findFirst
().
get
().
getName
());
});
PageDomain
pageDomain
=
TableSupport
.
buildPageRequest
();
Integer
pageNum
=
pageDomain
.
getPageNum
();
Integer
pageSize
=
pageDomain
.
getPageSize
();
int
start
=
(
pageNum
-
1
)
*
pageSize
;
int
end
=
Math
.
min
(
start
+
pageSize
,
sOrderVos
.
size
());
List
<
SOrderVo
>
pagedList
=
sOrderVos
.
subList
(
start
,
end
);
TableDataInfo
tableDataInfo
=
new
TableDataInfo
();
tableDataInfo
.
setRows
(
pagedList
);
tableDataInfo
.
setTotal
(
sOrderVos
.
size
());
tableDataInfo
.
setCode
(
200
);
tableDataInfo
.
setMsg
(
"查询成功"
);
return
tableDataInfo
;
}
}
@Override
@Override
...
@@ -944,6 +964,9 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -944,6 +964,9 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
if
(
ObjectUtil
.
isNotEmpty
(
request
.
getCouponId
()))
{
if
(
ObjectUtil
.
isNotEmpty
(
request
.
getCouponId
()))
{
//查询优惠卷金额
//查询优惠卷金额
SConsumerCoupon
coupon
=
consumerCouponService
.
getById
(
request
.
getCouponId
());
SConsumerCoupon
coupon
=
consumerCouponService
.
getById
(
request
.
getCouponId
());
if
(
ObjectUtils
.
isEmpty
(
coupon
))
{
throw
new
BaseException
(
"优惠券异常,联系客服!"
);
}
sOrder
.
setCouponPrice
(
coupon
.
getSubPrice
());
sOrder
.
setCouponPrice
(
coupon
.
getSubPrice
());
}
}
sOrder
.
setPayPrice
(
request
.
getPayFee
());
sOrder
.
setPayPrice
(
request
.
getPayFee
());
...
...
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