浏览代码

orders list add wait commend

abiao 4 年之前
父节点
当前提交
2f2acd4749
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      go/gopath/src/fohow.com/apps/controllers/order_controller/order_controller.go

+ 5 - 2
go/gopath/src/fohow.com/apps/controllers/order_controller/order_controller.go

@@ -578,14 +578,17 @@ func (self *OrderController) List() {
 	if perPage <= 0 || perPage > 100 {
 		perPage = 20
 	}
-
+	order_status := ""
 	if status == order_model.WAIT_COMMEN {
 		perPage = 100
+		order_status = order_model.STATUS_COMPLETE
+	} else {
+		order_status = status
 	}
 	cache, _ := self.GetBool("cache", false)
 	//uId := self.GetCurrentUserId()
 	wxUId := self.GetCurrentWxUserId()
-	orders := order_model.GetUserOrders(wxUId, status, page, perPage)
+	orders := order_model.GetUserOrders(wxUId, order_status, page, perPage)
 	count := order_model.GetUserOrdersCount(wxUId, status)
 	var latestOrders []*order_model.Order