Skip to content

Commit

Permalink
修正订单为空的BUG
Browse files Browse the repository at this point in the history
修正订单为空的BUG
  • Loading branch information
ZongXR committed Mar 26, 2022
1 parent f91066c commit b68acdd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ public void addOrder(Order order) throws Exception {
public List<Order> queryOrder(String userId) {
// TODO 先用userId查orderId,再用orderId查商品
List<Order> orders = this.orderDao.selectOrder(new Order(null, null, null, null, null, userId));
if (orders == null)
return new ArrayList<Order>();
for (Order order : orders) {
List<OrderItem> orderItems = this.orderDao.selectOrderItems(new OrderItem(
null, order.getOrderId(), null, null, null, null, null
Expand Down
2 changes: 0 additions & 2 deletions start_up/supermarketstatic/myorder.html
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,6 @@
});
}
});
}else{
alert(data.msg);
}
},
error: function () {
Expand Down

0 comments on commit b68acdd

Please sign in to comment.