|
@@ -493,7 +493,9 @@ func (this *ProductController) ProductList() {
|
|
|
wg.Add(len(List))
|
|
|
for _, product := range List {
|
|
|
go func(product *models.MerchantProduct) {
|
|
|
- defer wg.Done()
|
|
|
+ defer func() {
|
|
|
+ wg.Done()
|
|
|
+ }()
|
|
|
view := &services.ProductView{
|
|
|
Id: product.Id,
|
|
|
ProductName: product.Title,
|
|
@@ -519,7 +521,8 @@ func (this *ProductController) ProductList() {
|
|
|
if !product.UpdatedTime.IsZero() {
|
|
|
view.UpdatedTime = product.UpdatedTime.Format(time.DateTime)
|
|
|
}
|
|
|
- view.RiskLevel, _, _, _ = services.GetRiskLevel(string(product.Type), product.Id)
|
|
|
+ view.RiskLevel, _, _, _ = services.GetRiskLevel(string(product.Type), product.SourceId)
|
|
|
+
|
|
|
ListView = append(ListView, view)
|
|
|
}(product)
|
|
|
|