Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dankal-data-view
Overview
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
仲光辉
dankal-data-view
Commits
d0cfb99a
Commit
d0cfb99a
authored
Apr 28, 2023
by
仲光辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add sql.
parent
0ed78363
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
309 additions
and
309 deletions
+309
-309
2022.05.25 之后需要在线上数据执行的SQL.sql
2022.05.25 之后需要在线上数据执行的SQL.sql
+309
-309
No files found.
2022.05.25 之后需要在线上数据执行的SQL.sql
View file @
d0cfb99a
#
#
2
022
.
05
.
25
#
#
2
022
.
05
.
25
...
...
@@ -5808,315 +5808,315 @@
###
线上数据已经执行
执行时间
:
2023
.
04
.
11
15
:
33
alter
table
opportunity
add
intention_remarks
varchar
(
510
)
null
comment
'意向说明'
;
#
新增字段
ALTER
TABLE
opportunity
ADD
COLUMN
new_rent_date
VARCHAR
(
10
)
AFTER
rent_date
;
#
填充数据
UPDATE
opportunity
SET
new_rent_date
=
DATE_FORMAT
(
rent_date
,
'%Y-%m'
)
WHERE
rent_date
IS
NOT
NULL
;
#
新增字段
ALTER
TABLE
opportunity
ADD
COLUMN
new_expect_deal_date
VARCHAR
(
10
)
AFTER
expect_deal_date
;
#
填充数据
UPDATE
opportunity
SET
new_expect_deal_date
=
DATE_FORMAT
(
expect_deal_date
,
'%Y-%m'
)
WHERE
expect_deal_date
IS
NOT
NULL
;
alter
table
bill_charge_notice_history_group
modify
status
tinyint
(
1
)
default
0
null
comment
'生成状态0生成中1已完成 2:生成失败'
;
alter
table
bill_charge_notice_history_group
add
error_msg
varchar
(
200
)
null
comment
'错误原因'
;
alter
table
bill
add
pay_cycle_value
tinyint
null
comment
'付款周期 X月一付'
;
UPDATE
text_data
t
SET
t
.
value
=
'[
{
"name": "sign",
"value": [
{
"name": "基础信息",
"value": [
{
"text": "{{生成日期}}",
"remark": "如:2020年1月1日"
},
{
"text": "{{合同开始时间}}",
"remark": "如:2020年1月1日"
},
{
"text": "{{合同结束时间}}",
"remark": "如:2020年1月1日"
},
{
"text": "{{解约日期}}",
"remark": "如:2020年1月1日"
}
]
},
{
"name": "单元信息",
"value": [
{
"text": "{{项目所在城市}}",
"remark": "如:杭州市"
},
{
"text": "{{项目所在区域}}",
"remark": "如:余杭区"
},
{
"text": "{{详细地址}}",
"remark": "如:西湖街道123号"
},
{
"text": "{{项目名称}}",
"remark": "如:杭州测试楼"
},
{
"text": "{{楼层号}}",
"remark": "如:单个楼层显示为:3; 多个房源显示为:2,3,4"
},
{
"text": "{{单元号}}",
"remark": "如:单个单元显示为:103; 多个房源显示为:102,103,104"
},
{
"text": "{{套间号}}",
"remark": "如:单个套间显示为:302,多个套间显示为:302,302,403"
},
{
"text": "{{工位号}}",
"remark": "如:单个工位显示为:302,多个工位显示为:302,302,403"
}
]
},
{
"name": "承租方基本信息",
"value": [
{
"text": "{{承租方}}",
"remark": "如:杭州匠人网络科技有限公司"
}
]
},
{
"name": "出租方基本信息",
"value": [
{
"text": "{{出租方}}",
"remark": "如:mfg科技有限公司"
}
]
}
]
},
{
"name": "clause",
"value": [
{
"name": "费用条款",
"value": [
{
"text": "{{费用类型循环}}",
"remark": "如:租金"
},
{
"text": "{{合同编号}}",
"remark": "如:HT-SZS-SZCSXM0109-12334-202304-1900570"
},
{
"text": "{{账单计费开始日期}}",
"remark": "如:2021年11月7日"
},
{
"text": "{{账单计费截止日期}}",
"remark": "如:2021年11月7日"
},
{
"text": "{{拖欠天数}}",
"remark": "如:5(系统生成日-应付日期)"
},
{
"text": "{{滞纳金金额}}",
"remark": "如:1,200.00"
},
{
"text": "{{合计不含滞纳金}}",
"remark": "如:1,200.00"
},
{
"text": "{{滞纳金+租金}}",
"remark": "首期月租金+首期物业管理费,如:4,426.03"
}
]
}
]
}
]'
WHERE
t
.
uuid
=
3
;
CREATE
TABLE
`tenant_notification_contact`
(
`tenant_notification_contact_uuid`
bigint
(
19
)
NOT
NULL
COMMENT
'tenant_notification_contact uuid'
,
`business_uuid`
bigint
(
19
)
NOT
NULL
COMMENT
'eg. bill_charge_notice_history_group uuid'
,
`type`
tinyint
(
1
)
NOT
NULL
COMMENT
'类型: 1:缴费通知单 2:催款涵'
,
`company_uuid`
varchar
(
34
)
NOT
NULL
COMMENT
'company uuid'
,
`company_contacts_uuid`
varchar
(
34
)
NOT
NULL
COMMENT
'company_contacts uuid'
,
`contact_name`
varchar
(
30
)
NOT
NULL
COMMENT
'联系人姓名'
,
`phone_number`
varchar
(
11
)
NOT
NULL
COMMENT
'手机号'
,
`email`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'邮箱'
,
PRIMARY
KEY
(
`tenant_notification_contact_uuid`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COMMENT
=
'租户通知联系人'
;
alter
table
tenant_notification_contact
modify
business_uuid
bigint
(
19
)
not
null
comment
'eg. bill_charge_notice_history_group group_uuid'
;
alter
table
tenant_notification_contact
modify
contact_name
varchar
(
30
)
null
comment
'联系人姓名'
;
alter
table
tenant_notification_contact
modify
phone_number
varchar
(
50
)
null
comment
'手机号'
;
UPDATE
text_data
t
SET
t
.
value
=
'[
{
"name": "sign",
"value": [
{
"name": "基础信息",
"value": [
{
"remark": "如:2020年1月1日",
"text": "{{生成日期}}"
},
{
"remark": "如:2020年1月1日",
"text": "{{合同开始时间}}"
},
{
"remark": "如:2020年1月1日",
"text": "{{合同结束时间}}"
},
{
"remark": "如:2020年1月1日",
"text": "{{解约日期}}"
},
{
"remark": "如:2020年1月1日",
"text": "{{发送日期}}"
}
]
},
{
"name": "单元信息",
"value": [
{
"remark": "如:杭州市",
"text": "{{项目所在城市}}"
},
{
"remark": "如:余杭区",
"text": "{{项目所在区域}}"
},
{
"remark": "如:西湖街道123号",
"text": "{{详细地址}}"
},
{
"remark": "如:杭州测试楼",
"text": "{{项目名称}}"
},
{
"remark": "如:单个楼层显示为:3; 多个房源显示为:2,3,4",
"text": "{{楼层号}}"
},
{
"remark": "如:单个单元显示为:103; 多个房源显示为:102,103,104",
"text": "{{单元号}}"
},
{
"remark": "如:单个套间显示为:302,多个套间显示为:302,302,403",
"text": "{{套间号}}"
},
{
"remark": "如:单个工位显示为:302,多个工位显示为:302,302,403",
"text": "{{工位号}}"
}
]
},
{
"name": "承租方基本信息",
"value": [
{
"remark": "如:杭州匠人网络科技有限公司",
"text": "{{承租方}}"
}
]
},
{
"name": "出租方基本信息",
"value": [
{
"remark": "如:mfg科技有限公司",
"text": "{{出租方}}"
}
]
}
]
},
{
"name": "clause",
"value": [
{
"name": "费用条款",
"value": [
{
"remark": "如:租金",
"text": "{{费用类型循环}}"
},
{
"remark": "如:HT-SZS-SZCSXM0109-12334-202304-1900570",
"text": "{{合同编号}}"
},
{
"remark": "如:2021年11月7日",
"text": "{{账单计费开始日期}}"
},
{
"remark": "如:2021年11月7日",
"text": "{{账单计费截止日期}}"
},
{
"remark": "如:5(系统生成日-应付日期)",
"text": "{{拖欠天数}}"
},
{
"remark": "如:1,200.00",
"text": "{{滞纳金金额}}"
},
{
"remark": "如:1,200.00",
"text": "{{合计不含滞纳金}}"
},
{
"remark": "首期月租金+首期物业管理费,如:4,426.03",
"text": "{{滞纳金+租金}}"
}
]
}
]
}
]'
WHERE
t
.
uuid
=
3
;
#
alter
table
opportunity
#
add
intention_remarks
varchar
(
510
)
null
comment
'意向说明'
;
#
#
#
新增字段
#
ALTER
TABLE
opportunity
ADD
COLUMN
new_rent_date
VARCHAR
(
10
)
AFTER
rent_date
;
#
#
填充数据
#
UPDATE
opportunity
SET
new_rent_date
=
DATE_FORMAT
(
rent_date
,
'%Y-%m'
)
WHERE
rent_date
IS
NOT
NULL
;
#
#
#
新增字段
#
ALTER
TABLE
opportunity
ADD
COLUMN
new_expect_deal_date
VARCHAR
(
10
)
AFTER
expect_deal_date
;
#
#
填充数据
#
UPDATE
opportunity
SET
new_expect_deal_date
=
DATE_FORMAT
(
expect_deal_date
,
'%Y-%m'
)
WHERE
expect_deal_date
IS
NOT
NULL
;
#
#
#
alter
table
bill_charge_notice_history_group
#
modify
status
tinyint
(
1
)
default
0
null
comment
'生成状态0生成中1已完成 2:生成失败'
;
#
#
alter
table
bill_charge_notice_history_group
#
add
error_msg
varchar
(
200
)
null
comment
'错误原因'
;
#
#
alter
table
bill
#
add
pay_cycle_value
tinyint
null
comment
'付款周期 X月一付'
;
#
#
#
UPDATE
text_data
t
#
SET
t
.
value
=
'[
# {
# "name": "sign",
# "value": [
# {
# "name": "基础信息",
# "value": [
# {
# "text": "{{生成日期}}",
# "remark": "如:2020年1月1日"
# },
# {
# "text": "{{合同开始时间}}",
# "remark": "如:2020年1月1日"
# },
# {
# "text": "{{合同结束时间}}",
# "remark": "如:2020年1月1日"
# },
# {
# "text": "{{解约日期}}",
# "remark": "如:2020年1月1日"
# }
# ]
# },
# {
# "name": "单元信息",
# "value": [
# {
# "text": "{{项目所在城市}}",
# "remark": "如:杭州市"
# },
# {
# "text": "{{项目所在区域}}",
# "remark": "如:余杭区"
# },
# {
# "text": "{{详细地址}}",
# "remark": "如:西湖街道123号"
# },
# {
# "text": "{{项目名称}}",
# "remark": "如:杭州测试楼"
# },
# {
# "text": "{{楼层号}}",
# "remark": "如:单个楼层显示为:3; 多个房源显示为:2,3,4"
# },
# {
# "text": "{{单元号}}",
# "remark": "如:单个单元显示为:103; 多个房源显示为:102,103,104"
# },
# {
# "text": "{{套间号}}",
# "remark": "如:单个套间显示为:302,多个套间显示为:302,302,403"
# },
# {
# "text": "{{工位号}}",
# "remark": "如:单个工位显示为:302,多个工位显示为:302,302,403"
# }
# ]
# },
# {
# "name": "承租方基本信息",
# "value": [
# {
# "text": "{{承租方}}",
# "remark": "如:杭州匠人网络科技有限公司"
# }
# ]
# },
# {
# "name": "出租方基本信息",
# "value": [
# {
# "text": "{{出租方}}",
# "remark": "如:mfg科技有限公司"
# }
# ]
# }
# ]
# },
# {
# "name": "clause",
# "value": [
# {
# "name": "费用条款",
# "value": [
# {
# "text": "{{费用类型循环}}",
# "remark": "如:租金"
# },
# {
# "text": "{{合同编号}}",
# "remark": "如:HT-SZS-SZCSXM0109-12334-202304-1900570"
# },
# {
# "text": "{{账单计费开始日期}}",
# "remark": "如:2021年11月7日"
# },
# {
# "text": "{{账单计费截止日期}}",
# "remark": "如:2021年11月7日"
# },
# {
# "text": "{{拖欠天数}}",
# "remark": "如:5(系统生成日-应付日期)"
# },
# {
# "text": "{{滞纳金金额}}",
# "remark": "如:1,200.00"
# },
# {
# "text": "{{合计不含滞纳金}}",
# "remark": "如:1,200.00"
# },
# {
# "text": "{{滞纳金+租金}}",
# "remark": "首期月租金+首期物业管理费,如:4,426.03"
# }
# ]
# }
# ]
# }
# ]'
#
WHERE
t
.
uuid
=
3
;
#
#
CREATE
TABLE
`tenant_notification_contact`
(
#
`tenant_notification_contact_uuid`
bigint
(
19
)
NOT
NULL
COMMENT
'tenant_notification_contact uuid'
,
#
`business_uuid`
bigint
(
19
)
NOT
NULL
COMMENT
'eg. bill_charge_notice_history_group uuid'
,
#
`type`
tinyint
(
1
)
NOT
NULL
COMMENT
'类型: 1:缴费通知单 2:催款涵'
,
#
`company_uuid`
varchar
(
34
)
NOT
NULL
COMMENT
'company uuid'
,
#
`company_contacts_uuid`
varchar
(
34
)
NOT
NULL
COMMENT
'company_contacts uuid'
,
#
`contact_name`
varchar
(
30
)
NOT
NULL
COMMENT
'联系人姓名'
,
#
`phone_number`
varchar
(
11
)
NOT
NULL
COMMENT
'手机号'
,
#
`email`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'邮箱'
,
#
PRIMARY
KEY
(
`tenant_notification_contact_uuid`
)
#
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COMMENT
=
'租户通知联系人'
;
#
#
#
alter
table
tenant_notification_contact
#
modify
business_uuid
bigint
(
19
)
not
null
comment
'eg. bill_charge_notice_history_group group_uuid'
;
#
#
#
alter
table
tenant_notification_contact
#
modify
contact_name
varchar
(
30
)
null
comment
'联系人姓名'
;
#
#
alter
table
tenant_notification_contact
#
modify
phone_number
varchar
(
50
)
null
comment
'手机号'
;
#
#
#
UPDATE
text_data
t
#
SET
t
.
value
=
'[
# {
# "name": "sign",
# "value": [
# {
# "name": "基础信息",
# "value": [
# {
# "remark": "如:2020年1月1日",
# "text": "{{生成日期}}"
# },
# {
# "remark": "如:2020年1月1日",
# "text": "{{合同开始时间}}"
# },
# {
# "remark": "如:2020年1月1日",
# "text": "{{合同结束时间}}"
# },
# {
# "remark": "如:2020年1月1日",
# "text": "{{解约日期}}"
# },
# {
# "remark": "如:2020年1月1日",
# "text": "{{发送日期}}"
# }
# ]
# },
# {
# "name": "单元信息",
# "value": [
# {
# "remark": "如:杭州市",
# "text": "{{项目所在城市}}"
# },
# {
# "remark": "如:余杭区",
# "text": "{{项目所在区域}}"
# },
# {
# "remark": "如:西湖街道123号",
# "text": "{{详细地址}}"
# },
# {
# "remark": "如:杭州测试楼",
# "text": "{{项目名称}}"
# },
# {
# "remark": "如:单个楼层显示为:3; 多个房源显示为:2,3,4",
# "text": "{{楼层号}}"
# },
# {
# "remark": "如:单个单元显示为:103; 多个房源显示为:102,103,104",
# "text": "{{单元号}}"
# },
# {
# "remark": "如:单个套间显示为:302,多个套间显示为:302,302,403",
# "text": "{{套间号}}"
# },
# {
# "remark": "如:单个工位显示为:302,多个工位显示为:302,302,403",
# "text": "{{工位号}}"
# }
# ]
# },
# {
# "name": "承租方基本信息",
# "value": [
# {
# "remark": "如:杭州匠人网络科技有限公司",
# "text": "{{承租方}}"
# }
# ]
# },
# {
# "name": "出租方基本信息",
# "value": [
# {
# "remark": "如:mfg科技有限公司",
# "text": "{{出租方}}"
# }
# ]
# }
# ]
# },
# {
# "name": "clause",
# "value": [
# {
# "name": "费用条款",
# "value": [
# {
# "remark": "如:租金",
# "text": "{{费用类型循环}}"
# },
# {
# "remark": "如:HT-SZS-SZCSXM0109-12334-202304-1900570",
# "text": "{{合同编号}}"
# },
# {
# "remark": "如:2021年11月7日",
# "text": "{{账单计费开始日期}}"
# },
# {
# "remark": "如:2021年11月7日",
# "text": "{{账单计费截止日期}}"
# },
# {
# "remark": "如:5(系统生成日-应付日期)",
# "text": "{{拖欠天数}}"
# },
# {
# "remark": "如:1,200.00",
# "text": "{{滞纳金金额}}"
# },
# {
# "remark": "如:1,200.00",
# "text": "{{合计不含滞纳金}}"
# },
# {
# "remark": "首期月租金+首期物业管理费,如:4,426.03",
# "text": "{{滞纳金+租金}}"
# }
# ]
# }
# ]
# }
# ]'
#
WHERE
t
.
uuid
=
3
;
###
线上数据已经执行
执行时间
:
2023
.
04
.
28
12
:
13
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