rdluck 4 年之前
父节点
当前提交
662a954526
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      controllers/user.go

+ 4 - 2
controllers/user.go

@@ -631,12 +631,14 @@ func (this *UserController) ApplyTryOut() {
 	} else {
 		//获取销售信息
 		sellerItem, err := models.GetSellerByCompanyId(user.CompanyId)
-		if err != nil {
+		if err != nil && err.Error() != utils.ErrNoRow() {
 			br.Msg = "申请失败"
 			br.ErrMsg = "获取销售信息失败,Err:" + err.Error()
 			return
 		}
-		sellerMobile = sellerItem.Mobile
+		if sellerItem != nil {
+			sellerMobile = sellerItem.Mobile
+		}
 	}
 	err = models.AddApplyRecord(&req, user.Mobile, user.CompanyName, user.UserId, user.CompanyId)
 	if err != nil {