aa
This commit is contained in:
@@ -1959,11 +1959,33 @@ func TempJob() (err error) {
|
|||||||
return err
|
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 {
|
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) {
|
func ShareUnionLink(ctx *jxcontext.Context, jobID, shareType, linkType, resourceType int, goodsID string) (link string, err error) {
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ const (
|
|||||||
JobTypeNormal = 0 //普通任务
|
JobTypeNormal = 0 //普通任务
|
||||||
JobTypeMtMember = 1 //美团会员任务
|
JobTypeMtMember = 1 //美团会员任务
|
||||||
JobTypeJdDelivery = 2 //京东快递任务
|
JobTypeJdDelivery = 2 //京东快递任务
|
||||||
|
JobTypeOther = 3 //其他任务(可能是存储信息用的
|
||||||
|
|
||||||
JobCashbackPrice = 1 //返现类型固定返现
|
JobCashbackPrice = 1 //返现类型固定返现
|
||||||
JobCashbackPercentage = 2 //返现类型比例返现
|
JobCashbackPercentage = 2 //返现类型比例返现
|
||||||
|
|||||||
Reference in New Issue
Block a user