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
3c2a2bf7
Commit
3c2a2bf7
authored
Aug 22, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
门店增加状态:筹备中/维护中 门店列表可显示,不能点击进入,不显示有人预定,当前维护中更改为下线
parent
d9286e68
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
11 deletions
+26
-11
StoreStatusEnum.java
...mon/src/main/java/share/common/enums/StoreStatusEnum.java
+2
-0
SStoreServiceImpl.java
...ain/java/share/system/service/impl/SStoreServiceImpl.java
+23
-10
SOrderMapper.xml
...-system/src/main/resources/mapper/system/SOrderMapper.xml
+1
-1
No files found.
share-common/src/main/java/share/common/enums/StoreStatusEnum.java
View file @
3c2a2bf7
...
...
@@ -4,6 +4,8 @@ public enum StoreStatusEnum {
// 0:停业 1:正常营业
STOP
(
"0"
,
"停业"
),
NORMAL
(
"1"
,
"正常营业"
),
//维修中
REPAIR
(
"2"
,
"维修中"
),
;
private
String
index
;
...
...
share-system/src/main/java/share/system/service/impl/SStoreServiceImpl.java
View file @
3c2a2bf7
...
...
@@ -198,7 +198,7 @@ public class SStoreServiceImpl extends ServiceImpl<SStoreMapper, SStore> impleme
@Override
public
int
updateSStore
(
SStore
sStore
)
{
sStore
.
setUpdateTime
(
DateUtils
.
getNowDate
());
if
(
sStore
.
getStatus
().
equals
(
YesNoEnum
.
no
.
getIndex
().
toString
()))
{
if
(
sStore
.
getStatus
().
equals
(
StoreStatusEnum
.
STOP
.
getIndex
()))
{
//判断门店下是否有已支付.待使用,使用中订单
LambdaQueryWrapper
<
SOrder
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
SOrder:
:
getStoreId
,
sStore
.
getId
());
...
...
@@ -278,10 +278,15 @@ public class SStoreServiceImpl extends ServiceImpl<SStoreMapper, SStore> impleme
request
.
setStatus
(
YesNoEnum
.
yes
.
getIndex
().
toString
());
}
listVoCheck
(
request
);
SStore
store
=
new
SStore
();
store
.
setStatus
(
request
.
getStatus
());
store
.
setName
(
request
.
getName
());
List
<
SStore
>
storeList
=
baseMapper
.
selectSStoreList
(
store
);
// SStore store = new SStore();
// store.setStatus(request.getStatus());
// store.setName(request.getName());
LambdaQueryWrapper
<
SStore
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
ne
(
SStore:
:
getStatus
,
StoreStatusEnum
.
STOP
.
getIndex
());
if
(
StringUtils
.
isNotEmpty
(
request
.
getName
()))
{
queryWrapper
.
eq
(
SStore:
:
getName
,
request
.
getName
());
}
List
<
SStore
>
storeList
=
baseMapper
.
selectList
(
queryWrapper
);
List
<
SStoreVo
>
voList
=
new
ArrayList
<>();
if
(
StringUtils
.
isNotBlank
(
request
.
getNowLongitude
()))
{
voList
=
convertDosToVosSortByDst
(
storeList
,
request
);
...
...
@@ -333,12 +338,19 @@ public class SStoreServiceImpl extends ServiceImpl<SStoreMapper, SStore> impleme
}
vo
.
setOrderType
(
order
.
getOrderType
());
}
else
{
vo
.
setOrderTimeType
(
2
);
vo
.
setOrderTime
(
3L
);
if
(
o
.
getStatus
().
equals
(
StoreStatusEnum
.
REPAIR
.
getIndex
()))
{
vo
.
setOrderTimeType
(
0
);
vo
.
setOrderTime
(
0L
);
}
else
{
vo
.
setOrderTimeType
(
2
);
vo
.
setOrderTime
(
3L
);
}
}
voList
.
add
(
vo
);
});
return
voList
.
stream
().
sorted
(
Comparator
.
comparing
(
storeVo
->
Double
.
parseDouble
(
storeVo
.
getDistance
()))).
collect
(
Collectors
.
toList
());
//排序条件 getStatus()从小到大并且getDistance()从小到大
voList
.
sort
(
Comparator
.
comparing
(
SStoreVo:
:
getStatus
).
thenComparing
(
SStoreVo:
:
getDistance
));
// voList.stream().sorted(Comparator.comparing(storeVo -> Double.parseDouble(storeVo.getDistance()))).collect(Collectors.toList());
}
return
voList
;
}
...
...
@@ -562,8 +574,9 @@ public class SStoreServiceImpl extends ServiceImpl<SStoreMapper, SStore> impleme
List
<
SOrder
>
orderList
=
list
.
stream
().
filter
(
order
->
order
.
getRoomId
().
compareTo
(
room
.
getId
())
==
0
&&
order
.
getStatus
().
equals
(
OrderStatusEnum
.
UNUSED
.
getCode
())
//预约开始时间是今天的
&&
DateUtil
.
isSameDay
(
order
.
getPreStartDate
(),
DateUtil
.
date
())
//预约开始时间是当前时间至之后的12小时内
&&
order
.
getPreStartDate
().
compareTo
(
new
Date
())
>=
0
&&
order
.
getPreStartDate
().
compareTo
(
DateUtils
.
addHours
(
new
Date
(),
12
))
<=
0
).
collect
(
Collectors
.
toList
());
//按照预约开始时间排序
orderList
.
sort
(
Comparator
.
comparing
(
SOrder:
:
getPreStartDate
));
...
...
share-system/src/main/resources/mapper/system/SOrderMapper.xml
View file @
3c2a2bf7
...
...
@@ -166,7 +166,7 @@
and DATE_FORMAT(pre_start_date, '%Y-%m-%d')
>
= DATE_FORMAT(#{preStartDate}, '%Y-%m-%d')
</if>
<if
test=
"preEndDate != null"
>
and DATE_FORMAT(pre_
end
_date, '%Y-%m-%d')
<
= DATE_FORMAT(#{preEndDate}, '%Y-%m-%d')
and DATE_FORMAT(pre_
start
_date, '%Y-%m-%d')
<
= DATE_FORMAT(#{preEndDate}, '%Y-%m-%d')
</if>
<if
test=
"startDate != null"
>
and DATE_FORMAT(create_time, '%Y-%m-%d')
>
= DATE_FORMAT(#{startDate}, '%Y-%m-%d')
...
...
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