This commit is contained in:
苏尹岚
2021-01-12 10:25:03 +08:00
parent e3cc92bde9
commit 3838cf2ebf
2 changed files with 24 additions and 0 deletions

View File

@@ -3,6 +3,8 @@ package controllers
import (
"fmt"
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/business/jxstore/cms"
"git.rosy.net.cn/jx-callback/business/jxutils"
@@ -522,3 +524,16 @@ func (c *JobController) GetCoordinateFromAddress() {
return place, "", err
})
}
// @Title 手动刷新京东快递任务
// @Description 手动刷新京东快递任务
// @Param token header string true "认证token"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /RefreshJdDelivery [post]
func (c *JobController) RefreshJdDelivery() {
c.callRefreshJdDelivery(func(params *tJobRefreshJdDeliveryParams) (retVal interface{}, errCode string, err error) {
err = cms.RefreshJdDelivery(jxcontext.AdminCtx)
return retVal, "", err
})
}

View File

@@ -547,6 +547,15 @@ func init() {
Filters: nil,
Params: nil})
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:JobController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:JobController"],
beego.ControllerComments{
Method: "RefreshJdDelivery",
Router: `/RefreshJdDelivery`,
AllowHTTPMethods: []string{"post"},
MethodParams: param.Make(),
Filters: nil,
Params: nil})
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:JobController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:JobController"],
beego.ControllerComments{
Method: "RefreshJobStatus",