abiao преди 5 години
родител
ревизия
03f71527e7
променени са 1 файла, в които са добавени 8 реда и са изтрити 2 реда
  1. 8 2
      go/gopath/src/fohow.com/apps/controllers/order_controller/order_controller.go

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

@@ -463,11 +463,14 @@ func (self *OrderController) Detail() {
 			self.ReturnError(403, apps.ProductNotExist, "", nil)
 		}
 		//获取商品属性详情
+		product.Commend = true
 		product.SizeName = item.SizeName
 		product.ColorName = item.ColorName
 		product.OrderCount = item.Count
 		product.IsZeng = item.Send
-		product.Commend = item.Commend
+		if !item.Commend && o.Status == order_model.STATUS_COMPLETE {
+			product.Commend = item.Commend
+		}
 		o.Count += item.Count
 		if product.SeckilShowPrice > 0 {
 			now := time.Now()
@@ -540,7 +543,10 @@ func (self *OrderController) List() {
 			item.Count += orderItem.Count
 			product.OrderCount = orderItem.Count
 			product.IsZeng = orderItem.Send
-			product.Commend = orderItem.Commend
+			product.Commend = true
+			if !orderItem.Commend && item.Status == order_model.STATUS_COMPLETE {
+				product.Commend = orderItem.Commend
+			}
 
 			if product.SeckilShowPrice > 0 {
 				now := time.Now()