新注册的用户请输入邮箱并保存,随后登录邮箱激活账号。后续可直接使用邮箱登录!

Commit 9ef3caf1 authored by kunkkawu's avatar kunkkawu

fix kingbase support

remove ` for asset list
parent af27aa32
No related merge requests found
......@@ -72,12 +72,13 @@ GrpcServerConf:
# 数据库配置
DBConf:
# 数据库类型,支持:mysql、kingbase_mysql、kingbase_pgsql、postgres
Type: "mysql"
Type: "kingbase_pgsql"
# 数据库连接字符串
DNS: root:root123456@tcp(192.168.1.135:3306)/registration_service?charset=utf8&parseTime=true&loc=Asia%2FShanghai
# DNS: root:root123456@tcp(192.168.1.135:3306)/registration_service?charset=utf8&parseTime=true&loc=Asia%2FShanghai
#DNS: root:root123456@tcp(192.168.1.135:3306)/ida1?charset=utf8&parseTime=true&loc=Asia%2FShanghai
#DNS: root:@tcp(127.0.0.1:3306)/registration-service?charset=utf8&parseTime=true&loc=Asia%2FShanghai
#DNS: root:root123456@tcp(192.168.40.22:32006)/registration_service?charset=utf8&parseTime=true&loc=Asia%2FShanghai
DNS: host=192.168.1.135 port=54321 user=kingbase password=123456 dbname=registration_service sslmode=disable client_encoding=UTF8 TimeZone=Asia/Shanghai
# redis 缓存配置,主要指定访问地址,其他配置项默认即可
Cache:
......
......@@ -26,7 +26,6 @@ import (
)
var (
// defaultGroupName 订阅组信息
defaultGroupName = "registration" // 注册中心
// consumer 消费者
......
......@@ -89,10 +89,10 @@ func (l *AssetListLogic) AssetList(in *registrationpb.AssetListReq) (*registrati
sql1 := fmt.Sprintf("SELECT asset_id from asset_chain_info where "+
" deleted_at is NULL and asset_id not in(%s) group by asset_chain_info.asset_id", sub1)
// 查询当前链的资产
sql2 := fmt.Sprintf("SELECT *,2 as sort_order FROM `asset` WHERE asset.platform = %d "+
"AND `asset`.`deleted_at` IS NULL and asset.id in (%s) %s ", model.PlatformLocal, sub2, whereClause)
sql2 := fmt.Sprintf("SELECT *,2 as sort_order FROM asset WHERE asset.platform = %d "+
"AND asset.deleted_at IS NULL and asset.id in (%s) %s ", model.PlatformLocal, sub2, whereClause)
sql := fmt.Sprintf("SELECT *,1 as sort_order FROM `asset` WHERE platform = %d %s "+
sql := fmt.Sprintf("SELECT *,1 as sort_order FROM asset WHERE platform = %d %s "+
"AND deleted_at IS NULL and asset.id in(%s) UNION ALL %s order by sort_order asc, created_at desc "+
"LIMIT %d OFFSET %d", model.PlatformLocal, whereClause, sql1, sql2, int(in.PageSize), offset)
db.Raw(sql).Scan(&assetList)
......
......@@ -26,7 +26,7 @@ const (
// nolint
type AssetCertification struct {
Id uint `gorm:"column:id;primary_key;AUTO_INCREMENT" json:"id"`
AssetId int32 `gorm:"column:asset_id;type:varchar(120);comment:资产自增id" json:"asset_id"`
AssetId int32 `gorm:"column:asset_id;comment:资产自增id" json:"asset_id"`
ChainInfoId int32 `gorm:"column:chain_info_id;comment:链信息id" json:"chain_info_id"`
EnterpriseId int32 `gorm:"column:enterprise_id;comment:认证企业ID" json:"enterprise_id"`
EnterpriseType int32 `gorm:"column:enterprise_type;comment:企业类型: 1合规认证,2价值评估" json:"enterprise_type"`
......
......@@ -19,18 +19,18 @@ import (
type AssetDataSetColumn struct {
Id uint `gorm:"column:id;primary_key;AUTO_INCREMENT" json:"id"`
DataSetId int32 `gorm:"column:data_set_id" json:"data_set_id"`
AssetId int32 `gorm:"column:asset_id;type:varchar(20);comment:资产id;NOT NULL" json:"asset_id"`
AssetId int32 `gorm:"column:asset_id;comment:资产id;NOT NULL" json:"asset_id"`
Name string `gorm:"column:name;type:varchar(128);comment:数据项字段名称;NOT NULL" json:"name"`
OriginalName string `gorm:"column:original_name;type:varchar(128);comment:原始数据项字段名称" json:"original_name"`
SecurityLevel int32 `gorm:"column:security_level;comment:分级分类:1 一级,2二级,3三级" json:"security_level"`
DataType string `gorm:"column:data_type;type:varchar(20);comment:数据类型;NOT NULL" json:"data_type"`
DataLength int32 `gorm:"column:data_length;comment:数据长度;NOT NULL" json:"data_length"`
Description string `gorm:"column:description;type:varchar(50);comment:字段描述;NOT NULL" json:"description"`
IsPrimaryKey int32 `gorm:"column:is_primary_key;default:0;comment:是否主键: 1是,0否;NOT NULL" json:"is_primary_key"`
Description string `gorm:"column:description;type:varchar(50);comment:字段描述" json:"description"`
IsPrimaryKey int32 `gorm:"column:is_primary_key;default:0;comment:是否主键: 1是,0否" json:"is_primary_key"`
IsNotNull int32 `gorm:"column:is_not_null;default:0;comment:是否为空:1是,0否;NOT NULL" json:"is_not_null"`
PrivacyQuery int32 `gorm:"column:privacy_query;default:1;comment:是否隐私查询:1是,0否;NOT NULL" json:"privacy_query"`
DataExample string `gorm:"column:data_example;type:varchar(255);comment:数据样例" json:"data_example"`
CustomColumn string `gorm:"column:custom_column;type:varchar(500);comment:个性化字段" json:"custom_column"`
CustomColumn string `gorm:"column:custom_column;type:varchar(4096);comment:个性化字段" json:"custom_column"`
CreatedAt time.Time `gorm:"column:created_at;comment:创建时间" json:"created_at"`
UpdatedAt time.Time `gorm:"column:updated_at;comment:更新时间" json:"updated_at"`
}
......
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