feat: support ClickHouse log database (#5663)
* feat: support ClickHouse log database * feat(log): optimize log deletion process for ClickHouse
This commit is contained in:
+6
-6
@@ -85,7 +85,7 @@ func UpdatePendingTopUpStatus(tradeNo string, expectedPaymentProvider string, ta
|
||||
}
|
||||
|
||||
refCol := "`trade_no`"
|
||||
if common.UsingPostgreSQL {
|
||||
if common.UsingMainDatabase(common.DatabaseTypePostgreSQL) {
|
||||
refCol = `"trade_no"`
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ func Recharge(referenceId string, customerId string, callerIp string) (err error
|
||||
topUp := &TopUp{}
|
||||
|
||||
refCol := "`trade_no`"
|
||||
if common.UsingPostgreSQL {
|
||||
if common.UsingMainDatabase(common.DatabaseTypePostgreSQL) {
|
||||
refCol = `"trade_no"`
|
||||
}
|
||||
|
||||
@@ -323,7 +323,7 @@ func ManualCompleteTopUp(tradeNo string, callerIp string) error {
|
||||
}
|
||||
|
||||
refCol := "`trade_no`"
|
||||
if common.UsingPostgreSQL {
|
||||
if common.UsingMainDatabase(common.DatabaseTypePostgreSQL) {
|
||||
refCol = `"trade_no"`
|
||||
}
|
||||
|
||||
@@ -398,7 +398,7 @@ func RechargeCreem(referenceId string, customerEmail string, customerName string
|
||||
topUp := &TopUp{}
|
||||
|
||||
refCol := "`trade_no`"
|
||||
if common.UsingPostgreSQL {
|
||||
if common.UsingMainDatabase(common.DatabaseTypePostgreSQL) {
|
||||
refCol = `"trade_no"`
|
||||
}
|
||||
|
||||
@@ -473,7 +473,7 @@ func RechargeWaffo(tradeNo string, callerIp string) (err error) {
|
||||
topUp := &TopUp{}
|
||||
|
||||
refCol := "`trade_no`"
|
||||
if common.UsingPostgreSQL {
|
||||
if common.UsingMainDatabase(common.DatabaseTypePostgreSQL) {
|
||||
refCol = `"trade_no"`
|
||||
}
|
||||
|
||||
@@ -536,7 +536,7 @@ func RechargeWaffoPancake(tradeNo string) (err error) {
|
||||
topUp := &TopUp{}
|
||||
|
||||
refCol := "`trade_no`"
|
||||
if common.UsingPostgreSQL {
|
||||
if common.UsingMainDatabase(common.DatabaseTypePostgreSQL) {
|
||||
refCol = `"trade_no"`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user