wangyingyang

add is confirm

No preview for this file type
1 /.idea/ 1 /.idea/
2 /.gradle/ 2 /.gradle/
3 /build/ 3 /build/
4 +.DS_Store
5 +src/.DS_Store
6 +src/main/.DS_Store
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -49,7 +49,8 @@ CREATE TABLE `client_customer_orders` ( ...@@ -49,7 +49,8 @@ CREATE TABLE `client_customer_orders` (
49 49
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 54
54 CREATE TABLE `client_customer_order_details` ( 55 CREATE TABLE `client_customer_order_details` (
55 `id` INT AUTO_INCREMENT PRIMARY KEY COMMENT '订单详情表主键,自增整数', 56 `id` INT AUTO_INCREMENT PRIMARY KEY COMMENT '订单详情表主键,自增整数',
......
No preview for this file type
No preview for this file type
...@@ -165,4 +165,6 @@ public class OrderDb extends Model<OrderDb> implements Serializable { ...@@ -165,4 +165,6 @@ public class OrderDb extends Model<OrderDb> implements Serializable {
165 * 截单类型 165 * 截单类型
166 */ 166 */
167 private Integer closeTimeType; 167 private Integer closeTimeType;
168 +
169 + private Boolean isConfirm;
168 } 170 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -115,6 +115,7 @@ public class OrderDbServiceImpl extends ServiceImpl<OrderDbMapper, OrderDb> impl ...@@ -115,6 +115,7 @@ public class OrderDbServiceImpl extends ServiceImpl<OrderDbMapper, OrderDb> impl
115 orderDb.setCloseTimeType(createOrderRpcRequest.getCreation().getCloseTimeTypeValue()); 115 orderDb.setCloseTimeType(createOrderRpcRequest.getCreation().getCloseTimeTypeValue());
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 119
119 boolean res = this.save(orderDb); 120 boolean res = this.save(orderDb);
120 if (!res) { 121 if (!res) {
...@@ -320,6 +321,7 @@ public class OrderDbServiceImpl extends ServiceImpl<OrderDbMapper, OrderDb> impl ...@@ -320,6 +321,7 @@ public class OrderDbServiceImpl extends ServiceImpl<OrderDbMapper, OrderDb> impl
320 orderDb.setCloseTimeType(creation.getCloseTimeTypeValue()); 321 orderDb.setCloseTimeType(creation.getCloseTimeTypeValue());
321 orderDb.setIsRead(creation.getIsRead()); 322 orderDb.setIsRead(creation.getIsRead());
322 orderDb.setIsDeleted(false); 323 orderDb.setIsDeleted(false);
324 + orderDb.setIsConfirm(false);
323 boolean res = this.save(orderDb); 325 boolean res = this.save(orderDb);
324 if (!res) { 326 if (!res) {
325 throw ServiceExceptionUtil.exception(ErrorCodeConstants.ORDER_GEN_FAIL); 327 throw ServiceExceptionUtil.exception(ErrorCodeConstants.ORDER_GEN_FAIL);
...@@ -463,6 +465,9 @@ public class OrderDbServiceImpl extends ServiceImpl<OrderDbMapper, OrderDb> impl ...@@ -463,6 +465,9 @@ public class OrderDbServiceImpl extends ServiceImpl<OrderDbMapper, OrderDb> impl
463 if (updateOrderRequest.getModification().getShouldUpdateIsRead()) { 465 if (updateOrderRequest.getModification().getShouldUpdateIsRead()) {
464 orderDb.setIsRead(updateOrderRequest.getModification().getIsRead()); 466 orderDb.setIsRead(updateOrderRequest.getModification().getIsRead());
465 } 467 }
468 + if (updateOrderRequest.getModification().getShouldUpdateOpenId()) {
469 + orderDb.setIsConfirm(updateOrderRequest.getModification().getIsConfirm());
470 + }
466 return orderDbMapper.updateById(orderDb) > 0; 471 return orderDbMapper.updateById(orderDb) > 0;
467 } 472 }
468 473
...@@ -552,6 +557,9 @@ public class OrderDbServiceImpl extends ServiceImpl<OrderDbMapper, OrderDb> impl ...@@ -552,6 +557,9 @@ public class OrderDbServiceImpl extends ServiceImpl<OrderDbMapper, OrderDb> impl
552 if (modification.getShouldUpdateIsRead()) { 557 if (modification.getShouldUpdateIsRead()) {
553 orderDb.setIsRead(modification.getIsRead()); 558 orderDb.setIsRead(modification.getIsRead());
554 } 559 }
560 + if (modification.getShouldUpdateIsConfirm()) {
561 + orderDb.setIsConfirm(modification.getIsConfirm());
562 + }
555 return orderDb; 563 return orderDb;
556 }).collect(Collectors.toList()); 564 }).collect(Collectors.toList());
557 return SpringUtil.getBean(OrderDbServiceImpl.class).updateBatchById(list); 565 return SpringUtil.getBean(OrderDbServiceImpl.class).updateBatchById(list);
......
No preview for this file type
...@@ -111,6 +111,7 @@ message SingleClientCustomerOrderRpcResponse { ...@@ -111,6 +111,7 @@ message SingleClientCustomerOrderRpcResponse {
111 OrderSourceEnum updateSource = 31; 111 OrderSourceEnum updateSource = 31;
112 bool isDeleted = 32; 112 bool isDeleted = 32;
113 bool isRead = 33; 113 bool isRead = 33;
114 + bool isConfirm = 34;
114 } 115 }
115 116
116 message GetClientCustomerOrderByIdRpcRequest { 117 message GetClientCustomerOrderByIdRpcRequest {
...@@ -202,6 +203,8 @@ message QueryClientCustomerOrdersByConditionRpcRequest { ...@@ -202,6 +203,8 @@ message QueryClientCustomerOrdersByConditionRpcRequest {
202 int64 createdAtEnd = 41; 203 int64 createdAtEnd = 41;
203 bool shouldFilterIsRead = 42; 204 bool shouldFilterIsRead = 42;
204 bool isRead = 43; 205 bool isRead = 43;
206 + bool shouldFilterIsConfirm = 44;
207 + bool isConfirm = 45;
205 } 208 }
206 209
207 message QueryClientCustomerOrdersByConditionRpcResponse { 210 message QueryClientCustomerOrdersByConditionRpcResponse {
...@@ -325,6 +328,8 @@ message ClientCustomerOrderModification { ...@@ -325,6 +328,8 @@ message ClientCustomerOrderModification {
325 CustomerNotice customerNoticeJson = 47; 328 CustomerNotice customerNoticeJson = 47;
326 bool shouldUpdateIsRead = 48; 329 bool shouldUpdateIsRead = 48;
327 bool isRead = 49; 330 bool isRead = 49;
331 + bool shouldUpdateIsConfirm = 50;
332 + bool isConfirm = 51;
328 } 333 }
329 334
330 message UpdateClientCustomerOrderRpcRequest { 335 message UpdateClientCustomerOrderRpcRequest {
......