作者 tangxvhui

更新时间

@@ -21,8 +21,17 @@ func TestField(t *testing.T) { @@ -21,8 +21,17 @@ func TestField(t *testing.T) {
21 21
22 func TestPushData(t *testing.T) { 22 func TestPushData(t *testing.T) {
23 nowTime := time.Unix(1688572800, 0) 23 nowTime := time.Unix(1688572800, 0)
24 - err := SendDataStaffAssess(nowTime) 24 + c := NewClient()
  25 + c.Host = "https://character-library-metadata-bastion.sumifcc.com"
  26 + c.AppKey = "7q9Kd8ktoB"
  27 + c.AppSecret = "pQSoBj44Wk"
  28 + entry := StaffAssessItem{}
  29 + data, err := entry.DataForAppend(nowTime)
  30 + if err != nil {
  31 + t.Logf("获取每日评估的数据 %s", err)
  32 + }
  33 + err = c.AppendData(data)
25 if err != nil { 34 if err != nil {
26 - t.Error(err) 35 + t.Logf("获取每日评估的数据 %s", err)
27 } 36 }
28 } 37 }
@@ -10,7 +10,7 @@ func PushData() { @@ -10,7 +10,7 @@ func PushData() {
10 //每天15:30点运行 10 //每天15:30点运行
11 nowTime := time.Now() 11 nowTime := time.Now()
12 y, m, d := nowTime.Date() 12 y, m, d := nowTime.Date()
13 - t1 := time.Date(y, m, d, 16, 0, 0, 0, time.Local) //今天的15:30 13 + t1 := time.Date(y, m, d, 16, 50, 0, 0, time.Local) //今天的15:30
14 interval := t1.Sub(nowTime) 14 interval := t1.Sub(nowTime)
15 if interval < 0 { 15 if interval < 0 {
16 interval = (24 * time.Hour) + interval 16 interval = (24 * time.Hour) + interval