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 (
"errors"
@ -24,12 +24,12 @@ type ApprovalProfitCreate struct {
}
type ApprovalProfit struct {
Erp
OA
}
func NewApprovalProfit(baseUrl, token string) *ApprovalProfit {
return &ApprovalProfit{
Erp: Erp{
OA: OA{
baseUrl: baseUrl,
token: token,
},

View File

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

View File

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

View File

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