From 7b8489fa50c74db3bfb99faf919b1b03abf8185c Mon Sep 17 00:00:00 2001 From: suyl <770236076@qq.com> Date: Tue, 10 Aug 2021 15:49:54 +0800 Subject: [PATCH] aa --- business/jxstore/cms/job.go | 8 +++++--- controllers/job_controller.go | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/business/jxstore/cms/job.go b/business/jxstore/cms/job.go index 18007b00a..e3b0971c7 100644 --- a/business/jxstore/cms/job.go +++ b/business/jxstore/cms/job.go @@ -1957,7 +1957,7 @@ func TempJob() (err error) { // }, []int{0, 1}) //tasksch.HandleTask(task, nil, true).Run() //task.GetID() - MtUnionJobAutoUpdate(jxcontext.AdminCtx) + err = MtUnionJobAutoUpdate(jxcontext.AdminCtx) return err } @@ -2187,7 +2187,6 @@ func MtUnionJobAutoUpdate(ctx *jxcontext.Context) (err error) { percentage := 0 if v.ActRule != "" { if storeURLs := regexp.MustCompile(`href="(.*?)"`).FindStringSubmatch(strings.ReplaceAll(v.ActRule, "\\", "")); len(storeURLs) > 0 { - fmt.Println("storeURLs .........................", storeURLs) storeURL = storeURLs[1] } } @@ -2196,7 +2195,7 @@ func MtUnionJobAutoUpdate(ctx *jxcontext.Context) (err error) { percentage = utils.Str2Int(ratios[1]) } } - PublishJob(ctx, &model.JobExt{ + _, _, err = PublishJob(ctx, &model.JobExt{ FinishedAtStr: utils.Time2Str(v.DateEnd), Job: model.Job{ VendorID: model.VendorIDMTWM, @@ -2219,6 +2218,9 @@ func MtUnionJobAutoUpdate(ctx *jxcontext.Context) (err error) { Percentage: percentage, }, }) + if err != nil { + return err + } break } return err diff --git a/controllers/job_controller.go b/controllers/job_controller.go index a750a6e5f..389d97479 100644 --- a/controllers/job_controller.go +++ b/controllers/job_controller.go @@ -546,7 +546,7 @@ func (c *JobController) RefreshJdDelivery() { // @router /TempJob [post] func (c *JobController) TempJob() { c.callTempJob(func(params *tJobTempJobParams) (retVal interface{}, errCode string, err error) { - cms.TempJob() + err = cms.TempJob() //cms.TestTemp() return retVal, "", err })