-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprocess_fetch.go
60 lines (52 loc) · 2.33 KB
/
process_fetch.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
59
60
// Copyright 2020 aumujun
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package godingtalk
// OapiProcessinstanceListidsRequest 批量获取审批实例ID
func (d *DingtalkClient) OapiProcessinstanceListidsRequest(reqData ProcessinstanceListidsReq) (ProcessinstanceListidsResp, error) {
var respData ProcessinstanceListidsResp
return respData, rpc(d, "topapi/processinstance/listids", d.params, reqData, &respData)
}
// OapiProcessinstanceGetRequest 获取审批实例详情
func (d *DingtalkClient) OapiProcessinstanceGetRequest(processInstanceID string) (ProcessinstanceGetResp, error) {
reqData := ProcessinstanceGetReq{
ProcessInstanceID: processInstanceID,
}
var respData ProcessinstanceGetResp
return respData, rpc(d, "topapi/processinstance/get", d.params, reqData, &respData)
}
// OapiProcessGettodonumRequest 获取用户待审批数量
func (d *DingtalkClient) OapiProcessGettodonumRequest(userID string) (ProcessGettodonumResp, error) {
reqData := ProcessGettodonumReq{
UserID: userID,
}
var respData ProcessGettodonumResp
return respData, rpc(d, "topapi/process/gettodonum", d.params, reqData, &respData)
}
// OapiProcessListbyuseridRequest 获取用户可见的审批模板
func (d *DingtalkClient) OapiProcessListbyuseridRequest(userID string, offset, size int64) (ProcessListbyuseridResp, error) {
reqData := ProcessListbyuseridReq{
UserID: userID,
Offset: offset,
Size: size,
}
var respData ProcessListbyuseridResp
return respData, rpc(d, "topapi/process/listbyuserid", d.params, reqData, &respData)
}
func (d *DingtalkClient) OapiProcessinstanceCspaceInfoRequest(userID string) (ProcessinstanceCspaceInfoResp, error) {
reqData := ProcessinstanceCspaceInfoReq{
UserID: userID,
}
var respData ProcessinstanceCspaceInfoResp
return respData, rpc(d, "topapi/processinstance/cspace/info", d.params, reqData, &respData)
}