From 0fbe0c0b20e1475c0f6a2da93d85ae2dd1b7d35b Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Thu, 6 Jun 2024 19:40:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/db/model/express_order.go | 3 +++ consume/zhios_express_order_fail.go | 10 ++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app/db/model/express_order.go b/app/db/model/express_order.go index be85d44..2a4899d 100644 --- a/app/db/model/express_order.go +++ b/app/db/model/express_order.go @@ -47,4 +47,7 @@ type ExpressOrder struct { AgentSupplementMoney string `json:"agent_supplement_money" xorm:"default 0.00000000 DECIMAL(20,8)"` IsStationSupplementPay int `json:"is_station_supplement_pay" xorm:"default 0 INT(1)"` IsAgentSupplementPay int `json:"is_agent_supplement_pay" xorm:"default 0 INT(1)"` + Platform int `json:"platform" xorm:"default 0 INT(1)"` + Own int `json:"own" xorm:"default 0 INT(1)"` + NeedDeduct string `json:"need_deduct" xorm:"default 0.00000000 DECIMAL(20,8)"` } diff --git a/consume/zhios_express_order_fail.go b/consume/zhios_express_order_fail.go index 15e25ca..dd610b2 100644 --- a/consume/zhios_express_order_fail.go +++ b/consume/zhios_express_order_fail.go @@ -93,11 +93,13 @@ func handleZhiosExpressOrderFail(msg []byte) error { ord.Status = "已退回" ord.IsRefund = 1 ord.RefundTime = time.Now() - officialOrd.Status = "已退回" - officialOrd.IsRefund = 1 - officialOrd.RefundTime = time.Now() + if ord.Own != 1 { + officialOrd.Status = "已退回" + officialOrd.IsRefund = 1 + officialOrd.RefundTime = time.Now() + db.Db.Where("oid=?", officialOrd.Oid).Update(officialOrd) + } eg.Where("oid=?", ord.Oid).Update(ord) - db.Db.Where("oid=?", officialOrd.Oid).Update(officialOrd) svc.DealMoneyWithEg(eg, ord.Uid, ord.Money, 56, utils.StrToInt64(ord.Oid), 0, 0, "快递退款", "express", 0) if ord.AgentPay == 1 { agentDeduct(ord.Oid, base, ord.AgentPrice)