+GetMyOrderCountInfo

This commit is contained in:
gazebo
2019-12-02 11:00:57 +08:00
parent 67976664e6
commit 0a42beac8a
4 changed files with 66 additions and 0 deletions

View File

@@ -2,6 +2,7 @@ package controllers
import (
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/business/jxutils"
"git.rosy.net.cn/jx-callback/business/partner/purchase/jx/localjx"
"github.com/astaxie/beego"
)
@@ -92,3 +93,25 @@ func (c *JxOrderController) GetMyOrders() {
return retVal, "", err
})
}
// @Title 查询自己的订单状态数量信息
// @Description 查询自己的订单状态数量信息
// @Param token header string true "认证token"
// @Param fromDate query string false "开始日期包含格式2006-01-02如果订单号为空此项必须要求"
// @Param toDate query string false "结束日期包含格式2006-01-02如果订单号为空此项必须要求"
// @Param statuss query string false "订单状态列表[1,2,3],缺省不限制"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /GetMyOrderCountInfo [get]
func (c *JxOrderController) GetMyOrderCountInfo() {
c.callGetMyOrderCountInfo(func(params *tJxorderGetMyOrderCountInfoParams) (retVal interface{}, errCode string, err error) {
timeList, err := jxutils.BatchStr2Time(params.FromDate, params.ToDate)
if err == nil {
var statuss []int
if err = jxutils.Strings2Objs(params.Statuss, &statuss); err == nil {
retVal, err = localjx.GetMyOrderCountInfo(params.Ctx, timeList[0], timeList[1], statuss)
}
}
return retVal, "", err
})
}