Showing
3 changed files
with
5 additions
and
1 deletions
| ... | @@ -31,7 +31,6 @@ import org.springframework.web.bind.annotation.RestController; | ... | @@ -31,7 +31,6 @@ import org.springframework.web.bind.annotation.RestController; |
| 31 | public class ClientOrderController { | 31 | public class ClientOrderController { |
| 32 | private final OrderService orderService; | 32 | private final OrderService orderService; |
| 33 | 33 | ||
| 34 | - @SaIgnore | ||
| 35 | @ApiOperation(value = "院区端分页获取用户订单") | 34 | @ApiOperation(value = "院区端分页获取用户订单") |
| 36 | @PostMapping("/client/orders/pagination") | 35 | @PostMapping("/client/orders/pagination") |
| 37 | @ResponseStatus(HttpStatus.OK) | 36 | @ResponseStatus(HttpStatus.OK) | ... | ... |
| ... | @@ -55,6 +55,7 @@ public class OrderServiceRpcClient { | ... | @@ -55,6 +55,7 @@ public class OrderServiceRpcClient { |
| 55 | private final ClientCustomerOrderServiceRpcGrpc.ClientCustomerOrderServiceRpcBlockingStub orderServiceRpcBlockingStub; | 55 | private final ClientCustomerOrderServiceRpcGrpc.ClientCustomerOrderServiceRpcBlockingStub orderServiceRpcBlockingStub; |
| 56 | private final MenuServiceRpcClient menuServiceRpcClient; | 56 | private final MenuServiceRpcClient menuServiceRpcClient; |
| 57 | private final SkuServiceRpcClient skuServiceRpcClient; | 57 | private final SkuServiceRpcClient skuServiceRpcClient; |
| 58 | + private final OperatorServiceRpcClient operatorServiceRpcClient; | ||
| 58 | 59 | ||
| 59 | public List<SingleClientCustomerOrderRpcResponse> getOrdersByCustomerId(Integer customerId) { | 60 | public List<SingleClientCustomerOrderRpcResponse> getOrdersByCustomerId(Integer customerId) { |
| 60 | return orderServiceRpcBlockingStub.getClientCustomerOrdersByCustomerId( | 61 | return orderServiceRpcBlockingStub.getClientCustomerOrdersByCustomerId( |
| ... | @@ -205,6 +206,8 @@ public class OrderServiceRpcClient { | ... | @@ -205,6 +206,8 @@ public class OrderServiceRpcClient { |
| 205 | 206 | ||
| 206 | public QueryClientCustomerOrdersByPaginationRpcResponse queryClientCustomerOrdersByPagination( | 207 | public QueryClientCustomerOrdersByPaginationRpcResponse queryClientCustomerOrdersByPagination( |
| 207 | QueryOrderByPaginationDto queryOrderDto) { | 208 | QueryOrderByPaginationDto queryOrderDto) { |
| 209 | + final var operatorLoginInfo = LoginContextHolder.getLoginInfo(); | ||
| 210 | + final var operator = operatorServiceRpcClient.getCOperatorById(operatorLoginInfo.getId()); | ||
| 208 | final var request = QueryClientCustomerOrdersByPaginationRpcRequest.newBuilder() | 211 | final var request = QueryClientCustomerOrdersByPaginationRpcRequest.newBuilder() |
| 209 | .setKeyword(queryOrderDto.getKeyword()) | 212 | .setKeyword(queryOrderDto.getKeyword()) |
| 210 | .setPageNo(queryOrderDto.getPn()) | 213 | .setPageNo(queryOrderDto.getPn()) |
| ... | @@ -212,6 +215,7 @@ public class OrderServiceRpcClient { | ... | @@ -212,6 +215,7 @@ public class OrderServiceRpcClient { |
| 212 | .setStatus(queryOrderDto.getStatus()) | 215 | .setStatus(queryOrderDto.getStatus()) |
| 213 | .setEnterpriseId(queryOrderDto.getEnterpriseId()) | 216 | .setEnterpriseId(queryOrderDto.getEnterpriseId()) |
| 214 | .setClientId(queryOrderDto.getClientId()) | 217 | .setClientId(queryOrderDto.getClientId()) |
| 218 | + .addAllStallIds(List.of(operator.getStallId())) | ||
| 215 | .build(); | 219 | .build(); |
| 216 | return orderServiceRpcBlockingStub.queryClientCustomerOrdersByPagination(request); | 220 | return orderServiceRpcBlockingStub.queryClientCustomerOrdersByPagination(request); |
| 217 | } | 221 | } | ... | ... |
| ... | @@ -159,6 +159,7 @@ message QueryClientCustomerOrdersByPaginationRpcRequest { | ... | @@ -159,6 +159,7 @@ message QueryClientCustomerOrdersByPaginationRpcRequest { |
| 159 | int32 enterpriseId = 4; | 159 | int32 enterpriseId = 4; |
| 160 | int32 pageNo = 5; | 160 | int32 pageNo = 5; |
| 161 | int32 pageSize = 6; | 161 | int32 pageSize = 6; |
| 162 | + repeated int32 stallIds = 7; | ||
| 162 | } | 163 | } |
| 163 | 164 | ||
| 164 | message OrderCountByStatus { | 165 | message OrderCountByStatus { | ... | ... |
-
Please register or login to post a comment