Toggle navigation
Toggle navigation
This project
Loading...
Sign in
jiujian
/
client-customer-order-api
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
wangyingyang
2024-12-03 12:23:47 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
1240bc56e6a3c005d7cf41a547b04e0da83a1e1c
1240bc56
1 parent
7787a5c0
fix
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
1 deletions
src/main/java/com/infoloop/tianting/controller/ClientOrderController.java
src/main/java/com/infoloop/tianting/service/client/OrderServiceRpcClient.java
src/main/proto/ClientCustomerOrderService.proto
src/main/java/com/infoloop/tianting/controller/ClientOrderController.java
View file @
1240bc5
...
...
@@ -31,7 +31,6 @@ import org.springframework.web.bind.annotation.RestController;
public
class
ClientOrderController
{
private
final
OrderService
orderService
;
@SaIgnore
@ApiOperation
(
value
=
"院区端分页获取用户订单"
)
@PostMapping
(
"/client/orders/pagination"
)
@ResponseStatus
(
HttpStatus
.
OK
)
...
...
src/main/java/com/infoloop/tianting/service/client/OrderServiceRpcClient.java
View file @
1240bc5
...
...
@@ -55,6 +55,7 @@ public class OrderServiceRpcClient {
private
final
ClientCustomerOrderServiceRpcGrpc
.
ClientCustomerOrderServiceRpcBlockingStub
orderServiceRpcBlockingStub
;
private
final
MenuServiceRpcClient
menuServiceRpcClient
;
private
final
SkuServiceRpcClient
skuServiceRpcClient
;
private
final
OperatorServiceRpcClient
operatorServiceRpcClient
;
public
List
<
SingleClientCustomerOrderRpcResponse
>
getOrdersByCustomerId
(
Integer
customerId
)
{
return
orderServiceRpcBlockingStub
.
getClientCustomerOrdersByCustomerId
(
...
...
@@ -205,6 +206,8 @@ public class OrderServiceRpcClient {
public
QueryClientCustomerOrdersByPaginationRpcResponse
queryClientCustomerOrdersByPagination
(
QueryOrderByPaginationDto
queryOrderDto
)
{
final
var
operatorLoginInfo
=
LoginContextHolder
.
getLoginInfo
();
final
var
operator
=
operatorServiceRpcClient
.
getCOperatorById
(
operatorLoginInfo
.
getId
());
final
var
request
=
QueryClientCustomerOrdersByPaginationRpcRequest
.
newBuilder
()
.
setKeyword
(
queryOrderDto
.
getKeyword
())
.
setPageNo
(
queryOrderDto
.
getPn
())
...
...
@@ -212,6 +215,7 @@ public class OrderServiceRpcClient {
.
setStatus
(
queryOrderDto
.
getStatus
())
.
setEnterpriseId
(
queryOrderDto
.
getEnterpriseId
())
.
setClientId
(
queryOrderDto
.
getClientId
())
.
addAllStallIds
(
List
.
of
(
operator
.
getStallId
()))
.
build
();
return
orderServiceRpcBlockingStub
.
queryClientCustomerOrdersByPagination
(
request
);
}
...
...
src/main/proto/ClientCustomerOrderService.proto
View file @
1240bc5
...
...
@@ -159,6 +159,7 @@ message QueryClientCustomerOrdersByPaginationRpcRequest {
int32
enterpriseId
=
4
;
int32
pageNo
=
5
;
int32
pageSize
=
6
;
repeated
int32
stallIds
=
7
;
}
message
OrderCountByStatus
{
...
...
Please
register
or
login
to post a comment