Browse Source

Merge branch 'dev1.1' of http://192.168.3.207:8080/dataservice/datatools into dev1.1

xuzhiheng 2 years ago
parent
commit
d8e2998031

+ 30 - 1
telemarketingEtl/config.yaml

@@ -55,4 +55,33 @@ regex:
   - "^/swordfish/frontPage/collection/sess/index:pcCollection"#pc-标讯收藏
   - "^/jyapp/frontPage/collection/sess/index:appCollection"#app-标讯收藏
   - "^/weixin/frontPage/collection/sess/index:wxCollection"#wx-标讯收藏
-  - "^/product/index?serviceType=0:productIndex"#pc-会员介绍页面
+  - "^/product/index?serviceType=0:productIndex"#pc-会员介绍页面
+classOneHighSeas_A: 3  #一级公海A 3天内点击过剑鱼付费产品介绍页...
+classOneHighSeas_B: 30 #一级公海B 购买了超级订阅产品剩余使用时长不足30天的客户;
+classTwoHighSeaslastDay: 30 #二级公海 最近30天内活跃天数
+classTwoHighSeas_A: 15# #二级公海 A最近30天内活跃天数≥15天的客户
+classTwoHighSeas_B: #二级公海 B 10天≤最近30天内活跃天数<15天的客户;
+  - 10
+  - 15
+classTwoHighSeas_C: #二级公海C 5天≤最近30天内活跃天数<10天的客户;
+  - 5
+  - 10
+classTwoHighSeas_D: #二级公海D 1天≤最近30天内活跃天数<5天的客户;
+  - 1
+  - 5
+classThreeHighSeasDay: 0
+classThreeHighSeaslastDay: 30
+recycleBin_A: 5  #回收站:A.5个自然日内被销售人员手动退回公海的客户;
+recycleBin_B: 3  #回收站:B.3个自然日内有过“已接听”的通话记录且仍处于“商机线索”状态下的客户;
+#定时任务 查看事件
+eventInfoTask: '0 0 * * * *'
+#定时任务 搜索事件
+searchInfoTask: '0 0 * * * *'
+#定时任务 每日访问
+visitInfoTask: '0 0 * * * *'
+#定时任务
+TaskOpenSea: '0 0 0 * * *'
+#退出公海
+deleteOpenSeaTask: '0 0 0 * * *'
+#自动退回公海
+returnOpenSeaTask: '0 0 0 * * *'

+ 463 - 0
telemarketingEtl/entity/dwd_f_crm_open_sea.go

