1
This commit is contained in:
@@ -54,8 +54,8 @@ func (p *PurchaseHandler) getOrder(vendorOrgCode string, vendorOrderID int64, ve
|
|||||||
StoreId: utils.String2Pointer(vendorStoreID),
|
StoreId: utils.String2Pointer(vendorStoreID),
|
||||||
BizOrderId: utils.Int64ToPointer(vendorOrderID),
|
BizOrderId: utils.Int64ToPointer(vendorOrderID),
|
||||||
}}
|
}}
|
||||||
|
api := getAPI(vendorOrgCode, 0, vendorStoreID)
|
||||||
orderDetail, err := getAPI(vendorOrgCode, 0, vendorStoreID).QueryOrderDetail(requestParam)
|
orderDetail, err := api.QueryOrderDetail(requestParam)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
@@ -79,7 +79,7 @@ func (p *PurchaseHandler) getOrder(vendorOrgCode string, vendorOrderID int64, ve
|
|||||||
InvoiceTitle: "",
|
InvoiceTitle: "",
|
||||||
InvoiceTaxerID: "",
|
InvoiceTaxerID: "",
|
||||||
InvoiceEmail: "",
|
InvoiceEmail: "",
|
||||||
VendorOrgCode: vendorOrgCode,
|
VendorOrgCode: api.GetVendorOrgCode(),
|
||||||
UserID: *orderDetail.OpenUid,
|
UserID: *orderDetail.OpenUid,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -262,6 +262,21 @@ func (c *PurchaseHandler) GetAfsStatusFromVendorStatus(notifyType string) int {
|
|||||||
func (c *PurchaseHandler) AgreeOrRefuseRefund(ctx *jxcontext.Context, order *model.AfsOrder, approveType int, reason string) (err error) {
|
func (c *PurchaseHandler) AgreeOrRefuseRefund(ctx *jxcontext.Context, order *model.AfsOrder, approveType int, reason string) (err error) {
|
||||||
db := dao.GetDB()
|
db := dao.GetDB()
|
||||||
if approveType == partner.AfsApproveTypeRefused {
|
if approveType == partner.AfsApproveTypeRefused {
|
||||||
|
param := &request3156.AlibabaTclsAelophyRefundDisagreeRequest{
|
||||||
|
RefundId: utils.String2Pointer(order.AfsOrderID),
|
||||||
|
RejectReason: utils.String2Pointer(reason),
|
||||||
|
OrderFrom: utils.Int64ToPointer(utils.Str2Int64(tao_vegetable.TaoVegetableChannelCode)),
|
||||||
|
}
|
||||||
|
err = getAPI(order.VendorOrgCode, jxutils.GetSaleStoreIDFromAfsOrder(order), order.VendorStoreID).DisAgreeUserCancel(param)
|
||||||
|
if err != nil {
|
||||||
|
order.Status = model.AfsOrderStatusFailed
|
||||||
|
order.VendorStatus = "老板拒绝"
|
||||||
|
order.ReasonDesc += "," + reason
|
||||||
|
dao.UpdateEntity(dao.GetDB(), order, "Status", "ReasonDesc", "VendorStatus")
|
||||||
|
}
|
||||||
|
} else if approveType == partner.AfsApproveTypeRefusedToRefundMoney {
|
||||||
|
return errors.New("此平台暂时不支持")
|
||||||
|
} else {
|
||||||
// 加载子订单号
|
// 加载子订单号
|
||||||
orderDetail, _ := partner.CurOrderManager.LoadOrder(order.VendorOrderID, model.VendorIDTaoVegetable)
|
orderDetail, _ := partner.CurOrderManager.LoadOrder(order.VendorOrderID, model.VendorIDTaoVegetable)
|
||||||
// 加载退款商品
|
// 加载退款商品
|
||||||
@@ -300,21 +315,7 @@ func (c *PurchaseHandler) AgreeOrRefuseRefund(ctx *jxcontext.Context, order *mod
|
|||||||
param.AuditMemo = utils.String2Pointer(*param.AuditMemo + fmt.Sprintf(",%s", reason))
|
param.AuditMemo = utils.String2Pointer(*param.AuditMemo + fmt.Sprintf(",%s", reason))
|
||||||
}
|
}
|
||||||
err = getAPI(order.VendorOrgCode, jxutils.GetSaleStoreIDFromAfsOrder(order), order.VendorStoreID).AgreeUserCancel(param)
|
err = getAPI(order.VendorOrgCode, jxutils.GetSaleStoreIDFromAfsOrder(order), order.VendorStoreID).AgreeUserCancel(param)
|
||||||
} else if approveType == partner.AfsApproveTypeRefusedToRefundMoney {
|
|
||||||
return errors.New("此平台暂时不支持")
|
|
||||||
} else {
|
|
||||||
param := &request3156.AlibabaTclsAelophyRefundDisagreeRequest{
|
|
||||||
RefundId: utils.String2Pointer(order.AfsOrderID),
|
|
||||||
RejectReason: utils.String2Pointer(reason),
|
|
||||||
OrderFrom: utils.Int64ToPointer(utils.Str2Int64(tao_vegetable.TaoVegetableChannelCode)),
|
|
||||||
}
|
|
||||||
err = getAPI(order.VendorOrgCode, jxutils.GetSaleStoreIDFromAfsOrder(order), order.VendorStoreID).DisAgreeUserCancel(param)
|
|
||||||
if err != nil {
|
|
||||||
order.Status = model.AfsOrderStatusFailed
|
|
||||||
order.VendorStatus = "老板拒绝"
|
|
||||||
order.ReasonDesc += "," + reason
|
|
||||||
dao.UpdateEntity(dao.GetDB(), order, "Status", "ReasonDesc", "VendorStatus")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user