- tmp GetStoresOrderSaleInfo

This commit is contained in:
gazebo
2019-05-13 11:42:58 +08:00
parent 4b7e387f23
commit 9114700688
2 changed files with 36 additions and 0 deletions

View File

@@ -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
}

View File

@@ -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"