Переглянути джерело

Merge branch 'debug' of http://8.136.199.33:3000/hongze/hz_crm_api into debug

xingzai 6 місяців тому
батько
коміт
23b7378290
1 змінених файлів з 3 додано та 3 видалено
  1. 3 3
      models/yb/apply_record.go

+ 3 - 3
models/yb/apply_record.go

@@ -170,7 +170,7 @@ FROM
 	LEFT JOIN (SELECT * from yb_apply_record where apply_record_id in (SELECT max(apply_record_id) from yb_apply_record GROUP BY user_id)) as y on a.user_id = y.user_id
 WHERE
 	b.enabled = 1 
-	AND ( y.apply_record_id > 0 or a.company_id=1 or bp.company_product_id is null)
+	AND ( y.apply_record_id > 0 or a.company_id=1 or bp.company_product_id is not null)
 	AND ( a.mobile IS NOT NULL || a.email IS NOT NULL ) 
 	AND ( a.mobile <> '' OR a.email <> '' ) 
 	AND ( c.create_platform in (1,3,6,9) OR c.create_platform IS NULL )
@@ -201,7 +201,7 @@ FROM
 	LEFT JOIN (SELECT * from yb_apply_record where apply_record_id in (SELECT max(apply_record_id) from yb_apply_record GROUP BY user_id)) as y on a.user_id = y.user_id
 WHERE
 	b.enabled = 1
-	AND ( y.apply_record_id > 0 or a.company_id=1 or bp.company_product_id is null)
+	AND ( y.apply_record_id > 0 or a.company_id=1 or bp.company_product_id is not null)
 	AND ( a.mobile IS NOT NULL || a.email IS NOT NULL ) 
 	AND ( a.mobile <> '' OR a.email <> '' ) 
 	AND ( c.create_platform <> 4 OR c.create_platform IS NULL )
@@ -256,7 +256,7 @@ FROM
 	LEFT JOIN (SELECT * from yb_apply_record where apply_record_id in (SELECT max(apply_record_id) from yb_apply_record GROUP BY user_id)) as y on a.user_id = y.user_id
 WHERE
 	b.enabled = 1
-	AND ( y.apply_record_id > 0 or a.company_id=1 or bp.company_product_id is null)
+	AND ( y.apply_record_id > 0 or a.company_id=1 or bp.company_product_id is not null)
 	AND ( a.mobile IS NOT NULL || a.email IS NOT NULL ) 
 	AND ( a.mobile <> '' OR a.email <> '' ) 
 	AND ( c.create_platform in (1,3,6,9) OR c.create_platform IS NULL )