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
f17b9e46
Commit
f17b9e46
authored
Jan 11, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
实付金额不为0的订单增加验卷校验
parent
7bb538d0
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
160 additions
and
2 deletions
+160
-2
QPServiceImplAspect.java
...ain/java/share/framework/aspectj/QPServiceImplAspect.java
+1
-1
OpenInterfaceController.java
.../share/web/controller/system/OpenInterfaceController.java
+20
-0
OrderVo.java
...-system/src/main/java/share/system/domain/vo/OrderVo.java
+92
-0
ISOrderService.java
...em/src/main/java/share/system/service/ISOrderService.java
+3
-0
QPServiceImpl.java
...rc/main/java/share/system/service/impl/QPServiceImpl.java
+1
-1
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+43
-0
No files found.
share-framework/src/main/java/share/framework/aspectj/QPServiceImplAspect.java
View file @
f17b9e46
...
@@ -131,7 +131,7 @@ public class QPServiceImplAspect {
...
@@ -131,7 +131,7 @@ public class QPServiceImplAspect {
couponLog
.
setStatus
(
YesNoEnum
.
no
.
getDisplay_3
());
couponLog
.
setStatus
(
YesNoEnum
.
no
.
getDisplay_3
());
couponLog
.
setNumber
(
TRY_NUMBER
);
couponLog
.
setNumber
(
TRY_NUMBER
);
couponLog
.
setCreateTime
(
new
Date
());
couponLog
.
setCreateTime
(
new
Date
());
couponLog
.
setMessage
(
stackTraceToString
(
e
.
getClass
().
getName
(),
e
.
getMessage
(),
e
.
getStackTrace
()
));
couponLog
.
setMessage
(
e
.
getMessage
(
));
}
catch
(
Exception
e2
)
{
}
catch
(
Exception
e2
)
{
e2
.
printStackTrace
();
e2
.
printStackTrace
();
...
...
share-front/src/main/java/share/web/controller/system/OpenInterfaceController.java
0 → 100644
View file @
f17b9e46
package
share
.
web
.
controller
.
system
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
share.common.core.domain.AjaxResult
;
import
share.system.service.ISOrderService
;
@RestController
@RequestMapping
(
"/openInterface"
)
public
class
OpenInterfaceController
{
@Autowired
private
ISOrderService
sOrderService
;
@GetMapping
(
"/order/info"
)
public
AjaxResult
orderInfo
(
String
orderNo
)
{
return
AjaxResult
.
success
(
sOrderService
.
orderInfo
(
orderNo
));
}
}
share-system/src/main/java/share/system/domain/vo/OrderVo.java
0 → 100644
View file @
f17b9e46
package
share
.
system
.
domain
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.Date
;
@Data
public
class
OrderVo
{
/**
* 订单编号
*/
private
String
orderNo
;
/**
* 支付类型(1:微信,2:支付宝)
*/
private
Integer
payType
;
/**
* 支付时间
*/
private
Date
payTime
;
/**
* 订单时长
*/
private
String
timeLong
;
/**
* 预约开始时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
private
Date
preStartDate
;
/**
* 预约结束时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
private
Date
preEndDate
;
/**
* 开始时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
private
Date
startDate
;
/**
* 结束时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
private
Date
endDate
;
/**
* 门店名称
*/
private
String
storeName
;
/**
* 房间名称
*/
private
String
roomName
;
//房间图片
private
String
roomImages
;
//房间类型
private
String
roomType
;
//房间类型名称
private
String
roomTypeName
;
/**
* 门店地址
*/
private
String
address
;
/**
* 经度
*/
private
String
longitude
;
/**
* 纬度
*/
private
String
latitude
;
//是否可以申请退款
private
Boolean
isRefund
;
//套餐名称
private
String
packName
;
//优惠卷名称
private
String
couponName
;
}
share-system/src/main/java/share/system/service/ISOrderService.java
View file @
f17b9e46
...
@@ -5,6 +5,7 @@ import java.util.List;
...
@@ -5,6 +5,7 @@ import java.util.List;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
share.system.domain.SOrder
;
import
share.system.domain.SOrder
;
import
share.system.domain.vo.OrderVo
;
import
share.system.domain.vo.SOrderVo
;
import
share.system.domain.vo.SOrderVo
;
import
share.system.request.CreateOrderRequest
;
import
share.system.request.CreateOrderRequest
;
import
share.system.request.OrderComputedPriceRequest
;
import
share.system.request.OrderComputedPriceRequest
;
...
@@ -171,4 +172,6 @@ public interface ISOrderService extends IService<SOrder>
...
@@ -171,4 +172,6 @@ public interface ISOrderService extends IService<SOrder>
* @return
* @return
*/
*/
List
<
SOrder
>
payedUnrefundListByUserId
(
Long
userId
);
List
<
SOrder
>
payedUnrefundListByUserId
(
Long
userId
);
OrderVo
orderInfo
(
String
orderNo
);
}
}
share-system/src/main/java/share/system/service/impl/QPServiceImpl.java
View file @
f17b9e46
...
@@ -91,7 +91,7 @@ public class QPServiceImpl implements QPService {
...
@@ -91,7 +91,7 @@ public class QPServiceImpl implements QPService {
@Override
@Override
public
TuangouReceiptPrepareResponseEntityVo
consumeByUser
(
String
code
,
String
openShopUuid
,
String
status
)
{
public
TuangouReceiptPrepareResponseEntityVo
consumeByUser
(
String
code
,
String
openShopUuid
,
String
status
)
{
//验券准备
//验券准备
TuangouReceiptPrepareResponseEntity
prepare
=
prepare
(
code
,
openShopUuid
,
status
);
TuangouReceiptPrepareResponseEntity
prepare
=
prepare
(
code
.
trim
()
,
openShopUuid
,
status
);
//获取用户信息
//获取用户信息
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
//查询领取记录表
//查询领取记录表
...
...
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
f17b9e46
...
@@ -309,6 +309,18 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -309,6 +309,18 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
checkOrderDate
(
request
);
checkOrderDate
(
request
);
//校验订单套餐
//校验订单套餐
checkOrderPack
(
request
,
user
);
checkOrderPack
(
request
,
user
);
if
(
Objects
.
nonNull
(
request
.
getCouponId
())
&&
request
.
getCouponId
()
!=
0
)
{
SConsumerCoupon
byId
=
consumerCouponService
.
getById
(
request
.
getCouponId
());
if
(
byId
.
getUseStatus
().
equals
(
UserStatusEnum
.
UNUSED
.
getCode
()))
{
if
(
Objects
.
nonNull
(
byId
))
{
qpService
.
prepare
(
byId
.
getCouponCode
(),
sStore
.
getOpenShopUuid
(),
ConsumerCouponStatusEnum
.
ORDER
.
getCode
());
}
else
{
throw
new
BaseException
(
"优惠券不存在!"
);
}
}
else
{
throw
new
BaseException
(
"优惠券已使用!"
);
}
}
OrderPayResultResponse
response
=
new
OrderPayResultResponse
();
OrderPayResultResponse
response
=
new
OrderPayResultResponse
();
if
(
request
.
getPayFee
().
compareTo
(
BigDecimal
.
ZERO
)
<=
0
)
{
if
(
request
.
getPayFee
().
compareTo
(
BigDecimal
.
ZERO
)
<=
0
)
{
response
.
setPayType
(
PayTypeEnum
.
WECHAT
.
getValue
());
response
.
setPayType
(
PayTypeEnum
.
WECHAT
.
getValue
());
...
@@ -851,6 +863,37 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -851,6 +863,37 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
return
list
(
queryWrapper
);
return
list
(
queryWrapper
);
}
}
@Override
public
OrderVo
orderInfo
(
String
orderNo
)
{
SOrder
en
=
getByOrderNo
(
orderNo
);
OrderVo
vo
=
new
OrderVo
();
BeanUtils
.
copyProperties
(
en
,
vo
);
SStore
store
=
storeService
.
getById
(
en
.
getStoreId
());
SRoom
room
=
roomService
.
getById
(
en
.
getRoomId
());
vo
.
setStoreName
(
store
.
getName
());
vo
.
setAddress
(
store
.
getAddress
());
vo
.
setRoomImages
(
room
.
getImages
());
vo
.
setRoomName
(
room
.
getName
());
vo
.
setRoomType
(
room
.
getRoomType
());
vo
.
setRoomTypeName
(
RoomType
.
getNameByCode
(
room
.
getRoomType
()));
vo
.
setLongitude
(
store
.
getLongitude
());
vo
.
setLatitude
(
store
.
getLatitude
());
if
(
ObjectUtil
.
isNotEmpty
(
en
.
getCouponId
()))
{
SConsumerCoupon
consumerCoupon
=
consumerCouponService
.
getById
(
en
.
getCouponId
());
vo
.
setCouponName
(
consumerCoupon
.
getName
());
// 判断是否可以退款
vo
.
setIsRefund
(
isRefund
(
en
,
consumerCoupon
));
}
else
{
// 判断是否可以退款
vo
.
setIsRefund
(
isRefund
(
en
,
null
));
}
if
(
ObjectUtil
.
isNotEmpty
(
en
.
getPackId
()))
{
SPack
byId
=
packService
.
getById
(
en
.
getPackId
());
vo
.
setPackName
(
byId
.
getName
());
}
return
vo
;
}
/**
/**
* 订单DO集合转换VO集合,按距离排序
* 订单DO集合转换VO集合,按距离排序
*
*
...
...
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