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