统计订单信息接口
This commit is contained in:
31
controllers/jx_report.go
Normal file
31
controllers/jx_report.go
Normal file
@@ -0,0 +1,31 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/report"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
"github.com/astaxie/beego"
|
||||
)
|
||||
|
||||
// 统计相关API
|
||||
type ReportController struct {
|
||||
beego.Controller
|
||||
}
|
||||
|
||||
// @Title 查询订单统计信息
|
||||
// @Description 根据门店idlist和时间范围查询
|
||||
// @Param token header string true "认证token"
|
||||
// @Param storeIDs formData string true "京西门店ID列表[1,2,3]"
|
||||
// @Param FromDate formData string false "开始日期(包含),格式(2006-01-02 00:00:00)"
|
||||
// @Param ToDate formData string false "结束日期(包含),格式(2006-01-02 00:00:00)"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /StatisticsReportForOrders [post]
|
||||
func (c *ReportController) StatisticsReportForOrders() {
|
||||
c.callStatisticsReportForOrders(func(params *tReportStatisticsReportForOrdersParams) (retVal interface{}, errCode string, err error) {
|
||||
var storeIDList []int
|
||||
if err = jxutils.Strings2Objs(params.StoreIDs, &storeIDList); err == nil {
|
||||
retVal, err = report.GetStatisticsReportForOrders(params.Ctx, storeIDList, params.FromDate, params.ToDate)
|
||||
}
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user