<?xml version="1.0" encoding="UTF-8" ?>
|
|
<sqls>
|
<dataSpace name="help">
|
|
<sql name="setDirectionFieldLabel">
|
update help_direction_field set label = (
|
select max(label_chinese) from sys_data_property
|
where sys_data_property.dataname = lower(help_direction_field.table_id)
|
and lower(help_direction_field.name) = sys_data_property.field_name
|
)
|
where label is null and help_direction_field.table_id = '@{tableName}'
|
</sql>
|
|
<sql name="setDirectionFieldLabelOnTableName">
|
update help_direction_field set label = (
|
select max(label_chinese) from sys_data_field
|
where sys_data_field.dataname = lower(help_direction_field.table_id)
|
and lower(help_direction_field.name) = sys_data_field.field_name
|
)
|
where label is null and lower(help_direction_field.table_id) = '@{tableName}'
|
</sql>
|
|
<sql name="setFieldCommentFromDB">
|
update help_direction_field
|
set TITLE = (
|
SELECT comments FROM (@{commentTable}) commentTable
|
WHERE commentTable.table_name = help_direction_field.table_id
|
and help_direction_field.name = commentTable.column_name
|
)
|
where table_id = '@{tableName}' and title is null
|
and exists (
|
SELECT 1 FROM (@{commentTable}) commentTable
|
WHERE lower(commentTable.table_name) = '@{tableName}'
|
and help_direction_field.name = commentTable.column_name )
|
</sql>
|
|
<sql name="setDirectionFieldLabel_id">
|
update help_direction_field set label = '主键'
|
where name = 'id' and label is null
|
</sql>
|
|
<sql name="setDirectionFieldLabel_stateCode">
|
update help_direction_field set label = '状态编码'
|
where name = 'state_code' and label is null
|
</sql>
|
|
<sql name="setDirectionFieldLabel_stateDetailCode">
|
update help_direction_field set label = '明细状态编码'
|
where name = 'state_detail_code' and label is null
|
</sql>
|
|
<sql name="setDirectionFieldLabel_creatorId">
|
update help_direction_field set label = '创建人ID'
|
where name = 'creator_id' and label is null
|
</sql>
|
|
<sql name="getDirectionOutline">
|
select help_direction_table.id, help_direction_table.parent_id as parent_id,
|
help_direction_table.name, help_direction_table.title, help_direction_table.order_no
|
from help_direction_outline
|
right join help_direction_table on help_direction_outline.id = help_direction_table.parent_id
|
union all
|
select help_direction_outline.id, help_direction_outline.parent_id,
|
code, help_direction_outline.title, order_no
|
from help_direction_outline
|
order by parent_id, order_no, name
|
</sql>
|
|
</dataSpace>
|
</sqls>
|