This commit is contained in:
邹宗楠
2022-12-07 17:33:29 +08:00
parent 40c7ca6dca
commit be333c9feb
3 changed files with 3 additions and 2 deletions

View File

@@ -32,7 +32,7 @@ func QueryPrintBill(db *sqlx.Tx, userId, printNo string) ([]*app_model.PrintBill
// QueryPrintBillList 查询打印机余额
func QueryPrintBillList(userId string, printNo []string) ([]*app_model.PrintBill, error) {
db := globals.GetTxDb()
db := globals.GetDB()
sql := `SELECT * FROM print_bill WHERE 1 = 1 `
var param []interface{}
if userId != "" {

View File

@@ -95,7 +95,7 @@ type PrintInfo struct {
type PagedInfo struct {
TotalCount int `json:"totalCount"`
Data interface{} `json:"data"`
PrintBill map[string]int64 `json:"print_bill"`
PrintBill map[string]int64 `json:"printBill"`
}
type ModelIDCULD struct {

View File

@@ -87,6 +87,7 @@ func GetPrinters(userId string, appID int, printNo, name string, status, isOnlin
if err != nil {
return nil, err
}
globals.SugarLogger.Debugf("====================%s", utils.Format4Output(printBillList, false))
for _, v := range printBillList {
page.PrintBill[v.PrintNo] = v.PrintBalance
}