aa
This commit is contained in:
@@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user