aa
This commit is contained in:
@@ -1979,3 +1979,29 @@ func ShareUnionLink(ctx *jxcontext.Context, jobID, linkType int) (link string, e
|
||||
}
|
||||
return link, err
|
||||
}
|
||||
|
||||
type GetUnionJobOrderInfoResult struct {
|
||||
AcceptCouponCount int `json:"acceptCouponCount"` //领取优惠券数量
|
||||
FinishedOrderCount int `json:"finishedOrderCount"` //完成订单量
|
||||
IncomePrice int `json:"incomePrice"` //收入
|
||||
}
|
||||
|
||||
func GetUnionJobOrderInfo(ctx *jxcontext.Context, jobOrderID int) (getUnionJobOrderInfoResult *GetUnionJobOrderInfoResult, err error) {
|
||||
var (
|
||||
jobOrder = &model.JobOrder{}
|
||||
job = &model.Job{}
|
||||
db = dao.GetDB()
|
||||
)
|
||||
jobOrder.ID = int64(jobOrderID)
|
||||
if err = dao.GetEntity(db, jobOrder); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
job.ID = jobOrder.JobID
|
||||
if err = dao.GetEntity(db, job); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if job.JobCategoryID != model.JobCategoryIDUnion {
|
||||
return nil, fmt.Errorf("只允许联盟任务才能查看!")
|
||||
}
|
||||
return getUnionJobOrderInfoResult, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user