diff --git a/internal/dao/bundleExtend.go b/internal/dao/bundleExtend.go index 80aa2bf..bcfc7f2 100644 --- a/internal/dao/bundleExtend.go +++ b/internal/dao/bundleExtend.go @@ -126,6 +126,7 @@ func GetBundleBalanceByUserId(req *bundle.GetBundleBalanceByUserIdReq) (data mod Select("bb .*,bor.uuid AS order_uuid, bor.bundle_name AS bundle_name, bor.status AS bundle_status, bor.pay_time AS pay_time, bor.expiration_time AS expired_time"). Joins("LEFT JOIN bundle_order_records bor ON bor.customer_id = bb.user_id"). Joins("LEFT JOIN `micro-account`.`user` u ON u.id = bb.user_id"). + Where("bor.deleted_at IS NULL"). Where("bb.user_id = ?", req.UserId). Where("bor.expiration_time > ?", time.Now()). First(&data).Error @@ -241,7 +242,7 @@ func GetVedioWorkDetail(req *bundle.GetVedioWorkDetailReq) (data model.CastWorkV } func ToBeComfirmedWorks(req *bundle.ToBeComfirmedWorksReq) (data []model.CastWorkLog, total int64, err error) { - session := app.ModuleClients.BundleDB.Where(&model.CastWorkLog{ + session := app.ModuleClients.BundleDB.Model(&model.CastWorkLog{}).Where(&model.CastWorkLog{ ArtistUuid: req.ArtistUuid, }) err = session.Count(&total).Error diff --git a/internal/model/bundle.go b/internal/model/bundle.go index 8e93ab7..3dc04b9 100644 --- a/internal/model/bundle.go +++ b/internal/model/bundle.go @@ -160,7 +160,7 @@ type UserBundleBalancePo struct { BundleName string `json:"bundleName" gorm:"column:bundle_name"` BundleStatus string `json:"bundleStatus" gorm:"column:bundle_status"` PayTime string `json:"payTime" gorm:"column:pay_time"` - ExpiredTime string `json:"expiredTime" gorm:"column:expiration_time"` + ExpiredTime string `json:"expiredTime" gorm:"column:expired_time"` PaymentAmount string `json:"paymentAmount" gorm:"column:payment_amount"` AccountNumber int32 `json:"accountNumber" gorm:"column:account_number"` AccountAdditional int32 `json:"accountAdditional" gorm:"column:account_additional"`