This commit is contained in:
jiangyong 2026-09-28 23:24:18 +08:00
parent a5d9980087
commit 30e7a7d5d0
4 changed files with 13 additions and 13 deletions

View File

@ -1,4 +1,4 @@
package erp package oa
import ( import (
"errors" "errors"
@ -24,12 +24,12 @@ type ApprovalProfitCreate struct {
} }
type ApprovalProfit struct { type ApprovalProfit struct {
Erp OA
} }
func NewApprovalProfit(baseUrl, token string) *ApprovalProfit { func NewApprovalProfit(baseUrl, token string) *ApprovalProfit {
return &ApprovalProfit{ return &ApprovalProfit{
Erp: Erp{ OA: OA{
baseUrl: baseUrl, baseUrl: baseUrl,
token: token, token: token,
}, },

View File

@ -1,17 +1,17 @@
package erp package oa
type Erp struct { type OA struct {
token string token string
baseUrl string baseUrl string
} }
func (e *Erp) GetHeader() map[string]string { func (e *OA) GetHeader() map[string]string {
return map[string]string{ return map[string]string{
"x-token": e.token, "x-token": e.token,
} }
} }
func (e *Erp) GetBaseUrl() string { func (e *OA) GetBaseUrl() string {
if e.baseUrl != "" { if e.baseUrl != "" {
return e.baseUrl return e.baseUrl
} }

View File

@ -1,4 +1,4 @@
package erp package oa
import ( import (
"errors" "errors"
@ -8,7 +8,7 @@ import (
) )
type StaffScore struct { type StaffScore struct {
Erp OA
} }
type StaffScoreCreate struct { type StaffScoreCreate struct {
@ -21,7 +21,7 @@ type StaffScoreCreate struct {
func NewStaffScore(baseUrl, token string) *StaffScore { func NewStaffScore(baseUrl, token string) *StaffScore {
return &StaffScore{ return &StaffScore{
Erp: Erp{ OA: OA{
baseUrl: baseUrl, baseUrl: baseUrl,
token: token, token: token,
}, },

View File

@ -1,4 +1,4 @@
package erp package oa
import ( import (
"errors" "errors"
@ -36,12 +36,12 @@ type UpdateReq struct {
} }
type StaffUser struct { type StaffUser struct {
Erp OA
} }
func NewStaffUser(baseUrl, token string) *StaffUser { func NewStaffUser(baseUrl, token string) *StaffUser {
return &StaffUser{ return &StaffUser{
Erp: Erp{ OA: OA{
baseUrl: baseUrl, baseUrl: baseUrl,
token: token, token: token,
}, },