From 11740281cadc8a6cde5321ec4b46587a12b3ec5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Fri, 26 Mar 2021 11:13:07 +0800 Subject: [PATCH] aa --- business/jxcallback/orderman/orderman_ext.go | 3 +++ business/jxcallback/scheduler/defsch/defsch.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/business/jxcallback/orderman/orderman_ext.go b/business/jxcallback/orderman/orderman_ext.go index 07b40f08c..014bae301 100644 --- a/business/jxcallback/orderman/orderman_ext.go +++ b/business/jxcallback/orderman/orderman_ext.go @@ -1267,6 +1267,9 @@ func (c *OrderManager) AmendMissingOrders(ctx *jxcontext.Context, vendorIDs []in if model.IsOrderFinalStatus(order.Status) { goodsOrder.Status = order.Status goodsOrder.OrderFinishedAt = order.OrderFinishedAt + if goodsOrder.OrderFinishedAt == utils.DefaultTimeValue { + goodsOrder.OrderFinishedAt = goodsOrder.OrderCreatedAt.Add(time.Hour) + } _, err = dao.UpdateEntity(db, goodsOrder, "Status", "OrderFinishedAt") } } diff --git a/business/jxcallback/scheduler/defsch/defsch.go b/business/jxcallback/scheduler/defsch/defsch.go index 24eac70a1..23a4b9a67 100644 --- a/business/jxcallback/scheduler/defsch/defsch.go +++ b/business/jxcallback/scheduler/defsch/defsch.go @@ -1603,7 +1603,7 @@ func OrderProfitWarning(order *model.GoodsOrder) { } } else { if payPercentage >= 50 { - profit = utils.Str2Float64(utils.Int64ToStr(order.TotalShopMoney-order.ShopPrice)) / 100 + profit = utils.Str2Float64(utils.Int64ToStr(order.TotalShopMoney-order.EarningPrice)) / 100 } else { profit = utils.Str2Float64(utils.Int64ToStr(order.TotalShopMoney*int64(payPercentage)/200)) / 100 }