This commit is contained in:
苏尹岚
2020-12-31 08:59:20 +08:00
parent 8720663f07
commit d8c8a36063
2 changed files with 6 additions and 7 deletions

View File

@@ -662,10 +662,10 @@ func (c *OrderManager) GetStoresOrderSaleInfo(ctx *jxcontext.Context, storeIDLis
func (c *OrderManager) GetStoresOrderSaleInfoNew(ctx *jxcontext.Context, storeIDList []int, fromTime time.Time, toTime time.Time, statusList []int) (saleInfoList []*dao.StoresOrderSaleInfo, err error) {
db := dao.GetDB()
// var isFinish = true
// if toTime.Sub(fromTime).Hours() > 24 {
// isFinish = false
// }
var isLongTime = false
if toTime.Sub(fromTime).Hours() > 24 {
isLongTime = true
}
orderSkuList, err := dao.GetStoreOrderSkuList(db, storeIDList, fromTime, toTime, statusList, true)
if err != nil {
return nil, err
@@ -724,7 +724,7 @@ func (c *OrderManager) GetStoresOrderSaleInfoNew(ctx *jxcontext.Context, storeID
if k == 0 {
saleInfo.EarningPrice = v.NewEarningPrice
if beego.BConfig.RunMode == "prod" || beego.BConfig.RunMode == "beta" {
if v.EarningType == model.EarningTypePoints {
if v.EarningType == model.EarningTypePoints && !isLongTime {
if storeDetail.VendorPayPercentage != 0 {
saleInfo.RealEarningPrice += 0
} else {
@@ -741,7 +741,7 @@ func (c *OrderManager) GetStoresOrderSaleInfoNew(ctx *jxcontext.Context, storeID
flagVendorOrderID = v.VendorOrderID
saleInfo.EarningPrice += v.NewEarningPrice
if beego.BConfig.RunMode == "prod" || beego.BConfig.RunMode == "beta" {
if v.EarningType == model.EarningTypePoints {
if v.EarningType == model.EarningTypePoints && !isLongTime {
if storeDetail.VendorPayPercentage != 0 {
saleInfo.RealEarningPrice += 0
} else {

View File

@@ -510,7 +510,6 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag
} else if dao.IsVendorThingIDEmpty(utils.Int64ToStr(sku.VendorVendorCatID)) && vendorID == model.VendorIDJDShop {
globals.SugarLogger.Warnf("syncStoreSkuNew 创建门店:%d商品:%d但没有映射的平台ID", storeID, sku.SkuID)
} else {
fmt.Println("qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq", utils.Format4Output(sku, false))
createList = append(createList, sku)
}
}