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
a360b3d0
Commit
a360b3d0
authored
Mar 18, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
补齐优惠卷领取记录美团团购id
parent
70ee5aa0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
166 additions
and
67 deletions
+166
-67
SOrderController.java
...in/java/share/web/controller/system/SOrderController.java
+3
-2
CouponRetryTask.java
...artz/src/main/java/share/quartz/task/CouponRetryTask.java
+30
-0
SOrderVo.java
...system/src/main/java/share/system/domain/vo/SOrderVo.java
+91
-60
ISOrderService.java
...em/src/main/java/share/system/service/ISOrderService.java
+2
-0
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+40
-5
No files found.
share-admin/src/main/java/share/web/controller/system/SOrderController.java
View file @
a360b3d0
...
@@ -15,6 +15,7 @@ import share.common.utils.poi.ExcelUtil;
...
@@ -15,6 +15,7 @@ import share.common.utils.poi.ExcelUtil;
import
share.common.vo.TableDataInfoVo
;
import
share.common.vo.TableDataInfoVo
;
import
share.system.domain.SOrder
;
import
share.system.domain.SOrder
;
import
share.system.domain.vo.SOrderDto
;
import
share.system.domain.vo.SOrderDto
;
import
share.system.domain.vo.SOrderVo
;
import
share.system.domain.vo.SRoomVo
;
import
share.system.domain.vo.SRoomVo
;
import
share.system.request.AdminRefundRequest
;
import
share.system.request.AdminRefundRequest
;
import
share.system.service.ISOrderService
;
import
share.system.service.ISOrderService
;
...
@@ -69,8 +70,8 @@ public class SOrderController extends BaseController
...
@@ -69,8 +70,8 @@ public class SOrderController extends BaseController
@PostMapping
(
"/export"
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
SOrder
sOrder
)
public
void
export
(
HttpServletResponse
response
,
SOrder
sOrder
)
{
{
List
<
SOrder
>
list
=
sOrderService
.
selectSOrder
List
(
sOrder
);
List
<
SOrder
Vo
>
list
=
sOrderService
.
export
List
(
sOrder
);
ExcelUtil
<
SOrder
>
util
=
new
ExcelUtil
<
SOrder
>(
SOrder
.
class
);
ExcelUtil
<
SOrder
Vo
>
util
=
new
ExcelUtil
<
SOrderVo
>(
SOrderVo
.
class
);
util
.
exportExcel
(
response
,
list
,
"订单数据"
);
util
.
exportExcel
(
response
,
list
,
"订单数据"
);
}
}
...
...
share-quartz/src/main/java/share/quartz/task/CouponRetryTask.java
View file @
a360b3d0
...
@@ -109,4 +109,34 @@ public class CouponRetryTask {
...
@@ -109,4 +109,34 @@ public class CouponRetryTask {
sConsumerCouponService
.
updateBatchById
(
sConsumerCouponList
);
sConsumerCouponService
.
updateBatchById
(
sConsumerCouponList
);
}
}
}
}
//补齐美团团购id
public
void
AutoGenerateTuangouId
()
{
LambdaQueryWrapper
<
SConsumerCoupon
>
consumerCouponWrapper
=
new
LambdaQueryWrapper
<>();
consumerCouponWrapper
.
eq
(
SConsumerCoupon:
:
getIsDelete
,
YesNoEnum
.
no
.
getIndex
());
consumerCouponWrapper
.
isNull
(
SConsumerCoupon:
:
getDealgroupId
);
consumerCouponWrapper
.
eq
(
SConsumerCoupon:
:
getPlatformType
,
PlatformTypeEnum
.
MEITUAN
.
getCode
());
consumerCouponWrapper
.
ne
(
SConsumerCoupon:
:
getUseStatus
,
UserStatusEnum
.
EXPIRED
.
getCode
());
List
<
SConsumerCoupon
>
sConsumerCoupons
=
sConsumerCouponService
.
list
(
consumerCouponWrapper
);
List
<
SStore
>
list
=
storeService
.
list
();
List
<
SConsumerCoupon
>
sConsumerCouponList
=
new
ArrayList
<>();
//去除没open_shop_uuid的store
list
=
list
.
stream
().
filter
(
item
->
item
.
getOpenShopUuid
()
!=
null
).
collect
(
Collectors
.
toList
());
if
(!
CollectionUtils
.
isEmpty
(
sConsumerCoupons
))
{
List
<
SStore
>
finalList
=
list
;
sConsumerCoupons
.
stream
().
forEach
(
item
->
{
if
(
item
.
getPlatformType
().
equals
(
PlatformTypeEnum
.
MEITUAN
.
getCode
()))
{
String
openShopUuid
=
finalList
.
stream
().
filter
(
store
->
store
.
getId
().
equals
(
item
.
getStoreId
())).
findFirst
().
get
().
getOpenShopUuid
();
TuangouReceiptGetConsumedReponseEntity
getconsumed
=
qpService
.
getconsumed
(
item
.
getCouponCode
(),
openShopUuid
);
System
.
out
.
println
(
getconsumed
);
if
(!
ObjectUtils
.
isEmpty
(
getconsumed
))
{
item
.
setDealgroupId
(
getconsumed
.
getDealgroup_id
());
sConsumerCouponList
.
add
(
item
);
}
}
});
}
if
(!
CollectionUtils
.
isEmpty
(
sConsumerCouponList
))
sConsumerCouponService
.
updateBatchById
(
sConsumerCouponList
);
}
}
}
share-system/src/main/java/share/system/domain/vo/SOrderVo.java
View file @
a360b3d0
...
@@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
...
@@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
import
share.common.annotation.Excel
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -33,82 +34,106 @@ public class SOrderVo
...
@@ -33,82 +34,106 @@ public class SOrderVo
/** 订单流水号 */
/** 订单流水号 */
@ApiModelProperty
(
value
=
"订单编号"
)
@ApiModelProperty
(
value
=
"订单编号"
)
@Excel
(
name
=
"订单编号"
)
private
String
orderNo
;
private
String
orderNo
;
@ApiModelProperty
(
value
=
"商户订单号"
)
private
String
outTradeNo
;
/** 订单类型(0:订房订单,1:续房订单,2:充值订单) */
/** 订单类型(0:订房订单,1:续房订单,2:充值订单) */
@ApiModelProperty
(
value
=
"订单类型(1:订房订单,2:续房订单,3:充值订单)"
)
@ApiModelProperty
(
value
=
"订单类型(1:订房订单,2:续房订单,3:充值订单)"
)
@Excel
(
name
=
"订单类型"
,
dictType
=
"store_order_type"
)
private
Integer
orderType
;
private
Integer
orderType
;
@ApiModelProperty
(
value
=
"支付类型(1:微信,2:支付宝)"
)
private
Integer
payType
;
@ApiModelProperty
(
value
=
"支付状态(0:未支付,1:已支付)"
)
private
Integer
payStatus
;
@ApiModelProperty
(
value
=
"门店ID"
)
@ApiModelProperty
(
value
=
"门店名称"
)
private
Long
storeId
;
@Excel
(
name
=
"门店名称"
)
private
String
storeName
;
@ApiModelProperty
(
value
=
"房间ID"
)
@ApiModelProperty
(
value
=
"房间名称"
)
private
Long
roomId
;
@Excel
(
name
=
"房间名称"
)
private
String
roomName
;
/** 用户ID */
/**
@ApiModelProperty
(
value
=
"用户ID"
)
* 用户手机号
private
Long
consumerId
;
*/
@ApiModelProperty
(
value
=
"用户手机号"
)
@Excel
(
name
=
"用户手机号"
)
private
String
consumerPhone
;
/** 用户名称 */
/** 用户名称 */
@ApiModelProperty
(
value
=
"用户名称"
)
@ApiModelProperty
(
value
=
"用户名称"
)
@Excel
(
name
=
"用户昵称"
)
private
String
consumerName
;
private
String
consumerName
;
/** 用户手机号 */
//套餐名称
@ApiModelProperty
(
value
=
"用户手机号"
)
@ApiModelProperty
(
name
=
"套餐名称"
)
private
String
consumerPhone
;
@Excel
(
name
=
"套餐名称"
)
private
String
packName
;
@ApiModelProperty
(
value
=
"套餐ID"
)
private
Long
packId
;
@ApiModelProperty
(
value
=
"套餐金额"
)
@ApiModelProperty
(
value
=
"套餐金额"
)
@Excel
(
name
=
"套餐价格"
)
private
BigDecimal
packPrice
;
private
BigDecimal
packPrice
;
@ApiModelProperty
(
value
=
"订单时长(H)"
)
@Excel
(
name
=
"订单时长"
)
private
String
timeLong
;
@ApiModelProperty
(
name
=
"第三方平台类型(1:自营,2:美团,3: 抖音)"
)
@Excel
(
name
=
"优惠卷类型"
,
dictType
=
"store_platform_type"
)
private
Integer
platformType
;
/** 优惠券id */
/** 优惠券id */
@ApiModelProperty
(
value
=
"优惠券id"
)
@ApiModelProperty
(
value
=
"优惠券id"
)
private
Long
couponId
;
@Excel
(
name
=
"优惠券id"
)
private
String
couponSkuId
;
//优惠卷名称
@ApiModelProperty
(
name
=
"优惠卷名称"
)
@Excel
(
name
=
"优惠卷名称"
)
private
String
couponName
;
@ApiModelProperty
(
value
=
"优惠券金额"
)
@ApiModelProperty
(
value
=
"优惠券金额"
)
@Excel
(
name
=
"优惠券原价"
)
private
BigDecimal
couponPrice
;
private
BigDecimal
couponPrice
;
@ApiModelProperty
(
name
=
"优惠卷购买金额"
)
@Excel
(
name
=
"优惠卷售卖金额"
)
private
BigDecimal
couponPayPrice
;
@ApiModelProperty
(
value
=
"订单总价"
)
@ApiModelProperty
(
value
=
"订单总价"
)
@Excel
(
name
=
"订单总价"
)
private
BigDecimal
totalPrice
;
private
BigDecimal
totalPrice
;
@ApiModelProperty
(
value
=
"实际支付金额"
)
@ApiModelProperty
(
value
=
"实际支付金额"
)
@Excel
(
name
=
"实际支付金额"
)
private
BigDecimal
payPrice
;
private
BigDecimal
payPrice
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"支付时间"
)
@ApiModelProperty
(
value
=
"支付时间"
)
@Excel
(
name
=
"支付时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd HH:mm"
)
private
Date
payTime
;
private
Date
payTime
;
@ApiModelProperty
(
value
=
"订单时长(H)"
)
private
String
timeLong
;
/** 预约开始时间 */
/** 预约开始时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
@ApiModelProperty
(
value
=
"预约开始时间"
)
@ApiModelProperty
(
value
=
"预约开始时间"
)
@Excel
(
name
=
"预约开始时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd HH:mm"
)
private
Date
preStartDate
;
private
Date
preStartDate
;
/** 预约结束时间 */
/** 预约结束时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
@ApiModelProperty
(
value
=
"预约结束时间"
)
@ApiModelProperty
(
value
=
"预约结束时间"
)
@Excel
(
name
=
"预约结束时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd HH:mm"
)
private
Date
preEndDate
;
private
Date
preEndDate
;
/** 开始时间 */
/** 开始时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
@ApiModelProperty
(
value
=
"开始时间"
)
@ApiModelProperty
(
value
=
"开始时间"
)
@Excel
(
name
=
"开始时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd HH:mm"
)
private
Date
startDate
;
private
Date
startDate
;
/** 结束时间 */
/** 结束时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
@ApiModelProperty
(
value
=
"结束时间"
)
@ApiModelProperty
(
value
=
"结束时间"
)
@Excel
(
name
=
"结束时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd HH:mm"
)
private
Date
endDate
;
private
Date
endDate
;
/**
/**
...
@@ -116,12 +141,54 @@ public class SOrderVo
...
@@ -116,12 +141,54 @@ public class SOrderVo
*/
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
name
=
"到店时间"
)
@ApiModelProperty
(
name
=
"到店时间"
)
@Excel
(
name
=
"到店时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
arrivalTime
;
private
Date
arrivalTime
;
/** 订单状态(0:待使用/已预约,1:使用中,2:已使用,3:已取消预约/退款中,4:审核中,5:已退费) */
/** 订单状态(0:待使用/已预约,1:使用中,2:已使用,3:已取消预约/退款中,4:审核中,5:已退费) */
@ApiModelProperty
(
value
=
"订单状态(0:待使用/已预约,1:使用中,2:已使用,3:已取消预约/申请退款,4:退款中,5:已退费)"
)
@ApiModelProperty
(
value
=
"订单状态(0:待使用/已预约,1:使用中,2:已使用,3:已取消预约/申请退款,4:退款中,5:已退费)"
)
@Excel
(
name
=
"订单状态"
,
dictType
=
"order_status_admin"
)
private
Integer
status
;
private
Integer
status
;
/**
* 创建时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Excel
(
name
=
"下单时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createTime
;
@Excel
(
name
=
"备注"
)
/** 备注 */
private
String
remark
;
@ApiModelProperty
(
value
=
"商户订单号"
)
private
String
outTradeNo
;
@ApiModelProperty
(
value
=
"支付类型(1:微信,2:支付宝)"
)
private
Integer
payType
;
@ApiModelProperty
(
value
=
"支付状态(0:未支付,1:已支付)"
)
private
Integer
payStatus
;
@ApiModelProperty
(
value
=
"门店ID"
)
private
Long
storeId
;
@ApiModelProperty
(
value
=
"房间ID"
)
private
Long
roomId
;
/**
* 用户ID
*/
@ApiModelProperty
(
value
=
"用户ID"
)
private
Long
consumerId
;
@ApiModelProperty
(
name
=
"优惠券id"
)
private
Long
couponId
;
@ApiModelProperty
(
value
=
"套餐ID"
)
private
Long
packId
;
@ApiModelProperty
(
value
=
"0 未退款 1 申请中 2 退款中 3 已退款 4 拒绝退款"
)
@ApiModelProperty
(
value
=
"0 未退款 1 申请中 2 退款中 3 已退款 4 拒绝退款"
)
@TableField
(
value
=
"refund_status"
)
@TableField
(
value
=
"refund_status"
)
private
Integer
refundStatus
;
private
Integer
refundStatus
;
...
@@ -141,17 +208,11 @@ public class SOrderVo
...
@@ -141,17 +208,11 @@ public class SOrderVo
//逻辑删除注解(0 未删除 1 已删除)
//逻辑删除注解(0 未删除 1 已删除)
private
Integer
isDelete
;
private
Integer
isDelete
;
private
Integer
buyType
;
private
Integer
buyType
;
/** 创建者 */
/** 创建者 */
private
String
createBy
;
private
String
createBy
;
/** 创建时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createTime
;
/** 更新者 */
/** 更新者 */
private
String
updateBy
;
private
String
updateBy
;
...
@@ -159,15 +220,6 @@ public class SOrderVo
...
@@ -159,15 +220,6 @@ public class SOrderVo
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
updateTime
;
private
Date
updateTime
;
/** 备注 */
private
String
remark
;
@ApiModelProperty
(
value
=
"门店名称"
)
private
String
storeName
;
@ApiModelProperty
(
value
=
"房间名称"
)
private
String
roomName
;
//房间图片
//房间图片
@ApiModelProperty
(
value
=
"房间图片"
)
@ApiModelProperty
(
value
=
"房间图片"
)
private
String
roomImages
;
private
String
roomImages
;
...
@@ -211,25 +263,4 @@ public class SOrderVo
...
@@ -211,25 +263,4 @@ public class SOrderVo
//是否可以申请退款
//是否可以申请退款
@ApiModelProperty
(
name
=
"是否可以申请退款"
)
@ApiModelProperty
(
name
=
"是否可以申请退款"
)
private
Boolean
isRefund
;
private
Boolean
isRefund
;
//优惠卷名称
@ApiModelProperty
(
name
=
"优惠卷名称"
)
private
String
couponName
;
//套餐名称
@ApiModelProperty
(
name
=
"套餐名称"
)
private
String
packName
;
@ApiModelProperty
(
name
=
"优惠券id"
)
private
String
couponSkuId
;
@ApiModelProperty
(
name
=
"优惠卷购买金额"
)
private
BigDecimal
couponPayPrice
;
@ApiModelProperty
(
name
=
"第三方平台类型(1:自营,2:美团,3: 抖音)"
)
private
Integer
platformType
;
}
}
share-system/src/main/java/share/system/service/ISOrderService.java
View file @
a360b3d0
...
@@ -209,4 +209,6 @@ public interface ISOrderService extends IService<SOrder>
...
@@ -209,4 +209,6 @@ public interface ISOrderService extends IService<SOrder>
List
<
SRoomVo
>
changeRoomList
(
Long
id
);
List
<
SRoomVo
>
changeRoomList
(
Long
id
);
Boolean
changeRoom
(
SOrderDto
dto
);
Boolean
changeRoom
(
SOrderDto
dto
);
List
<
SOrderVo
>
exportList
(
SOrder
sOrder
);
}
}
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
a360b3d0
...
@@ -326,11 +326,11 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -326,11 +326,11 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
sConsumerCoupons
.
stream
().
filter
(
sConsumerCoupon
->
sConsumerCoupon
.
getId
().
equals
(
item
.
getCouponId
())).
findFirst
().
ifPresent
(
sConsumerCoupon
->
{
sConsumerCoupons
.
stream
().
filter
(
sConsumerCoupon
->
sConsumerCoupon
.
getId
().
equals
(
item
.
getCouponId
())).
findFirst
().
ifPresent
(
sConsumerCoupon
->
{
item
.
setCouponPayPrice
(
sConsumerCoupon
.
getCouponPayPrice
());
item
.
setCouponPayPrice
(
sConsumerCoupon
.
getCouponPayPrice
());
item
.
setPlatformType
(
sConsumerCoupon
.
getPlatformType
());
item
.
setPlatformType
(
sConsumerCoupon
.
getPlatformType
());
if
(
sConsumerCoupon
.
getPlatformType
().
equals
(
PlatformTypeEnum
.
MEITUAN
.
getCode
()))
{
//
if (sConsumerCoupon.getPlatformType().equals(PlatformTypeEnum.MEITUAN.getCode())) {
item
.
setCouponSkuId
(
String
.
valueOf
(
sConsumerCoupon
.
getDealgroupId
()));
//
item.setCouponSkuId(String.valueOf(sConsumerCoupon.getDealgroupId()));
}
else
if
(
sConsumerCoupon
.
getPlatformType
().
equals
(
PlatformTypeEnum
.
TIKTOK
.
getCode
()))
{
//
} else if (sConsumerCoupon.getPlatformType().equals(PlatformTypeEnum.TIKTOK.getCode())) {
item
.
setCouponSkuId
(
String
.
valueOf
(
sConsumerCoupon
.
getTiktokSkuId
()));
//
item.setCouponSkuId(String.valueOf(sConsumerCoupon.getTiktokSkuId()));
}
//
}
totalSalesAmount
[
0
]
=
totalSalesAmount
[
0
].
add
(
ObjectUtil
.
isEmpty
(
sConsumerCoupon
.
getCouponPayPrice
())
?
new
BigDecimal
(
"0.00"
)
:
sConsumerCoupon
.
getCouponPayPrice
());
totalSalesAmount
[
0
]
=
totalSalesAmount
[
0
].
add
(
ObjectUtil
.
isEmpty
(
sConsumerCoupon
.
getCouponPayPrice
())
?
new
BigDecimal
(
"0.00"
)
:
sConsumerCoupon
.
getCouponPayPrice
());
});
});
if
(
item
.
getPayStatus
().
equals
(
YesNoEnum
.
yes
.
getIndex
())
&&
item
.
getRefundStatus
().
equals
(
RefundStatusEnum
.
REFUNDED
.
getCode
()))
{
if
(
item
.
getPayStatus
().
equals
(
YesNoEnum
.
yes
.
getIndex
())
&&
item
.
getRefundStatus
().
equals
(
RefundStatusEnum
.
REFUNDED
.
getCode
()))
{
...
@@ -623,6 +623,41 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -623,6 +623,41 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
return
updateById
(
sOrder
);
return
updateById
(
sOrder
);
}
}
@Override
public
List
<
SOrderVo
>
exportList
(
SOrder
sOrder
)
{
List
<
SOrder
>
sOrders
=
selectSOrderList
(
sOrder
);
List
<
SOrderVo
>
sOrderVos
=
convertDosToVos
(
sOrders
);
List
<
SConsumerCoupon
>
sConsumerCoupons
=
consumerCouponService
.
queryList
();
List
<
SCoupon
>
list
=
sCouponService
.
list
();
if
(
CollectionUtils
.
isNotEmpty
(
sOrderVos
))
{
for
(
SOrderVo
item
:
sOrderVos
)
{
sConsumerCoupons
.
stream
().
filter
(
sConsumerCoupon
->
sConsumerCoupon
.
getId
().
equals
(
item
.
getCouponId
())).
findFirst
().
ifPresent
(
sConsumerCoupon
->
{
item
.
setCouponPayPrice
(
sConsumerCoupon
.
getCouponPayPrice
());
item
.
setPlatformType
(
sConsumerCoupon
.
getPlatformType
());
if
(
sConsumerCoupon
.
getPlatformType
().
equals
(
PlatformTypeEnum
.
MEITUAN
.
getCode
()))
{
if
(!
ObjectUtils
.
isEmpty
(
sConsumerCoupon
.
getDealgroupId
()))
{
item
.
setCouponSkuId
(
String
.
valueOf
(
sConsumerCoupon
.
getDealgroupId
()));
}
else
{
list
.
stream
().
filter
(
sCoupon
->
sCoupon
.
getId
().
equals
(
sConsumerCoupon
.
getCouponId
())).
findFirst
().
ifPresent
(
sConsumer
->
{
item
.
setCouponSkuId
(
String
.
valueOf
(
sConsumer
.
getDealgroupId
()));
});
}
}
else
if
(
sConsumerCoupon
.
getPlatformType
().
equals
(
PlatformTypeEnum
.
TIKTOK
.
getCode
()))
{
if
(!
ObjectUtils
.
isEmpty
(
sConsumerCoupon
.
getTiktokSkuId
()))
{
item
.
setCouponSkuId
(
sConsumerCoupon
.
getTiktokSkuId
());
}
else
{
list
.
stream
().
filter
(
sCoupon
->
sCoupon
.
getId
().
equals
(
sConsumerCoupon
.
getCouponId
())).
findFirst
().
ifPresent
(
sConsumer
->
{
item
.
setCouponSkuId
(
sConsumer
.
getTiktokSkuId
());
});
}
}
});
}
}
sOrderVos
.
sort
(
Comparator
.
comparing
(
SOrderVo:
:
getCreateTime
).
reversed
());
return
sOrderVos
;
}
/**
/**
* 新增订单
* 新增订单
*
*
...
...
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