- temp op for jd order
This commit is contained in:
27
controllers/temp_op.go
Normal file
27
controllers/temp_op.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/initdata"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
)
|
||||
|
||||
// @Title 拉取京东订单补齐本地
|
||||
// @Description 拉取京东订单补齐本地
|
||||
// @Param token header string true "认证token"
|
||||
// @Param fromTime formData string true "开始时间"
|
||||
// @Param toTime formData string true "结束时间"
|
||||
// @Param isAsync formData bool false "是否异步操作"
|
||||
// @Param isContinueWhenError formData bool false "单个同步失败是否继续,缺省false"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /PullJdOrder [post]
|
||||
func (c *InitDataController) PullJdOrder() {
|
||||
c.callPullJdOrder(func(params *tInitdataPullJdOrderParams) (retVal interface{}, errCode string, err error) {
|
||||
timeList, err := jxutils.BatchStr2Time(params.FromTime, params.ToTime)
|
||||
if err != nil {
|
||||
return retVal, "", err
|
||||
}
|
||||
retVal, err = initdata.PullJdOrder(params.Ctx, timeList[0], timeList[1], params.IsAsync, params.IsContinueWhenError)
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user