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-11-20 13:56:25 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4f2795661dcd742bffb3d391ce0c4ea5e5d4c4c4
4f279566
1 parent
ce6a3b90
fix order
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
4 deletions
src/main/java/com/infoloop/tianting/model/dto/OrderDbDTO.java
src/main/java/com/infoloop/tianting/service/client/OrderServiceRpcClient.java
src/main/java/com/infoloop/tianting/service/impl/OrderServiceImpl.java
src/main/proto/ClientCustomerOrderService.proto
src/main/java/com/infoloop/tianting/model/dto/OrderDbDTO.java
View file @
4f27956
...
...
@@ -195,7 +195,7 @@ public class OrderDbDTO {
private
Boolean
shouldCreateOpenId
;
@ApiModelProperty
(
value
=
"阳光厅点餐客户 ID"
)
private
String
openId
;
private
String
openId
=
""
;
@ApiModelProperty
(
value
=
"状态订单;待备餐=1,备餐中=2,部分出餐=3,已出餐=4,已取消=5"
)
private
Integer
status
;
...
...
@@ -207,7 +207,7 @@ public class OrderDbDTO {
private
Integer
totalNum
;
@ApiModelProperty
(
value
=
"实际支付金额,单位为分"
)
private
Integer
payPrice
;
private
Integer
payPrice
=
0
;
@ApiModelProperty
(
value
=
"是否在线付费;0=未付费,1=付费"
)
private
Boolean
onlinePay
;
...
...
src/main/java/com/infoloop/tianting/service/client/OrderServiceRpcClient.java
View file @
4f27956
...
...
@@ -237,7 +237,7 @@ public class OrderServiceRpcClient {
.
setShowName
(
orderDetailDto
.
getShowName
())
.
setPrice
(
orderDetailDto
.
getPrice
())
.
setMealDetailJson
(
mealDetail
)
.
setAdjustSkuRemark
(
orderDetailDto
.
getAdjustSkuRemark
())
//
.setAdjustSkuRemark(orderDetailDto.getAdjustSkuRemark())
.
setNotServe
(
orderDetailDto
.
getNotServe
())
.
setShouldCreateAdjustSkuRemark
(
true
)
.
setShouldCreatePrice
(
true
)
...
...
src/main/java/com/infoloop/tianting/service/impl/OrderServiceImpl.java
View file @
4f27956
...
...
@@ -22,6 +22,7 @@ import com.infoloop.tianting.model.dto.OrderDbDTO.CreateOrderResponse;
import
com.infoloop.tianting.model.dto.OrderDbDTO.CustomerDetailDto
;
import
com.infoloop.tianting.model.dto.OrderDbDTO.CustomerNotice
;
import
com.infoloop.tianting.model.dto.OrderDbDTO.MealDetailDto
;
import
com.infoloop.tianting.model.dto.OrderDbDTO.OperatorCreateOrderDetailDto
;
import
com.infoloop.tianting.model.dto.OrderDbDTO.OperatorCreateOrderDto
;
import
com.infoloop.tianting.model.dto.OrderDbDTO.OrderAndDetailsDto
;
import
com.infoloop.tianting.model.dto.OrderDbDTO.OrderDetailBatchUpdateDto
;
...
...
@@ -73,6 +74,8 @@ public class OrderServiceImpl implements OrderService {
final
var
customer
=
clientCustomerServiceRpcClient
.
getClientCustomerById
(
operatorCreateOrderDto
.
getCustomerId
()).
getResponse
();
final
var
record
=
clientCustomerServiceRpcClient
.
getClientCustomerHospitalRecordsByCustomerId
(
customer
.
getEnterpriseId
(),
customer
.
getId
()).
getResponse
();
CreateOrderDto
createOrderDto
=
new
CreateOrderDto
();
createOrderDto
.
setShouldCreateCustomerId
(
true
);
createOrderDto
.
setShouldCreateOpenId
(
false
);
createOrderDto
.
setCustomerId
(
operatorCreateOrderDto
.
getCustomerId
());
createOrderDto
.
setStallId
(
operatorCreateOrderDto
.
getStallId
());
createOrderDto
.
setMenuId
(
operatorCreateOrderDto
.
getMenuId
());
...
...
@@ -129,7 +132,7 @@ public class OrderServiceImpl implements OrderService {
.
collect
(
Collectors
.
toList
());
final
var
rpcSkus
=
skuServiceRpcClient
.
getDishSkusByIds
(
skuIds
).
getResponseList
();
Integer
totalSkuCount
=
0
;
for
(
CreateOrderDetailDto
orderDetail:
c
reateOrderDto
.
getOrderDetailDtos
())
{
for
(
OperatorCreateOrderDetailDto
orderDetail:
operatorC
reateOrderDto
.
getOrderDetailDtos
())
{
totalSkuCount
+=
orderDetail
.
getCount
();
final
var
optionalTargetMenuDetail
=
menuDetails
.
stream
().
filter
(
detail
->
detail
.
getId
()
==
orderDetail
.
getMenuDetailId
()).
findFirst
();
if
(
optionalTargetMenuDetail
.
isEmpty
())
{
...
...
src/main/proto/ClientCustomerOrderService.proto
View file @
4f27956
...
...
@@ -112,6 +112,7 @@ message SingleClientCustomerOrderRpcResponse {
bool
isDeleted
=
32
;
bool
isRead
=
33
;
bool
isConfirm
=
34
;
bool
isAllocation
=
35
;
}
message
GetClientCustomerOrderByIdRpcRequest
{
...
...
@@ -205,6 +206,8 @@ message QueryClientCustomerOrdersByConditionRpcRequest {
bool
isRead
=
43
;
bool
shouldFilterIsConfirm
=
44
;
bool
isConfirm
=
45
;
bool
shouldFilterIsAllocation
=
46
;
bool
isAllocation
=
47
;
}
message
QueryClientCustomerOrdersByConditionRpcResponse
{
...
...
@@ -330,6 +333,8 @@ message ClientCustomerOrderModification {
bool
isRead
=
49
;
bool
shouldUpdateIsConfirm
=
50
;
bool
isConfirm
=
51
;
bool
shouldUpdateIsAllocation
=
52
;
bool
isAllocation
=
53
;
}
message
UpdateClientCustomerOrderRpcRequest
{
...
...
Please
register
or
login
to post a comment