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
7c3fefce
Commit
7c3fefce
authored
Mar 13, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改美团获取有效期为空的解决方法
parent
a8e3bd0b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
8 deletions
+25
-8
SOrderVo.java
...system/src/main/java/share/system/domain/vo/SOrderVo.java
+7
-0
QPServiceImpl.java
...rc/main/java/share/system/service/impl/QPServiceImpl.java
+16
-6
SCouponServiceImpl.java
...in/java/share/system/service/impl/SCouponServiceImpl.java
+2
-2
No files found.
share-system/src/main/java/share/system/domain/vo/SOrderVo.java
View file @
7c3fefce
...
...
@@ -111,6 +111,13 @@ public class SOrderVo
@ApiModelProperty
(
value
=
"结束时间"
)
private
Date
endDate
;
/**
* 到店时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
name
=
"到店时间"
)
private
Date
arrivalTime
;
/** 订单状态(0:待使用/已预约,1:使用中,2:已使用,3:已取消预约/退款中,4:审核中,5:已退费) */
@ApiModelProperty
(
value
=
"订单状态(0:待使用/已预约,1:使用中,2:已使用,3:已取消预约/申请退款,4:退款中,5:已退费)"
)
private
Integer
status
;
...
...
share-system/src/main/java/share/system/service/impl/QPServiceImpl.java
View file @
7c3fefce
...
...
@@ -44,10 +44,7 @@ import share.system.service.QPService;
import
javax.annotation.Resource
;
import
java.math.BigDecimal
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Optional
;
import
java.util.UUID
;
import
java.util.*
;
import
java.util.concurrent.TimeUnit
;
@Service
...
...
@@ -134,14 +131,27 @@ public class QPServiceImpl implements QPService {
List
<
TuangouDealQueryShopDealResponseEntity
>
groupActivities
=
queryshopdeal
(
sStore
.
getOpenShopUuid
());
groupActivities
.
forEach
(
o
->
{
//套餐名称相同并且在售卖中
if
(
prepare
.
getDealgroup_id
().
equals
(
o
.
getDealgroup_id
())
&&
saleStatusEnum
.
SELLING
.
getCode
().
equals
(
o
.
getSale_status
())
)
{
if
(
prepare
.
getDealgroup_id
().
equals
(
o
.
getDealgroup_id
()))
{
Date
receiptEndDate
=
DateUtil
.
parse
(
o
.
getReceipt_end_date
(),
DatePattern
.
NORM_DATETIME_MINUTE_PATTERN
);
Date
receiptBeginDate
=
DateUtil
.
parse
(
o
.
getReceipt_begin_date
(),
DatePattern
.
NORM_DATETIME_MINUTE_PATTERN
);
sConsumerCoupon
.
setStartDate
(
receiptBeginDate
);
sConsumerCoupon
.
setEndDate
(
receiptEndDate
);
}
});
if
(
ObjectUtils
.
isEmpty
(
sConsumerCoupon
.
getStartDate
()))
{
//获取本日的00:00:00
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
set
(
Calendar
.
HOUR_OF_DAY
,
0
);
calendar
.
set
(
Calendar
.
MINUTE
,
0
);
calendar
.
set
(
Calendar
.
SECOND
,
0
);
calendar
.
set
(
Calendar
.
MILLISECOND
,
0
);
Date
startOfDay
=
calendar
.
getTime
();
sConsumerCoupon
.
setStartDate
(
startOfDay
);
}
if
(
ObjectUtils
.
isEmpty
(
sConsumerCoupon
.
getEndDate
()))
{
//当前时间加上一年
sConsumerCoupon
.
setEndDate
(
DateUtils
.
addYears
(
new
Date
(),
1
));
}
List
<
SCoupon
>
sCoupons
=
isCouponService
.
selectSCouponByDealgroupId
(
prepare
.
getDealgroup_id
());
SCoupon
sCoupon
=
null
;
if
(!
CollectionUtils
.
isEmpty
(
sCoupons
))
{
...
...
share-system/src/main/java/share/system/service/impl/SCouponServiceImpl.java
View file @
7c3fefce
...
...
@@ -200,7 +200,7 @@ public class SCouponServiceImpl extends ServiceImpl<SCouponMapper, SCoupon> impl
List
<
TuangouDealQueryShopDealResponseEntity
>
queryshopdeal
=
qpService
.
queryshopdeal
(
openShopUuid
);
if
(!
CollectionUtils
.
isEmpty
(
queryshopdeal
))
{
queryshopdeal
.
stream
().
forEach
(
item
->
{
if
(
TWO
.
equals
(
item
.
getSale_status
()))
{
//
if (TWO.equals(item.getSale_status())) {
SCoupon
sCoupon1
=
sCouponList
.
get
(
item
.
getDealgroup_id
());
if
(
ObjectUtils
.
isEmpty
(
sCoupon1
))
{
SCoupon
sCoupon
=
new
SCoupon
();
...
...
@@ -234,7 +234,7 @@ public class SCouponServiceImpl extends ServiceImpl<SCouponMapper, SCoupon> impl
}
else
{
sCoupon1
.
setStoreIds
(
sCoupon1
.
getStoreIds
()
+
","
+
sStores
.
stream
().
filter
(
store
->
store
.
getOpenShopUuid
().
equals
(
openShopUuid
)).
findFirst
().
get
().
getId
());
}
}
//
}
});
}
});
...
...
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