You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
service/supply/setting/rate.go

34 lines
715 B

package setting
import (
"context"
"git.oa00.com/supply-chain/service/client"
"github.com/shopspring/decimal"
)
type rate struct {
}
type RateItem struct {
Id uint `json:"id"`
Name string `json:"name"`
Rate decimal.Decimal `json:"rate"`
}
// All @Title 全部利率
func (r *rate) All(ctx context.Context) (result []RateItem, err error) {
err = client.GetClient(r).Call(ctx, "All", 0, &result)
return
}
type ArgsRateChannel struct {
ChannelId uint // 渠道id
RateId uint // 费率id
}
// Channel @Title 设置渠道利率
func (r *rate) Channel(ctx context.Context, args ArgsRateChannel) error {
reply := 0
return client.GetClient(r).Call(ctx, "Channel", args, &reply)
}