package services

import (
	"fmt"
	"hongze/hz_crm_api/models"
	"time"
)

// 获取所有关注公众号的用户open_id
func GetWxUsersSubscribe() {
	openIdList := models.WxUsersGetV1()
	fmt.Println("openIdList:", len(openIdList))
	time.Sleep(3 * time.Second)
	for _, v := range openIdList {
		fmt.Println("openId:" + v)
		err := models.SetUserSubscribe(v)
		if err != nil {
			fmt.Println("SetUserSubscribe Err:" + err.Error())
			return
		}
	}
}
