Commit 1a4ecedc by wuwenlong

open the door bugfix;

parent 95918c6f
...@@ -276,7 +276,7 @@ public class OrderTask { ...@@ -276,7 +276,7 @@ public class OrderTask {
map.put("expirationTime", item.getEndDate().toString()); map.put("expirationTime", item.getEndDate().toString());
JSONObject jsonObject = new JSONObject(map); JSONObject jsonObject = new JSONObject(map);
redisUtils.set(ReceiptRdeisEnum.ORDER_NO_KEY.getValue() + item.getOrderNo(), jsonObject.toString()); redisUtils.set(ReceiptRdeisEnum.ORDER_NO_KEY.getValue() + item.getOrderNo(), jsonObject.toString());
orderService.updateSOrder(item); // orderService.updateSOrder(item);
roomList.stream().forEach( room -> { roomList.stream().forEach( room -> {
if(room.getId().compareTo(item.getRoomId())==0) { if(room.getId().compareTo(item.getRoomId())==0) {
room.setStatus(RoomStatusEnum.HOLD.getValue()); room.setStatus(RoomStatusEnum.HOLD.getValue());
......
...@@ -973,9 +973,10 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme ...@@ -973,9 +973,10 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
* @return * @return
*/ */
private boolean checkOrderOpenDoor(SOrder order) { private boolean checkOrderOpenDoor(SOrder order) {
SConsumer user = FrontTokenComponent.getWxSConsumerEntry();
LambdaQueryWrapper<SOrder> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SOrder> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.ne(SOrder::getConsumerId, user.getId()); queryWrapper.ne(SOrder::getOrderNo, order.getOrderNo());
queryWrapper.eq(SOrder::getStoreId, order.getStoreId());
queryWrapper.eq(SOrder::getRoomId, order.getRoomId());
queryWrapper.notIn(SOrder::getStatus, new ArrayList<Integer>() {{ queryWrapper.notIn(SOrder::getStatus, new ArrayList<Integer>() {{
add(OrderStatusEnum.USED.getCode()); add(OrderStatusEnum.USED.getCode());
add(OrderStatusEnum.CANCEL.getCode()); add(OrderStatusEnum.CANCEL.getCode());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment