rdluck 4 years ago
parent
commit
bea2f1fde5
3 changed files with 6 additions and 6 deletions
  1. 1 1
      models/data_source_longzhong.go
  2. 1 1
      services/data_source_longzhong.go
  3. 4 4
      services/task.go

+ 1 - 1
models/data_source_longzhong.go

@@ -205,7 +205,7 @@ type LongzhonginfoList struct {
 func GetLongzhonginfoList() (items []*LongzhonginfoList, err error) {
 	o := orm.NewOrm()
 	o.Using("edb")
-	sql := ` SELECT * FROM longzhonginfo WHERE classify_id IN(55,56) `
+	sql := ` SELECT * FROM longzhonginfo WHERE longzhonginfo_id=42 `
 	_, err = o.Raw(sql).QueryRows(&items)
 	return
 }

+ 1 - 1
services/data_source_longzhong.go

@@ -355,7 +355,7 @@ func GetHistoryLzProductDetail() (err error) {
 	}
 
 	for ik, iv := range infoList {
-		fmt.Println(ik, iv.SecName)
+		fmt.Println(ik, iv.SecName,iv.LongzhonginfoId)
 		startDate := "2020-01-01" //time.Now().AddDate(0, 0, 0).Format(utils.FormatDate)
 		endDate := "2020-12-31"   //time.Now().AddDate(0, 0, 0).Format(utils.FormatDate)
 		//time.Sleep(1 * time.Second)

+ 4 - 4
services/task.go

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