diff --git a/business/jxstore/cms/job.go b/business/jxstore/cms/job.go index 4e69df75c..b235f82dc 100644 --- a/business/jxstore/cms/job.go +++ b/business/jxstore/cms/job.go @@ -1959,11 +1959,33 @@ func TempJob() (err error) { return err } -func GetUnionActList(ctx *jxcontext.Context, vendorID, actType int) (actList []*partner.ActivityList, err error) { +type GetUnionActListResult struct { + actList *partner.ActivityList + JobID int `orm:"column(job_id)" json:"jobID"` +} + +func GetUnionActList(ctx *jxcontext.Context, vendorID, actType int) (results []*GetUnionActListResult, err error) { if handler := partner.GetHandler(vendorID); handler != nil { - actList, err = handler.GetUnionActList(ctx, actType) + actList, err2 := handler.GetUnionActList(ctx, actType) + if err2 == nil { + for _, v := range actList { + result := &GetUnionActListResult{ + actList: v, + } + var job *model.Job + sql := ` + SELECT * FROM job WHERE vendor_id = ? AND union_act_id = ? AND type = ? + ` + sqlParams := []interface{}{vendorID, v.ActID, model.JobTypeOther} + dao.GetRow(dao.GetDB(), &job, sql, sqlParams) + if job != nil { + result.JobID = job.ID + } + results = append(results, result) + } + } } - return actList, err + return results, err } func ShareUnionLink(ctx *jxcontext.Context, jobID, shareType, linkType, resourceType int, goodsID string) (link string, err error) { diff --git a/business/model/job.go b/business/model/job.go index 73edeff29..d0933fde9 100644 --- a/business/model/job.go +++ b/business/model/job.go @@ -35,6 +35,7 @@ const ( JobTypeNormal = 0 //普通任务 JobTypeMtMember = 1 //美团会员任务 JobTypeJdDelivery = 2 //京东快递任务 + JobTypeOther = 3 //其他任务(可能是存储信息用的 JobCashbackPrice = 1 //返现类型固定返现 JobCashbackPercentage = 2 //返现类型比例返现