mirror of
https://github.com/injoyai/tdx.git
synced 2025-11-26 21:25:35 +08:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4d1487f0b6 | ||
|
|
bd3863d3c5 | ||
|
|
5fb1a212c6 |
@@ -281,11 +281,11 @@ func IsETF(code string) bool {
|
|||||||
code = strings.ToLower(code)
|
code = strings.ToLower(code)
|
||||||
switch {
|
switch {
|
||||||
case code[0:2] == ExchangeSH.String() &&
|
case code[0:2] == ExchangeSH.String() &&
|
||||||
(code[2:5] == "510" || code[2:5] == "511" || code[2:5] == "512" || code[2:5] == "513" || code[2:5] == "515"):
|
(code[2:4] == "51" || code[2:4] == "56" || code[2:4] == "58"):
|
||||||
return true
|
return true
|
||||||
|
|
||||||
case code[0:2] == ExchangeSZ.String() &&
|
case code[0:2] == ExchangeSZ.String() &&
|
||||||
(code[2:5] == "159"):
|
(code[2:4] == "15" || code[2:4] == "16"):
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import (
|
|||||||
_ "github.com/go-sql-driver/mysql"
|
_ "github.com/go-sql-driver/mysql"
|
||||||
"github.com/injoyai/base/maps"
|
"github.com/injoyai/base/maps"
|
||||||
"github.com/injoyai/conv"
|
"github.com/injoyai/conv"
|
||||||
|
"github.com/injoyai/ios/client"
|
||||||
"github.com/injoyai/logs"
|
"github.com/injoyai/logs"
|
||||||
"github.com/injoyai/tdx/protocol"
|
"github.com/injoyai/tdx/protocol"
|
||||||
"github.com/robfig/cron/v3"
|
"github.com/robfig/cron/v3"
|
||||||
@@ -16,6 +17,14 @@ import (
|
|||||||
"xorm.io/xorm"
|
"xorm.io/xorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func DialWorkday(op ...client.Option) (*Workday, error) {
|
||||||
|
c, err := DialDefault(op...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return NewWorkdaySqlite(c)
|
||||||
|
}
|
||||||
|
|
||||||
func NewWorkdayMysql(c *Client, dsn string) (*Workday, error) {
|
func NewWorkdayMysql(c *Client, dsn string) (*Workday, error) {
|
||||||
|
|
||||||
//连接数据库
|
//连接数据库
|
||||||
|
|||||||
Reference in New Issue
Block a user