pg_order_dao.go 674 字节
package dao

import (
	"fmt"
	"gitlab.fjmaimaimai.com/mmm-go/partner/pkg/infrastructure/pg/transaction"
)

type OrderDao struct {
	transactionContext *transaction.TransactionContext
}

func (dao *OrderDao) OrderStatics() (count int, amount float64, err error) {
	//tx :=dao.transactionContext.PgTx
	//order :=new(models.Order)
	//sql :=fmt.Sprintf(``,)
	//q:=tx.Model(order).QueryOne()
	return
}

func NewEmployeeDao(transactionContext *transaction.TransactionContext) (*OrderDao, error) {
	if transactionContext == nil {
		return nil, fmt.Errorf("transactionContext参数不能为nil")
	} else {
		return &OrderDao{
			transactionContext: transactionContext,
		}, nil
	}
}