Jelajahi Sumber

dyksbl_link_auto_task

Ethan 1 Minggu lalu
induk
melakukan
fcc0bd2185

+ 1 - 1
app/controller/cooperation_controller.go

@@ -12,7 +12,7 @@ type CooperationController struct{}
 
 // 服务商端链接
 func (o CooperationController) GetSupplierLink(c *gin.Context) {
-	supplierLink := "服务商端链接"
+	supplierLink := "https://www.younggee.com:8889"
 	resultMap := make(map[string]string)
 	resultMap["supplierLink"] = supplierLink
 	returnSuccess(c, 20000, resultMap)

+ 26 - 0
app/controller/moreapi_controller.go

@@ -0,0 +1,26 @@
+package controller
+
+import (
+	"github.com/gin-gonic/gin"
+	"youngee_b_api/app/service"
+)
+
+type MoreAPIController struct{}
+
+// 测试
+func (o MoreAPIController) GetData(c *gin.Context) {
+	//param := &vo.SupplierSearchParam{}
+	//err := c.BindJSON(param)
+	//if err != nil || "" == param.FieldName {
+	//	logrus.Errorf("Request bind err:%+v\n", err)
+	//	returnError(c, 40000, "Parameter Error: "+err.Error())
+	//	return
+	//}
+	service.MoreapiService{}.GetBilibiliStatistic("")
+	//if err != nil {
+	//	logrus.Errorf("[SearchSupplier] call Show err:%+v\n", err)
+	//	returnError(c, 40000, err.Error())
+	//	return
+	//}
+	returnSuccess(c, 20000, nil)
+}

+ 259 - 0
app/service/moreapi_service.go

@@ -0,0 +1,259 @@
+package service
+
+import (
+	"encoding/json"
+	"fmt"
+	"io/ioutil"
+	"net/http"
+	"strings"
+)
+
+type MoreapiService struct{}
+
+// 获取抖音作品数据
+type DouyinStatisticResponse struct {
+	Code int `json:"code"`
+	Data struct {
+		AwemeDetail struct {
+			Statistics struct {
+				DiggCount    int `json:"digg_count"`    // 点赞数
+				CommentCount int `json:"comment_count"` // 评论数
+				CollectCount int `json:"collect_count"` // 收藏数
+				ShareCount   int `json:"share_count"`   // 分享数
+			} `json:"statistics"`
+		} `json:"aweme_detail"`
+	} `json:"data"`
+}
+
+// 获取抖音作品数据
+func (s MoreapiService) GetDouyinStatistic(shareText string) (likes, comments, collects, shares int, err error) {
+	url := "http://120.46.92.62:6888/api/douyin/aweme_detail_v4"
+	method := "POST"
+
+	//awemeId = "7519726524871462153"
+	//shareText = "6.99 M@j.cn 03/18 uSy:/ - 你怎么哭着脸 # 沈妙 # 永劫无间 # 街头狂欢 # 涂鸦少女  https://v.douyin.com/z4go6Y8l458/ 复制此链接,打开Dou音搜索,直接观看视频!"
+
+	requestBody := struct {
+		AwemeId   string `json:"aweme_id"`
+		ShareText string `json:"share_text"`
+		Proxy     string `json:"proxy"`
+	}{
+		AwemeId:   "",
+		ShareText: shareText,
+		Proxy:     "",
+	}
+
+	// 封装请求体
+	jsonData, err := json.Marshal(requestBody)
+	if err != nil {
+		fmt.Println("JSON编码失败:", err)
+		return 0, 0, 0, 0, err
+	}
+	payload := strings.NewReader(string(jsonData))
+	client := &http.Client{}
+	req, err := http.NewRequest(method, url, payload)
+	if err != nil {
+		// fmt.Println(err)
+		return 0, 0, 0, 0, err
+	}
+	req.Header.Add("Cookie", "")
+	req.Header.Add("Content-Type", "application/json")
+
+	res, err := client.Do(req)
+	if err != nil {
+		// fmt.Println(err)
+		return 0, 0, 0, 0, err
+	}
+	defer res.Body.Close()
+
+	body, err := ioutil.ReadAll(res.Body)
+	if err != nil {
+		//fmt.Println("解析互动数据失败:", err)
+		return 0, 0, 0, 0, err
+	}
+	fmt.Println(string(body))
+
+	// 解析响应数据
+	var response DouyinStatisticResponse
+	err = json.Unmarshal(body, &response)
+	if err != nil {
+		fmt.Println("解析互动数据失败:", err)
+		return 0, 0, 0, 0, fmt.Errorf("解析JSON失败: %v", err)
+	}
+
+	statistics := response.Data.AwemeDetail.Statistics
+	likes, comments, collects, shares = statistics.DiggCount, statistics.CommentCount, statistics.CollectCount, statistics.ShareCount
+
+	// 打印结果
+	fmt.Println("点赞数:", likes)
+	fmt.Println("评论数:", comments)
+	fmt.Println("收藏数:", collects)
+	fmt.Println("分享数(可作为浏览量参考):", shares)
+
+	return likes, comments, collects, shares, nil
+}
+
+// 获取快手作品数据
+type KuaishouStatisticResponse struct {
+	Code int `json:"code"`
+	Data struct {
+		Photos []struct {
+			CollectCount int `json:"collect_count"` // 收藏数
+			CommentCount int `json:"comment_count"` // 评论数
+			LikeCount    int `json:"like_count"`    // 点赞数
+			ForwardCount int `json:"forward_count"`
+			ViewCount    int `json:"view_count"`  // 浏览数
+			ShareCount   int `json:"share_count"` // 分享数
+		} `json:"photos"`
+	} `json:"data"`
+}
+
+// 获取快手作品数据
+func (s MoreapiService) GetKuaishouStatistic(shareText string) (likes, comments, collects, shares int, err error) {
+	url := "http://120.46.92.62:6888/api/ks/aweme_detail"
+	method := "POST"
+
+	//photoId = "3xhsja9s5xfr3ts"
+	//shareText = "https://www.kuaishou.com/f/X-16itgqSzQ64163"
+
+	requestBody := struct {
+		PhotoId   string `json:"photo_id"`
+		ShareText string `json:"share_text"`
+		Proxy     string `json:"proxy"`
+	}{
+		PhotoId:   "",
+		ShareText: shareText,
+		Proxy:     "",
+	}
+
+	// 封装请求体
+	jsonData, err := json.Marshal(requestBody)
+	if err != nil {
+		fmt.Println("JSON编码失败:", err)
+		return 0, 0, 0, 0, err
+	}
+	payload := strings.NewReader(string(jsonData))
+	client := &http.Client{}
+	req, err := http.NewRequest(method, url, payload)
+	if err != nil {
+		// fmt.Println(err)
+		return 0, 0, 0, 0, err
+	}
+	req.Header.Add("Cookie", "")
+	req.Header.Add("Content-Type", "application/json")
+
+	res, err := client.Do(req)
+	if err != nil {
+		// fmt.Println(err)
+		return 0, 0, 0, 0, err
+	}
+	defer res.Body.Close()
+
+	body, err := ioutil.ReadAll(res.Body)
+	if err != nil {
+		//fmt.Println("解析互动数据失败:", err)
+		return 0, 0, 0, 0, err
+	}
+	fmt.Println(string(body))
+
+	// 解析响应数据
+	var response KuaishouStatisticResponse
+	err = json.Unmarshal(body, &response)
+	if err != nil {
+		fmt.Println("解析互动数据失败:", err)
+		return 0, 0, 0, 0, fmt.Errorf("解析JSON失败: %v", err)
+	}
+
+	photo := response.Data.Photos[0]
+	likes, comments, collects, shares = photo.LikeCount, photo.CommentCount, photo.CollectCount, photo.ViewCount
+
+	// 打印结果
+	fmt.Println("点赞数:", likes)
+	fmt.Println("评论数:", comments)
+	fmt.Println("收藏数:", collects)
+	fmt.Println("分享数(可作为浏览量参考):", shares)
+
+	return likes, comments, collects, shares, nil
+}
+
+// 获取b站作品数据
+type BilibiliStatisticResponse struct {
+	Code int `json:"code"`
+	Data struct {
+		VideoData struct {
+			Stat struct {
+				Like     int `json:"like"`     // 点赞数
+				Reply    int `json:"reply"`    // 评论数
+				Favorite int `json:"favorite"` // 收藏数
+				Share    int `json:"share"`    // 分享数
+				Coin     int `json:"coin"`     // 投币数
+				View     int `json:"view"`     // 浏览数
+			} `json:"stat"`
+		} `json:"videoData"`
+	} `json:"data"`
+}
+
+// 获取b站作品数据
+func (s MoreapiService) GetBilibiliStatistic(bvId string) (likes, comments, collects, shares int, err error) {
+	url := "http://120.46.92.62:6888/api/bilibili/video_data"
+	method := "POST"
+
+	bvId = "BV1KUM2z1Ecu"
+
+	requestBody := struct {
+		BvId  string `json:"bvid"`
+		Proxy string `json:"proxy"`
+	}{
+		BvId:  bvId,
+		Proxy: "",
+	}
+
+	// 封装请求体
+	jsonData, err := json.Marshal(requestBody)
+	if err != nil {
+		fmt.Println("JSON编码失败:", err)
+		return 0, 0, 0, 0, err
+	}
+	payload := strings.NewReader(string(jsonData))
+	client := &http.Client{}
+	req, err := http.NewRequest(method, url, payload)
+	if err != nil {
+		// fmt.Println(err)
+		return 0, 0, 0, 0, err
+	}
+	req.Header.Add("Cookie", "")
+	req.Header.Add("Content-Type", "application/json")
+
+	res, err := client.Do(req)
+	if err != nil {
+		// fmt.Println(err)
+		return 0, 0, 0, 0, err
+	}
+	defer res.Body.Close()
+
+	body, err := ioutil.ReadAll(res.Body)
+	if err != nil {
+		//fmt.Println("解析互动数据失败:", err)
+		return 0, 0, 0, 0, err
+	}
+	fmt.Println(string(body))
+
+	// 解析响应数据
+	var response BilibiliStatisticResponse
+	err = json.Unmarshal(body, &response)
+	if err != nil {
+		fmt.Println("解析互动数据失败:", err)
+		return 0, 0, 0, 0, fmt.Errorf("解析JSON失败: %v", err)
+	}
+
+	stat := response.Data.VideoData.Stat
+	likes, comments, collects, shares = stat.Like, stat.Reply, stat.Favorite, stat.View
+
+	// 打印结果
+	fmt.Println("点赞数:", likes)
+	fmt.Println("评论数:", comments)
+	fmt.Println("收藏数:", collects)
+	fmt.Println("分享数(可作为浏览量参考):", shares)
+
+	return likes, comments, collects, shares, nil
+}

+ 9 - 0
route/init.go

@@ -421,6 +421,15 @@ func InitRoute(r *gin.Engine) {
 		talent.POST("/locallifetalent", handler.WrapGetLocallifeTalentHandler) //本地生活达人
 
 	}
+
+	// moreAPI取数
+	moreAPI := r.Group("/youngee/b/moreAPI")
+	{
+		moreAPI.Use(middleware.LoginAuthMiddleware)
+		//moreAPI.POST("/douyin", controller.MoreAPIController{}.GetData) //抖音数据
+
+	}
+
 	// 账号管理
 	account := r.Group("/youngee/b/account")
 	{

+ 361 - 0
service/autoTask.go

@@ -6,6 +6,7 @@ import (
 	"github.com/robfig/cron/v3"
 	log "github.com/sirupsen/logrus"
 	"time"
+	"youngee_b_api/app/service"
 	"youngee_b_api/db"
 	"youngee_b_api/model/gorm_model"
 )
@@ -69,6 +70,36 @@ func AutoTask() error {
 		log.Println("service [UpdateProjectTaskWeiBoLinkData] error:", err10)
 		return err10
 	}
+	_, err11 := c.AddFunc(spec, UpdateProjectTaskDouyinLinkData)
+	if err11 != nil {
+		log.Println("service [UpdateProjectTaskDouyinLinkData] error:", err11)
+		return err11
+	}
+	_, err12 := c.AddFunc(spec, UpdateLocalTaskDouyinLinkData)
+	if err12 != nil {
+		log.Println("service [UpdateLocalTaskDouyinLinkData] error:", err12)
+		return err12
+	}
+	_, err13 := c.AddFunc(spec, UpdateProjectTaskKuaishouLinkData)
+	if err13 != nil {
+		log.Println("service [UpdateProjectTaskKuaishouLinkData] error:", err13)
+		return err13
+	}
+	_, err14 := c.AddFunc(spec, UpdateLocalTaskKuaishouLinkData)
+	if err14 != nil {
+		log.Println("service [UpdateLocalTaskKuaishouLinkData] error:", err14)
+		return err14
+	}
+	_, err15 := c.AddFunc(spec, UpdateProjectTaskBilibiliLinkData)
+	if err15 != nil {
+		log.Println("service [UpdateProjectTaskBilibiliLinkData] error:", err15)
+		return err15
+	}
+	_, err16 := c.AddFunc(spec, UpdateLocalTaskBilibiliLinkData)
+	if err16 != nil {
+		log.Println("service [UpdateLocalTaskBilibiliLinkData] error:", err16)
+		return err16
+	}
 	fmt.Println(spec)
 	c.Start()
 	return nil
@@ -344,3 +375,333 @@ func UpdateLocalTaskWeiBoLinkData() {
 		}
 	}
 }
