zwxi 1 year ago
parent
commit
08e378116b
1 changed files with 4 additions and 2 deletions
  1. 4 2
      controllers/company.go

+ 4 - 2
controllers/company.go

@@ -3082,12 +3082,14 @@ func (this *CompanyController) Detail() {
 	if productId > 0 {
 		var  e  error
 		productItem, e = company.GetCompanyProductByCompanyIdAndProductId(companyId, productId)
-		if e != nil {
+		if e != nil && e.Error() != utils.ErrNoRow() {
 			br.Msg = "客户信息有误"
 			br.ErrMsg = "获取客户信息失败, Err: " + e.Error()
 			return
 		}
-		shareSellerId = productItem.ShareSellerId
+		if productItem != nil {
+			shareSellerId = productItem.ShareSellerId
+		}
 	}
 
 	var productName string