zhangxinlei1996 před 1 rokem
rodič
revize
76c286a70a
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      service/util.go

+ 1 - 1
service/util.go

@@ -19,7 +19,7 @@ func CanAdd(entId int64, key string, employInfoId, employCustomId, positionId in
 	tenantData := cm.BaseMysql.SelectBySql(`select * from crm.config_tenant where account_id =?`, accountId)
 
 	//不允许
-	if tenantData == nil || gconv.Int((*tenantData)[0][key]) == 0 {
+	if tenantData == nil || (len(*tenantData) > 0 && gconv.Int((*tenantData)[0][key]) == 0) {
 		//判断是否已经创建
 		if strings.Contains(key, "clue") {
 			d := cm.BaseMysql.SelectBySql(`select create_person,position_id from crm.sale_clue where employ_info_id =? and ent_id =?`, employInfoId, entId)