作者 yangfu

业务表同步

... ... @@ -44,7 +44,7 @@ ELSE
RAISE NOTICE '视图不存在';
END IF;
END $$;
create view view_area_rel_expireds as select area_code as id,area_code,latest_update_time,created_at,area_rel_expired_id,remark,module,expired_at,latest_check_at,notice_times from area_rel_expireds;
create view view_area_rel_expireds as select area_rel_expired_id as id,area_code as id,area_code,latest_update_time,created_at,area_rel_expired_id,remark,module,expired_at,latest_check_at,notice_times from area_rel_expireds;
-- pk
-- jsonb
... ...
... ... @@ -10,7 +10,7 @@ BEGIN
RAISE NOTICE '视图不存在';
END IF;
END $$;
create view view_area_rel_expireds as select area_code,latest_update_time,created_at,area_rel_expired_id,remark,module,expired_at,latest_check_at,notice_times from area_rel_expireds;
create view view_area_rel_expireds as select area_rel_expired_id as id,area_code,latest_update_time,created_at,area_rel_expired_id,remark,module,expired_at,latest_check_at,notice_times from area_rel_expireds;
-- pk
-- jsonb
... ... @@ -61,7 +61,7 @@ BEGIN
RAISE NOTICE '视图不存在';
END IF;
END $$;
create view view_area_categorys as select area_code,area_category_id,category_type,tag,begin_time,created_at,deleted_at,end_time,latest_update_time,updated_at,status,operator_id from area_categorys;
create view view_area_categorys as select area_category_id as id,area_code,area_category_id,category_type,tag,begin_time,created_at,deleted_at,end_time,latest_update_time,updated_at,status,operator_id from area_categorys;
-- pk
-- jsonb
... ... @@ -503,7 +503,7 @@ BEGIN
RAISE NOTICE '视图不存在';
END IF;
END $$;
create view view_sales_methods as select created_at,data_from,sales_method_id,updated_at,method_name,operator_id,latest_update_time from sales_methods;
create view view_sales_methods as select sales_method_id as id,created_at,data_from,sales_method_id,updated_at,method_name,operator_id,latest_update_time from sales_methods;
-- pk
-- jsonb operator
... ...
... ... @@ -30,6 +30,19 @@ func (tableService *TableService) ShowBusinessDatabases(ctx *domain.Context, cmd
var GlobalDB []command.DBTablesRequest = []command.DBTablesRequest{
{
ByteBankDBName: "tl_mysql.suplus_salary",
ByteBankDBZhName: "销导报表系统",
GenerateBusinessTableViewRequest: command.GenerateBusinessTableViewRequest{
Host: "114.55.200.59",
Port: "32306",
User: "root",
Password: "eagle1010",
DBName: "suplus_salary_test",
SchemaName: "public",
DBType: "mysql",
},
},
{
ByteBankDBName: "allied_creation_reporting_system_test.public",
ByteBankDBZhName: "销导报表系统",
GenerateBusinessTableViewRequest: command.GenerateBusinessTableViewRequest{
... ... @@ -42,6 +55,19 @@ var GlobalDB []command.DBTablesRequest = []command.DBTablesRequest{
DBType: "postgresql",
},
},
{
ByteBankDBName: "allied_creation_reporting_system_prd.public",
ByteBankDBZhName: "销导报表系统(正式)",
GenerateBusinessTableViewRequest: command.GenerateBusinessTableViewRequest{
Host: "114.55.200.59",
Port: "31544",
User: "postgres",
Password: "eagle1010",
DBName: "allied-creation-reporting-system_prd",
SchemaName: "public",
DBType: "postgresql",
},
},
}
func getDB(databaseEnName string) (*command.DBTablesRequest, bool) {
... ...