wangyingyang

add isAllocation

...@@ -50,7 +50,8 @@ CREATE TABLE `client_customer_orders` ( ...@@ -50,7 +50,8 @@ CREATE TABLE `client_customer_orders` (
50 ALTER TABLE `client_customer_orders` 50 ALTER TABLE `client_customer_orders`
51 ADD COLUMN `closeTimeType` tinyint(4) NOT NULL COMMENT '餐单截单类型;0:立即,1:预定' AFTER `menuId`, 51 ADD COLUMN `closeTimeType` tinyint(4) NOT NULL COMMENT '餐单截单类型;0:立即,1:预定' AFTER `menuId`,
52 ADD COLUMN `isRead` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否已读;0:未读,1:已读' AFTER `isDeleted`, 52 ADD COLUMN `isRead` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否已读;0:未读,1:已读' AFTER `isDeleted`,
53 -ADD COLUMN `isConfirm` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否确认;0:未确认,1:已确认' AFTER `isRead`; 53 +ADD COLUMN `isConfirm` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否确认;0:未确认,1:已确认' AFTER `isRead`,
54 +ADD COLUMN `isAllocation` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否调拨;0:未调拨,1:已调拨' AFTER `isConfirm`;
54 55
55 CREATE TABLE `client_customer_order_details` ( 56 CREATE TABLE `client_customer_order_details` (
56 `id` INT AUTO_INCREMENT PRIMARY KEY COMMENT '订单详情表主键,自增整数', 57 `id` INT AUTO_INCREMENT PRIMARY KEY COMMENT '订单详情表主键,自增整数',
......
...@@ -167,4 +167,9 @@ public class OrderDb extends Model<OrderDb> implements Serializable { ...@@ -167,4 +167,9 @@ public class OrderDb extends Model<OrderDb> implements Serializable {
167 private Integer closeTimeType; 167 private Integer closeTimeType;
168 168
169 private Boolean isConfirm; 169 private Boolean isConfirm;
170 +
171 + /**
172 + * 是否调拨至厨房
173 + */
174 + private Boolean isAllocation;
170 } 175 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -116,6 +116,7 @@ public class OrderDbServiceImpl extends ServiceImpl<OrderDbMapper, OrderDb> impl ...@@ -116,6 +116,7 @@ public class OrderDbServiceImpl extends ServiceImpl<OrderDbMapper, OrderDb> impl
116 orderDb.setIsRead(createOrderRpcRequest.getCreation().getIsRead()); 116 orderDb.setIsRead(createOrderRpcRequest.getCreation().getIsRead());
117 orderDb.setIsDeleted(false); 117 orderDb.setIsDeleted(false);
118 orderDb.setIsConfirm(false); 118 orderDb.setIsConfirm(false);
119 + orderDb.setIsAllocation(false);
119 120
120 boolean res = this.save(orderDb); 121 boolean res = this.save(orderDb);
121 if (!res) { 122 if (!res) {
...@@ -322,6 +323,7 @@ public class OrderDbServiceImpl extends ServiceImpl<OrderDbMapper, OrderDb> impl ...@@ -322,6 +323,7 @@ public class OrderDbServiceImpl extends ServiceImpl<OrderDbMapper, OrderDb> impl
322 orderDb.setIsRead(creation.getIsRead()); 323 orderDb.setIsRead(creation.getIsRead());
323 orderDb.setIsDeleted(false); 324 orderDb.setIsDeleted(false);
324 orderDb.setIsConfirm(false); 325 orderDb.setIsConfirm(false);
326 + orderDb.setIsAllocation(false);
325 boolean res = this.save(orderDb); 327 boolean res = this.save(orderDb);
326 if (!res) { 328 if (!res) {
327 throw ServiceExceptionUtil.exception(ErrorCodeConstants.ORDER_GEN_FAIL); 329 throw ServiceExceptionUtil.exception(ErrorCodeConstants.ORDER_GEN_FAIL);
...@@ -468,6 +470,9 @@ public class OrderDbServiceImpl extends ServiceImpl<OrderDbMapper, OrderDb> impl ...@@ -468,6 +470,9 @@ public class OrderDbServiceImpl extends ServiceImpl<OrderDbMapper, OrderDb> impl
468 if (updateOrderRequest.getModification().getShouldUpdateOpenId()) { 470 if (updateOrderRequest.getModification().getShouldUpdateOpenId()) {
469 orderDb.setIsConfirm(updateOrderRequest.getModification().getIsConfirm()); 471 orderDb.setIsConfirm(updateOrderRequest.getModification().getIsConfirm());
470 } 472 }
473 + if (updateOrderRequest.getModification().getShouldUpdateIsAllocation()) {
474 + orderDb.setIsAllocation(updateOrderRequest.getModification().getIsAllocation());
475 + }
471 return orderDbMapper.updateById(orderDb) > 0; 476 return orderDbMapper.updateById(orderDb) > 0;
472 } 477 }
473 478
...@@ -560,6 +565,9 @@ public class OrderDbServiceImpl extends ServiceImpl<OrderDbMapper, OrderDb> impl ...@@ -560,6 +565,9 @@ public class OrderDbServiceImpl extends ServiceImpl<OrderDbMapper, OrderDb> impl
560 if (modification.getShouldUpdateIsConfirm()) { 565 if (modification.getShouldUpdateIsConfirm()) {
561 orderDb.setIsConfirm(modification.getIsConfirm()); 566 orderDb.setIsConfirm(modification.getIsConfirm());
562 } 567 }
568 + if (modification.getShouldUpdateIsAllocation()) {
569 + orderDb.setIsAllocation(modification.getIsAllocation());
570 + }
563 return orderDb; 571 return orderDb;
564 }).collect(Collectors.toList()); 572 }).collect(Collectors.toList());
565 return SpringUtil.getBean(OrderDbServiceImpl.class).updateBatchById(list); 573 return SpringUtil.getBean(OrderDbServiceImpl.class).updateBatchById(list);
......
...@@ -112,6 +112,7 @@ message SingleClientCustomerOrderRpcResponse { ...@@ -112,6 +112,7 @@ message SingleClientCustomerOrderRpcResponse {
112 bool isDeleted = 32; 112 bool isDeleted = 32;
113 bool isRead = 33; 113 bool isRead = 33;
114 bool isConfirm = 34; 114 bool isConfirm = 34;
115 + bool isAllocation = 35;
115 } 116 }
116 117
117 message GetClientCustomerOrderByIdRpcRequest { 118 message GetClientCustomerOrderByIdRpcRequest {
...@@ -205,6 +206,8 @@ message QueryClientCustomerOrdersByConditionRpcRequest { ...@@ -205,6 +206,8 @@ message QueryClientCustomerOrdersByConditionRpcRequest {
205 bool isRead = 43; 206 bool isRead = 43;
206 bool shouldFilterIsConfirm = 44; 207 bool shouldFilterIsConfirm = 44;
207 bool isConfirm = 45; 208 bool isConfirm = 45;
209 + bool shouldFilterIsAllocation = 46;
210 + bool isAllocation = 47;
208 } 211 }
209 212
210 message QueryClientCustomerOrdersByConditionRpcResponse { 213 message QueryClientCustomerOrdersByConditionRpcResponse {
...@@ -330,6 +333,8 @@ message ClientCustomerOrderModification { ...@@ -330,6 +333,8 @@ message ClientCustomerOrderModification {
330 bool isRead = 49; 333 bool isRead = 49;
331 bool shouldUpdateIsConfirm = 50; 334 bool shouldUpdateIsConfirm = 50;
332 bool isConfirm = 51; 335 bool isConfirm = 51;
336 + bool shouldUpdateIsAllocation = 52;
337 + bool isAllocation = 53;
333 } 338 }
334 339
335 message UpdateClientCustomerOrderRpcRequest { 340 message UpdateClientCustomerOrderRpcRequest {
......