aa
This commit is contained in:
@@ -1958,7 +1958,6 @@ func TempJob() (err error) {
|
|||||||
// }, []int{0, 1})
|
// }, []int{0, 1})
|
||||||
//tasksch.HandleTask(task, nil, true).Run()
|
//tasksch.HandleTask(task, nil, true).Run()
|
||||||
//task.GetID()
|
//task.GetID()
|
||||||
fmt.Println("2222222222222222222222222222")
|
|
||||||
MtUnionJobAutoUpdate(jxcontext.AdminCtx)
|
MtUnionJobAutoUpdate(jxcontext.AdminCtx)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -2146,7 +2145,7 @@ func GetVendorMatterRcmmd(ctx *jxcontext.Context, vendorID int, goodsID string,
|
|||||||
return handler.GetUnionMatterListRcmmd(ctx, goodsID, rcmmdType, offset, pageSize)
|
return handler.GetUnionMatterListRcmmd(ctx, goodsID, rcmmdType, offset, pageSize)
|
||||||
}
|
}
|
||||||
|
|
||||||
func MtUnionJobAutoUpdate(ctx *jxcontext.Context) {
|
func MtUnionJobAutoUpdate(ctx *jxcontext.Context) (err error) {
|
||||||
var (
|
var (
|
||||||
db = dao.GetDB()
|
db = dao.GetDB()
|
||||||
actMap = make(map[int]*mtunionapi.ActivityListResult)
|
actMap = make(map[int]*mtunionapi.ActivityListResult)
|
||||||
@@ -2154,11 +2153,16 @@ func MtUnionJobAutoUpdate(ctx *jxcontext.Context) {
|
|||||||
addList []*mtunionapi.ActivityListResult
|
addList []*mtunionapi.ActivityListResult
|
||||||
now = time.Now()
|
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 {
|
for _, v := range acts {
|
||||||
if v.DateBound != "" {
|
if v.DateBound != "" {
|
||||||
dateBegin := utils.Str2Time(v.DateBound[:strings.LastIndex(v.DateBound, "至")-1])
|
dateBegin := utils.Str2Time(v.DateBound[:strings.LastIndex(v.DateBound, "至")-1])
|
||||||
@@ -2221,4 +2225,5 @@ func MtUnionJobAutoUpdate(ctx *jxcontext.Context) {
|
|||||||
})
|
})
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user