Blame view

addons/antis/library/wework/Api/CheckIn.php 1.08 KB
2db47680   hexiaodong   chore: 初始提交 php 遗...
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
  <?php

  

  namespace WeWork\Api;

  

  use WeWork\Traits\HttpClientTrait;

  

  class CheckIn

  {

      use HttpClientTrait;

  

      const TYPE_COMMUTE = 1;

      const TYPE_OUTSIDE = 2;

      const TYPE_ALL = 3;

  

      /**

       * 获取打卡规则

       *

       * @param int $datetime

       * @param array $userIdList

       * @return array

       */

      public function getOption(int $datetime, array $userIdList): array

      {

          return $this->httpClient->postJson('checkin/getcheckinoption', ['datetime' => $datetime, 'useridlist' => $userIdList]);

      }

  

      /**

       * 获取打卡数据

       *

       * @param int $type

       * @param int $startTime

       * @param int $endTime

       * @param array $userIdList

       * @return array

       */

      public function getData(int $type, int $startTime, int $endTime, array $userIdList): array

      {

          return $this->httpClient->postJson('checkin/getcheckindata', [

              'opencheckindatatype' => $type,

              'starttime' => $startTime,

              'endtime' => $endTime,

              'useridlist' => $userIdList

          ]);

      }

  }