@@ -0,0 +1,463 @@
+package entity
+
+import (
+	"app.yhyue.com/moapp/jybase/date"
+	"app.yhyue.com/moapp/jybase/mongodb"
+	"github.com/gogf/gf/v2/frame/g"
+	"github.com/gogf/gf/v2/util/gconv"
+	"log"
+	"strings"
+	"sync"
+	"telemarketingEtl/config"
+	"telemarketingEtl/util"
+	"time"
+)
+
+/*
+超级订阅落地页 /front/vipsubscribe/introducePage  /jyapp/vipsubscribe/introducePage
+大会员落地页 /big/wx/page/landingPage /jyapp/big/page/landingPage
+产品体系服务 /product/index
+数据导出筛选 /front/dataExport/toSieve  /front/wx_dataExport/toSieve /jyapp/front/dataExport/toSieve
+数据导出购买 /front/dataExport/toCreateOrderPage/425b420f564502000756420a4056564451535451430e490f?from=&type=2&source=
+数据流量包 /front/dataPack/createOrder
+超级订阅 /swordfish/page_big_pc/free/svip/buy
+大会员 /big/pc/page/buy_commit
+*/
+
+/*
+3.公海客户来源:
+(1)一级公海:
+A. 3天内点击过剑鱼付费产品介绍页(产品-供应商服务体系页、大会员落地页、超级订阅落地页、数据自助导出-筛选条件页)或进入了购买页(超级订阅、大会员购买页、数据自助导出购买页、数据流量包购买页)的客户;
+B. 购买了超级订阅产品剩余使用时长不足30天的客户;
+C.超时未跟进导致被自动退回至公海的处于“潜在客户”、“意向客户”、“高意向客户”
+(2)二级公海:
+A.最近30天内活跃天数≥15天的客户;
+B.10天≤最近30天内活跃天数<15天的客户;
+C.5天≤最近30天内活跃天数<10天的客户;
+D.1天≤最近30天内活跃天数<5天的客户;
+备注:判断当日是否活跃的标准为当日是否点击查看了标讯内容。
+(3)三级公海:
+最近30天内活跃天数=0天的客户。
+(4)回收站:
+A.5个自然日内被销售人员手动退回公海的客户;
+B.3个自然日内有过“已接听”的通话记录且仍处于“商机线索”状态下的客户。
+(5)以上,涉及时间及量的均可配置。
+
+*/
+
+var (
+	oPool chan bool
+	oWait = &sync.WaitGroup{}
+)
+
+func init() {
+	poolSize := g.Cfg().MustGet(ctx, "poolSize").Int()
+	oPool = make(chan bool, poolSize)
+}
+
+func GetOpenSea() {
+	//
+	session := config.MgoLog.GetMgoConn()
+	defer config.MgoLog.DestoryMongoConn(session)
+	t := time.Now()
+	t = time.Date(t.Year(), t.Month(), t.Day(), 0, 0, 0, 0, time.Local)
+	end := t.Unix()
+	tA := t.AddDate(0, 0, -g.Cfg().MustGet(ctx, "classOneHighSeas_A").Int())
+
+	start := tA.Unix()
+	oneClassA := map[string]bool{}
+	//一级公海查询条件
+	queryOneClassPc := map[string]interface{}{
+		"date": map[string]interface{}{
+			"$gte": start,
+			"$lt":  end,
+		},
+		"$or": []map[string]interface{}{
+			map[string]interface{}{
+				"url": map[string]interface{}{
+					"$regex": `/front/vipsubscribe/introducePage`,
+				},
+			},
+			map[string]interface{}{
+				"url": map[string]interface{}{
+					"$regex": `/big/wx/page/landingPage`,
+				},
+			},
+			map[string]interface{}{
+				"url": map[string]interface{}{
+					"$regex": `/product/index`,
+				},
+			},
+			map[string]interface{}{
+				"url": map[string]interface{}{
+					"$regex": `/front/dataExport/toSieve`,
+				},
+			},
+			map[string]interface{}{
+				"url": map[string]interface{}{
+					"$regex": `/front/dataExport/toCreateOrderPage`,
+				},
+			},
+			map[string]interface{}{
+				"url": map[string]interface{}{
+					"$regex": `/front/dataPack/createOrder`,
+				},
+			},
+			map[string]interface{}{
+				"url": map[string]interface{}{
+					"$regex": `/swordfish/page_big_pc/free/svip/buy`,
+				},
+			},
+			map[string]interface{}{
+				"url": map[string]interface{}{
+					"$regex": `/big/pc/page/buy_commit`,
+				},
+			},
+			map[string]interface{}{
+				"url": map[string]interface{}{
+					"$regex": `/front/wx_dataExport/toSieve`,
+				},
+			},
+		},
+	}
+	iter := session.DB("qfw").C("jy_logs").Find(queryOneClassPc).Iter()
+	count := 0
+	//一级公海
+	for thisData := map[string]interface{}{}; iter.Next(&thisData); {
+		oPool <- true
+		oWait.Add(1)
+		go func(thisData map[string]interface{}) {
+			defer func() {
+				<-oPool
+				oWait.Done()
+			}()
+			userid := gconv.String(thisData["userid"])
+			if userid == "" {
+				return
+			}
+			if !mongodb.IsObjectIdHex(userid) {
+				userid = GetUserIdByPositionId(userid)
+			}
+			if userid == "" {
+				return
+			}
+			//根据userid获取线索id
+			if oneClassA[userid] {
+				return
+			}
+			uuid := GetClueIdByUserId(userid)
+			if uuid == "" {
+				return
+			}
+			oneClassA[uuid] = true
+		}(thisData)
+		count++
+		if count%100000 == 0 {
+			log.Printf("已完成%d条数据\n", count)
+		}
+		thisData = map[string]interface{}{}
+	}
+	oWait.Wait()
+
+	queryOneClassApp := map[string]interface{}{
+		"date": map[string]interface{}{
+			"$gte": start,
+			"$lt":  end,
+		},
+		"$or": []map[string]interface{}{
+			map[string]interface{}{
+				"url": map[string]interface{}{
+					"$regex": `/jyapp/vipsubscribe/introducePage`,
+				},
+			},
+			map[string]interface{}{
+				"url": map[string]interface{}{
+					"$regex": `jyapp/big/page/landingPage`,
+				},
+			},
+			map[string]interface{}{
+				"url": map[string]interface{}{
+					"$regex": `/jyapp/front/dataExport/toSieve`,
+				},
+			},
+		},
+	}
+	iter2 := session.DB("qfw").C("jyapp_logs").Find(queryOneClassApp).Iter()
+	count = 0
+	//一级公海
+	for thisData := map[string]interface{}{}; iter2.Next(&thisData); {
+		oPool <- true
+		oWait.Add(1)
+		go func(thisData map[string]interface{}) {
+			defer func() {
+				<-oPool
+				oWait.Done()
+			}()
+			userid := gconv.String(thisData["userid"])
+			if userid == "" {
+				return
+			}
+			if !mongodb.IsObjectIdHex(userid) {
+				userid = GetUserIdByPositionId(userid)
+			}
+			if userid == "" {
+				return
+			}
+			//根据userid获取线索id
+			if oneClassA[userid] {
+				return
+			}
+			uuid := GetClueIdByUserId(userid)
+			if uuid == "" {
+				return
+			}
+			oneClassA[uuid] = true
+		}(thisData)
+		count++
+		if count%100000 == 0 {
+			log.Printf("已完成%d条数据\n", count)
+		}
+		thisData = map[string]interface{}{}
+	}
+	oWait.Wait()
+	//更新公海
+	AddOpenSea(oneClassA, 1, "A")
+	//
+	oneClassB := map[string]bool{}
+	classB, ok := config.Mgo.Find("user", map[string]interface{}{
+		"l_vip_endtime": map[string]interface{}{
+			"$gte": t.AddDate(0, 0, -g.Cfg().MustGet(ctx, "classOneHighSeas_B").Int()),
+		},
+		"i_vip_status": map[string]interface{}{
+			"$gt": 0,
+		},
+		"i_appid": 2,
+	}, nil, `{"_id":1}`, false, -1, -1)
+	if classB != nil && ok && len(*classB) > 0 {
+		for _, v := range *classB {
+			userid := mongodb.BsonIdToSId(v["_id"])
+			if oneClassA[userid] {
+				continue
+			}
+			uuid := GetClueIdByUserId(userid)
+			oneClassB[uuid] = true
+		}
+	}
+	AddOpenSea(oneClassB, 1, "B")
+	//TODO 一级公海c
+	oneClassC := map[string]bool{}
+	twoA, twoB, twoC, twoD := TwoOpenSea(oneClassA, oneClassB, oneClassC)
+	AddOpenSea(twoA, 2, "A")
+	AddOpenSea(twoB, 2, "B")
+	AddOpenSea(twoC, 2, "C")
+	AddOpenSea(twoD, 2, "D")
+	//三级公海
+	ThreeOpenSea()
+	//
+	log.Println("end")
+}
+
+//二级公海
+/*
+	A.最近30天内活跃天数≥15天的客户;
+	B.10天≤最近30天内活跃天数<15天的客户;
+	C.5天≤最近30天内活跃天数<10天的客户;
+	D.1天≤最近30天内活跃天数<5天的客户;
+*/
+func TwoOpenSea(oneClassA, oneClassB, oneClassC map[string]bool) (aMap, bMap, cMap, dMap map[string]bool) {
+	q := "SELECT userid,COUNT(1) as count FROM dwd_f_userbase_visit_info WHERE  createtime > %s AND contentnum >%v GROUP BY userid "
+	//
+	stmtOut, err := config.JianyuSubjectdb.DB.Prepare(q)
+	defer func() {
+		log.Println("stmtOut.Close start")
+		stmtOut.Close()
+		log.Println("stmtOut.Close over")
+	}()
+
+	rows, err := stmtOut.Query()
+	if err != nil {
+		log.Println(err)
+	}
+	defer func() {
+		log.Println("rows.Close start")
+		rows.Close()
+		log.Println("rows.Close over")
+	}()
+	aMap = map[string]bool{}
+	bMap = map[string]bool{}
+	cMap = map[string]bool{}
+	dMap = map[string]bool{}
+	for rows.Next() {
+		var userid string
+		var ct int
+		err := rows.Scan(&userid, &ct)
+		if err != nil {
+			log.Println("row scan err:", err)
+		}
+		uuid := GetClueIdByUserId(userid)
+		if oneClassA[uuid] || oneClassB[uuid] || oneClassC[uuid] {
+			continue
+		}
+		if ct >= 15 {
+			aMap[uuid] = true
+		}
+		if ct < 15 && ct >= 10 {
+			bMap[uuid] = true
+		}
+		if ct < 10 && ct >= 5 {
+			cMap[uuid] = true
+		}
+		if ct < 5 && ct >= 1 {
+			dMap[uuid] = true
+		}
+	}
+	// Check for errors during iteration
+	err = rows.Err()
+	if err != nil {
+		log.Println("rows err err:", err)
+	}
+	return
+}
+
+// 三级公海:
+// 最近30天内活跃天数=0天的客户。
+func ThreeOpenSea() {
+	t := time.Now()
+	t = time.Date(t.Year(), t.Month(), t.Day(), 0, 0, 0, 0, time.Local)
+	day := g.Cfg().MustGet(ctx, "classThreeHighSeaslastDay").Int()
+	t.AddDate(0, 0, day)
+	start := util.GetObjectId(t.Unix())
+	createtime := time.Now().Format(date.Date_Full_Layout)
+
+	config.JianyuSubjectdb.SelectByBath(500, func(l *[]map[string]interface{}) bool {
+		for _, v := range *l {
+			userid := gconv.String(v["userid"])
+			query := map[string]interface{}{
+				"userid": userid,
+				"_id": map[string]interface{}{
+					"$gte": start,
+				},
+			}
+			uuid := gconv.String(v["uid"])
+			if r, ok := config.MgoLog.Find("subscribepay_logs", query, nil, `{"_id":1}`, false, 0, 1); ok && r != nil && len(*r) == 0 {
+				config.JianyuSubjectdb.ExecBySql(`INSERT INTO dwd_f_crm_open_seax (comeintime,comeinsource,LEVEL,clue_level,clue_id) 
+												VALUES(?,?,?,?,?)
+												ON DUPLICATE KEY UPDATE comeintime=?,comeinsource=?,LEVEL=?,clue_level=?`, createtime, 1, 3, "D", uuid, createtime, 1, 3, "D")
+
+			}
+		}
+		return true
+	}, `select userid,uid from dwd_f_crm_clue_info where is_assign !=1`)
+}
+
+// 根据mongodb userid 获取 线索id
+func GetClueIdByUserId(userid string) (uuid string) {
+	if userid == "" {
+		return
+	}
+	data := config.JianyuSubjectdb.SelectBySql(`select id from dwd_f_crm_clue_info where userid=? limit 1`, userid)
+	if data == nil || len(*data) == 0 {
+		return
+	}
+	return gconv.String((*data)[0]["id"])
+}
+
+// m 需要更新的Map key:uuid
+// level 公海级别
+// clue_level线索级别
+func AddOpenSea(m map[string]bool, level int, clue_level string) {
+	createtime := time.Now().Format(date.Date_Full_Layout)
+	if len(m) > 0 {
+		for _, v := range m {
+			config.JianyuSubjectdb.ExecBySql(`INSERT INTO dwd_f_crm_open_seax (comeintime,comeinsource,LEVEL,clue_level,clue_id) 
+												VALUES(?,?,?,?,?)
+												ON DUPLICATE KEY UPDATE comeintime=?,comeinsource=?,LEVEL=?,clue_level=?`, createtime, 1, level, clue_level, v, createtime, 1, level, clue_level)
+		}
+	}
+}
+
+// 自动退出公海
+// 线索状态为“空号停机”自动从线索池删除。
+func DeleteOpenSea() {
+	config.JianyuSubjectdb.SelectByBath(500, func(l *[]map[string]interface{}) bool {
+		ids := []interface{}{}
+		for _, v := range *l {
+			id := v["id"]
+			ids = append(ids, id)
+		}
+		whs := []string{}
+		for i := 0; i < len(ids); i++ {
+			whs = append(whs, "?")
+		}
+		wh := strings.Join(whs, ",")
+		count := config.JianyuSubjectdb.UpdateOrDeleteBySql(`delete from dwd_f_crm_clue_info where id in (`+wh+`)`, ids...)
+		if count > 0 {
+			return true
+		}
+		return true
+	}, `select id from dwd_f_crm_clue_info where trailstatus == ?`, "00")
+}
+
+//自动退回公海
+/*
+1.处于“待签署客户”和“成交客户”状态下的客户不自动退回公海;
+2.“高意向客户”超过30天未更新跟进记录自动退回公海;
+3.“意向客户”超过30天未更新跟进记录自动退回公海;
+4.“潜在客户”超过60天未更新跟进记录自动退回公海;
+5.“沉睡客户”超过90天未更新跟进记录自动退回公海;
+6.“商机线索”超过2天未更新跟进记录自动退回公海;
+7.“无意向客户”自动退回公海;
+*/
+func ReturnOpenSea() {
+	t := time.Now()
+	t = time.Date(t.Year(), t.Month(), t.Day(), 0, 0, 0, 0, time.Local)
+	//高意向客户
+	highIntentionCustomer := g.Cfg().MustGet(ctx, "highIntentionCustomer").Int()
+	//意向客户
+	intentionCustomer := g.Cfg().MustGet(ctx, "intentionCustomer").Int()
+	//潜在客户
+	latentCustomer := g.Cfg().MustGet(ctx, "latentCustomer").Int()
+	//沉睡客户
+	sleepCustomer := g.Cfg().MustGet(ctx, "sleepCustomer").Int()
+	//商机线索
+	businessLeads := g.Cfg().MustGet(ctx, "businessLeads").Int()
+	//无意向客户
+	noIdeaCustomer := g.Cfg().MustGet(ctx, "noIdeaCustomer").Int()
+	//2.“高意向客户”超过30天未更新跟进记录自动退回公海;
+	for trailstatus, nexttime := range map[string]interface{}{
+		"04": t.AddDate(0, 0, -highIntentionCustomer),
+		"05": t.AddDate(0, 0, -intentionCustomer),
+		"06": t.AddDate(0, 0, -latentCustomer),
+		"07": t.AddDate(0, 0, -sleepCustomer),
+		"01": t.AddDate(0, 0, -businessLeads),
+		"08": t.AddDate(0, 0, -noIdeaCustomer),
+	} {
+		config.JianyuSubjectdb.SelectByBath(500, func(l *[]map[string]interface{}) bool {
+			ids := []interface{}{}
+			args := []interface{}{}
+			for _, v := range *l {
+				id := v["id"]
+				ids = append(ids, id)
+				//
+				args = append(args, id, time.Now().Format(date.Date_Full_Layout), 2)
+			}
+			whs := []string{}
+			for i := 0; i < len(ids); i++ {
+				whs = append(whs, "?")
+			}
+			wh := strings.Join(whs, ",")
+			//退出私海
+			count := config.JianyuSubjectdb.UpdateOrDeleteBySql(`delete from dwd_f_crm_private_sea  where clue_id in (`+wh+`)`, ids...)
+			//进入公海
+			config.JianyuSubjectdb.InsertIgnoreBatch("dwd_f_crm_open_sea", []string{"clue_id", "comeintime", "comeinsource"}, args)
+			//
+			if count > 0 {
+				return true
+			}
+			return true
+		}, `SELECT MAX(c.next_time) nexttime, b.id FROM dwd_f_crm_private_sea a 
+				LEFT JOIN dwd_f_crm_clue_info b ON a.clue_id=b.id 
+				LEFT JOIN  dwd_f_crm_trail_content c ON b.id =c.clue_id 
+				WHERE b.trailstatus =? AND c.next_time >?  GROUP BY  b.id`, trailstatus, nexttime)
+	}
+}

