过滤软删除的记录
This commit is contained in:
parent
2a137ad3fb
commit
370f0a08c1
@ -90,7 +90,7 @@ func GetBundleExtendRecordList(req *bundle.BundleExtendRecordsListRequest) (data
|
||||
func GetBundleBalanceList(req *bundle.GetBundleBalanceListReq) (data []model.BundleBalancePo, total int64, err error) {
|
||||
session := app.ModuleClients.BundleDB.Table("fiee_bundle.bundle_balance AS bb").
|
||||
Select(`
|
||||
bb .*,
|
||||
bb.*,
|
||||
bor.expiration_time as expired_time,
|
||||
bor.bundle_name,
|
||||
bor.status,
|
||||
@ -99,7 +99,8 @@ func GetBundleBalanceList(req *bundle.GetBundleBalanceListReq) (data []model.Bun
|
||||
u.tel_num as user_phone_number
|
||||
`).
|
||||
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")
|
||||
Joins("LEFT JOIN `micro-account`.`user` u on u.id = bb.user_id").
|
||||
Where("bor.deleted_at IS NOT NULL")
|
||||
if req.UserName != "" {
|
||||
session = session.Where("u.nickname like ?", "%"+req.UserName+"%")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user