-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathattendance_listscheduler_test.go
58 lines (51 loc) · 2.02 KB
/
attendance_listscheduler_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package godingtalk
import (
"fmt"
"testing"
"time"
)
func TestOapiAttendanceListscheduleRequest(t *testing.T) {
ts := time.Now().Format("2006-01-02 15:04:05")
resp, err := client.OapiAttendanceListscheduleRequest(ts, 0, 200)
if err != nil {
t.Fatal(err)
}
fmt.Println(resp)
}
func TestOapiAttendanceScheduleListbydayRequest(t *testing.T) {
ts := time.Now().AddDate(0, 0, 2)
resp, err := client.OapiAttendanceScheduleListbydayRequest("2749481918775803", "1519491135941375", ts.UnixNano()/1e6)
if err != nil {
t.Fatal(err)
}
for _, v := range resp.Result {
fmt.Println(v)
}
}
func TestOapiAttendanceScheduleListbyusersRequest(t *testing.T) {
ts := time.Now().AddDate(0, 0, 2)
resp, err := client.OapiAttendanceScheduleListbyusersRequest("2749481918775803", "2749481918775803,04553731381000121,6927611729781291,02155716671265668,2617504507699370,29616845081220641,322323373831091186,21604948491168487,095931334621426867,15163867091053091,0141304625714090,1519491135941375", ts.UnixNano()/1e6, ts.UnixNano()/1e6)
if err != nil {
t.Fatal(err)
}
for _, v := range resp.Result {
fmt.Println(v)
}
}
func TestOapiAttendanceScheduleResultListbyidsRequest(t *testing.T) {
resp, err := client.OapiAttendanceScheduleResultListbyidsRequest("1519491135941375", "113783017330,113783017331,113783016878,113783017280,113783016979,113783017179,113783017180,113783017130,113783016929,113783017031,113783017080,113783017081,113783017230")
if err != nil {
t.Fatal(err)
}
for _, v := range resp.Result {
fmt.Println(v)
}
}
func TestOapiAttendanceGetleavestatusRequest(t *testing.T) {
tm := time.Now()
resp, err := client.OapiAttendanceGetleavestatusRequest([]string{"2749481918775803","04553731381000121","6927611729781291","02155716671265668","2617504507699370","29616845081220641","322323373831091186","21604948491168487","095931334621426867","15163867091053091","0141304625714090","1519491135941375"}, tm.AddDate(0,0,-7).UnixNano()/1e6, tm.AddDate(0, 0, 7).UnixNano()/1e6, 0, 20)
if err != nil {
t.Fatal(err)
}
fmt.Println(resp)
}