Toggle navigation
Toggle navigation
This project
Loading...
Sign in
jiujian
/
client-customer-order-service
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:49:14 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ff8e9a8fb1ab183aa02c2adfdc8eafb7be6b7d47
ff8e9a8f
1 parent
d00cb3a6
add isAllocation
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
1 deletions
sql/table.sql
src/main/java/com/tianting/infoloop/model/db/OrderDb.java
src/main/java/com/tianting/infoloop/service/impl/OrderDbServiceImpl.java
src/main/proto/ClientCustomerOrderService.proto
sql/table.sql
View file @
ff8e9a8
...
...
@@ -50,7 +50,8 @@ CREATE TABLE `client_customer_orders` (
ALTER
TABLE
`client_customer_orders`
ADD
COLUMN
`closeTimeType`
tinyint
(
4
)
NOT
NULL
COMMENT
'餐单截单类型;0:立即,1:预定'
AFTER
`menuId`
,
ADD
COLUMN
`isRead`
tinyint
(
1
)
NOT
NULL
DEFAULT
0
COMMENT
'是否已读;0:未读,1:已读'
AFTER
`isDeleted`
,
ADD
COLUMN
`isConfirm`
TINYINT
(
1
)
NOT
NULL
DEFAULT
0
COMMENT
'是否确认;0:未确认,1:已确认'
AFTER
`isRead`
;
ADD
COLUMN
`isConfirm`
TINYINT
(
1
)
NOT
NULL
DEFAULT
0
COMMENT
'是否确认;0:未确认,1:已确认'
AFTER
`isRead`
,
ADD
COLUMN
`isAllocation`
tinyint
(
1
)
NOT
NULL
DEFAULT
0
COMMENT
'是否调拨;0:未调拨,1:已调拨'
AFTER
`isConfirm`
;
CREATE
TABLE
`client_customer_order_details`
(
`id`
INT
AUTO_INCREMENT
PRIMARY
KEY
COMMENT
'订单详情表主键,自增整数'
,
...
...
src/main/java/com/tianting/infoloop/model/db/OrderDb.java
View file @
ff8e9a8
...
...
@@ -167,4 +167,9 @@ public class OrderDb extends Model<OrderDb> implements Serializable {
private
Integer
closeTimeType
;
private
Boolean
isConfirm
;
/**
* 是否调拨至厨房
*/
private
Boolean
isAllocation
;
}
\ No newline at end of file
...
...
src/main/java/com/tianting/infoloop/service/impl/OrderDbServiceImpl.java
View file @
ff8e9a8
...
...
@@ -116,6 +116,7 @@ public class OrderDbServiceImpl extends ServiceImpl<OrderDbMapper, OrderDb> impl
orderDb
.
setIsRead
(
createOrderRpcRequest
.
getCreation
().
getIsRead
());
orderDb
.
setIsDeleted
(
false
);
orderDb
.
setIsConfirm
(
false
);
orderDb
.
setIsAllocation
(
false
);
boolean
res
=
this
.
save
(
orderDb
);
if
(!
res
)
{
...
...
@@ -322,6 +323,7 @@ public class OrderDbServiceImpl extends ServiceImpl<OrderDbMapper, OrderDb> impl
orderDb
.
setIsRead
(
creation
.
getIsRead
());
orderDb
.
setIsDeleted
(
false
);
orderDb
.
setIsConfirm
(
false
);
orderDb
.
setIsAllocation
(
false
);
boolean
res
=
this
.
save
(
orderDb
);
if
(!
res
)
{
throw
ServiceExceptionUtil
.
exception
(
ErrorCodeConstants
.
ORDER_GEN_FAIL
);
...
...
@@ -468,6 +470,9 @@ public class OrderDbServiceImpl extends ServiceImpl<OrderDbMapper, OrderDb> impl
if
(
updateOrderRequest
.
getModification
().
getShouldUpdateOpenId
())
{
orderDb
.
setIsConfirm
(
updateOrderRequest
.
getModification
().
getIsConfirm
());
}
if
(
updateOrderRequest
.
getModification
().
getShouldUpdateIsAllocation
())
{
orderDb
.
setIsAllocation
(
updateOrderRequest
.
getModification
().
getIsAllocation
());
}
return
orderDbMapper
.
updateById
(
orderDb
)
>
0
;
}
...
...
@@ -560,6 +565,9 @@ public class OrderDbServiceImpl extends ServiceImpl<OrderDbMapper, OrderDb> impl
if
(
modification
.
getShouldUpdateIsConfirm
())
{
orderDb
.
setIsConfirm
(
modification
.
getIsConfirm
());
}
if
(
modification
.
getShouldUpdateIsAllocation
())
{
orderDb
.
setIsAllocation
(
modification
.
getIsAllocation
());
}
return
orderDb
;
}).
collect
(
Collectors
.
toList
());
return
SpringUtil
.
getBean
(
OrderDbServiceImpl
.
class
).
updateBatchById
(
list
);
...
...
src/main/proto/ClientCustomerOrderService.proto
View file @
ff8e9a8
...
...
@@ -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