mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2026-04-08 06:35:18 +08:00
支持购买套餐/续费套餐/用户账户操作等
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"github.com/iwind/TeaGo/Tea"
|
||||
"github.com/iwind/TeaGo/dbs"
|
||||
"github.com/iwind/TeaGo/types"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -119,7 +120,7 @@ func (this *RegionCityDAO) FindCityIdWithNameCacheable(tx *dbs.Tx, provinceId in
|
||||
cityId, err := this.Query(tx).
|
||||
Attr("provinceId", provinceId).
|
||||
Where("JSON_CONTAINS(codes, :cityName)").
|
||||
Param("cityName", "\""+cityName+"\""). // 查询的需要是个JSON字符串,所以这里加双引号
|
||||
Param("cityName", strconv.Quote(cityName)). // 查询的需要是个JSON字符串,所以这里加双引号
|
||||
ResultPk().
|
||||
FindInt64Col(0)
|
||||
if err != nil {
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
"github.com/iwind/TeaGo/dbs"
|
||||
"github.com/iwind/TeaGo/types"
|
||||
"github.com/mozillazg/go-pinyin"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
||||
@@ -88,7 +89,7 @@ func (this *RegionCountryDAO) FindCountryIdWithDataId(tx *dbs.Tx, dataId string)
|
||||
func (this *RegionCountryDAO) FindCountryIdWithName(tx *dbs.Tx, countryName string) (int64, error) {
|
||||
return this.Query(tx).
|
||||
Where("JSON_CONTAINS(codes, :countryName)").
|
||||
Param("countryName", "\""+countryName+"\""). // 查询的需要是个JSON字符串,所以这里加双引号
|
||||
Param("countryName", strconv.Quote(countryName)). // 查询的需要是个JSON字符串,所以这里加双引号
|
||||
ResultPk().
|
||||
FindInt64Col(0)
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
"github.com/iwind/TeaGo/Tea"
|
||||
"github.com/iwind/TeaGo/dbs"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -85,7 +86,7 @@ func (this *RegionProviderDAO) FindProviderIdWithNameCacheable(tx *dbs.Tx, provi
|
||||
|
||||
providerId, err := this.Query(tx).
|
||||
Where("JSON_CONTAINS(codes, :providerName)").
|
||||
Param("providerName", "\""+providerName+"\""). // 查询的需要是个JSON字符串,所以这里加双引号
|
||||
Param("providerName", strconv.Quote(providerName)). // 查询的需要是个JSON字符串,所以这里加双引号
|
||||
ResultPk().
|
||||
FindInt64Col(0)
|
||||
if err != nil {
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
"github.com/iwind/TeaGo/Tea"
|
||||
"github.com/iwind/TeaGo/dbs"
|
||||
"github.com/iwind/TeaGo/types"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -88,7 +89,7 @@ func (this *RegionProvinceDAO) FindProvinceIdWithName(tx *dbs.Tx, countryId int6
|
||||
return this.Query(tx).
|
||||
Attr("countryId", countryId).
|
||||
Where("JSON_CONTAINS(codes, :provinceName)").
|
||||
Param("provinceName", "\""+provinceName+"\""). // 查询的需要是个JSON字符串,所以这里加双引号
|
||||
Param("provinceName", strconv.Quote(provinceName)). // 查询的需要是个JSON字符串,所以这里加双引号
|
||||
ResultPk().
|
||||
FindInt64Col(0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user