|
@@ -246,7 +246,7 @@ func filterTrailStatus(ctx context.Context, rule entity.NewUserSendRule, userLis
|
|
|
infoIndustrySet := gset.NewStrSetFrom(strings.Split(info.Industry, ","), true) // 用户-行业
|
|
|
// 交集计算匹配
|
|
|
intersectSet = industrySet.Intersect(infoIndustrySet)
|
|
|
- if intersectSet.Size() > 0 || industrySet.Contains("other") { // 行业匹配到了-发行业内容 或者包含other-未匹配到指定行业-则发送默认内容
|
|
|
+ if (intersectSet != nil && intersectSet.Size() > 0) || industrySet.Contains("other") { // 行业匹配到了-发行业内容 或者包含other-未匹配到指定行业-则发送默认内容
|
|
|
flag = true
|
|
|
}
|
|
|
} else {
|
|
@@ -255,7 +255,7 @@ func filterTrailStatus(ctx context.Context, rule entity.NewUserSendRule, userLis
|
|
|
|
|
|
// 匹配行业
|
|
|
if flag {
|
|
|
- if intersectSet.Size() > 0 {
|
|
|
+ if intersectSet != nil && intersectSet.Size() > 0 {
|
|
|
// 选一个行业存进去
|
|
|
industryName := IndustryMap[intersectSet.Pop()]
|
|
|
userList[i].Industry = industryName
|