rdluck 4 rokov pred
rodič
commit
308497bbaa
2 zmenil súbory, kde vykonal 7 pridanie a 6 odobranie
  1. 3 2
      services/data_source_longzhong.go
  2. 4 4
      services/task.go

+ 3 - 2
services/data_source_longzhong.go

@@ -227,8 +227,8 @@ func GetLzProductDetail() (err error) {
 		}
 	}()
 
-	startDate := time.Now().AddDate(0, 0, 0).Format(utils.FormatDate)
-	endDate := time.Now().AddDate(0, 0, 0).Format(utils.FormatDate)
+	startDate := "2017-01-01"//time.Now().AddDate(0, 0, 0).Format(utils.FormatDate)
+	endDate := "2017-12-31"//time.Now().AddDate(0, 0, 0).Format(utils.FormatDate)
 	time.Sleep(5 * time.Second)
 	pageSize := 30
 
@@ -258,6 +258,7 @@ func GetLzProductDetail() (err error) {
 			fmt.Println("err:", err.Error())
 			return err
 		}
+		fmt.Println(string(body))
 		utils.FileLog.Info("%s", string(body))
 		resp := new(models.LzProductInfoDetailResp)
 		err = json.Unmarshal(body, &resp)

+ 4 - 4
services/task.go

@@ -5,7 +5,7 @@ import (
 	"github.com/astaxie/beego/toolbox"
 )
 
-func Task() {
+func Task123() {
 	fmt.Println("task start")
 	//发送邮件
 	sendEmail := toolbox.NewTask("sendEmail", "0 0 12 * * 0 ", SendEmail)
@@ -37,13 +37,13 @@ func Task() {
 	fmt.Println("task end")
 }
 
-/*
+
 func Task() {
 	fmt.Println("start")
-	LzPriceExportExcel()
+	GetLzProductDetail()
 	fmt.Println("end")
 }
-*/
+
 func SendEmail() (err error) {
 	//报告历史访问次数
 	go ReportViewTimes()