diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index e799caa63..b749fdb24 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -501,21 +501,21 @@ func ResetCreateWaybillFee(db *dao.DaoDB, order *model.GoodsOrder) (err error) { globals.SugarLogger.Debug("Refund Money Fail:", "同一订单无法重复退款") return errors.New("无法重复退款") } - if v.BillType == model.BrandBillTypeExpend { - // 将支出记录修改为退款记录,支付类型为收入,且类型为三方配送时:退费 - newBill := &model.BrandBill{ - BrandID: store.BrandID, - Price: v.Price, - BillType: model.BrandBillTypeIncome, - FeeType: model.BrandBillFeeTypeDelivery, - VendorOrderID: v.VendorOrderID, - OrderID: v.OrderID, - } - dao.WrapAddIDCULEntity(newBill, "系统退费") - err = dao.CreateEntity(db, newBill) - } + } + // 将支出记录修改为退款记录,支付类型为收入,且类型为三方配送时:退费 + newBill := &model.BrandBill{ + BrandID: store.BrandID, + Price: orderBill[0].Price, + BillType: model.BrandBillTypeIncome, + FeeType: model.BrandBillFeeTypeDelivery, + VendorOrderID: orderBill[0].VendorOrderID, + OrderID: orderBill[0].OrderID, + } + dao.WrapAddIDCULEntity(newBill, "系统退费") + err = dao.CreateEntity(db, newBill) + } return err } diff --git a/business/partner/printer/yilianyun/yilianyun_test.go b/business/partner/printer/yilianyun/yilianyun_test.go index 82eb11c20..137c0b9a4 100644 --- a/business/partner/printer/yilianyun/yilianyun_test.go +++ b/business/partner/printer/yilianyun/yilianyun_test.go @@ -1,6 +1,7 @@ package yilianyun import ( + "fmt" "git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/jx-callback/business/partner" "testing" @@ -46,3 +47,9 @@ func TestRegisterPrinter(t *testing.T) { t.Fatal(err) } } + +func TestStatusPrinter(t *testing.T) { + data, err := CurPrinterHandler.GetPrinterStatus(jxcontext.AdminCtx, "4004802883", "441719962922") + fmt.Println("data", data) + fmt.Println("err", err) +}