Browse Source

feat: 是否可以创建调整

zhangxinlei1996 1 year ago
parent
commit
e665fd45a0
1 changed files with 1 additions and 1 deletions
  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 || (len(*tenantData) > 0 && gconv.Int((*tenantData)[0][key]) == 0) {
+	if (len(*tenantData) == 0) || (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)