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
712a9911
Commit
712a9911
authored
Aug 27, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改数据统计的数据量
parent
5a723c63
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
12 deletions
+26
-12
SOrderController.java
...in/java/share/web/controller/system/SOrderController.java
+7
-2
OrderStatisticsRequest.java
...ain/java/share/system/request/OrderStatisticsRequest.java
+10
-1
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+9
-9
No files found.
share-front/src/main/java/share/web/controller/system/SOrderController.java
View file @
712a9911
...
@@ -15,6 +15,7 @@ import share.common.utils.JsonConvertUtil;
...
@@ -15,6 +15,7 @@ import share.common.utils.JsonConvertUtil;
import
share.system.domain.SOrder
;
import
share.system.domain.SOrder
;
import
share.system.domain.vo.OrderVo
;
import
share.system.domain.vo.OrderVo
;
import
share.system.domain.vo.SOrderVo
;
import
share.system.domain.vo.SOrderVo
;
import
share.system.mapper.SStoreConsumerMapper
;
import
share.system.request.CreateOrderRequest
;
import
share.system.request.CreateOrderRequest
;
import
share.system.request.OrderComputedPriceRequest
;
import
share.system.request.OrderComputedPriceRequest
;
import
share.system.request.OrderRefundRequest
;
import
share.system.request.OrderRefundRequest
;
...
@@ -43,6 +44,8 @@ public class SOrderController extends BaseController
...
@@ -43,6 +44,8 @@ public class SOrderController extends BaseController
private
ISOrderService
sOrderService
;
private
ISOrderService
sOrderService
;
@Autowired
@Autowired
private
RedisUtil
redisUtil
;
private
RedisUtil
redisUtil
;
@Autowired
private
SStoreConsumerMapper
storeConsumerMapper
;
/**
/**
* 查询订单列表
* 查询订单列表
...
@@ -148,8 +151,10 @@ public class SOrderController extends BaseController
...
@@ -148,8 +151,10 @@ public class SOrderController extends BaseController
return
R
.
ok
(
sOrderService
.
statistics
(
request
));
return
R
.
ok
(
sOrderService
.
statistics
(
request
));
}
}
@PostMapping
(
"/statistics/orderList"
)
// @PostMapping("/statistics/orderList")
public
R
<
List
<
OrderVo
>>
statisticsOrderList
(
@RequestBody
OrderStatisticsRequest
request
)
{
@RequestMapping
(
value
=
"/statistics/orderList"
,
method
=
RequestMethod
.
GET
)
public
R
<
List
<
OrderVo
>>
statisticsOrderList
(
OrderStatisticsRequest
request
)
{
startPage
();
return
R
.
ok
(
sOrderService
.
statisticsOrderList
(
request
));
return
R
.
ok
(
sOrderService
.
statisticsOrderList
(
request
));
}
}
...
...
share-system/src/main/java/share/system/request/OrderStatisticsRequest.java
View file @
712a9911
package
share
.
system
.
request
;
package
share
.
system
.
request
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.Date
;
@Data
@Data
public
class
OrderStatisticsRequest
{
@EqualsAndHashCode
(
callSuper
=
false
)
@Accessors
(
chain
=
true
)
@ApiModel
(
value
=
"OrderStatisticsRequest对象"
,
description
=
"门店数据查询请求对象"
)
public
class
OrderStatisticsRequest
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
//门店id
//门店id
private
Long
storeId
;
private
Long
storeId
;
//开始时间
//开始时间
...
...
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
712a9911
...
@@ -3080,18 +3080,9 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -3080,18 +3080,9 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
@Override
@Override
public
List
<
OrderVo
>
statisticsOrderList
(
OrderStatisticsRequest
request
)
{
public
List
<
OrderVo
>
statisticsOrderList
(
OrderStatisticsRequest
request
)
{
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
List
<
OrderVo
>
orderVoList
=
new
ArrayList
<>();
if
(!
user
.
getRoleType
().
equals
(
RoleTypeEnum
.
CLEANER
.
getCode
()))
{
if
(!
user
.
getRoleType
().
equals
(
RoleTypeEnum
.
CLEANER
.
getCode
()))
{
throw
new
RuntimeException
(
"当前用户不是店员"
);
throw
new
RuntimeException
(
"当前用户不是店员"
);
}
}
List
<
Long
>
longs
=
storeConsumerMapper
.
selectByConsumerId
(
user
.
getId
(),
PositionEnum
.
MANAGE
.
getCode
());
if
(
CollectionUtils
.
isEmpty
(
longs
))
{
throw
new
RuntimeException
(
"当前用户不是门店管理人员"
);
}
//判断longs是否包含request.getStoreId()
if
(!
longs
.
contains
(
request
.
getStoreId
()))
{
throw
new
RuntimeException
(
"当前用户不是该门店管理人员"
);
}
List
<
SOrder
>
orderList
=
baseMapper
.
selectList
(
new
LambdaQueryWrapper
<
SOrder
>()
List
<
SOrder
>
orderList
=
baseMapper
.
selectList
(
new
LambdaQueryWrapper
<
SOrder
>()
.
eq
(
SOrder:
:
getStoreId
,
request
.
getStoreId
())
.
eq
(
SOrder:
:
getStoreId
,
request
.
getStoreId
())
.
eq
(
SOrder:
:
getIsDelete
,
YesNoEnum
.
no
.
getIndex
())
.
eq
(
SOrder:
:
getIsDelete
,
YesNoEnum
.
no
.
getIndex
())
...
@@ -3100,9 +3091,18 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -3100,9 +3091,18 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
.
le
(
SOrder:
:
getCreateTime
,
request
.
getEndTime
())
.
le
(
SOrder:
:
getCreateTime
,
request
.
getEndTime
())
.
orderByDesc
(
SOrder:
:
getCreateTime
)
.
orderByDesc
(
SOrder:
:
getCreateTime
)
);
);
List
<
OrderVo
>
orderVoList
=
new
ArrayList
<>();
if
(
CollectionUtil
.
isEmpty
(
orderList
))
{
if
(
CollectionUtil
.
isEmpty
(
orderList
))
{
return
new
ArrayList
<>();
return
new
ArrayList
<>();
}
}
List
<
Long
>
longs
=
storeConsumerMapper
.
selectByConsumerId
(
user
.
getId
(),
PositionEnum
.
MANAGE
.
getCode
());
if
(
CollectionUtils
.
isEmpty
(
longs
))
{
throw
new
RuntimeException
(
"当前用户不是门店管理人员"
);
}
//判断longs是否包含request.getStoreId()
if
(!
longs
.
contains
(
request
.
getStoreId
()))
{
throw
new
RuntimeException
(
"当前用户不是该门店管理人员"
);
}
Map
<
Long
,
SCoupon
>
sCouponMap
=
sCouponService
.
list
().
stream
().
collect
(
Collectors
.
toMap
(
SCoupon:
:
getId
,
Function
.
identity
()));
Map
<
Long
,
SCoupon
>
sCouponMap
=
sCouponService
.
list
().
stream
().
collect
(
Collectors
.
toMap
(
SCoupon:
:
getId
,
Function
.
identity
()));
Map
<
Long
,
SStore
>
sStoreMap
=
storeService
.
list
().
stream
().
collect
(
Collectors
.
toMap
(
SStore:
:
getId
,
Function
.
identity
()));
Map
<
Long
,
SStore
>
sStoreMap
=
storeService
.
list
().
stream
().
collect
(
Collectors
.
toMap
(
SStore:
:
getId
,
Function
.
identity
()));
Map
<
Long
,
SRoom
>
sRoomMap
=
roomService
.
list
().
stream
().
collect
(
Collectors
.
toMap
(
SRoom:
:
getId
,
Function
.
identity
()));
Map
<
Long
,
SRoom
>
sRoomMap
=
roomService
.
list
().
stream
().
collect
(
Collectors
.
toMap
(
SRoom:
:
getId
,
Function
.
identity
()));
...
...
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