提交 16c722e7 编写于 作者: ibizdev's avatar ibizdev

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

上级 ae9ad75f
...@@ -129,10 +129,6 @@ export default { ...@@ -129,10 +129,6 @@ export default {
}, },
}, },
gridviewtoolbar_toolbar: { gridviewtoolbar_toolbar: {
tbitem1_initdsbatch: {
caption: "批初始化",
tip: "批初始化",
},
tbitem1_initds: { tbitem1_initds: {
caption: "初始化", caption: "初始化",
tip: "初始化", tip: "初始化",
......
...@@ -128,10 +128,6 @@ export default { ...@@ -128,10 +128,6 @@ export default {
}, },
}, },
gridviewtoolbar_toolbar: { gridviewtoolbar_toolbar: {
tbitem1_initdsbatch: {
caption: "批初始化",
tip: "批初始化",
},
tbitem1_initds: { tbitem1_initds: {
caption: "初始化", caption: "初始化",
tip: "初始化", tip: "初始化",
......
...@@ -309,44 +309,6 @@ mock.onPost(new RegExp(/^\/dstdatasources\/?([a-zA-Z0-9\-\;]{0,35})\/initds$/)). ...@@ -309,44 +309,6 @@ mock.onPost(new RegExp(/^\/dstdatasources\/?([a-zA-Z0-9\-\;]{0,35})\/initds$/)).
return [status, data]; return [status, data];
}); });
// InitDSBatch
mock.onPost(new RegExp(/^\/dstdatasources\/?([a-zA-Z0-9\-\;]{0,35})\/initdsbatch$/)).reply((config: any) => {
console.groupCollapsed("实体:dstdatasource 方法: InitDSBatch");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['ds_id'];
const matchArray:any = new RegExp(/^\/dstdatasources\/([a-zA-Z0-9\-\;]{1,35})\/initdsbatch$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.ds_id, tempValue.ds_id));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['ds_id'] == tempValue['ds_id'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// Save // Save
mock.onPost(new RegExp(/^\/dstdatasources\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => { mock.onPost(new RegExp(/^\/dstdatasources\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:dstdatasource 方法: Save"); console.groupCollapsed("实体:dstdatasource 方法: Save");
......
...@@ -12,13 +12,6 @@ ...@@ -12,13 +12,6 @@
<i-input v-show="!isExpandSearchForm" v-model="query" search enter-button @on-search="onSearch($event)" class='quick-search-input' style='max-width: 400px;padding-left: 24px' placeholder="数据源名称" /> <i-input v-show="!isExpandSearchForm" v-model="query" search enter-button @on-search="onSearch($event)" class='quick-search-input' style='max-width: 400px;padding-left: 24px' placeholder="数据源名称" />
<div class='pull-right'> <div class='pull-right'>
<div class='toolbar-container'> <div class='toolbar-container'>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem1_initdsbatch.visabled" :disabled="toolBarModels.tbitem1_initdsbatch.disabled" class='' v-loading:i-button @click="toolbar_click({ tag: 'tbitem1_initdsbatch' }, $event)">
<i class=''></i>
<span class='caption'>{{$t('entities.dstdatasource.gridviewtoolbar_toolbar.tbitem1_initdsbatch.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.dstdatasource.gridviewtoolbar_toolbar.tbitem1_initdsbatch.tip')}}</div>
</tooltip>
<tooltip :transfer="true" :max-width="600"> <tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem1_initds.visabled" :disabled="toolBarModels.tbitem1_initds.disabled" class='' v-loading:i-button @click="toolbar_click({ tag: 'tbitem1_initds' }, $event)"> <i-button v-show="toolBarModels.tbitem1_initds.visabled" :disabled="toolBarModels.tbitem1_initds.disabled" class='' v-loading:i-button @click="toolbar_click({ tag: 'tbitem1_initds' }, $event)">
<i class=''></i> <i class=''></i>
...@@ -384,8 +377,6 @@ export default class DstDataSourceGridViewBase extends Vue { ...@@ -384,8 +377,6 @@ export default class DstDataSourceGridViewBase extends Vue {
* @memberof DstDataSourceGridView * @memberof DstDataSourceGridView
*/ */
public toolBarModels: any = { public toolBarModels: any = {
tbitem1_initdsbatch: { name: 'tbitem1_initdsbatch', actiontarget: 'NONE', caption: '批初始化', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'InitDsBatch', target: 'MULTIDATA' } },
tbitem1_initds: { name: 'tbitem1_initds', actiontarget: 'NONE', caption: '初始化', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'InitDS', target: 'SINGLEKEY' } }, tbitem1_initds: { name: 'tbitem1_initds', actiontarget: 'NONE', caption: '初始化', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'InitDS', target: 'SINGLEKEY' } },
tbitem2: { name: 'tbitem2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } }, tbitem2: { name: 'tbitem2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
...@@ -764,9 +755,6 @@ export default class DstDataSourceGridViewBase extends Vue { ...@@ -764,9 +755,6 @@ export default class DstDataSourceGridViewBase extends Vue {
* @memberof DstDataSourceGridViewBase * @memberof DstDataSourceGridViewBase
*/ */
public toolbar_click($event: any, $event2?: any) { public toolbar_click($event: any, $event2?: any) {
if (Object.is($event.tag, 'tbitem1_initdsbatch')) {
this.toolbar_tbitem1_initdsbatch_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem1_initds')) { if (Object.is($event.tag, 'tbitem1_initds')) {
this.toolbar_tbitem1_initds_click(null, '', $event2); this.toolbar_tbitem1_initds_click(null, '', $event2);
} }
...@@ -912,35 +900,6 @@ export default class DstDataSourceGridViewBase extends Vue { ...@@ -912,35 +900,6 @@ export default class DstDataSourceGridViewBase extends Vue {
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem1_initdsbatch_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.grid;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
const curUIService:DstDataSourceUIService = new DstDataSourceUIService();
curUIService.DstDataSource_InitDsBatch(datas,contextJO, paramJO, $event, xData,this,"DstDataSource");
}
/** /**
* 逻辑事件 * 逻辑事件
* *
......
...@@ -181,20 +181,6 @@ export default class DstDataSourceServiceBase extends EntityService { ...@@ -181,20 +181,6 @@ export default class DstDataSourceServiceBase extends EntityService {
return res; return res;
} }
/**
* InitDSBatch接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DstDataSourceServiceBase
*/
public async InitDSBatch(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/dstdatasources/${context.dstdatasource}/initdsbatch`,data,isloading);
return res;
}
/** /**
* Save接口方法 * Save接口方法
* *
......
...@@ -118,22 +118,6 @@ export default class DstDataSourceUIServiceBase extends UIService { ...@@ -118,22 +118,6 @@ export default class DstDataSourceUIServiceBase extends UIService {
public initDeMainStateOPPrivsMap(){ public initDeMainStateOPPrivsMap(){
} }
/**
* 批初始化
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
*/
public async DstDataSource_InitDsBatch(args: any[],context:any = {}, params:any = {}, $event?: any, xData?: any,actionContext?: any,srfParentDeName?:string){
actionContext.$Notice.error({ title: '错误', desc: '不支持多项数据' });
}
/** /**
* 初始化 * 初始化
* *
......
...@@ -37,11 +37,6 @@ ...@@ -37,11 +37,6 @@
git clone -b master $para2 ibzlite/ git clone -b master $para2 ibzlite/
export NODE_OPTIONS=--max-old-space-size=4096 export NODE_OPTIONS=--max-old-space-size=4096
cd ibzlite/ cd ibzlite/
mvn clean package -Papi
cd ibzlite-provider/ibzlite-provider-api
mvn -Papi docker:build
mvn -Papi docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/ibzlite-provider-api.yaml ibzlab-rt --with-registry-auth
</command> </command>
</hudson.tasks.Shell> </hudson.tasks.Shell>
</builders> </builders>
......
...@@ -36,7 +36,6 @@ public interface IDstDataSourceService extends IService<DstDataSource> { ...@@ -36,7 +36,6 @@ public interface IDstDataSourceService extends IService<DstDataSource> {
DstDataSource buildDS(DstDataSource et); DstDataSource buildDS(DstDataSource et);
boolean checkKey(DstDataSource et); boolean checkKey(DstDataSource et);
DstDataSource initDS(DstDataSource et); DstDataSource initDS(DstDataSource et);
DstDataSource initDSBatch(DstDataSource et);
boolean save(DstDataSource et); boolean save(DstDataSource et);
void saveBatch(List<DstDataSource> list); void saveBatch(List<DstDataSource> list);
Page<DstDataSource> searchDefault(DstDataSourceSearchContext context); Page<DstDataSource> searchDefault(DstDataSourceSearchContext context);
......
package cn.ibizlab.core.lite.service.impl;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.Map;
import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection;
import java.util.Objects;
import java.util.Optional;
import java.math.BigInteger;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.beans.factory.annotation.Value;
import cn.ibizlab.util.errors.BadRequestAlertException;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.core.lite.domain.DstDataSource;
import cn.ibizlab.core.lite.filter.DstDataSourceSearchContext;
import cn.ibizlab.core.lite.service.IDstDataSourceService;
import cn.ibizlab.util.helper.CachedBeanCopier;
import cn.ibizlab.util.helper.DEFieldCacheMap;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.ibizlab.core.lite.mapper.DstDataSourceMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
/**
* 实体[数据源] 服务对象接口实现
*/
@Slf4j
@Service("DstDataSourceServiceImpl")
public class DstDataSourceServiceImpl extends ServiceImpl<DstDataSourceMapper, DstDataSource> implements IDstDataSourceService {
@Autowired
@Lazy
protected cn.ibizlab.core.lite.service.IMetaEntityService metaentityService;
protected int batchSize = 500;
@Override
@Transactional
public boolean create(DstDataSource et) {
if(!this.retBool(this.baseMapper.insert(et))) {
return false;
}
CachedBeanCopier.copy(get(et.getDsId()), et);
return true;
}
@Override
@Transactional
public void createBatch(List<DstDataSource> list) {
this.saveBatch(list, batchSize);
}
@Override
@Transactional
public boolean update(DstDataSource et) {
if(!update(et, (Wrapper) et.getUpdateWrapper(true).eq("dsid", et.getDsId()))) {
return false;
}
CachedBeanCopier.copy(get(et.getDsId()), et);
return true;
}
@Override
@Transactional
public void updateBatch(List<DstDataSource> list) {
updateBatchById(list, batchSize);
}
@Override
@Transactional
public boolean remove(String key) {
boolean result = removeById(key);
return result ;
}
@Override
@Transactional
public void removeBatch(Collection<String> idList) {
removeByIds(idList);
}
@Override
@Transactional
public DstDataSource get(String key) {
DstDataSource et = getById(key);
if(et == null){
et = new DstDataSource();
et.setDsId(key);
}
else {
}
return et;
}
@Override
public DstDataSource getDraft(DstDataSource et) {
return et;
}
@Override
@Transactional
public DstDataSource buildDS(DstDataSource et) {
//自定义代码
return et;
}
@Override
public boolean checkKey(DstDataSource et) {
return (!ObjectUtils.isEmpty(et.getDsId())) && (!Objects.isNull(this.getById(et.getDsId())));
}
@Override
@Transactional
public DstDataSource initDS(DstDataSource et) {
//自定义代码
return et;
}
@Override
@Transactional
public boolean save(DstDataSource et) {
if(!saveOrUpdate(et)) {
return false;
}
return true;
}
@Override
@Transactional
public boolean saveOrUpdate(DstDataSource et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
@Transactional
public boolean saveBatch(Collection<DstDataSource> list) {
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
@Transactional
public void saveBatch(List<DstDataSource> list) {
saveOrUpdateBatch(list,batchSize);
}
/**
* 查询集合 数据集
*/
@Override
public Page<DstDataSource> searchDefault(DstDataSourceSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<DstDataSource> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<DstDataSource>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
@Override
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql , Map param){
if (sql == null || sql.isEmpty()) {
return false;
}
if (sql.toLowerCase().trim().startsWith("insert")) {
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
}
}
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<!--输出实体[BLADE_VISUAL]数据结构 --> <!--输出实体[BLADE_VISUAL]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-blade_visual-55-1"> <changeSet author="root" id="tab-blade_visual-55-1">
<createTable tableName="blade_visual"> <createTable tableName="blade_visual">
<column name="ID" remarks="" type="BIGINT"> <column name="ID" remarks="" type="BIGINT">
<constraints primaryKey="true" primaryKeyName="PK_BLADE_VISUAL_ID"/> <constraints primaryKey="true" primaryKeyName="PK_BLADE_VISUAL_ID"/>
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<!--输出实体[BLADE_VISUAL_CATEGORY]数据结构 --> <!--输出实体[BLADE_VISUAL_CATEGORY]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-blade_visual_category-23-2"> <changeSet author="root" id="tab-blade_visual_category-23-2">
<createTable tableName="blade_visual_category"> <createTable tableName="blade_visual_category">
<column name="ID" remarks="" type="BIGINT"> <column name="ID" remarks="" type="BIGINT">
<constraints primaryKey="true" primaryKeyName="PK_BLADE_VISUAL_CATEGORY_ID"/> <constraints primaryKey="true" primaryKeyName="PK_BLADE_VISUAL_CATEGORY_ID"/>
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<!--输出实体[BLADE_VISUAL_CONFIG]数据结构 --> <!--输出实体[BLADE_VISUAL_CONFIG]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-blade_visual_config-18-3"> <changeSet author="root" id="tab-blade_visual_config-18-3">
<createTable tableName="blade_visual_config"> <createTable tableName="blade_visual_config">
<column name="ID" remarks="" type="BIGINT"> <column name="ID" remarks="" type="BIGINT">
<constraints primaryKey="true" primaryKeyName="PK_BLADE_VISUAL_CONFIG_ID"/> <constraints primaryKey="true" primaryKeyName="PK_BLADE_VISUAL_CONFIG_ID"/>
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
<!--输出实体[BLADE_VISUAL_MAP]数据结构 --> <!--输出实体[BLADE_VISUAL_MAP]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-blade_visual_map-18-4"> <changeSet author="root" id="tab-blade_visual_map-18-4">
<createTable tableName="blade_visual_map"> <createTable tableName="blade_visual_map">
<column name="ID" remarks="" type="BIGINT"> <column name="ID" remarks="" type="BIGINT">
<constraints primaryKey="true" primaryKeyName="PK_BLADE_VISUAL_MAP_ID"/> <constraints primaryKey="true" primaryKeyName="PK_BLADE_VISUAL_MAP_ID"/>
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
<!--输出实体[DST_COMPONENT]数据结构 --> <!--输出实体[DST_COMPONENT]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-dst_component-59-5"> <changeSet author="root" id="tab-dst_component-59-5">
<createTable tableName="IBZCOMPONENT"> <createTable tableName="IBZCOMPONENT">
<column name="CID" remarks="" type="VARCHAR(100)"> <column name="CID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DST_COMPONENT_CID"/> <constraints primaryKey="true" primaryKeyName="PK_DST_COMPONENT_CID"/>
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
<!--输出实体[DST_CONFIG]数据结构 --> <!--输出实体[DST_CONFIG]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-dst_config-32-6"> <changeSet author="root" id="tab-dst_config-32-6">
<createTable tableName="IBZCFG"> <createTable tableName="IBZCFG">
<column name="CFGID" remarks="" type="VARCHAR(100)"> <column name="CFGID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DST_CONFIG_CFGID"/> <constraints primaryKey="true" primaryKeyName="PK_DST_CONFIG_CFGID"/>
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
<!--输出实体[DST_DATASOURCE]数据结构 --> <!--输出实体[DST_DATASOURCE]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-dst_datasource-72-7"> <changeSet author="root" id="tab-dst_datasource-74-7">
<createTable tableName="IBZDATASOURCE"> <createTable tableName="IBZDATASOURCE">
<column name="DSID" remarks="" type="VARCHAR(100)"> <column name="DSID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DST_DATASOURCE_DSID"/> <constraints primaryKey="true" primaryKeyName="PK_DST_DATASOURCE_DSID"/>
...@@ -152,7 +152,7 @@ ...@@ -152,7 +152,7 @@
<!--输出实体[DST_ROUTER]数据结构 --> <!--输出实体[DST_ROUTER]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-dst_router-37-8"> <changeSet author="root" id="tab-dst_router-37-8">
<createTable tableName="IBZROUTER"> <createTable tableName="IBZROUTER">
<column name="ROUTERID" remarks="" type="VARCHAR(100)"> <column name="ROUTERID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DST_ROUTER_ROUTERID"/> <constraints primaryKey="true" primaryKeyName="PK_DST_ROUTER_ROUTERID"/>
...@@ -178,7 +178,7 @@ ...@@ -178,7 +178,7 @@
<!--输出实体[DST_SYSTEM]数据结构 --> <!--输出实体[DST_SYSTEM]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-dst_system-41-9"> <changeSet author="root" id="tab-dst_system-41-9">
<createTable tableName="IBZPSSYSTEM"> <createTable tableName="IBZPSSYSTEM">
<column name="PSSYSTEMID" remarks="" type="VARCHAR(100)"> <column name="PSSYSTEMID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DST_SYSTEM_PSSYSTEMID"/> <constraints primaryKey="true" primaryKeyName="PK_DST_SYSTEM_PSSYSTEMID"/>
...@@ -198,7 +198,7 @@ ...@@ -198,7 +198,7 @@
<!--输出实体[DST_VIEW]数据结构 --> <!--输出实体[DST_VIEW]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-dst_view-46-10"> <changeSet author="root" id="tab-dst_view-46-10">
<createTable tableName="IBZVIEW"> <createTable tableName="IBZVIEW">
<column name="VIEWID" remarks="" type="VARCHAR(100)"> <column name="VIEWID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DST_VIEW_VIEWID"/> <constraints primaryKey="true" primaryKeyName="PK_DST_VIEW_VIEWID"/>
...@@ -222,7 +222,7 @@ ...@@ -222,7 +222,7 @@
<!--输出实体[META_DATASET]数据结构 --> <!--输出实体[META_DATASET]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-meta_dataset-33-11"> <changeSet author="root" id="tab-meta_dataset-33-11">
<createTable tableName="IBZDATASET"> <createTable tableName="IBZDATASET">
<column name="DATASETID" remarks="" type="VARCHAR(100)"> <column name="DATASETID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_META_DATASET_DATASETID"/> <constraints primaryKey="true" primaryKeyName="PK_META_DATASET_DATASETID"/>
...@@ -244,7 +244,7 @@ ...@@ -244,7 +244,7 @@
<!--输出实体[META_ENTITY]数据结构 --> <!--输出实体[META_ENTITY]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-meta_entity-95-12"> <changeSet author="root" id="tab-meta_entity-95-12">
<createTable tableName="IBZENTITY"> <createTable tableName="IBZENTITY">
<column name="ENTITYID" remarks="" type="VARCHAR(100)"> <column name="ENTITYID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_META_ENTITY_ENTITYID"/> <constraints primaryKey="true" primaryKeyName="PK_META_ENTITY_ENTITYID"/>
...@@ -276,7 +276,7 @@ ...@@ -276,7 +276,7 @@
<!--输出实体[META_FIELD]数据结构 --> <!--输出实体[META_FIELD]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-meta_field-153-13"> <changeSet author="root" id="tab-meta_field-153-13">
<createTable tableName="IBZFIELD"> <createTable tableName="IBZFIELD">
<column name="FIELDID" remarks="" type="VARCHAR(100)"> <column name="FIELDID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_META_FIELD_FIELDID"/> <constraints primaryKey="true" primaryKeyName="PK_META_FIELD_FIELDID"/>
...@@ -340,7 +340,7 @@ ...@@ -340,7 +340,7 @@
<!--输出实体[META_MODEL]数据结构 --> <!--输出实体[META_MODEL]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-meta_model-44-14"> <changeSet author="root" id="tab-meta_model-44-14">
<createTable tableName="IBZMODEL"> <createTable tableName="IBZMODEL">
<column name="MODELID" remarks="" type="VARCHAR(100)"> <column name="MODELID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_META_MODEL_MODELID"/> <constraints primaryKey="true" primaryKeyName="PK_META_MODEL_MODELID"/>
...@@ -366,7 +366,7 @@ ...@@ -366,7 +366,7 @@
<!--输出实体[META_MODULE]数据结构 --> <!--输出实体[META_MODULE]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-meta_module-34-15"> <changeSet author="root" id="tab-meta_module-34-15">
<createTable tableName="IBZMODULE"> <createTable tableName="IBZMODULE">
<column name="MODULEID" remarks="" type="VARCHAR(100)"> <column name="MODULEID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_META_MODULE_MODULEID"/> <constraints primaryKey="true" primaryKeyName="PK_META_MODULE_MODULEID"/>
...@@ -384,7 +384,7 @@ ...@@ -384,7 +384,7 @@
<!--输出实体[META_RELATION]数据结构 --> <!--输出实体[META_RELATION]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-meta_relation-103-16"> <changeSet author="root" id="tab-meta_relation-103-16">
<createTable tableName="IBZRELATION"> <createTable tableName="IBZRELATION">
<column name="RELATIONID" remarks="" type="VARCHAR(100)"> <column name="RELATIONID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_META_RELATION_RELATIONID"/> <constraints primaryKey="true" primaryKeyName="PK_META_RELATION_RELATIONID"/>
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
"delogicname":"数据源", "delogicname":"数据源",
"sysmoudle":{"id":"LITE","name":"lite"}, "sysmoudle":{"id":"LITE","name":"lite"},
"dedataset":[{"id":"Default" , "name":"数据集"}], "dedataset":[{"id":"Default" , "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":"BuildDS" , "name":"buildDS" , "type":"USERCUSTOM" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"InitDS" , "name":"行为" , "type":"USERCUSTOM" },{"id":"InitDSBatch" , "name":"批行为" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" }], "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":"BuildDS" , "name":"buildDS" , "type":"USERCUSTOM" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"InitDS" , "name":"行为" , "type":"USERCUSTOM" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}] "datascope":[{"id":"all","name":"全部数据"}]
} }
, { , {
......
...@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \ ...@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \ sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzlite-provider-api.jar java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzlite-provider-api.jar
EXPOSE 40010 EXPOSE 8081
ADD ibzlite-provider-api.jar /ibzlite-provider-api.jar ADD ibzlite-provider-api.jar /ibzlite-provider-api.jar
...@@ -3,23 +3,9 @@ services: ...@@ -3,23 +3,9 @@ services:
ibzlite-provider-api: ibzlite-provider-api:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzlite-provider-api:latest image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzlite-provider-api:latest
ports: ports:
- "40010:40010" - "8081:8081"
networks: networks:
- agent_network - agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.180.237
- SERVER_PORT=40010
- SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.100.243:8848
- SPRING_REDIS_HOST=172.16.100.243
- SPRING_REDIS_PORT=6379
- SPRING_REDIS_DATABASE=0
- SPRING_DATASOURCE_USERNAME=a_A_5d9d78509
- SPRING_DATASOURCE_PASSWORD=@6dEfb3@
- SPRING_DATASOURCE_URL=jdbc:mysql://172.16.180.232:3306/a_A_5d9d78509?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
- SPRING_DATASOURCE_DEFAULTSCHEMA=a_A_5d9d78509
- NACOS=172.16.100.243:8848
- SPRING_CLOUD_NACOS_DISCOVERY_GROUP=ibizdev
deploy: deploy:
resources: resources:
limits: limits:
......
...@@ -142,17 +142,6 @@ public class DstDataSourceResource { ...@@ -142,17 +142,6 @@ public class DstDataSourceResource {
return ResponseEntity.status(HttpStatus.OK).body(dstdatasourcedto); return ResponseEntity.status(HttpStatus.OK).body(dstdatasourcedto);
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-DstDataSource-InitDSBatch-all')")
@ApiOperation(value = "批行为", tags = {"数据源" }, notes = "批行为")
@RequestMapping(method = RequestMethod.POST, value = "/dstdatasources/{dstdatasource_id}/initdsbatch")
public ResponseEntity<DstDataSourceDTO> initDSBatch(@PathVariable("dstdatasource_id") String dstdatasource_id, @RequestBody DstDataSourceDTO dstdatasourcedto) {
DstDataSource domain = dstdatasourceMapping.toDomain(dstdatasourcedto);
domain.setDsId(dstdatasource_id);
domain = dstdatasourceService.initDSBatch(domain);
dstdatasourcedto = dstdatasourceMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dstdatasourcedto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-DstDataSource-Save-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-DstDataSource-Save-all')")
@ApiOperation(value = "保存数据源", tags = {"数据源" }, notes = "保存数据源") @ApiOperation(value = "保存数据源", tags = {"数据源" }, notes = "保存数据源")
@RequestMapping(method = RequestMethod.POST, value = "/dstdatasources/save") @RequestMapping(method = RequestMethod.POST, value = "/dstdatasources/save")
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册