This commit is contained in:
richboo111
2022-07-29 15:23:21 +08:00
parent 4bbf80c7a4
commit e11b4f4611
8 changed files with 97 additions and 42 deletions

View File

@@ -11,6 +11,17 @@ import (
"time"
)
func AddMixPay(txDB orm.TxOrmer, orderID string, balancePrice, totalPrice, method int) error {
mixPayInfo := &model.MixPay{
OrderID: orderID,
BalancePrice: balancePrice,
TotalPrice: totalPrice,
Method: method,
}
dao.WrapAddIDCULEntity(mixPayInfo, jxcontext.AdminCtx.GetUserName())
return dao.CreateEntityTx(txDB, mixPayInfo)
}
func AddBillIncome(txDB orm.TxOrmer, billID int64, billType, incomePrice, jobID int) (err error) {
billIncome := &model.BillIncome{
BillID: billID,
@@ -50,6 +61,11 @@ func AddUserBillDb(db *dao.DaoDB, billID int64, userID string) (err error) {
return dao.CreateEntity(db, userBillInsert)
}
//
//func AddExpendMixPay(txDB orm.TxOrmer, userBill *model.UserBill, billType, price, jobID int) (err error) {
//err=AddMixPay()
//}
func GetUserBillDetail(ctx *jxcontext.Context, userID, fromTime, toTime string, pageSize, offset int) (pagedInfo *model.PagedInfo, err error) {
return dao.GetUserBillDetail(dao.GetDB(), userID, utils.Str2Time(fromTime), utils.Str2Time(toTime), pageSize, offset)
}