+
+// UpdateProjectTaskDouyinLinkData 定时拉取抖音平台,种草子任务链接数据
+func UpdateProjectTaskDouyinLinkData() {
+
+	log.Println("UpdateProjectTaskDouyinLinkData is running ,Time :", time.Now())
+
+	// 1. 符合条件的project
+	ctx := context.Background()
+	projectIdList, projectIdListTotal, projectIdListErr := db.GetProjectIdList(ctx, 8, 2)
+	if projectIdListErr != nil {
+		log.Println("GetProjectIdList error : ", projectIdListErr)
+		return
+	}
+
+	// 2. 符合条件的task
+	if projectIdList != nil && projectIdListTotal != 0 {
+		for _, projectId := range projectIdList {
+			taskIdList, taskIdTotal, taskIdErr := db.GetProjectTaskIdList(ctx, projectId)
+			if taskIdErr != nil {
+				log.Println("GetProjectTaskIdList error : ", taskIdErr)
+				continue
+			}
+			if taskIdList != nil && taskIdTotal != 0 {
+				for _, taskId := range taskIdList {
+					linkInfo, linkErr := db.GetProjectTaskLinkInfo(ctx, taskId, 1)
+					if linkErr != nil {
+						log.Println("GetProjectTaskLinkInfo error : ", linkErr)
+						continue
+					}
+					if linkInfo != "" {
+						like, comment, collect, share, moreApiErr := service.MoreapiService{}.GetDouyinStatistic(linkInfo)
+						if moreApiErr != nil {
+							log.Println("GetDouyinStatistic error : ", moreApiErr)
+							continue
+						}
+						createData := gorm_model.ProjectTaskLinkStatistic{
+							ProjectId:       projectId,
+							TaskId:          taskId,
+							PlatformId:      2,
+							VoteCount:       like,
+							CommitCount:     comment,
+							CollectionCount: collect,
+							ViewCount:       share,
+						}
+						createErr := db.CreateProjectTaskLinkStatistic(ctx, &createData)
+						if createErr != nil {
+							log.Println("CreateProjectTaskLinkStatistic error : ", createErr)
+							continue
+						}
+					}
+				}
+			}
+		}
+	}
+}
+
+// UpdateLocalTaskDouyinLinkData 定时拉取抖音平台,本地生活子任务链接数据
+func UpdateLocalTaskDouyinLinkData() {
+
+	log.Println("UpdateLocalTaskDouyinLinkData is running ,Time :", time.Now())
+
+	// 1. 符合条件的local
+	ctx := context.Background()
+	localIdList, localIdListTotal, localIdListErr := db.GetLocalIdList(ctx, 8, 2)
+	if localIdListErr != nil {
+		log.Println("GetLocalIdList error : ", localIdListErr)
+		return
+	}
+
+	// 2. 符合条件的task
+	if localIdList != nil && localIdListTotal != 0 {
+		for _, localId := range localIdList {
+			taskIdList, taskIdTotal, taskIdErr := db.GetLocalTaskIdList(ctx, localId)
+			if taskIdErr != nil {
+				log.Println("GetLocalTaskIdList error : ", taskIdErr)
+				continue
+			}
+			if taskIdList != nil && taskIdTotal != 0 {
+				for _, taskId := range taskIdList {
+					linkInfo, linkErr := db.GetProjectTaskLinkInfo(ctx, taskId, 1)
+					if linkErr != nil {
+						log.Println("GetProjectTaskLinkInfo error : ", linkErr)
+						continue
+					}
+					if linkInfo != "" {
+						like, comment, collect, share, moreApiErr := service.MoreapiService{}.GetDouyinStatistic(linkInfo)
+						if moreApiErr != nil {
+							log.Println("GetWeiBoLinkDetail error : ", moreApiErr)
+							continue
+						}
+						createData := gorm_model.LocalTaskLinkStatistic{
+							LocalId:         localId,
+							TaskId:          taskId,
+							PlatformId:      2,
+							VoteCount:       like,
+							CommitCount:     comment,
+							CollectionCount: collect,
+							ViewCount:       share,
+						}
+						createErr := db.CreateLocalTaskLinkStatistic(ctx, &createData)
+						if createErr != nil {
+							log.Println("CreateLocalTaskLinkStatistic error : ", createErr)
+							continue
+						}
+					}
+				}
+			}
+		}
+	}
+}
+
+// UpdateProjectTaskKuaishouLinkData 定时拉取快手平台,种草子任务链接数据
+func UpdateProjectTaskKuaishouLinkData() {
+
+	log.Println("UpdateProjectTaskKuaishouLinkData is running ,Time :", time.Now())
+
+	// 1. 符合条件的project
+	ctx := context.Background()
+	projectIdList, projectIdListTotal, projectIdListErr := db.GetProjectIdList(ctx, 8, 4)
+	if projectIdListErr != nil {
+		log.Println("GetProjectIdList error : ", projectIdListErr)
+		return
+	}
+
+	// 2. 符合条件的task
+	if projectIdList != nil && projectIdListTotal != 0 {
+		for _, projectId := range projectIdList {
+			taskIdList, taskIdTotal, taskIdErr := db.GetProjectTaskIdList(ctx, projectId)
+			if taskIdErr != nil {
+				log.Println("GetProjectTaskIdList error : ", taskIdErr)
+				continue
+			}
+			if taskIdList != nil && taskIdTotal != 0 {
+				for _, taskId := range taskIdList {
+					linkInfo, linkErr := db.GetProjectTaskLinkInfo(ctx, taskId, 1)
+					if linkErr != nil {
+						log.Println("GetProjectTaskLinkInfo error : ", linkErr)
+						continue
+					}
+					if linkInfo != "" {
+						like, comment, collect, share, moreApiErr := service.MoreapiService{}.GetKuaishouStatistic(linkInfo)
+						if moreApiErr != nil {
+							log.Println("GetKuaishouStatistic error : ", moreApiErr)
+							continue
+						}
+						createData := gorm_model.ProjectTaskLinkStatistic{
+							ProjectId:       projectId,
+							TaskId:          taskId,
+							PlatformId:      4,
+							VoteCount:       like,
+							CommitCount:     comment,
+							CollectionCount: collect,
+							ViewCount:       share,
+						}
+						createErr := db.CreateProjectTaskLinkStatistic(ctx, &createData)
+						if createErr != nil {
+							log.Println("CreateProjectTaskLinkStatistic error : ", createErr)
+							continue
+						}
+					}
+				}
+			}
+		}
+	}
+}
+
+// UpdateLocalTaskKuaishouLinkData 定时拉取快手平台,本地生活子任务链接数据
+func UpdateLocalTaskKuaishouLinkData() {
+
+	log.Println("UpdateLocalTaskKuaishouLinkData is running ,Time :", time.Now())
+
+	// 1. 符合条件的local
+	ctx := context.Background()
+	localIdList, localIdListTotal, localIdListErr := db.GetLocalIdList(ctx, 8, 4)
+	if localIdListErr != nil {
+		log.Println("GetLocalIdList error : ", localIdListErr)
+		return
+	}
+
+	// 2. 符合条件的task
+	if localIdList != nil && localIdListTotal != 0 {
+		for _, localId := range localIdList {
+			taskIdList, taskIdTotal, taskIdErr := db.GetLocalTaskIdList(ctx, localId)
+			if taskIdErr != nil {
+				log.Println("GetLocalTaskIdList error : ", taskIdErr)
+				continue
+			}
+			if taskIdList != nil && taskIdTotal != 0 {
+				for _, taskId := range taskIdList {
+					linkInfo, linkErr := db.GetProjectTaskLinkInfo(ctx, taskId, 1)
+					if linkErr != nil {
+						log.Println("GetProjectTaskLinkInfo error : ", linkErr)
+						continue
+					}
+					if linkInfo != "" {
+						like, comment, collect, share, moreApiErr := service.MoreapiService{}.GetKuaishouStatistic(linkInfo)
+						if moreApiErr != nil {
+							log.Println("GetKuaishouStatistic error : ", moreApiErr)
+							continue
+						}
+						createData := gorm_model.LocalTaskLinkStatistic{
+							LocalId:         localId,
+							TaskId:          taskId,
+							PlatformId:      4,
+							VoteCount:       like,
+							CommitCount:     comment,
+							CollectionCount: collect,
+							ViewCount:       share,
+						}
+						createErr := db.CreateLocalTaskLinkStatistic(ctx, &createData)
+						if createErr != nil {
+							log.Println("CreateLocalTaskLinkStatistic error : ", createErr)
+							continue
+						}
+					}
+				}
+			}
+		}
+	}
+}
+
+// UpdateProjectTaskBilibiliLinkData 定时拉取b站平台,种草子任务链接数据
+func UpdateProjectTaskBilibiliLinkData() {
+
+	log.Println("UpdateProjectTaskBilibiliLinkData is running ,Time :", time.Now())
+
+	// 1. 符合条件的project
+	ctx := context.Background()
+	projectIdList, projectIdListTotal, projectIdListErr := db.GetProjectIdList(ctx, 8, 5)
+	if projectIdListErr != nil {
+		log.Println("GetProjectIdList error : ", projectIdListErr)
+		return
+	}
+
+	// 2. 符合条件的task
+	if projectIdList != nil && projectIdListTotal != 0 {
+		for _, projectId := range projectIdList {
+			taskIdList, taskIdTotal, taskIdErr := db.GetProjectTaskIdList(ctx, projectId)
+			if taskIdErr != nil {
+				log.Println("GetProjectTaskIdList error : ", taskIdErr)
+				continue
+			}
+			if taskIdList != nil && taskIdTotal != 0 {
+				for _, taskId := range taskIdList {
+					linkInfo, linkErr := db.GetProjectTaskLinkInfo(ctx, taskId, 1)
+					if linkErr != nil {
+						log.Println("GetProjectTaskLinkInfo error : ", linkErr)
+						continue
+					}
+					if linkInfo != "" {
+						like, comment, collect, share, moreApiErr := service.MoreapiService{}.GetBilibiliStatistic(linkInfo)
+						if moreApiErr != nil {
+							log.Println("GetBilibiliStatistic error : ", moreApiErr)
+							continue
+						}
+						createData := gorm_model.ProjectTaskLinkStatistic{
+							ProjectId:       projectId,
+							TaskId:          taskId,
+							PlatformId:      5,
+							VoteCount:       like,
+							CommitCount:     comment,
+							CollectionCount: collect,
+							ViewCount:       share,
+						}
+						createErr := db.CreateProjectTaskLinkStatistic(ctx, &createData)
+						if createErr != nil {
+							log.Println("CreateProjectTaskLinkStatistic error : ", createErr)
+							continue
+						}
+					}
+				}
+			}
+		}
+	}
+}
+
+// UpdateLocalTaskBilibiliLinkData 定时拉取b站平台,本地生活子任务链接数据
+func UpdateLocalTaskBilibiliLinkData() {
+
+	log.Println("UpdateLocalTaskBilibiliLinkData is running ,Time :", time.Now())
+
+	// 1. 符合条件的local
+	ctx := context.Background()
+	localIdList, localIdListTotal, localIdListErr := db.GetLocalIdList(ctx, 8, 5)
+	if localIdListErr != nil {
+		log.Println("GetLocalIdList error : ", localIdListErr)
+		return
+	}
+
+	// 2. 符合条件的task
+	if localIdList != nil && localIdListTotal != 0 {
+		for _, localId := range localIdList {
+			taskIdList, taskIdTotal, taskIdErr := db.GetLocalTaskIdList(ctx, localId)
+			if taskIdErr != nil {
+				log.Println("GetLocalTaskIdList error : ", taskIdErr)
+				continue
+			}
+			if taskIdList != nil && taskIdTotal != 0 {
+				for _, taskId := range taskIdList {
+					linkInfo, linkErr := db.GetProjectTaskLinkInfo(ctx, taskId, 1)
+					if linkErr != nil {
+						log.Println("GetProjectTaskLinkInfo error : ", linkErr)
+						continue
+					}
+					if linkInfo != "" {
+						like, comment, collect, share, moreApiErr := service.MoreapiService{}.GetBilibiliStatistic(linkInfo)
+						if moreApiErr != nil {
+							log.Println("GetKuaishouStatistic error : ", moreApiErr)
+							continue
+						}
+						createData := gorm_model.LocalTaskLinkStatistic{
+							LocalId:         localId,
+							TaskId:          taskId,
+							PlatformId:      5,
+							VoteCount:       like,
+							CommitCount:     comment,
+							CollectionCount: collect,
+							ViewCount:       share,
+						}
+						createErr := db.CreateLocalTaskLinkStatistic(ctx, &createData)
+						if createErr != nil {
+							log.Println("CreateLocalTaskLinkStatistic error : ", createErr)
+							continue
+						}
+					}
+				}
+			}
+		}
+	}
+}