Browse Source

feat:代码调整

fuwencai 5 months ago
parent
commit
1f8c4100e6
2 changed files with 3 additions and 3 deletions
  1. 2 2
      newuserGet/internal/logic/task.go
  2. 1 1
      newuserSend/manifest/config/config.yaml

+ 2 - 2
newuserGet/internal/logic/task.go

@@ -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

+ 1 - 1
newuserSend/manifest/config/config.yaml

@@ -29,5 +29,5 @@ sms:
   rpc: "192.168.3.149:932"
 test:
   switch: true # 是否仅发送测试手机号短信
-  phone: [ "18238182402" ]
+  phone: [ "18238182402","15737190152" ]
 industryUrl: { "水利水电": "SHUILISHUIDIAN" } #行业对应的地址