结算守价

This commit is contained in:
苏尹岚
2020-08-14 14:41:48 +08:00
parent e32274a31b
commit 5a659f694b
3 changed files with 36 additions and 0 deletions

View File

@@ -383,6 +383,7 @@ func ModifyOrderSkusStock(db *dao.DaoDB, order *model.GoodsOrder, isAdd bool) (e
dao.SetStoreSkuSyncStatus(db, order.VendorID, []int{order.FromStoreID}, []int{sku.SkuID}, model.SyncFlagStockMask)
}
}
checkDefendPriceOrder(db, jxutils.GetSaleStoreIDFromOrder(order), sku.SkuID)
}
storeSku.Stock = stock
dao.UpdateEntity(db, storeSku, "Stock")
@@ -399,6 +400,17 @@ func filterOrderInfo(order *model.GoodsOrder) {
order.ConsigneeAddress = strings.ReplaceAll(order.ConsigneeAddress, "·", "")
}
func checkDefendPriceOrder(db *dao.DaoDB, storeID, skuID int) {
var (
issue = 0
)
if time.Now().Hour() >= 22 {
issue = utils.Str2Int(time.Now().AddDate(0, 0, 1).Format("20060102"))
} else {
issue = utils.Str2Int(time.Now().Format("20060102"))
}
}
func (c *OrderManager) updateOrderSkuOtherInfo(order *model.GoodsOrder, db *dao.DaoDB, storePayPercentage, changePriceType int) (err error) {
globals.SugarLogger.Debugf("updateOrderSkuOtherInfo orderID:%s, VendorStoreID:%s", order.VendorOrderID, order.VendorStoreID)
jxStoreID := jxutils.GetShowStoreIDFromOrder(order)