Commit a8d691ab authored by brent's avatar brent

modify debit

parent b1951f4c
......@@ -6,7 +6,8 @@ sessionon = true
sessiongcmaxlifetime = 127800
logLevel = 7
logfile = "admin_backend.log"
debitTime = "01 01 00 * * ?" ;01 01 00 * * ?
debitTime = "0 46 15 * * ?"
;01 01 00 * * ?
; SessionProvider = "redis"
; SessionProviderConfig = "192.168.1.10:6379,1000"
web3ClientId = "BHciicCbodMasHsyVfcdPYCaCokJMK5wGs2H4IRCaseqNJlcb1Li4kExaf5gF5DoUx-m_77epCrRPq4XmQzzdRk"
......
......@@ -58,6 +58,16 @@ func init() {
if err != nil {
panic(err)
}
createFundTable()
}
func createFundTable() {
sql := "CREATE TABLE IF NOT EXISTS \n'funds' (\n id LONG ,\n status int,\n uid int,\n order_id SYMBOL CAPACITY 128 CACHE INDEX CAPACITY 8192,\n trade_flow int,\n trade_time TIMESTAMP,\n trade_type INT,\n trade_channel int,\n channel_serial SYMBOL CAPACITY 128 CACHE INDEX CAPACITY 8192,\n amount LONG,\n balance LONG,\n remark SYMBOL CAPACITY 128 CACHE INDEX CAPACITY 8192\n) timestamp (trade_time) PARTITION BY DAY WAL;"
qs := ormpost.Raw(sql)
_, err := qs.Exec()
if err != nil {
logs.Debug("createFundTable", err.Error())
}
}
func QueryTset(sql string, args ...interface{}) ([]models.Bills, error) {
......
package snowflake
import "github.com/sony/sonyflake"
import (
"github.com/sony/sonyflake"
"time"
)
import "github.com/beego/beego/v2/core/logs"
import "errors"
var flake *sonyflake.Sonyflake
func init() {
flake = sonyflake.NewSonyflake(sonyflake.Settings{}) // New(sonyflake.Settings{})
flake = sonyflake.NewSonyflake(sonyflake.Settings{
MachineID: func() (uint16, error) {
return 1, nil
},
StartTime: time.Now(),
}) // New(sonyflake.Settings{})
if flake == nil {
logs.Error("failed to create Sonyflake,")
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment