Merge branch 'master' of git.oa00.com:supply-chain/service

finance
黄伟 2 years ago
commit d0e21725a8

@ -41,6 +41,7 @@ func (t *task) RefreshToken(ctx context.Context) error {
type ReplySkuAddStatus struct {
Total uint
Count uint
StartTime int64
}
// GetSkuAddStatus @Title 获取同步状态

@ -32,10 +32,10 @@ type AfsItem struct {
Id uint `json:"id"`
AfsSn string `json:"afsSn"`
OrderSubSn string `json:"orderSubSn"`
SkuId uint `json:"skuId"`
SkuName string `json:"skuName"`
Quantity uint `json:"quantity"`
Status uint `json:"status"`
AuditStatus uint `json:"manageStatus"`
Result string `json:"result"`
OrderFee decimal.Decimal `json:"orderFee"`
CreatedAt int64 `json:"createdAt"`
@ -55,8 +55,10 @@ func (a *afs) Lists(ctx context.Context, args ArgsAfsLists) (reply ReplyAfsLists
type ReplyAfsDetail struct {
Id uint `json:"id"`
AuditId uint `json:"auditId"`
AfsSn string `json:"afsSn"`
Status uint `json:"status"`
AuditStatus uint `json:"auditStatus"`
ApproveNotes string `json:"approveNotes"`
Result string `json:"result"`
CreatedAt int64 `json:"createdAt"`
@ -174,9 +176,11 @@ func (a *afs) Refund(ctx context.Context, args ArgsAfsRefund) (err error) {
}
type ArgsAfsCompensate struct {
ApplyUserId uint `json:"applyUserId"`
AfsSn string `json:"afsSn"`
RefundFee decimal.Decimal `json:"refundFee"`
Notes string `json:"notes"`
RefundId uint `json:"refundId"`
}
// Compensate @Title 订单赔偿

@ -0,0 +1,119 @@
package supplier
import (
"context"
"git.oa00.com/supply-chain/service/client"
"git.oa00.com/supply-chain/service/lib/bean"
"github.com/shopspring/decimal"
)
const (
AfsAuditSwitchOn = 1 // 开
AfsAuditSwitchOff = 2 // 关
)
type afsAudit struct {
}
type ArgsAfsAuditLists struct {
Search AfsAuditSearch
Page bean.Page
}
type AfsAuditSearch struct {
Status uint // 0=全部 1=待审核 2=审核通过 3=审核驳回
AfsSn string
OrderSubSn string
CreatedStartDate string
CreatedEndDate string
}
type ReplyAfsAuditLists struct {
Lists []AfsAuditItem
Total int64
}
type AfsAuditItem struct {
Id uint `json:"id"`
AfsSn uint64 `json:"afsSn"`
OrderSubSn uint64 `json:"orderSubSn"`
SkuName string `json:"skuName"`
Status uint `json:"status"`
Quantity uint `json:"quantity"`
OrderSubAfsId uint `json:"orderSubAfsId"`
RefundFee decimal.Decimal `json:"refundFee"`
Remark string `json:"remark"`
Result string `json:"result"`
Notes string `json:"notes"`
AuditAt int64 `json:"auditAt"`
CreatedAt int64 `json:"createdAt"`
}
// Lists @Title 售后审核列表
func (a *afsAudit) Lists(ctx context.Context, args ArgsAfsAuditLists) (reply ReplyAfsAuditLists, err error) {
xClient, err := client.GetClient(a)
if err != nil {
return
}
err = xClient.Call(ctx, "Lists", args, &reply)
return
}
type ArgsAfsAuditAdopt struct {
AuditUserId uint
AfsAuditId uint
}
// Adopt @Title 审核通过
func (a *afsAudit) Adopt(ctx context.Context, args ArgsAfsAuditAdopt) error {
xClient, err := client.GetClient(a)
if err != nil {
return err
}
reply := 0
return xClient.Call(ctx, "Adopt", args, &reply)
}
type ArgsAfsAuditReject struct {
AuditUserId uint
Remark string
AfsAuditId uint
}
// Reject @Title 审核驳回
func (a *afsAudit) Reject(ctx context.Context, args ArgsAfsAuditReject) error {
xClient, err := client.GetClient(a)
if err != nil {
return err
}
reply := 0
return xClient.Call(ctx, "Reject", args, &reply)
}
type ArgsSetAfsAuditPrice struct {
Price decimal.Decimal
Switch uint
}
// SetAfsAuditConfig @Title 设置售后审核配置
func (a *afsAudit) SetAfsAuditConfig(ctx context.Context, args ArgsSetAfsAuditPrice) error {
xClient, err := client.GetClient(a)
if err != nil {
return err
}
reply := 0
return xClient.Call(ctx, "SetAfsAuditConfig", args, &reply)
}
type ReplyAfsAuditConfig struct {
Price decimal.Decimal
Switch uint
}
// GetAfsAuditConfig @Title 获取售后审核配置
func (a *afsAudit) GetAfsAuditConfig(ctx context.Context) (reply ReplyAfsAuditConfig, err error) {
xClient, err := client.GetClient(a)
if err != nil {
return
}
args := 0
err = xClient.Call(ctx, "GetAfsAuditConfig", args, &reply)
return
}

@ -180,7 +180,7 @@ func (g *goods) ReHandle(ctx context.Context, goodsIds []uint) (reply []AdoptIte
type ReplyByIdItem struct {
SkuId uint `json:"skuId"`
SupplierId uint `json:"supplierIds"`
SupplierId uint `json:"supplierId"`
SupplierName string `json:"supplierName"`
}

@ -17,6 +17,7 @@ type Supplier struct {
LogisticsCompany logisticsCompany
ReturnAddress returnAddress
Afs afs
AfsAudit afsAudit
BatchGoods batch.Goods
}

Loading…
Cancel
Save