Răsfoiți Sursa

reset to 线上

ziwen 3 ani în urmă
părinte
comite
7d0db34190

+ 0 - 0
services/commodity_trade_cffex.go → service/commodity_trade_cffex.go


+ 30 - 65
services/commodity_trade_dalian.go → service/commodity_trade_dalian.go

@@ -29,8 +29,7 @@ type SearchContractId struct {
 
 //同步 N天 之内的数据
 func SyncRankingFromDalianDo() {
-	for i := 180; i >= 0; i-- {
-		//time.Sleep(time.Duration(1) * time.Second)
+	for i := 182; i >= 0; i-- {
 		SyncRankingFromDalianSearch(i)
 	}
 }
@@ -124,11 +123,11 @@ func SyncRankingFromDalianSearch(dayNum int) (err error) {
 		item.ListSearch = listContractId
 		items = append(items, item)
 	}
-	//for k, v := range items {
-	//	for _, v2 := range v.ListSearch {
-	//		fmt.Println(currDate, v.VarietyName, v2.ContractId, v.CarietyCode, k)
-	//	}
-	//}
+	for k, v := range items {
+		for _, v2 := range v.ListSearch {
+			fmt.Println(currDate, v.VarietyName, v2.ContractId, v.CarietyCode, k)
+		}
+	}
 	SyncRankingFromDalian(dayNum, items)
 	return err
 }
@@ -253,7 +252,7 @@ func DoHtml(body, name, contractId string, dateTime time.Time, listDataMap map[s
 	table.Find("tr").Each(func(i int, tr *goquery.Selection) {
 		tds := tr.Find("td")
 		//fmt.Println(tds.Length(), "长度:", i)
-		if tds.Length() == 0 || tds.Length() == 7 {
+		if tds.Length() == 0 || tds.Length() == 7 || i == 23 {
 			tdText := tds.Text()
 			utils.FileLog.Info(tdText)
 		} else {
@@ -295,16 +294,29 @@ func DoHtml(body, name, contractId string, dateTime time.Time, listDataMap map[s
 			item.Rank = rank
 			item.DealShortName = shortName
 			item.DealName = shortName + "_" + contractId + "_成交量"
-
+			if val, ok := listIndexCodeMap[item.DealName]; ok {
+				item.DealCode = val
+			} else {
+				item.DealCode = GetIndexCodeGeneratorPinYing(shortName, item.DealName, contractId, "deal", "DL")
+			}
 			item.DealValue = dealValue
 			item.BuyShortName = buyName
 			item.DealChange = dealChange
 			item.BuyName = buyName + "_" + contractId + "_持买单量"
-
+			if val, ok := listIndexCodeMap[item.BuyName]; ok {
+				item.BuyCode = val
+			} else {
+				item.BuyCode = GetIndexCodeGeneratorPinYing(buyName, item.BuyName, contractId, "buy", "DL")
+			}
 			item.BuyValue = buyValue
 			item.BuyChange = buyChange
 			item.SoldShortName = soldName
 			item.SoldName = soldName + "_" + contractId + "_持卖单量"
+			if val, ok := listIndexCodeMap[item.SoldName]; ok {
+				item.SoldCode = val
+			} else {
+				item.SoldCode = GetIndexCodeGeneratorPinYing(soldName, item.SoldName, contractId, "sold", "DL")
+			}
 			item.SoldValue = soldValue
 			item.SoldChange = soldChange
 			item.Frequency = "日度"
@@ -313,47 +325,6 @@ func DoHtml(body, name, contractId string, dateTime time.Time, listDataMap map[s
 			item.CreateTime = time.Now().Format(utils.FormatDateTime)
 			item.ModifyTime = time.Now().Format(utils.FormatDateTime)
 			item.DataTime = dateTime.Format(utils.FormatDate)
-			//处理指标Id
-			if i != 23 {
-				if val, ok := listIndexCodeMap[item.DealName]; ok {
-					item.DealCode = val
-				} else {
-					item.DealCode = GetIndexCodeGeneratorPinYing(shortName, item.DealName, contractId, "deal", "DL")
-				}
-				if val, ok := listIndexCodeMap[item.BuyName]; ok {
-					item.BuyCode = val
-				} else {
-					item.BuyCode = GetIndexCodeGeneratorPinYing(buyName, item.BuyName, contractId, "buy", "DL")
-				}
-				if val, ok := listIndexCodeMap[item.SoldName]; ok {
-					item.SoldCode = val
-				} else {
-					item.SoldCode = GetIndexCodeGeneratorPinYing(soldName, item.SoldName, contractId, "sold", "DL")
-				}
-			}
-
-			if i == 23 {
-				item.Rank = "999"
-				item.DealName = "top20_" + contractId + "_成交量(手)"
-				if val, ok := listIndexCodeMap[item.DealName]; ok {
-					item.DealCode = val
-				} else {
-					item.DealCode = GetIndexCodeGeneratorPinYing("top20", item.DealName, contractId, "deal", "DL")
-				}
-				item.BuyName = "top20_" + contractId + "_持买单量(手)"
-				if val, ok := listIndexCodeMap[item.BuyName]; ok {
-					item.BuyCode = val
-				} else {
-					item.BuyCode = GetIndexCodeGeneratorPinYing("top20", item.BuyName, contractId, "buy", "DL")
-				}
-				item.SoldName = "top20_" + contractId + "_持卖单量(手)"
-
-				if val, ok := listIndexCodeMap[item.SoldName]; ok {
-					item.SoldCode = val
-				} else {
-					item.SoldCode = GetIndexCodeGeneratorPinYing("top20", item.SoldName, contractId, "sold", "DL")
-				}
-			}
 			if val, ok := listDataMap[item.DealShortName+item.ClassifyType+item.DataTime]; !ok {
 				addSql += models.GetAddSql(item)
 				isAdd = true
@@ -366,7 +337,6 @@ func DoHtml(body, name, contractId string, dateTime time.Time, listDataMap map[s
 					}
 				}
 			}
-
 		}
 	})
 	addSql = strings.TrimRight(addSql, ",")
@@ -393,21 +363,16 @@ func GetIndexCodeGeneratorPinYing(shortName, indexName, contractCode, suffix, ex
 		indexCode = ""
 		return indexCode
 	}
-	if shortName == "top20" {
-		indexCode = "top20" + contractCode + suffix
-	} else {
-		//取公司的全拼
-		a := pinyin.NewArgs()
-		rows := pinyin.Pinyin(shortName, a)
-		strResult := ""
-		for i := 0; i < len(rows); i++ {
-			if len(rows[i]) != 0 {
-				strResult += rows[i][0]
-			}
+	//取公司前两个字的全拼
+	a := pinyin.NewArgs()
+	rows := pinyin.Pinyin(shortName, a)
+	strResult := ""
+	for i := 0; i < len(rows[:2]); i++ {
+		if len(rows[i]) != 0 {
+			strResult += rows[i][0]
 		}
-		indexCode = strResult + contractCode + suffix
 	}
-
+	indexCode = strResult + contractCode + suffix
 	err := models.AddBaseFromTradeMapping(indexName, indexCode, exchange)
 	if err != nil {
 		fmt.Println("add Code err:", err)

+ 10 - 53
services/commodity_trade_ine.go → service/commodity_trade_ine.go

@@ -4,9 +4,9 @@ import (
 	"encoding/json"
 	"fmt"
 	"github.com/mozillazg/go-pinyin"
-	"github.com/rdlucklib/rdluck_tools/http"
 	"hongze/hongze_data_crawler/models"
 	"hongze/hongze_data_crawler/utils"
+	"github.com/rdlucklib/rdluck_tools/http"
 	"strings"
 	"time"
 )
@@ -45,32 +45,28 @@ var ineIndexCodeMap = make(map[string]string)
 
 func IneIndexCodeGenerator(shortName, indexName, contractCode, suffix string) string {
 	if shortName == "" {
-		return ""
+		indexCode = ""
+		return indexCode
 	}
+	//取公司前两个字的全拼
+	a := pinyin.NewArgs()
+	rows := pinyin.Pinyin(shortName, a)
 	strResult := ""
-	if shortName != "top20" {
-		//取公司前两个字的全拼
-		a := pinyin.NewArgs()
-		rows := pinyin.Pinyin(shortName, a)
-		for i := 0; i < len(rows[:2]); i++ {
-			if len(rows[i]) != 0 {
-				strResult += rows[i][0]
-			}
+	for i := 0; i < len(rows[:2]); i++ {
+		if len(rows[i]) != 0 {
+			strResult += rows[i][0]
 		}
-	} else {
-		strResult = "top20"
 	}
 	ineIndexCode, _ := ineIndexCodeMap[indexName]
 	if ineIndexCode == "" {
 		ineIndexCode = strResult + contractCode + suffix
-		ineIndexCode = strings.Replace(ineIndexCode, " ", "", -1)
 		ineIndexCodeMap[indexName] = ineIndexCode
 		err := models.AddBaseFromTradeMapping(indexName, ineIndexCode, "INE")
 		if err != nil {
 			fmt.Println("add Code err:", err)
 		}
 	}
-	return strings.Replace(ineIndexCode, " ", "", -1)
+	return ineIndexCode
 }
 
 // SyncRankingFromIne 上海能源交易中心持单排名
@@ -139,45 +135,6 @@ func SyncRankingFromIne() {
 				item.ModifyTime = time.Now()
 				item.DataTime = tradeDate
 
-				itemVerifyCode = item.BuyValue + item.DealValue + item.SoldValue
-				if existIndex, ok := existIndexMap[item.DealName+item.BuyName+item.SoldName]; !ok {
-					newID, err := models.AddBaseFromTradeIneIndex(item)
-					if err != nil {
-						fmt.Println("insert error:", err)
-					}
-					fmt.Println("insert new indexID:", newID)
-				} else if existIndex != nil && itemVerifyCode != (existIndex.DealValue+existIndex.BuyValue+existIndex.SoldValue) {
-					//更新
-					err := models.ModifyBaseFromTradeIneIndex(item.DealValue, item.BuyValue, item.SoldValue, existIndex.BaseFromTradeIneIndexId)
-					if err != nil {
-						fmt.Println("data update err:", err)
-					}
-				}
-			} else if p.Rank == 999 {
-				//Top 20
-				item.Rank = p.Rank
-				item.DealShortName = p.ParticipantName1
-				item.BuyShortName = p.ParticipantName2
-				item.SoldShortName = p.ParticipantName3
-				item.DealName = strings.Replace(fmt.Sprintf("%s", "top20_"+p.ContractCode+"_成交量(手)"), " ", "", -1)
-				item.BuyName = strings.Replace(fmt.Sprintf("%s", "top20_"+p.ContractCode+"_持买单量(手)"), " ", "", -1)
-				item.SoldName = strings.Replace(fmt.Sprintf("%s", "top20_"+p.ContractCode+"_持卖单量(手)"), " ", "", -1)
-				item.DealCode = IneIndexCodeGenerator("top20", item.DealName, p.ContractCode, "deal")
-				item.BuyCode = IneIndexCodeGenerator("top20", item.BuyName, p.ContractCode, "buy")
-				item.SoldCode = IneIndexCodeGenerator("top20", item.SoldName, p.ContractCode, "sold")
-				item.DealValue = p.Deal
-				item.DealChange = p.Change1
-				item.BuyValue = p.BuyIn
-				item.BuyChange = p.Change2
-				item.SoldValue = p.SoldOut
-				item.SoldChange = p.Change3
-				item.ClassifyName = strings.Replace(p.ProductName, " ", "", -1)
-				item.ClassifyType = strings.Replace(p.ContractCode, " ", "", -1)
-				item.Frequency = "日度"
-				item.CreateTime = time.Now()
-				item.ModifyTime = time.Now()
-				item.DataTime = tradeDate
-
 				itemVerifyCode = item.BuyValue + item.DealValue + item.SoldValue
 				if existIndex, ok := existIndexMap[item.DealName+item.BuyName+item.SoldName]; !ok {
 					newID, err := models.AddBaseFromTradeIneIndex(item)

+ 17 - 64
services/commodity_trade_shanghai.go → service/commodity_trade_shanghai.go

@@ -4,9 +4,9 @@ import (
 	"encoding/json"
 	"fmt"
 	"github.com/mozillazg/go-pinyin"
-	"github.com/rdlucklib/rdluck_tools/http"
 	"hongze/hongze_data_crawler/models"
 	"hongze/hongze_data_crawler/utils"
+	"github.com/rdlucklib/rdluck_tools/http"
 	"strings"
 	"time"
 )
@@ -45,25 +45,21 @@ var indexCodeMap = make(map[string]string)
 
 func shIndexCodeGenerator(shortName, indexName, contractCode, suffix string) string {
 	if shortName == "" {
-		return ""
+		indexCode = ""
+		return indexCode
 	}
+	//取公司前两个字的全拼
+	a := pinyin.NewArgs()
+	rows := pinyin.Pinyin(shortName, a)
 	strResult := ""
-	if shortName != "top20" {
-		//取公司前两个字的全拼
-		a := pinyin.NewArgs()
-		rows := pinyin.Pinyin(shortName, a)
-		for i := 0; i < len(rows[:2]); i++ {
-			if len(rows[i]) != 0 {
-				strResult += rows[i][0]
-			}
+	for i := 0; i < len(rows[:2]); i++ {
+		if len(rows[i]) != 0 {
+			strResult += rows[i][0]
 		}
-	} else {
-		strResult = "top20"
 	}
 	indexCode, _ := indexCodeMap[indexName]
 	if indexCode == "" {
 		indexCode = strResult + contractCode + suffix
-		indexCode = strings.Replace(indexCode, " ", "", -1)
 		indexCodeMap[indexName] = indexCode
 		err := models.AddBaseFromTradeMapping(indexName, indexCode, "SH")
 		if err != nil {
@@ -77,7 +73,7 @@ func shIndexCodeGenerator(shortName, indexName, contractCode, suffix string) str
 func SyncRankingFromShangHai() {
 	n := utils.GetRandInt(10, 120)
 	time.Sleep(time.Duration(n) * time.Second)
-	allCode, err := models.GetIndexCodeFromMapping("SH")
+	allCode, err := models.GetIndexCodeFromMapping("Z")
 	if err != nil {
 		fmt.Println("select Code err:", err)
 	}
@@ -87,6 +83,7 @@ func SyncRankingFromShangHai() {
 	//获取新的指标信息
 	for i := 2; i > 0; i-- {
 		var message Message
+		var item = new(models.BaseFromTradeShanghaiIndex)
 		zzUrl := "http://www.shfe.com.cn/data/dailydata/kx/pm%s.dat"
 		date := time.Now().AddDate(0, 0, -i)
 		dateStr := date.Format(utils.FormatDateUnSpace)
@@ -114,63 +111,19 @@ func SyncRankingFromShangHai() {
 		var itemVerifyCode int
 		//处理指标
 		for _, p := range position {
-			var item = new(models.BaseFromTradeShanghaiIndex)
 			if p.Rank > 0 && p.Rank < 40 && p.ParticipantName1 != "" {
 				if strings.Replace(p.ProductName, " ", "", -1) != "20号胶" && strings.Replace(p.ProductName, " ", "", -1) != "低硫燃料油" {
-					contractCode := strings.Replace(p.ContractCode, " ", "", -1)
 					//成交量
 					item.Rank = p.Rank
-					item.DealShortName = strings.Replace(p.ParticipantName1, " ", "", -1)
-					item.BuyShortName = strings.Replace(p.ParticipantName2, " ", "", -1)
-					item.SoldShortName = strings.Replace(p.ParticipantName3, " ", "", -1)
+					item.DealShortName = p.ParticipantName1
+					item.BuyShortName = p.ParticipantName2
+					item.SoldShortName = p.ParticipantName3
 					item.DealName = strings.Replace(fmt.Sprintf("%s", p.ParticipantName1+"_"+p.ContractCode+"_成交量(手)"), " ", "", -1)
 					item.BuyName = strings.Replace(fmt.Sprintf("%s", p.ParticipantName2+"_"+p.ContractCode+"_持买单量(手)"), " ", "", -1)
 					item.SoldName = strings.Replace(fmt.Sprintf("%s", p.ParticipantName3+"_"+p.ContractCode+"_持卖单量(手)"), " ", "", -1)
-					item.DealCode = shIndexCodeGenerator(item.DealShortName, item.DealName, contractCode, "deal")
-					item.BuyCode = shIndexCodeGenerator(item.BuyShortName, item.BuyName, contractCode, "buy")
-					item.SoldCode = shIndexCodeGenerator(item.SoldShortName, item.SoldName, contractCode, "sold")
-					item.DealValue = p.Deal
-					item.DealChange = p.Change1
-					item.BuyValue = p.BuyIn
-					item.BuyChange = p.Change2
-					item.SoldValue = p.SoldOut
-					item.SoldChange = p.Change3
-					item.ClassifyName = strings.Replace(p.ProductName, " ", "", -1)
-					item.ClassifyType = strings.Replace(p.ContractCode, " ", "", -1)
-					item.Frequency = "日度"
-					item.CreateTime = time.Now()
-					item.ModifyTime = time.Now()
-					item.DataTime = tradeDate
-
-					itemVerifyCode = item.BuyValue + item.DealValue + item.SoldValue
-					if existIndex, ok := existIndexMap[item.DealName+item.BuyName+item.SoldName]; !ok {
-						newID, err := models.AddBaseFromTradeShangHaiIndex(item)
-						if err != nil {
-							fmt.Println("insert error:", err)
-						}
-						fmt.Println("insert new indexID:", newID)
-					} else if existIndex != nil && itemVerifyCode != (existIndex.DealValue+existIndex.BuyValue+existIndex.SoldValue) {
-						//更新
-						err := models.ModifyBaseFromTradeShangHaiIndex(item.DealValue, item.BuyValue, item.SoldValue, existIndex.BaseFromTradeShangHaiIndexId)
-						if err != nil {
-							fmt.Println("data update err:", err)
-						}
-					}
-				}
-			} else if p.Rank == 999 {
-				if strings.Replace(p.ProductName, " ", "", -1) != "20号胶" && strings.Replace(p.ProductName, " ", "", -1) != "低硫燃料油" {
-					contractCode := strings.Replace(p.ContractCode, " ", "", -1)
-					//Top 20
-					item.Rank = p.Rank
-					item.DealShortName = strings.Replace(p.ParticipantName1, " ", "", -1)
-					item.BuyShortName = strings.Replace(p.ParticipantName2, " ", "", -1)
-					item.SoldShortName = strings.Replace(p.ParticipantName3, " ", "", -1)
-					item.DealName = strings.Replace(fmt.Sprintf("%s", "top20_"+p.ContractCode+"_成交量(手)"), " ", "", -1)
-					item.BuyName = strings.Replace(fmt.Sprintf("%s", "top20_"+p.ContractCode+"_持买单量(手)"), " ", "", -1)
-					item.SoldName = strings.Replace(fmt.Sprintf("%s", "top20_"+p.ContractCode+"_持卖单量(手)"), " ", "", -1)
-					item.DealCode = shIndexCodeGenerator("top20", item.DealName, contractCode, "deal")
-					item.BuyCode = shIndexCodeGenerator("top20", item.BuyName, contractCode, "buy")
-					item.SoldCode = shIndexCodeGenerator("top20", item.SoldName, contractCode, "sold")
+					item.DealCode = shIndexCodeGenerator(item.DealShortName, item.DealName, p.ContractCode, "deal")
+					item.BuyCode = shIndexCodeGenerator(item.BuyShortName, item.BuyName, p.ContractCode, "buy")
+					item.SoldCode = shIndexCodeGenerator(item.SoldShortName, item.SoldName, p.ContractCode, "sold")
 					item.DealValue = p.Deal
 					item.DealChange = p.Change1
 					item.BuyValue = p.BuyIn

+ 11 - 58
services/commodity_trade_zhengzhou.go → service/commodity_trade_zhengzhou.go

@@ -3,10 +3,10 @@ package services
 import (
 	"fmt"
 	"github.com/mozillazg/go-pinyin"
-	"github.com/rdlucklib/rdluck_tools/http"
 	"hongze/hongze_data_crawler/models"
 	"hongze/hongze_data_crawler/utils"
 	"log"
+	"github.com/rdlucklib/rdluck_tools/http"
 	"strconv"
 	"strings"
 	"time"
@@ -19,21 +19,20 @@ var zIndexCodeMap = make(map[string]string)
 var zActionCodeMap = make(map[string]map[string]int)
 
 func zIndexCodeGenerator(shortName, indexName, contractCode, suffix string) string {
-	if shortName == "" || shortName == "-"{
+	if len(shortName) == 0 || shortName == "-" {
 		return ""
 	}
+	a := pinyin.NewArgs()
+	rows := pinyin.Pinyin(shortName, a)
 	strResult := ""
-	if shortName != "top20" {
-		//取公司前两个字的全拼
-		a := pinyin.NewArgs()
-		rows := pinyin.Pinyin(shortName, a)
-		for i := 0; i < len(rows[:2]); i++ {
-			if len(rows[i]) != 0 {
-				strResult += rows[i][0]
-			}
+	for i := 0; i < len(rows[:2]); i++ {
+		if len(rows[i]) != 0 {
+			strResult += rows[i][0]
 		}
-	} else {
-		strResult = "top20"
+	}
+	if shortName == "" {
+		zIndexCode = ""
+		return zIndexCode
 	}
 	//郑州特殊处理,当合约号有中文时只取英文代号 如 苹果AP ---> AP
 	if len(contractCode) > 7 {
@@ -218,9 +217,6 @@ func SyncRankingFromZhengzhou() {
 				//fmt.Printf("memberShortNameArr:%s,len:%d\n", memberShortNameArr, len(memberShortNameArr))
 				if len(memberShortNameArr) != 0 {
 					if len(memberShortNameArr[0]) != 2 {
-						if len(classifyName) > 7 {
-							classifyName = classifyName[len(classifyName)-2:]
-						}
 						item := new(models.BaseFromTradeZhengzhouIndex)
 						item.Rank, _ = strconv.Atoi(rank)
 						item.DealShortName = memberShortNameArr[0]
@@ -245,49 +241,6 @@ func SyncRankingFromZhengzhou() {
 						item.ModifyTime = time.Now()
 						item.DataTime = tradeDate
 
-						itemVerifyCode = item.BuyValue + item.DealValue + item.SoldValue
-						if existIndex, ok := existIndexMap[item.DealName+item.BuyName+item.SoldName]; !ok {
-							newID, err := models.AddBaseFromTradeZhengzhouIndex(item)
-							if err != nil {
-								fmt.Println("insert error:", err)
-							}
-							fmt.Println("insert new indexID:", newID)
-						} else if existIndex != nil && itemVerifyCode != (existIndex.DealValue+existIndex.BuyValue+existIndex.SoldValue) {
-							//更新
-							err := models.ModifyBaseFromTradeZhengzhouIndex(item.DealValue, item.BuyValue, item.SoldValue, existIndex.BaseFromTradeZhengzhouIndexId)
-							if err != nil {
-								fmt.Println("data update err:", err)
-							}
-						}
-					} else {
-						//合计
-						if len(classifyName) > 7 {
-							classifyName = classifyName[len(classifyName)-2:]
-						}
-						item := new(models.BaseFromTradeZhengzhouIndex)
-						item.Rank = 999
-						item.DealShortName = ""
-						item.DealName = "top20" + "_" + classifyName + "_" + dealSuffix
-						item.DealCode = zIndexCodeGenerator("top20", item.DealName, classifyName, "deal")
-						item.DealValue, _ = strconv.Atoi(dealVal)
-						item.DealChange, _ = strconv.Atoi(dealAddCutVal)
-						item.BuyShortName = ""
-						item.BuyName = "top20" + "_" + classifyName + "_" + buySuffix
-						item.BuyCode = zIndexCodeGenerator("top20", item.BuyName, classifyName, "buy")
-						item.BuyValue, _ = strconv.Atoi(buyVal)
-						item.BuyChange, _ = strconv.Atoi(buyAddCutVal)
-						item.SoldShortName = ""
-						item.SoldName = "top20" + "_" + classifyName + "_" + sellSuffix
-						item.SoldCode = zIndexCodeGenerator("top20", item.SoldName, classifyName, "sold")
-						item.SoldValue, _ = strconv.Atoi(sellVal)
-						item.SoldChange, _ = strconv.Atoi(sellAddCutVal)
-						item.Frequency = "日度"
-						item.ClassifyName = classifyName
-						item.ClassifyType = classifyType
-						item.CreateTime = time.Now()
-						item.ModifyTime = time.Now()
-						item.DataTime = tradeDate
-
 						itemVerifyCode = item.BuyValue + item.DealValue + item.SoldValue
 						if existIndex, ok := existIndexMap[item.DealName+item.BuyName+item.SoldName]; !ok {
 							newID, err := models.AddBaseFromTradeZhengzhouIndex(item)

+ 1 - 1
services/task.go → service/task.go

@@ -18,7 +18,7 @@ func Task() {
 	//time.Sleep(20 * time.Second)
 	//SyncRankingFromDalianDo()
 	//SyncStorageFromEic()
-	refreshData := task.NewTask("refreshData", "0 */30 16-20 * * *", RefreshData)
+	refreshData := task.NewTask("refreshData", "0 0 3 * * *", RefreshData)
 	task.AddTask("数据爬取", refreshData)
 	task.StartTask()
 	fmt.Println("end crawler")