+ 2 - 1
telemarketingEtl/entity/entity.go

@@ -10,6 +10,7 @@ const (
 	DWD_F_USERBASE_VISIT_INFO = "dwd_f_userbase_visit_info"
 
 	BUYPORTRAIT = "采购单位画像"
-	INFO        = "标讯"
+	INFO        = "标讯三级页"
 	ENTPORTRAIT = "企业画像"
+	//TODO
 )

+ 2 - 1
telemarketingEtl/main.go

@@ -8,7 +8,8 @@ import (
 
 func main() {
 
-	timetask.TimeTask()
+	//定时任务开始
+	timetask.Run()
 
 	time.Sleep(999999 * time.Hour)
 }

+ 92 - 25
telemarketingEtl/timetask/task.go

@@ -3,49 +3,116 @@ package timetask
 import (
 	"context"
 	_ "github.com/gogf/gf/contrib/drivers/mysql/v2"
-	"github.com/gogf/gf/v2/frame/g"
+	"github.com/gogf/gf/v2/os/gcfg"
 	"github.com/gogf/gf/v2/os/gcron"
 	"github.com/gogf/gf/v2/os/gctx"
 	"telemarketingEtl/entity"
 	"time"
 )
 
-func TimeTask() {
-	//TaskEventInfo()
-	//TaskSearchInfo()
-	TaskVisitInfo()
-	return
-	var (
-		err error
-		ctx = gctx.New()
-	)
-	_, err = gcron.Add(ctx, "1 0 0 * * *", func(ctx context.Context) {
-		g.Log().Print(ctx, "Every day")
-		//Task_clearUserLog()
-	}, "clearUserTask")
-	if err != nil {
-		panic(err)
-	}
-
-}
+//func TimeTask() {
+//	//TaskEventInfo()
+//	//TaskSearchInfo()
+//	TaskVisitInfo()
+//	return
+//	var (
+//		err error
+//		ctx = gctx.New()
+//	)
+//	_, err = gcron.Add(ctx, "1 0 0 * * *", func(ctx context.Context) {
+//		g.Log().Print(ctx, "Every day")
+//		//Task_clearUserLog()
+//	}, "clearUserTask")
+//	if err != nil {
+//		panic(err)
+//	}
+//
+//}
 
 func TaskEventInfo() {
 	now := time.Now()
 	end := now.Unix()
-	//start := now.Add(-time.Hour * 24).Unix()
-	entity.EventInfoAdd(1677657397, end)
+	start := now.Add(-time.Hour * 24).Unix()
+	//查看事件
+	entity.EventInfoAdd(start, end)
 }
 
 func TaskSearchInfo() {
 	now := time.Now()
 	end := now.Unix()
-	//start := now.Add(-time.Hour * 24).Unix()
-	entity.SearchInfoAdd(1677657397, end)
+	start := now.Add(-time.Hour * 24).Unix()
+	//搜索事件
+	entity.SearchInfoAdd(start, end)
 }
 
 func TaskVisitInfo() {
 	now := time.Now()
 	end := now.Unix()
-	//start := now.Add(-time.Hour * 24).Unix()
-	entity.VisitInfoAdd(1677657397, end)
+	start := now.Add(-time.Hour * 24).Unix()
+	entity.VisitInfoAdd(start, end)
+}
+
+func TaskOpenSea() {
+	entity.GetOpenSea()
+}
+
+// 定时任务
+func Run() {
+	timetaskBl := gcfg.Instance().MustGet(gctx.New(), "timetaskBl", "").Bool()
+	if timetaskBl {
+		var (
+			err error
+			ctx = gctx.New()
+		)
+
+		eventInfoTask := gcfg.Instance().MustGet(gctx.New(), "eventInfoTask", "").String()
+		searchInfoTask := gcfg.Instance().MustGet(gctx.New(), "searchInfoTask", "").String()
+		visitInfoTask := gcfg.Instance().MustGet(gctx.New(), "visitInfoTask", "").String()
+		openSeaTask := gcfg.Instance().MustGet(gctx.New(), "openSeaTask", "").String()
+		deleteOpenSeaTask := gcfg.Instance().MustGet(gctx.New(), "deleteOpenSeaTask", "").String()
+		returnOpenSeaTask := gcfg.Instance().MustGet(gctx.New(), "returnOpenSeaTask", "").String()
+		//
+		_, err = gcron.Add(ctx, eventInfoTask, func(ctx context.Context) {
+			TaskEventInfo()
+		}, "TaskEventInfo")
+		if err != nil {
+			panic(err)
+		}
+
+		//
+		_, err = gcron.Add(ctx, searchInfoTask, func(ctx context.Context) {
+			TaskSearchInfo()
+		}, "TaskSearchInfo")
+		if err != nil {
+			panic(err)
+		}
+		//
+		_, err = gcron.Add(ctx, visitInfoTask, func(ctx context.Context) {
+			TaskVisitInfo()
+		}, "TaskVisitInfo")
+		if err != nil {
+			panic(err)
+		}
+		//
+		_, err = gcron.Add(ctx, openSeaTask, func(ctx context.Context) {
+			TaskOpenSea()
+		}, "TaskOpenSea")
+		if err != nil {
+			panic(err)
+		}
+		//
+		_, err = gcron.Add(ctx, deleteOpenSeaTask, func(ctx context.Context) {
+			entity.DeleteOpenSea()
+		}, "DeleteOpenSea")
+		if err != nil {
+			panic(err)
+		}
+		//
+		_, err = gcron.Add(ctx, returnOpenSeaTask, func(ctx context.Context) {
+			entity.ReturnOpenSea()
+		}, "ReturnOpenSea")
+		if err != nil {
+			panic(err)
+		}
+	}
 }