abiao лет назад: 3
Родитель
Сommit
2e006e9195
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      go/gopath/src/fohow.com/apps/models/product_model/product.go

+ 1 - 1
go/gopath/src/fohow.com/apps/models/product_model/product.go

@@ -197,7 +197,7 @@ func GetNewLatestCount(recommend, saleZone, depart int64, ptype string, useCache
 	ret := &Ret{}
 	o := orm.NewOrm()
 	sql := `
-		 select count(DISTINCT a.id) from products a left join depart_records_products b  on a.id=b.product_id
+		 select count(DISTINCT a.id) as count from products a left join depart_records_products b  on a.id=b.product_id
 			where a.status = ? and a.recommend > ? and a.show_flag=? and a.ptype=? and (b.depart_record_id=? or b.depart_record_id is null ) %s;
 	`
 	var saleZoneSql string