This commit is contained in:
邹宗楠
2024-10-21 11:01:40 +08:00
parent 38d91b461c
commit 98f1e1a353
5 changed files with 235 additions and 158 deletions

View File

@@ -883,7 +883,7 @@ func (c *OrderManager) GetStoresOrderSaleInfo(ctx *jxcontext.Context, storeIDLis
return c.GetStoresOrderSaleInfoNew(ctx, storeIDList, fromTime, toTime, statusList)
}
func (c *OrderManager) GetStoresOrderSaleInfo2(ctx *jxcontext.Context, fromTime time.Time, toTime time.Time, storeId int, brandId, vendorId, storeList []int, mapStoreData map[int]int) (map[string]interface{}, error) {
func (c *OrderManager) GetStoresOrderSaleInfo2(ctx *jxcontext.Context, fromTime time.Time, toTime time.Time, storeId int, brandId, vendorId, storeList []int) (map[string]interface{}, error) {
var (
db = dao.GetDB()
)
@@ -914,7 +914,13 @@ func (c *OrderManager) GetStoresOrderSaleInfo2(ctx *jxcontext.Context, fromTime
return nil, err
}
return map[string]interface{}{"storeStatus": storeStatus, "orderStatus": orderStatus, "afsOrderStatus": afsOrderStatus}, nil
// 统计收益
incomeStatics, err := dao.StatisticsIncome(db, fromTime, toTime, storeId, brandId, vendorId, storeList)
if err != nil {
return nil, err
}
return map[string]interface{}{"storeStatus": storeStatus, "orderStatus": orderStatus, "afsOrderStatus": afsOrderStatus, "incomeStatics": incomeStatics}, nil
}
func (c *OrderManager) GetStoresOrderSaleInfoNew(ctx *jxcontext.Context, storeIDList []int, fromTime time.Time, toTime time.Time, statusList []int) (saleInfoList []*dao.StoresOrderSaleInfo, err error) {