- temp op for jd order

This commit is contained in:
gazebo
2019-01-10 18:49:42 +08:00
parent bf6bec2ce2
commit f6ed942619
4 changed files with 239 additions and 0 deletions

27
controllers/temp_op.go Normal file
View 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
})
}