wangyingyang

add is confirm

No preview for this file type
/.idea/
/.gradle/
/build/
.DS_Store
src/.DS_Store
src/main/.DS_Store
\ No newline at end of file
......
......@@ -49,7 +49,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 `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`;
CREATE TABLE `client_customer_order_details` (
`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 {
* 截单类型
*/
private Integer closeTimeType;
private Boolean isConfirm;
}
\ No newline at end of file
......
......@@ -115,6 +115,7 @@ public class OrderDbServiceImpl extends ServiceImpl<OrderDbMapper, OrderDb> impl
orderDb.setCloseTimeType(createOrderRpcRequest.getCreation().getCloseTimeTypeValue());
orderDb.setIsRead(createOrderRpcRequest.getCreation().getIsRead());
orderDb.setIsDeleted(false);
orderDb.setIsConfirm(false);
boolean res = this.save(orderDb);
if (!res) {
......@@ -320,6 +321,7 @@ public class OrderDbServiceImpl extends ServiceImpl<OrderDbMapper, OrderDb> impl
orderDb.setCloseTimeType(creation.getCloseTimeTypeValue());
orderDb.setIsRead(creation.getIsRead());
orderDb.setIsDeleted(false);
orderDb.setIsConfirm(false);
boolean res = this.save(orderDb);
if (!res) {
throw ServiceExceptionUtil.exception(ErrorCodeConstants.ORDER_GEN_FAIL);
......@@ -463,6 +465,9 @@ public class OrderDbServiceImpl extends ServiceImpl<OrderDbMapper, OrderDb> impl
if (updateOrderRequest.getModification().getShouldUpdateIsRead()) {
orderDb.setIsRead(updateOrderRequest.getModification().getIsRead());
}
if (updateOrderRequest.getModification().getShouldUpdateOpenId()) {
orderDb.setIsConfirm(updateOrderRequest.getModification().getIsConfirm());
}
return orderDbMapper.updateById(orderDb) > 0;
}
......@@ -552,6 +557,9 @@ public class OrderDbServiceImpl extends ServiceImpl<OrderDbMapper, OrderDb> impl
if (modification.getShouldUpdateIsRead()) {
orderDb.setIsRead(modification.getIsRead());
}
if (modification.getShouldUpdateIsConfirm()) {
orderDb.setIsConfirm(modification.getIsConfirm());
}
return orderDb;
}).collect(Collectors.toList());
return SpringUtil.getBean(OrderDbServiceImpl.class).updateBatchById(list);
......
No preview for this file type
......@@ -111,6 +111,7 @@ message SingleClientCustomerOrderRpcResponse {
OrderSourceEnum updateSource = 31;
bool isDeleted = 32;
bool isRead = 33;
bool isConfirm = 34;
}
message GetClientCustomerOrderByIdRpcRequest {
......@@ -202,6 +203,8 @@ message QueryClientCustomerOrdersByConditionRpcRequest {
int64 createdAtEnd = 41;
bool shouldFilterIsRead = 42;
bool isRead = 43;
bool shouldFilterIsConfirm = 44;
bool isConfirm = 45;
}
message QueryClientCustomerOrdersByConditionRpcResponse {
......@@ -325,6 +328,8 @@ message ClientCustomerOrderModification {
CustomerNotice customerNoticeJson = 47;
bool shouldUpdateIsRead = 48;
bool isRead = 49;
bool shouldUpdateIsConfirm = 50;
bool isConfirm = 51;
}
message UpdateClientCustomerOrderRpcRequest {
......