aa
This commit is contained in:
@@ -236,7 +236,7 @@ func CancelPublishJob(ctx *jxcontext.Context, jobID int) (err error) {
|
||||
if job.CashbackType == model.JobCashbackPrice {
|
||||
price = job.SurplusCount * job.AvgPrice
|
||||
} else {
|
||||
if billIncomes, err := dao.GetBillIncome(db, jobID); err == nil {
|
||||
if billIncomes, err := dao.GetBillIncome(db, jobID, 0); err == nil {
|
||||
for _, v := range billIncomes {
|
||||
price += v.IncomePrice
|
||||
}
|
||||
@@ -912,7 +912,7 @@ func RefreshJobStatus(ctx *jxcontext.Context) (err error) {
|
||||
if job.CashbackType == model.JobCashbackPrice {
|
||||
price = job.SurplusCount * job.AvgPrice
|
||||
} else {
|
||||
if billIncomes, err := dao.GetBillIncome(db, job.ID); err == nil {
|
||||
if billIncomes, err := dao.GetBillIncome(db, job.ID, 0); err == nil {
|
||||
for _, v := range billIncomes {
|
||||
price += v.IncomePrice
|
||||
}
|
||||
@@ -2003,5 +2003,18 @@ func GetUnionJobOrderInfo(ctx *jxcontext.Context, jobOrderID int) (getUnionJobOr
|
||||
if job.JobCategoryID != model.JobCategoryIDUnion {
|
||||
return nil, fmt.Errorf("只允许联盟任务才能查看!")
|
||||
}
|
||||
userBill, err := dao.GetUserBill(db, jobOrder.UserID, "")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
incomes, err := dao.GetBillIncome(db, job.ID, userBill.BillID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
incomeTotal := 0
|
||||
for _, v := range incomes {
|
||||
incomeTotal += v.IncomePrice
|
||||
}
|
||||
getUnionJobOrderInfoResult.IncomePrice = incomeTotal
|
||||
return getUnionJobOrderInfoResult, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user