getorders

This commit is contained in:
苏尹岚
2020-11-17 15:17:03 +08:00
parent 869b4f2c35
commit aafa040327
3 changed files with 63 additions and 0 deletions

View File

@@ -2,6 +2,7 @@ package controllers
import (
"git.rosy.net.cn/jx-callback/business/jxstore/cms"
"git.rosy.net.cn/jx-callback/business/jxutils"
"github.com/astaxie/beego"
)
@@ -63,12 +64,21 @@ func (c *OrderController) CreateOrder() {
// @Param token header string true "认证token"
// @Param orderID query string false "订单号"
// @Param orderType query int false "订单类型1为支付2为提现"
// @Param cityCodes query string false "城市code列表"
// @Param fromTime query string false "开始时间"
// @Param toTime query string false "结束时间"
// @Param keyword query string false "关键字"
// @Param offset query int false "门店列表起始序号以0开始缺省为0"
// @Param pageSize query int false "门店列表页大小缺省为50-1表示全部"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /GetOrders [get]
func (c *OrderController) GetOrders() {
c.callGetOrders(func(params *tOrderGetOrdersParams) (retVal interface{}, errCode string, err error) {
var cityCodes []int
if err = jxutils.Strings2Objs(params.CityCodes, &cityCodes); err == nil {
retVal, err = cms.GetOrders(params.Ctx, params.OrderID, params.OrderType, cityCodes, params.FromTime, params.ToTime, params.Keyword, params.Offset, params.PageSize)
}
return retVal, "", err
})
}