支持购买套餐/续费套餐/用户账户操作等

This commit is contained in:
刘祥超
2021-11-08 20:52:15 +08:00
parent 07bf994b68
commit e80441639c
24 changed files with 582 additions and 14 deletions

View File

@@ -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)
}