Compare commits

..

No commits in common. "main" and "v0.1.3" have entirely different histories.
main ... v0.1.3

5 changed files with 0 additions and 41 deletions

View File

@ -1,17 +0,0 @@
package model
import "strings"
func IsDuplicateError(err error) bool {
if err == nil {
return false
}
var errstr = strings.ToLower(err.Error())
if strings.HasPrefix(errstr, "error 1062 (23000): duplicate entry") {
return true
} else if strings.Contains(errstr, "error") && strings.Contains(errstr, "duplicate entry") {
return true
}
return false
}

View File

@ -1 +0,0 @@
package dao

View File

@ -1,22 +0,0 @@
package model
import (
"qoobing.ai/payserver/config"
"qoobing.com/gomod/log"
"qoobing.com/gomod/model"
)
var (
Db = model.Db
DbOf = model.DbOf
Redis = model.Redis
RedisPool = model.RedisPool
RedisPoolOf = model.RedisPoolOf
)
func init() {
cfg := config.Instance()
model.Init("pay", &cfg.PayDb)
model.Init("pay", &cfg.PayRedis)
log.Infof("model initlized")
}

View File

@ -1 +0,0 @@
package model