This commit is contained in:
苏尹岚
2021-04-06 14:32:17 +08:00
parent 6fa79a7a0a
commit 3f895f0dc4
2 changed files with 9 additions and 8 deletions

View File

@@ -1171,13 +1171,14 @@ func GetStoreAcctExpendLastCreateWayBillFee(db *DaoDB, vendorOrderID string) (ex
ORDER BY a.created_at DESC
LIMIT 1
`
err = GetRow(db, &expend, sql, sqlParams)
lastFee = expend.ExpendPrice
if expend.ExpID != 0 {
lastFee += expend.MulitExpendPrice
}
if expend.IncID != 0 {
lastFee -= expend.MulitIncomePrice
if err = GetRow(db, &expend, sql, sqlParams); err == nil && expend != nil {
lastFee = expend.ExpendPrice
if expend.ExpID != 0 {
lastFee += expend.MulitExpendPrice
}
if expend.IncID != 0 {
lastFee -= expend.MulitIncomePrice
}
}
return expend, lastFee, err
}