feat: support ClickHouse log database (#5663)
* feat: support ClickHouse log database * feat(log): optimize log deletion process for ClickHouse
This commit is contained in:
@@ -555,7 +555,7 @@ func CompleteSubscriptionOrder(tradeNo string, providerPayload string, expectedP
|
||||
return errors.New("tradeNo is empty")
|
||||
}
|
||||
refCol := "`trade_no`"
|
||||
if common.UsingPostgreSQL {
|
||||
if common.UsingMainDatabase(common.DatabaseTypePostgreSQL) {
|
||||
refCol = `"trade_no"`
|
||||
}
|
||||
var logUserId int
|
||||
@@ -663,7 +663,7 @@ func ExpireSubscriptionOrder(tradeNo string, expectedPaymentProvider string) err
|
||||
return errors.New("tradeNo is empty")
|
||||
}
|
||||
refCol := "`trade_no`"
|
||||
if common.UsingPostgreSQL {
|
||||
if common.UsingMainDatabase(common.DatabaseTypePostgreSQL) {
|
||||
refCol = `"trade_no"`
|
||||
}
|
||||
return DB.Transaction(func(tx *gorm.DB) error {
|
||||
|
||||
Reference in New Issue
Block a user