|
|
|
@ -5,11 +5,11 @@ import (
|
|
|
|
|
"git.oa00.com/supply-chain/service/client"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type Supply struct {
|
|
|
|
|
type supply struct {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type ArgsSupplyApply struct {
|
|
|
|
|
ApplyId uint // 申请人id
|
|
|
|
|
ApplyUserId uint // 申请人id
|
|
|
|
|
CustomerId uint // 客户id
|
|
|
|
|
RateId uint // 费率id
|
|
|
|
|
ExpirationAt int64 // 到期时间
|
|
|
|
@ -17,7 +17,7 @@ type ArgsSupplyApply struct {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Apply @Title 申请
|
|
|
|
|
func (s *Supply) Apply(ctx context.Context, args ArgsSupplyApply) error {
|
|
|
|
|
func (s *supply) Apply(ctx context.Context, args ArgsSupplyApply) error {
|
|
|
|
|
reply := 0
|
|
|
|
|
xClient, err := client.GetClient(s)
|
|
|
|
|
if err != nil {
|
|
|
|
@ -27,12 +27,12 @@ func (s *Supply) Apply(ctx context.Context, args ArgsSupplyApply) error {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type ArgsSupplyAdopt struct {
|
|
|
|
|
AuditId uint // 审核人id
|
|
|
|
|
AuditUserId uint // 审核人id
|
|
|
|
|
UserServiceId uint // 客户服务id
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Adopt @Title 审核通过
|
|
|
|
|
func (s *Supply) Adopt(ctx context.Context, args ArgsSupplyAdopt) error {
|
|
|
|
|
func (s *supply) Adopt(ctx context.Context, args ArgsSupplyAdopt) error {
|
|
|
|
|
reply := 0
|
|
|
|
|
xClient, err := client.GetClient(s)
|
|
|
|
|
if err != nil {
|
|
|
|
@ -42,13 +42,13 @@ func (s *Supply) Adopt(ctx context.Context, args ArgsSupplyAdopt) error {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type ArgsSupplyReject struct {
|
|
|
|
|
AuditId uint // 审核人id
|
|
|
|
|
AuditUserId uint // 审核人id
|
|
|
|
|
UserServiceId uint // 客户服务id
|
|
|
|
|
Reason string // 驳回原因
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Reject @Title 驳回
|
|
|
|
|
func (s *Supply) Reject(ctx context.Context, args ArgsSupplyReject) error {
|
|
|
|
|
func (s *supply) Reject(ctx context.Context, args ArgsSupplyReject) error {
|
|
|
|
|
reply := 0
|
|
|
|
|
xClient, err := client.GetClient(s)
|
|
|
|
|
if err != nil {
|
|
|
|
@ -74,7 +74,7 @@ type ReplySupplyInfo struct {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Info @Title 详情
|
|
|
|
|
func (s *Supply) Info(ctx context.Context, userServiceId uint) (reply ReplySupplyInfo, err error) {
|
|
|
|
|
func (s *supply) Info(ctx context.Context, userServiceId uint) (reply ReplySupplyInfo, err error) {
|
|
|
|
|
xClient, err := client.GetClient(s)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return
|
|
|
|
|