Browse Source

fix:商机管理消息推送修改

duxin 1 year ago
parent
commit
1208878d99
1 changed files with 4 additions and 4 deletions
  1. 4 4
      rpc/internal/common/task.go

+ 4 - 4
rpc/internal/common/task.go

@@ -60,9 +60,9 @@ func PayIntelUserPush() {
 
 func PushData(users []string, id int64, data *[]map[string]interface{}) {
 	log.Printf("需推送用户:%d\n", len(users))
-	var ids []int64
 	switch id {
 	case 0: //付费用户
+		var ids []int64
 		if data != nil {
 			for _, m := range *data {
 				_id := common.InterfaceToStr(m["_id"])
@@ -273,10 +273,10 @@ func FreeMessageData(number int) int64 {
 	return 0
 }
 
-func UpdateBatch(ids []string, biyStr string) {
+func UpdateBatch(ids []string, bitStr string) {
 	str := fmt.Sprintf(`'%s'`, strings.Join(ids, `','`))
-	log.Println(fmt.Sprintf(`alter table message_user_summary UPDATE allMsg = bitmapOr(allMsg,bitmapBuild([%s])) where userId in (%s)`, biyStr, str))
-	err1 := entity.ClickhouseConn.Exec(context.Background(), fmt.Sprintf(`alter table message_user_summary UPDATE allMsg = bitmapOr(allMsg,bitmapBuild([%s])) where userId in (%s)`, biyStr, str))
+	log.Println(fmt.Sprintf(`alter table message_user_summary UPDATE allMsg = bitmapOr(allMsg,bitmapBuild([%s])) where userId in (%s)`, bitStr, str))
+	err1 := entity.ClickhouseConn.Exec(context.Background(), fmt.Sprintf(`alter table message_user_summary UPDATE allMsg = bitmapOr(allMsg,bitmapBuild([%s])) where userId in (%s)`, bitStr, str))
 	if err1 != nil {
 		log.Printf("批量更新message_user_summary出错:%s", err1)
 		return