staffscore

This commit is contained in:
jiangyong 2026-07-01 23:54:43 +08:00
parent 6fa0b3b8af
commit e50a565e80
1 changed files with 6 additions and 6 deletions

View File

@ -7,11 +7,11 @@ import (
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
) )
type StaffTarget struct { type StaffScore struct {
Erp Erp
} }
type StaffTargetCreate struct { type StaffScoreCreate struct {
Username string `json:"username"` Username string `json:"username"`
Month string `json:"month"` Month string `json:"month"`
Day string `json:"day"` Day string `json:"day"`
@ -19,8 +19,8 @@ type StaffTargetCreate struct {
Comment string `json:"comment"` Comment string `json:"comment"`
} }
func NewStaffTarget(baseUrl, token string) *StaffTarget { func NewStaffScore(baseUrl, token string) *StaffScore {
return &StaffTarget{ return &StaffScore{
Erp: Erp{ Erp: Erp{
baseUrl: baseUrl, baseUrl: baseUrl,
token: token, token: token,
@ -28,8 +28,8 @@ func NewStaffTarget(baseUrl, token string) *StaffTarget {
} }
} }
func (e *StaffTarget) Create(req *StaffTargetCreate) error { func (e *StaffScore) Create(req *StaffScoreCreate) error {
reqUrl := e.GetBaseUrl() + "/ext/staff/target" reqUrl := e.GetBaseUrl() + "/ext/staff/score"
body, err := goutil.HttpPost(reqUrl, e.GetHeader(), []byte(goutil.EncodeJSON(req))) body, err := goutil.HttpPost(reqUrl, e.GetHeader(), []byte(goutil.EncodeJSON(req)))
if err != nil { if err != nil {
return err return err