diff --git a/business/jxcallback/orderman/orderman_ext.go b/business/jxcallback/orderman/orderman_ext.go index fa6237a94..38af80cbd 100644 --- a/business/jxcallback/orderman/orderman_ext.go +++ b/business/jxcallback/orderman/orderman_ext.go @@ -27,6 +27,14 @@ type tWaybillExt struct { StoreID int `json:"storeID" orm:"column(store_id)"` } +type StoresOrderSaleInfo struct { + StoreID int `json:"storeID"` + Status int `json:"status"` + Count int `json:"count"` + SalePrice int64 `json:"salePrice"` + ActualPay int64 `json:"actualPay"` +} + //此函数会被GetStoreOrderCountInfo2取代 func (c *OrderManager) GetStoreOrderCountInfo(ctx *jxcontext.Context, storeID string, lastHours int) (countInfo []*model.GoodsOrderCountInfo, err error) { globals.SugarLogger.Debugf("GetStoreOrderCountInfo storeID:%s", storeID) @@ -608,3 +616,7 @@ func (c *OrderManager) GetOrdersFinancial(ctx *jxcontext.Context, fromDateStr, t return pagedInfo, err } + +func (c *OrderManager) GetStoresOrderSaleInfo(ctx *jxcontext.Context, storeIDList []int, fromTime time.Time, toTime time.Time, statusList []int) (saleInfo *StoresOrderSaleInfo, err error) { + return saleInfo, err +} diff --git a/controllers/jx_order.go b/controllers/jx_order.go index 314eae5b0..d75e10e69 100644 --- a/controllers/jx_order.go +++ b/controllers/jx_order.go @@ -320,6 +320,30 @@ func (c *OrderController) GetOrderStatusList() { }) } +// @Title 查询门店营业数据 +// @Description 查询门店营业数据 +// @Param token header string true "认证token" +// @Param storeIDs query string false "京西门店ID列表[1,2,3],缺省不限制" +// @Param fromTime query string true "起始时间" +// @Param toTime query string true "结束时间" +// @Param statuss query string false "订单状态列表[1,2,3],缺省不限制" +// @Success 200 {object} controllers.CallResult +// @Failure 200 {object} controllers.CallResult +// @router /GetStoresOrderSaleInfo [get] +func (c *OrderController) GetStoresOrderSaleInfo() { + c.callGetStoresOrderSaleInfo(func(params *tOrderGetStoresOrderSaleInfoParams) (retVal interface{}, errCode string, err error) { + timeList, err := jxutils.BatchStr2Time(params.FromTime, params.ToTime) + if err == nil { + var storeIDList []int + var statusList []int + if err = jxutils.Strings2Objs(params.StoreIDs, &storeIDList, params.Statuss, &statusList); err == nil { + retVal, err = orderman.FixedOrderManager.GetStoresOrderSaleInfo(params.Ctx, storeIDList, timeList[0], timeList[1], statusList) + } + } + return retVal, "", err + }) +} + // @Title 刷新订单真实手机号 // @Description 刷新订单真实手机号 // @Param token header string true "认证token"