Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
smallproject
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mahaisong
smallproject
Commits
c273962f
Commit
c273962f
authored
Jul 05, 2018
by
mahaisong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix;数据结构定义修改
parent
afc9deb8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
223 additions
and
1 deletion
+223
-1
crebas.sql
15.国海推荐/crebas.sql
+221
-0
国海推荐.pdb
15.国海推荐/国海推荐.pdb
+0
-0
国海推荐.pdm
15.国海推荐/国海推荐.pdm
+0
-0
工作空间.sws
15.国海推荐/工作空间.sws
+2
-1
No files found.
15.国海推荐/crebas.sql
0 → 100644
View file @
c273962f
/*==============================================================*/
/*==============================================================*/
/* DBMS name: MySQL 5.0 */
/* Created on: 2018/7/5 14:45:27 */
/*==============================================================*/
/*==============================================================*/
/* Table: GHRecom_Dic */
/*==============================================================*/
create
table
GHRecom_Dic
(
ID
int
not
null
comment
'自增主键'
,
Type
varchar
(
20
)
not
null
comment
'USERRISK_LEVEL:用户风险等级
FUNDRISK_LEVEL:产品风险等级
FUND_TYPE:产品类型
INCOME_TYPE:收益类型
MONEY_TYPE:币种
'
,
DicKey
varchar
(
20
)
not
null
,
DicValue
varchar
(
20
)
not
null
,
CreateTime
datetime
not
null
,
UpdateTime
datetime
not
null
,
primary
key
(
ID
)
);
alter
table
GHRecom_Dic
comment
'同步国海数据的字典表'
;
/*==============================================================*/
/* Table: GHRecom_Fund */
/*==============================================================*/
create
table
GHRecom_Fund
(
ID
int
not
null
comment
'自增主键'
,
PROD_CODE
varchar
(
30
)
not
null
,
PRODTA_NO
varchar
(
30
)
not
null
,
PROD_NAME
varchar
(
30
)
not
null
,
PRODRISK_LEVEL
varchar
(
30
)
not
null
,
PRODRISK_LEVEL_NAME
varchar
(
30
),
PROD_STATUS
varchar
(
30
),
PROD_TYPE
int
comment
'字典表'
,
MIN_SHARE2
decimal
(
38
,
6
)
not
null
,
NAV
decimal
(
38
,
6
),
PROD_RATIO
decimal
(
38
,
6
)
not
null
,
INCOME_TYPE
int
,
MONEY_TYPE
int
,
YLD_RAT_1W
decimal
(
38
,
6
),
YLD_RAT_1M
decimal
(
38
,
6
),
YLD_RAT_3M
decimal
(
38
,
6
),
YLD_RAT_3M_RK
int
,
YLD_RAT_6M
decimal
(
38
,
6
),
YLD_RAT_1Y
decimal
(
38
,
6
)
not
null
,
YLD_RAT_1Y_RK
int
,
YLD_RAT
decimal
(
38
,
6
),
FLUC_RAN
varchar
(
10
),
FLUC_RAN_RANK
int
,
SHP_RAT
decimal
(
38
,
6
),
SHP_RAT_RANK
int
,
RISK_FCTR
int
,
RISK_FCTR_RANK
int
,
CreateDate
date
not
null
comment
'历史每天的数据都存储在此表中,同步日期不断累积。'
,
CreateTime
datetime
not
null
,
primary
key
(
ID
)
);
alter
table
GHRecom_Fund
comment
'国海推荐:产品(基金)接口源数据表。历史每天的数据都存储在此表中,同步日期不断累积。'
;
/*==============================================================*/
/* Table: GHRecom_FundPool */
/*==============================================================*/
create
table
GHRecom_FundPool
(
ID
int
not
null
comment
'自增主键'
,
PROD_CODE
varchar
(
30
)
not
null
,
PRODTA_NO
varchar
(
30
)
not
null
,
PROD_NAME
varchar
(
30
)
not
null
,
PRODRISK_LEVEL
varchar
(
30
)
not
null
,
PRODRISK_LEVEL_NAME
varchar
(
30
),
PROD_TYPE
int
comment
'字典表'
,
MIN_SHARE2
decimal
(
38
,
6
)
not
null
,
NAV
decimal
(
38
,
6
),
PROD_RATIO
decimal
(
38
,
6
)
not
null
,
INCOME_TYPE
int
,
MONEY_TYPE
int
,
YLD_RAT_1W
decimal
(
38
,
6
),
YLD_RAT_1M
decimal
(
38
,
6
),
YLD_RAT_3M
decimal
(
38
,
6
),
YLD_RAT_3M_RK
int
,
YLD_RAT_6M
decimal
(
38
,
6
),
YLD_RAT_1Y
decimal
(
38
,
6
)
not
null
,
YLD_RAT_1Y_RK
int
,
YLD_RAT
decimal
(
38
,
6
),
FLUC_RAN
varchar
(
10
),
FLUC_RAN_RANK
int
,
SHP_RAT
decimal
(
38
,
6
),
SHP_RAT_RANK
int
,
RISK_FCTR
int
,
RISK_FCTR_RANK
int
,
Issuing_Scale
decimal
(
38
,
6
),
StarLevel
int
,
FoundationDate
datetime
,
Redeem
datetime
,
BrightSpotLabel
varchar
(
30
),
URL
varchar
(
200
),
UpdateTime
datetime
not
null
comment
'历史每天的数据都存储在此表中,同步日期不断累积。'
,
CreateTime
datetime
not
null
,
IsDelete
bit
not
null
comment
'不再纳入计算。'
,
DeleteTime
datetime
,
primary
key
(
ID
)
);
alter
table
GHRecom_FundPool
comment
'1.同步逻辑1--数据累加更新
每次同步完成后,将源数据表与本表比对,
产品代码相'
;
/*==============================================================*/
/* Table: GHRecom_FundZC */
/*==============================================================*/
create
table
GHRecom_FundZC
(
ID
int
not
null
,
PROD_CODE
varchar
(
30
)
not
null
,
Type
int
not
null
comment
'0:股票重仓
1主题(行业)重仓'
,
ZCName
varchar
(
30
)
not
null
comment
'股票名称、主题(行业)名称'
,
ZCNo
varchar
(
30
)
comment
'股票类的有代码。
主题代码(主题、行业代码与Palas_V5数据库中Blocks表的ID相同)。'
,
ZCRate
decimal
(
38
,
6
)
comment
'重仓的这支股票(主题)在基金总数中占的比例。'
,
TOPN
int
,
MediaPubTime
datetime
not
null
comment
'媒体上公布的本次重仓统计的时间(一般是按季度)'
,
CrawlerTime
datetime
not
null
,
primary
key
(
ID
)
);
alter
table
GHRecom_FundZC
comment
'重仓类型分为股票重仓、主题(行业)重仓。1个产品多个重仓。'
;
/*==============================================================*/
/* Table: GHRecom_History */
/*==============================================================*/
create
table
GHRecom_History
(
ID
bigint
not
null
,
Openid
varchar
(
50
)
not
null
,
RecomType
int
not
null
comment
'1:收益(为1时,不显示
''
主题/个股名称
''
)
2.主题
3.个股'
,
PROD_CODE
varchar
(
30
)
not
null
,
PROD_NAME
varchar
(
30
)
not
null
,
BrightSpotLabel
varchar
(
30
),
YLD_RAT_1Y
decimal
(
38
,
6
)
not
null
,
URL
varchar
(
100
)
not
null
,
SmallTitle
varchar
(
30
),
YLD_RAT_6M
decimal
(
38
,
6
),
CreateTime
datetime
not
null
,
primary
key
(
ID
)
);
alter
table
GHRecom_History
comment
'可以不保存'
;
/*==============================================================*/
/* Table: GHRecom_RankList */
/*==============================================================*/
create
table
GHRecom_RankList
(
ID
int
not
null
,
RankType
int
not
null
comment
'榜单类型:(哪一个榜单)
1.收益榜单
2.重仓主题相关榜单
3.重仓个股相关榜单'
,
RankKey
varchar
(
30
)
not
null
comment
'包含了不同的风险等级+不同榜单的分类类型+下属排行TOP几
拼接规则如下:(具体参见详细设计-榜单法)
1:收益
R1 基金类型1 T1
\R
1 基金类型1 T2
\\
R2 基金类型1 T1……
R1 基金类型2 T1
\R
1 基金类型2 T2
\\
R2 基金类型2 T1……
2.主题;
R1食品行业编号T1
\R
1食品行业编号T2
\R
2食品行业编号T1……
3.个股:
R1股票代码T1
\R
1股票代码T2
\R
2股票代码T1……
'
,
ReturnRatio
decimal
(
38
,
6
)
not
null
,
PROD_CODE
varchar
(
30
)
not
null
,
LastUpdateTimestamp
datetime
not
null
,
CreateTime
datetime
not
null
,
primary
key
(
ID
)
);
alter
table
GHRecom_RankList
comment
'每日同步数据后,根据最新的产品池,计算一次榜单。
拼接规则如下:(具体参见详细设计-榜单法)
'
;
/*==============================================================*/
/* Index: Index_1 */
/*==============================================================*/
create
index
Index_1
on
GHRecom_RankList
(
RankType
,
RankKey
);
/*==============================================================*/
/* Table: GHRecom_UserRisk */
/*==============================================================*/
create
table
GHRecom_UserRisk
(
ID
int
not
null
comment
'主键、自增'
,
Openid
varchar
(
50
)
not
null
,
Risk_Level
varchar
(
10
)
not
null
,
CreateTime
datetime
not
null
,
primary
key
(
ID
)
);
alter
table
GHRecom_UserRisk
comment
'国海用户风险等级'
;
15.国海推荐/国海推荐.pdb
View file @
c273962f
This diff is collapsed.
Click to expand it.
15.国海推荐/国海推荐.pdm
View file @
c273962f
This diff is collapsed.
Click to expand it.
15.国海推荐/工作空间.sws
View file @
c273962f
<?xml
version="1.0" encoding="UTF-8"?>
<?xml
version="1.0" encoding="UTF-8"?>
...
...
@@ -4,6 +4,7 @@
<Workspace>
<Local
Expanded=
"Yes"
>
<Model
Expanded=
"Yes"
ID=
"{493CCEF3-7C19-40D3-B1CA-DBD1505EEC96}"
Loaded=
"No"
Name=
"国海推荐"
Type=
"{CDE44E21-9669-11D1-9914-006097355D9B}"
URL=
"国海推荐.pdm"
/>
<Model
Expanded=
"Yes"
ID=
"{493CCEF3-7C19-40D3-B1CA-DBD1505EEC96}"
Name=
"国海推荐"
Type=
"{CDE44E21-9669-11D1-9914-006097355D9B}"
URL=
"国海推荐.pdm"
/>
</Local>
<BrowserModule
Name=
"Repository"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment