|
@@ -227,7 +227,7 @@ func GetLzProductDetail() (err error) {
|
|
|
}
|
|
|
}()
|
|
|
|
|
|
- startDate := time.Now().AddDate(0, 0, 0).Format(utils.FormatDate)
|
|
|
+ startDate := time.Now().AddDate(0, 0, -7).Format(utils.FormatDate)
|
|
|
endDate := time.Now().AddDate(0, 0, 0).Format(utils.FormatDate)
|
|
|
time.Sleep(5 * time.Second)
|
|
|
pageSize := 30
|
|
@@ -305,6 +305,8 @@ func GetLzProductDetail() (err error) {
|
|
|
lzdetail.Close = v.UnitValue
|
|
|
lzdetail.UnitDesc = v.UnitDesc
|
|
|
lzdetail.UpdTime = v.UpdTime
|
|
|
+ lzdetail.AddTime=v.AddTime
|
|
|
+ lzdetail.DisplayTime=v.DisplayTime
|
|
|
err = models.ModifyLongzhongdata(lzdetail)
|
|
|
if err != nil {
|
|
|
fmt.Println("ModifyLongzhongdata Err:" + err.Error())
|
|
@@ -320,6 +322,8 @@ func GetLzProductDetail() (err error) {
|
|
|
lzdetail.Close = v.UnitValue
|
|
|
lzdetail.UnitDesc = v.UnitDesc
|
|
|
lzdetail.UpdTime = v.UpdTime
|
|
|
+ lzdetail.AddTime=v.AddTime
|
|
|
+ lzdetail.DisplayTime=v.DisplayTime
|
|
|
err = models.AddLongzhongdata(lzdetail)
|
|
|
if err != nil {
|
|
|
fmt.Println("AddLongzhongdata Err:" + err.Error())
|
|
@@ -335,7 +339,7 @@ func GetLzProductDetail() (err error) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-//获取历史隆众数据
|
|
|
+//获取历史隆众石化数据
|
|
|
func GetHistoryLzProductDetail() (err error) {
|
|
|
utils.FileLog.Info("start GetHistoryLzProductDetail")
|
|
|
var msg string
|
|
@@ -431,7 +435,7 @@ func GetHistoryLzProductDetail() (err error) {
|
|
|
}
|
|
|
if count > 0 {
|
|
|
fmt.Println("数据已存在:", iv.Unitid, iv.SecName, v.UnitValue, v.DataTime)
|
|
|
- /*lzdetail := new(models.Longzhongdata)
|
|
|
+ lzdetail := new(models.Longzhongdata)
|
|
|
lzdetail.CreateTime = time.Now()
|
|
|
lzdetail.ModifyTime = time.Now()
|
|
|
lzdetail.TradeCode = target.TradeCode
|
|
@@ -440,11 +444,13 @@ func GetHistoryLzProductDetail() (err error) {
|
|
|
lzdetail.Close = v.UnitValue
|
|
|
lzdetail.UnitDesc = v.UnitDesc
|
|
|
lzdetail.UpdTime = v.UpdTime
|
|
|
+ lzdetail.AddTime=v.AddTime
|
|
|
+ lzdetail.DisplayTime=v.DisplayTime
|
|
|
err = models.ModifyLongzhongdata(lzdetail)
|
|
|
if err != nil {
|
|
|
fmt.Println("ModifyLongzhongdata Err:" + err.Error())
|
|
|
return err
|
|
|
- }*/
|
|
|
+ }
|
|
|
} else {
|
|
|
lzdetail := new(models.Longzhongdata)
|
|
|
lzdetail.CreateTime = time.Now()
|
|
@@ -455,6 +461,8 @@ func GetHistoryLzProductDetail() (err error) {
|
|
|
lzdetail.Close = v.UnitValue
|
|
|
lzdetail.UnitDesc = v.UnitDesc
|
|
|
lzdetail.UpdTime = v.UpdTime
|
|
|
+ lzdetail.AddTime=v.AddTime
|
|
|
+ lzdetail.DisplayTime=v.DisplayTime
|
|
|
err = models.AddLongzhongdata(lzdetail)
|
|
|
if err != nil {
|
|
|
fmt.Println("AddLongzhongdata Err:" + err.Error())
|
|
@@ -728,7 +736,7 @@ func GetLzProductPriceData() (err error) {
|
|
|
}
|
|
|
username := "hzmd"
|
|
|
password := "HZMD2020"
|
|
|
- startDate := time.Now().AddDate(0, 0, -1).Format(utils.FormatDate)
|
|
|
+ startDate := time.Now().AddDate(0, 0, -7).Format(utils.FormatDate)
|
|
|
endDate := time.Now().AddDate(0, 0, 0).Format(utils.FormatDate)
|
|
|
for k, v := range priceInfoList {
|
|
|
fmt.Println(k, v)
|