wangyingyang

add isAllocation

......@@ -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 '订单详情表主键,自增整数',
......
......@@ -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
......
......@@ -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);
......
......@@ -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 {
......