diff --git a/business/jxstore/cms/job.go b/business/jxstore/cms/job.go index 33604aa2b..7d83278a9 100644 --- a/business/jxstore/cms/job.go +++ b/business/jxstore/cms/job.go @@ -1958,7 +1958,6 @@ func TempJob() (err error) { // }, []int{0, 1}) //tasksch.HandleTask(task, nil, true).Run() //task.GetID() - fmt.Println("2222222222222222222222222222") MtUnionJobAutoUpdate(jxcontext.AdminCtx) return err } @@ -2146,7 +2145,7 @@ func GetVendorMatterRcmmd(ctx *jxcontext.Context, vendorID int, goodsID string, return handler.GetUnionMatterListRcmmd(ctx, goodsID, rcmmdType, offset, pageSize) } -func MtUnionJobAutoUpdate(ctx *jxcontext.Context) { +func MtUnionJobAutoUpdate(ctx *jxcontext.Context) (err error) { var ( db = dao.GetDB() actMap = make(map[int]*mtunionapi.ActivityListResult) @@ -2154,11 +2153,16 @@ func MtUnionJobAutoUpdate(ctx *jxcontext.Context) { addList []*mtunionapi.ActivityListResult now = time.Now() ) - fmt.Println("2222222222222222222222222222222222222222") //先找出美团联盟所有发布任务(此任务只用于显示) - jobs, _ := dao.GetJobsNoPage(db, nil, []int{model.VendorIDMTWM}, []int{model.JobCategoryIDUnion}, []int{model.JobStatusDoing}, nil, utils.ZeroTimeValue, utils.ZeroTimeValue, 0, false) + jobs, err := dao.GetJobsNoPage(db, nil, []int{model.VendorIDMTWM}, []int{model.JobCategoryIDUnion}, []int{model.JobStatusDoing}, nil, utils.ZeroTimeValue, utils.ZeroTimeValue, 0, false) + if err != nil { + return err + } //再查美团联盟上的所有活动 - acts, _ := api.MtUnionAPI.ActivityList(1, 30, 0) + acts, err := api.MtUnionAPI.ActivityList(1, 30, 0) + if err != nil { + return err + } for _, v := range acts { if v.DateBound != "" { dateBegin := utils.Str2Time(v.DateBound[:strings.LastIndex(v.DateBound, "至")-1]) @@ -2221,4 +2225,5 @@ func MtUnionJobAutoUpdate(ctx *jxcontext.Context) { }) break } + return err }