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/customer/service/service.go

56 lines
1.2 KiB

package service
import (
"context"
"git.oa00.com/supply-chain/service/client"
"github.com/shopspring/decimal"
)
type Service struct {
Audit audit
Service service
}
type ArgsServiceLists struct {
CustomerId uint
Status uint
}
type ReplyServiceLists struct {
UserServiceId uint `json:"userServiceId"`
ServiceId uint `json:"serviceId"`
ServiceName string `json:"serviceName"`
EndTime int64 `json:"endTime"`
AuditStatus uint `json:"auditStatus"`
Rate decimal.Decimal `json:"rate"`
}
type service struct {
}
// All @Title 全部服务
func (s *service) All(ctx context.Context, customerId uint) (reply []ReplyServiceLists, err error) {
xClient, err := client.GetClient(s)
if err != nil {
return
}
err = xClient.Call(ctx, "All", customerId, &reply)
return
}
type ReplyServiceSelect struct {
Id uint `json:"id"`
Name string `json:"name"`
}
// Select @Title 服务筛选
func (s *service) Select(ctx context.Context) (reply []ReplyServiceSelect, err error) {
xClient, err := client.GetClient(s)
if err != nil {
return
}
args := 0
err = xClient.Call(ctx, "Select", args, &reply)
return
}