"修改数据库表名从 fiee_bundle 到 micro_bundle"
This commit is contained in:
parent
9c3c441eda
commit
1f1fbed3a8
@ -54,7 +54,7 @@ func AddBundleExtendRecord(data model.BundleExtensionRecords) error {
|
||||
}
|
||||
|
||||
func GetBundleExtendRecordList(req *bundle.BundleExtendRecordsListRequest) (data []model.BundleExtendRecordItemPo, total int64, err error) {
|
||||
session := app.ModuleClients.BundleDB.Table("fiee_bundle.bundle_extension_records AS ber").
|
||||
session := app.ModuleClients.BundleDB.Table("micro_bundle.bundle_extension_records AS ber").
|
||||
Select(`
|
||||
ber.*,
|
||||
rn.name as user_name,
|
||||
@ -112,7 +112,7 @@ func GetBundleBalanceList(req *bundle.GetBundleBalanceListReq) (data []model.Bun
|
||||
u.tel_num as user_phone_number, u.id as user_id`).
|
||||
Joins("LEFT JOIN `micro-account`.real_name rn ON u.real_name_id = rn.id").
|
||||
Joins("LEFT JOIN (?) as bor ON bor.customer_id = u.id", subQuery).
|
||||
Joins("LEFT JOIN fiee_bundle.bundle_balance bb ON u.id = bb.user_id AND bb.order_uuid = bor.uuid").
|
||||
Joins("LEFT JOIN micro_bundle.bundle_balance bb ON u.id = bb.user_id AND bb.order_uuid = bor.uuid").
|
||||
Where("rn.name IS NOT NULL").
|
||||
Where("u.deleted_at = 0")
|
||||
if req.UserName != "" {
|
||||
@ -152,7 +152,7 @@ func GetBundleBalanceList(req *bundle.GetBundleBalanceListReq) (data []model.Bun
|
||||
}
|
||||
|
||||
func GetBundleBalanceByUserId(req *bundle.GetBundleBalanceByUserIdReq) (data model.UserBundleBalancePo, err error) {
|
||||
err = app.ModuleClients.BundleDB.Table("fiee_bundle.bundle_balance AS bb").
|
||||
err = app.ModuleClients.BundleDB.Table("micro_bundle.bundle_balance AS bb").
|
||||
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,bor.amount AS payment_amount,bor.amount_type AS payment_type").
|
||||
Joins("LEFT JOIN bundle_order_records bor ON bor.uuid = bb.order_uuid").
|
||||
Joins("LEFT JOIN `micro-account`.`user` u ON u.id = bb.user_id").
|
||||
|
Loading…
Reference in New Issue
Block a user