From e50a565e802c410752b8ec7e27a4fb8b451d07b6 Mon Sep 17 00:00:00 2001 From: jiangyong Date: Wed, 1 Jul 2026 23:54:43 +0800 Subject: [PATCH] staffscore --- erp/{staff_target.go => staff_score.go} | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) rename erp/{staff_target.go => staff_score.go} (69%) diff --git a/erp/staff_target.go b/erp/staff_score.go similarity index 69% rename from erp/staff_target.go rename to erp/staff_score.go index 475cc30..3427bb5 100644 --- a/erp/staff_target.go +++ b/erp/staff_score.go @@ -7,11 +7,11 @@ import ( "github.com/tidwall/gjson" ) -type StaffTarget struct { +type StaffScore struct { Erp } -type StaffTargetCreate struct { +type StaffScoreCreate struct { Username string `json:"username"` Month string `json:"month"` Day string `json:"day"` @@ -19,8 +19,8 @@ type StaffTargetCreate struct { Comment string `json:"comment"` } -func NewStaffTarget(baseUrl, token string) *StaffTarget { - return &StaffTarget{ +func NewStaffScore(baseUrl, token string) *StaffScore { + return &StaffScore{ Erp: Erp{ baseUrl: baseUrl, token: token, @@ -28,8 +28,8 @@ func NewStaffTarget(baseUrl, token string) *StaffTarget { } } -func (e *StaffTarget) Create(req *StaffTargetCreate) error { - reqUrl := e.GetBaseUrl() + "/ext/staff/target" +func (e *StaffScore) Create(req *StaffScoreCreate) error { + reqUrl := e.GetBaseUrl() + "/ext/staff/score" body, err := goutil.HttpPost(reqUrl, e.GetHeader(), []byte(goutil.EncodeJSON(req))) if err != nil { return err