1
This commit is contained in:
@@ -765,13 +765,20 @@ func (c *PurchaseHandler) GetOrderRealMobile(ctx *jxcontext.Context, order *mode
|
||||
return mobile, err
|
||||
}
|
||||
|
||||
func (c *PurchaseHandler) AgreeOrRefuseCancel(ctx *jxcontext.Context, order *model.GoodsOrder, isAgree bool, reason string) (err error) {
|
||||
func (c *PurchaseHandler) AgreeOrRefuseCancel(ctx *jxcontext.Context, order *model.GoodsOrder, isAgree bool, reason string, refundParam interface{}) (err error) {
|
||||
if globals.EnableMtwmStoreWrite {
|
||||
if isAgree {
|
||||
err = getAPI(order.VendorOrgCode, jxutils.GetSaleStoreIDFromOrder(order), "").OrderRefundAgree(utils.Str2Int64(order.VendorOrderID), reason)
|
||||
} else {
|
||||
err = getAPI(order.VendorOrgCode, jxutils.GetSaleStoreIDFromOrder(order), "").OrderRefundReject(utils.Str2Int64(order.VendorOrderID), reason)
|
||||
var mtParam *mtwmapi.ReviewAfterSalesInfo
|
||||
data, _ := json.Marshal(refundParam)
|
||||
if err = json.Unmarshal(data, &mtParam); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = getAPI(order.VendorOrgCode, jxutils.GetSaleStoreIDFromOrder(order), "").ReviewAfterSales(mtParam)
|
||||
//if isAgree {
|
||||
// err = getAPI(order.VendorOrgCode, jxutils.GetSaleStoreIDFromOrder(order), "").OrderRefundAgree(utils.Str2Int64(order.VendorOrderID), reason)
|
||||
//} else {
|
||||
// err = getAPI(order.VendorOrgCode, jxutils.GetSaleStoreIDFromOrder(order), "").OrderRefundReject(utils.Str2Int64(order.VendorOrderID), reason)
|
||||
//}
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user