提交 04fbce83 编写于 作者: ibizdev's avatar ibizdev

zhouweidong 发布系统代码 [ibz-lite,应用]

上级 e8bf5131
......@@ -353,9 +353,9 @@ mock.onGet(new RegExp(/^\/metadynamicmodels\/fetchdefault(\?[\w-./?%&=,]*)*$/)).
return [status, records ? records : []];
});
// FetchFindbak
mock.onGet(new RegExp(/^\/metadynamicmodels\/fetchfindbak$/)).reply((config: any) => {
console.groupCollapsed("实体:metadynamicmodel 方法: FetchFindbak");
// FetchDynaInst
mock.onGet(new RegExp(/^\/metadynamicmodels\/fetchdynainst$/)).reply((config: any) => {
console.groupCollapsed("实体:metadynamicmodel 方法: FetchDynaInst");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
......@@ -368,9 +368,9 @@ mock.onGet(new RegExp(/^\/metadynamicmodels\/fetchfindbak$/)).reply((config: any
return [status, mockDatas ? mockDatas : []];
});
// FetchFindbak
mock.onGet(new RegExp(/^\/metadynamicmodels\/fetchfindbak(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:metadynamicmodel 方法: FetchFindbak");
// FetchDynaInst
mock.onGet(new RegExp(/^\/metadynamicmodels\/fetchdynainst(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:metadynamicmodel 方法: FetchDynaInst");
console.table({url:config.url, method: config.method, data:config.data});
if(config.url.includes('page')){
let url = config.url.split('?')[1];
......
......@@ -140,7 +140,7 @@
loaddraftAction=""
loadAction=""
createAction=""
fetchAction="FetchDefault"
fetchAction="FetchDynaInst"
:newdata="newdata"
:opendata="opendata"
name="grid"
......
......@@ -229,7 +229,7 @@ export default class MetaDynamicModelServiceBase extends EntityService {
}
/**
* FetchFindbak接口方法
* FetchDynaInst接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -237,14 +237,14 @@ export default class MetaDynamicModelServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof MetaDynamicModelServiceBase
*/
public async FetchFindbak(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
public async FetchDynaInst(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/metadynamicmodels/fetchfindbak`,tempData,isloading);
let res:any = Http.getInstance().get(`/metadynamicmodels/fetchdynainst`,tempData,isloading);
return res;
}
/**
* searchFindbak接口方法
* searchDynaInst接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -252,8 +252,8 @@ export default class MetaDynamicModelServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof MetaDynamicModelServiceBase
*/
public async searchFindbak(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
public async searchDynaInst(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/metadynamicmodels/searchfindbak`,tempData,isloading);
return await Http.getInstance().post(`/metadynamicmodels/searchdynainst`,tempData,isloading);
}
}
\ No newline at end of file
......@@ -20,7 +20,7 @@ import com.alibaba.fastjson.JSONObject;
public interface MetaDynamicModelMapper extends BaseMapper<MetaDynamicModel> {
Page<MetaDynamicModel> searchDefault(IPage page, @Param("srf") MetaDynamicModelSearchContext context, @Param("ew") Wrapper<MetaDynamicModel> wrapper);
Page<MetaDynamicModel> searchFindbak(IPage page, @Param("srf") MetaDynamicModelSearchContext context, @Param("ew") Wrapper<MetaDynamicModel> wrapper);
Page<MetaDynamicModel> searchDynaInst(IPage page, @Param("srf") MetaDynamicModelSearchContext context, @Param("ew") Wrapper<MetaDynamicModel> wrapper);
@Override
MetaDynamicModel selectById(Serializable id);
@Override
......
......@@ -39,7 +39,7 @@ public interface IMetaDynamicModelService extends IService<MetaDynamicModel> {
boolean save(MetaDynamicModel et);
void saveBatch(List<MetaDynamicModel> list);
Page<MetaDynamicModel> searchDefault(MetaDynamicModelSearchContext context);
Page<MetaDynamicModel> searchFindbak(MetaDynamicModelSearchContext context);
Page<MetaDynamicModel> searchDynaInst(MetaDynamicModelSearchContext context);
List<MetaDynamicModel> selectBySystemId(String pssystemid);
void removeBySystemId(String pssystemid);
List<MetaDynamicModel> selectByPdynainstid(String configid);
......
......@@ -229,11 +229,11 @@ public class MetaDynamicModelServiceImpl extends ServiceImpl<MetaDynamicModelMap
}
/**
* 查询集合 查询副本
* 查询集合 主实例数据查询
*/
@Override
public Page<MetaDynamicModel> searchFindbak(MetaDynamicModelSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<MetaDynamicModel> pages=baseMapper.searchFindbak(context.getPages(),context,context.getSelectCond());
public Page<MetaDynamicModel> searchDynaInst(MetaDynamicModelSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<MetaDynamicModel> pages=baseMapper.searchDynaInst(context.getPages(),context,context.getSelectCond());
return new PageImpl<MetaDynamicModel>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
......
......@@ -4,7 +4,7 @@
<!--输出实体[BLADE_VISUAL]数据结构 -->
<changeSet author="root" id="tab-blade_visual-55-1">
<changeSet author="a_A_5d9d78509" id="tab-blade_visual-55-1">
<createTable tableName="blade_visual">
<column name="ID" remarks="" type="BIGINT">
<constraints primaryKey="true" primaryKeyName="PK_BLADE_VISUAL_ID"/>
......@@ -36,7 +36,7 @@
<!--输出实体[BLADE_VISUAL_CATEGORY]数据结构 -->
<changeSet author="root" id="tab-blade_visual_category-23-2">
<changeSet author="a_A_5d9d78509" id="tab-blade_visual_category-23-2">
<createTable tableName="blade_visual_category">
<column name="ID" remarks="" type="BIGINT">
<constraints primaryKey="true" primaryKeyName="PK_BLADE_VISUAL_CATEGORY_ID"/>
......@@ -52,7 +52,7 @@
<!--输出实体[BLADE_VISUAL_CONFIG]数据结构 -->
<changeSet author="root" id="tab-blade_visual_config-18-3">
<changeSet author="a_A_5d9d78509" id="tab-blade_visual_config-18-3">
<createTable tableName="blade_visual_config">
<column name="ID" remarks="" type="BIGINT">
<constraints primaryKey="true" primaryKeyName="PK_BLADE_VISUAL_CONFIG_ID"/>
......@@ -68,7 +68,7 @@
<!--输出实体[BLADE_VISUAL_MAP]数据结构 -->
<changeSet author="root" id="tab-blade_visual_map-18-4">
<changeSet author="a_A_5d9d78509" id="tab-blade_visual_map-18-4">
<createTable tableName="blade_visual_map">
<column name="ID" remarks="" type="BIGINT">
<constraints primaryKey="true" primaryKeyName="PK_BLADE_VISUAL_MAP_ID"/>
......@@ -86,7 +86,7 @@
<!--输出实体[DST_COMPONENT]数据结构 -->
<changeSet author="root" id="tab-dst_component-59-5">
<changeSet author="a_A_5d9d78509" id="tab-dst_component-59-5">
<createTable tableName="IBZCOMPONENT">
<column name="CID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DST_COMPONENT_CID"/>
......@@ -112,7 +112,7 @@
<!--输出实体[DST_CONFIG]数据结构 -->
<changeSet author="root" id="tab-dst_config-32-6">
<changeSet author="a_A_5d9d78509" id="tab-dst_config-32-6">
<createTable tableName="IBZCFG">
<column name="CFGID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DST_CONFIG_CFGID"/>
......@@ -134,7 +134,7 @@
<!--输出实体[DST_DATASOURCE]数据结构 -->
<changeSet author="root" id="tab-dst_datasource-75-7">
<changeSet author="a_A_5d9d78509" id="tab-dst_datasource-75-7">
<createTable tableName="IBZDATASOURCE">
<column name="DSID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DST_DATASOURCE_DSID"/>
......@@ -152,7 +152,7 @@
<!--输出实体[DST_ROUTER]数据结构 -->
<changeSet author="root" id="tab-dst_router-37-8">
<changeSet author="a_A_5d9d78509" id="tab-dst_router-37-8">
<createTable tableName="IBZROUTER">
<column name="ROUTERID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DST_ROUTER_ROUTERID"/>
......@@ -178,7 +178,7 @@
<!--输出实体[DST_SYSTEM]数据结构 -->
<changeSet author="root" id="tab-dst_system-45-9">
<changeSet author="a_A_5d9d78509" id="tab-dst_system-45-9">
<createTable tableName="IBZPSSYSTEM">
<column name="PSSYSTEMID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DST_SYSTEM_PSSYSTEMID"/>
......@@ -198,7 +198,7 @@
<!--输出实体[DST_VIEW]数据结构 -->
<changeSet author="root" id="tab-dst_view-46-10">
<changeSet author="a_A_5d9d78509" id="tab-dst_view-46-10">
<createTable tableName="IBZVIEW">
<column name="VIEWID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DST_VIEW_VIEWID"/>
......@@ -222,7 +222,7 @@
<!--输出实体[META_DATASET]数据结构 -->
<changeSet author="root" id="tab-meta_dataset-33-11">
<changeSet author="a_A_5d9d78509" id="tab-meta_dataset-33-11">
<createTable tableName="IBZDATASET">
<column name="DATASETID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_META_DATASET_DATASETID"/>
......@@ -244,7 +244,7 @@
<!--输出实体[META_DYNAMICMODEL]数据结构 -->
<changeSet author="root" id="tab-meta_dynamicmodel-82-12">
<changeSet author="a_A_5d9d78509" id="tab-meta_dynamicmodel-82-12">
<createTable tableName="IBZDYNAMICMODEL">
<column name="DYNAINSTID" remarks="" type="VARCHAR(100)">
</column>
......@@ -266,7 +266,7 @@
<!--输出实体[META_ENTITY]数据结构 -->
<changeSet author="root" id="tab-meta_entity-105-13">
<changeSet author="a_A_5d9d78509" id="tab-meta_entity-105-13">
<createTable tableName="IBZENTITY">
<column name="ENTITYID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_META_ENTITY_ENTITYID"/>
......@@ -298,7 +298,7 @@
<!--输出实体[META_FIELD]数据结构 -->
<changeSet author="root" id="tab-meta_field-153-14">
<changeSet author="a_A_5d9d78509" id="tab-meta_field-153-14">
<createTable tableName="IBZFIELD">
<column name="FIELDID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_META_FIELD_FIELDID"/>
......@@ -362,7 +362,7 @@
<!--输出实体[META_MODEL]数据结构 -->
<changeSet author="root" id="tab-meta_model-44-15">
<changeSet author="a_A_5d9d78509" id="tab-meta_model-44-15">
<createTable tableName="IBZMODEL">
<column name="MODELID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_META_MODEL_MODELID"/>
......@@ -388,7 +388,7 @@
<!--输出实体[META_MODULE]数据结构 -->
<changeSet author="root" id="tab-meta_module-34-16">
<changeSet author="a_A_5d9d78509" id="tab-meta_module-34-16">
<createTable tableName="IBZMODULE">
<column name="MODULEID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_META_MODULE_MODULEID"/>
......@@ -406,7 +406,7 @@
<!--输出实体[META_RELATION]数据结构 -->
<changeSet author="root" id="tab-meta_relation-106-17">
<changeSet author="a_A_5d9d78509" id="tab-meta_relation-106-17">
<createTable tableName="IBZRELATION">
<column name="RELATIONID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_META_RELATION_RELATIONID"/>
......@@ -448,10 +448,10 @@
<!--输出实体[DST_VIEW]外键关系 -->
<!--输出实体[META_DATASET]外键关系 -->
<!--输出实体[META_DYNAMICMODEL]外键关系 -->
<changeSet author="root" id="fk-meta_dynamicmodel-82-18">
<changeSet author="a_A_5d9d78509" id="fk-meta_dynamicmodel-82-18">
<addForeignKeyConstraint baseColumnNames="SYSTEMID" baseTableName="IBZDYNAMICMODEL" constraintName="DER1N_META_DYNAMICMODEL_DST_SY" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="PSSYSTEMID" referencedTableName="IBZPSSYSTEM" validate="true"/>
</changeSet>
<changeSet author="root" id="fk-meta_dynamicmodel-82-19">
<changeSet author="a_A_5d9d78509" id="fk-meta_dynamicmodel-82-19">
<addForeignKeyConstraint baseColumnNames="PDYNAINSTID" baseTableName="IBZDYNAMICMODEL" constraintName="DER1N_META_DYNAMICMODEL_META_D" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="CONFIGID" referencedTableName="IBZDYNAMICMODEL" validate="true"/>
</changeSet>
<!--输出实体[META_ENTITY]外键关系 -->
......
......@@ -48,10 +48,10 @@
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据集合[Findbak]-->
<select id="searchFindbak" parameterType="cn.ibizlab.core.lite.filter.MetaDynamicModelSearchContext" resultMap="MetaDynamicModelResultMap">
<!--数据集合[DynaInst]-->
<select id="searchDynaInst" parameterType="cn.ibizlab.core.lite.filter.MetaDynamicModelSearchContext" resultMap="MetaDynamicModelResultMap">
select t1.* from (
<include refid="FINDDYNAMICS" />
<include refid="DynaInst" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
......@@ -67,19 +67,10 @@
<![CDATA[ SELECT t1.CONFIGID, t1.CONFIGNAME, t1.DYNAINSTID, t1.MODELFILE, t1.PDYNAINSTID, t1.STATUS, t1.SYSTEMID FROM IBZDYNAMICMODEL t1
]]>
</sql>
<!--数据查询[FINDDYNAMICS]-->
<sql id="FINDDYNAMICS" databaseId="mysql">
<!--数据查询[DynaInst]-->
<sql id="DynaInst" databaseId="mysql">
<![CDATA[ SELECT t1.`CONFIGID`, t1.`CONFIGNAME`, t1.`DYNAINSTID`, t1.`MODELFILE`, t1.`PDYNAINSTID`, t1.`STATUS`, t1.`SYSTEMID` FROM `IBZDYNAMICMODEL` t1
]]>
</sql>
<!--数据查询[FINDDYNAMICS]-->
<sql id="FINDDYNAMICS" databaseId="oracle">
<![CDATA[ SELECT t1.CONFIGID, t1.CONFIGNAME, t1.DYNAINSTID, t1.MODELFILE, t1.PDYNAINSTID, t1.STATUS, t1.SYSTEMID FROM IBZDYNAMICMODEL t1
]]>
</sql>
<!--数据查询[FINDDYNAMICS]-->
<sql id="FINDDYNAMICS" databaseId="postgresql">
<![CDATA[ SELECT t1.CONFIGID, t1.CONFIGNAME, t1.DYNAINSTID, t1.MODELFILE, t1.PDYNAINSTID, t1.STATUS, t1.SYSTEMID FROM IBZDYNAMICMODEL t1
WHERE ( t1.`PDYNAINSTID` IS NULL )
]]>
</sql>
<!--数据查询[View]-->
......
......@@ -119,7 +119,7 @@
"dename":"MetaDynamicModel",
"delogicname":"动态模型",
"sysmoudle":{"id":"LITE","name":"lite"},
"dedataset":[{"id":"Default" , "name":"数据集"},{"id":"Findbak" , "name":"查询副本"}],
"dedataset":[{"id":"Default" , "name":"数据集"},{"id":"DynaInst" , "name":"主实例数据查询"}],
"deaction":[{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Publish" , "name":"发布模型" , "type":"USERCUSTOM" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}]
}
......
......@@ -179,11 +179,11 @@ public class MetaDynamicModelResource {
.body(new PageImpl(metadynamicmodelMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-MetaDynamicModel-searchFindbak-all')")
@ApiOperation(value = "获取查询副本", tags = {"动态模型" } ,notes = "获取查询副本")
@RequestMapping(method= RequestMethod.GET , value="/metadynamicmodels/fetchfindbak")
public ResponseEntity<List<MetaDynamicModelDTO>> fetchFindbak(MetaDynamicModelSearchContext context) {
Page<MetaDynamicModel> domains = metadynamicmodelService.searchFindbak(context) ;
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-MetaDynamicModel-searchDynaInst-all')")
@ApiOperation(value = "获取主实例数据查询", tags = {"动态模型" } ,notes = "获取主实例数据查询")
@RequestMapping(method= RequestMethod.GET , value="/metadynamicmodels/fetchdynainst")
public ResponseEntity<List<MetaDynamicModelDTO>> fetchDynaInst(MetaDynamicModelSearchContext context) {
Page<MetaDynamicModel> domains = metadynamicmodelService.searchDynaInst(context) ;
List<MetaDynamicModelDTO> list = metadynamicmodelMapping.toDto(domains.getContent());
return ResponseEntity.status(HttpStatus.OK)
.header("x-page", String.valueOf(context.getPageable().getPageNumber()))
......@@ -192,11 +192,11 @@ public class MetaDynamicModelResource {
.body(list);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-MetaDynamicModel-searchFindbak-all')")
@ApiOperation(value = "查询查询副本", tags = {"动态模型" } ,notes = "查询查询副本")
@RequestMapping(method= RequestMethod.POST , value="/metadynamicmodels/searchfindbak")
public ResponseEntity<Page<MetaDynamicModelDTO>> searchFindbak(@RequestBody MetaDynamicModelSearchContext context) {
Page<MetaDynamicModel> domains = metadynamicmodelService.searchFindbak(context) ;
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-MetaDynamicModel-searchDynaInst-all')")
@ApiOperation(value = "查询主实例数据查询", tags = {"动态模型" } ,notes = "查询主实例数据查询")
@RequestMapping(method= RequestMethod.POST , value="/metadynamicmodels/searchdynainst")
public ResponseEntity<Page<MetaDynamicModelDTO>> searchDynaInst(@RequestBody MetaDynamicModelSearchContext context) {
Page<MetaDynamicModel> domains = metadynamicmodelService.searchDynaInst(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(metadynamicmodelMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册