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

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

上级 fc87b6f1
...@@ -148,6 +148,7 @@ export default { ...@@ -148,6 +148,7 @@ export default {
menuitem7: "路由", menuitem7: "路由",
menuitem3: "视图", menuitem3: "视图",
menuitem4: "组件", menuitem4: "组件",
menuitem11: "配置项",
menuitem10: "大屏", menuitem10: "大屏",
}, },
}, },
......
...@@ -148,6 +148,7 @@ export default { ...@@ -148,6 +148,7 @@ export default {
menuitem7: "路由", menuitem7: "路由",
menuitem3: "视图", menuitem3: "视图",
menuitem4: "组件", menuitem4: "组件",
menuitem11: "配置项",
menuitem10: "大屏", menuitem10: "大屏",
}, },
}, },
......
...@@ -23,8 +23,6 @@ export default { ...@@ -23,8 +23,6 @@ export default {
details: { details: {
group1: "配置基本信息", group1: "配置基本信息",
formpage1: "基本信息", formpage1: "基本信息",
group2: "操作信息",
formpage2: "其它",
srfupdatedate: "更新时间", srfupdatedate: "更新时间",
srforikey: "", srforikey: "",
srfkey: "标识", srfkey: "标识",
...@@ -33,6 +31,12 @@ export default { ...@@ -33,6 +31,12 @@ export default {
srfuf: "", srfuf: "",
srfdeid: "", srfdeid: "",
srfsourcekey: "", srfsourcekey: "",
systemid: "系统标识",
cfgtype: "配置类型",
targettype: "引用类型",
userid: "用户标识",
cfg: "配置内容",
updatedate: "更新时间",
cfgid: "标识", cfgid: "标识",
}, },
uiactions: { uiactions: {
...@@ -40,6 +44,11 @@ export default { ...@@ -40,6 +44,11 @@ export default {
}, },
main_grid: { main_grid: {
columns: { columns: {
cfgtype: "配置类型",
targettype: "引用类型",
systemid: "系统标识",
userid: "用户标识",
updatedate: "更新时间",
}, },
nodata:"", nodata:"",
uiactions: { uiactions: {
...@@ -48,10 +57,71 @@ export default { ...@@ -48,10 +57,71 @@ export default {
default_searchform: { default_searchform: {
details: { details: {
formpage1: "常规条件", formpage1: "常规条件",
n_cfgtype_eq: "配置类型(等于(=))",
n_targettype_eq: "引用类型(等于(=))",
n_systemid_eq: "系统标识(等于(=))",
}, },
uiactions: { uiactions: {
}, },
}, },
gridviewtoolbar_toolbar: {
tbitem3: {
caption: "New",
tip: "New",
},
tbitem4: {
caption: "Edit",
tip: "Edit {0}",
},
tbitem6: {
caption: "Copy",
tip: "Copy {0}",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "Remove",
tip: "Remove {0}",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "Export",
tip: "Export {0} Data To Excel",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem16: {
caption: "其它",
tip: "其它",
},
tbitem21: {
caption: "Export Data Model",
tip: "导出数据模型",
},
tbitem23: {
caption: "数据导入",
tip: "数据导入",
},
tbitem17: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "Filter",
tip: "Filter",
},
tbitem18: {
caption: "Help",
tip: "Help",
},
},
editviewtoolbar_toolbar: { editviewtoolbar_toolbar: {
tbitem3: { tbitem3: {
caption: "Save", caption: "Save",
...@@ -118,62 +188,4 @@ export default { ...@@ -118,62 +188,4 @@ export default {
tip: "Help", tip: "Help",
}, },
}, },
gridviewtoolbar_toolbar: {
tbitem3: {
caption: "New",
tip: "New",
},
tbitem4: {
caption: "Edit",
tip: "Edit {0}",
},
tbitem6: {
caption: "Copy",
tip: "Copy {0}",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "Remove",
tip: "Remove {0}",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "Export",
tip: "Export {0} Data To Excel",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem16: {
caption: "其它",
tip: "其它",
},
tbitem21: {
caption: "Export Data Model",
tip: "导出数据模型",
},
tbitem23: {
caption: "数据导入",
tip: "数据导入",
},
tbitem17: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "Filter",
tip: "Filter",
},
tbitem18: {
caption: "Help",
tip: "Help",
},
},
}; };
\ No newline at end of file
...@@ -22,8 +22,6 @@ export default { ...@@ -22,8 +22,6 @@ export default {
details: { details: {
group1: "配置基本信息", group1: "配置基本信息",
formpage1: "基本信息", formpage1: "基本信息",
group2: "操作信息",
formpage2: "其它",
srfupdatedate: "更新时间", srfupdatedate: "更新时间",
srforikey: "", srforikey: "",
srfkey: "标识", srfkey: "标识",
...@@ -32,6 +30,12 @@ export default { ...@@ -32,6 +30,12 @@ export default {
srfuf: "", srfuf: "",
srfdeid: "", srfdeid: "",
srfsourcekey: "", srfsourcekey: "",
systemid: "系统标识",
cfgtype: "配置类型",
targettype: "引用类型",
userid: "用户标识",
cfg: "配置内容",
updatedate: "更新时间",
cfgid: "标识", cfgid: "标识",
}, },
uiactions: { uiactions: {
...@@ -39,6 +43,11 @@ export default { ...@@ -39,6 +43,11 @@ export default {
}, },
main_grid: { main_grid: {
columns: { columns: {
cfgtype: "配置类型",
targettype: "引用类型",
systemid: "系统标识",
userid: "用户标识",
updatedate: "更新时间",
}, },
nodata:"", nodata:"",
uiactions: { uiactions: {
...@@ -47,10 +56,71 @@ export default { ...@@ -47,10 +56,71 @@ export default {
default_searchform: { default_searchform: {
details: { details: {
formpage1: "常规条件", formpage1: "常规条件",
n_cfgtype_eq: "配置类型(等于(=))",
n_targettype_eq: "引用类型(等于(=))",
n_systemid_eq: "系统标识(等于(=))",
}, },
uiactions: { uiactions: {
}, },
}, },
gridviewtoolbar_toolbar: {
tbitem3: {
caption: "新建",
tip: "新建",
},
tbitem4: {
caption: "编辑",
tip: "编辑",
},
tbitem6: {
caption: "拷贝",
tip: "拷贝",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "删除",
tip: "删除",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "导出",
tip: "导出",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem16: {
caption: "其它",
tip: "其它",
},
tbitem21: {
caption: "导出数据模型",
tip: "导出数据模型",
},
tbitem23: {
caption: "数据导入",
tip: "数据导入",
},
tbitem17: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "过滤",
tip: "过滤",
},
tbitem18: {
caption: "帮助",
tip: "帮助",
},
},
editviewtoolbar_toolbar: { editviewtoolbar_toolbar: {
tbitem3: { tbitem3: {
caption: "保存", caption: "保存",
...@@ -117,62 +187,4 @@ export default { ...@@ -117,62 +187,4 @@ export default {
tip: "帮助", tip: "帮助",
}, },
}, },
gridviewtoolbar_toolbar: {
tbitem3: {
caption: "新建",
tip: "新建",
},
tbitem4: {
caption: "编辑",
tip: "编辑",
},
tbitem6: {
caption: "拷贝",
tip: "拷贝",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "删除",
tip: "删除",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "导出",
tip: "导出",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem16: {
caption: "其它",
tip: "其它",
},
tbitem21: {
caption: "导出数据模型",
tip: "导出数据模型",
},
tbitem23: {
caption: "数据导入",
tip: "数据导入",
},
tbitem17: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "过滤",
tip: "过滤",
},
tbitem18: {
caption: "帮助",
tip: "帮助",
},
},
}; };
\ No newline at end of file
...@@ -171,6 +171,24 @@ mock.onGet('v7/lite-indexappmenu').reply((config: any) => { ...@@ -171,6 +171,24 @@ mock.onGet('v7/lite-indexappmenu').reply((config: any) => {
textcls: '', textcls: '',
appfunctag: 'AppFunc4', appfunctag: 'AppFunc4',
resourcetag: '', resourcetag: '',
},
{
id: 'D1F510DC-819F-45FA-AF98-55327155B417',
name: 'menuitem11',
text: '配置项',
type: 'MENUITEM',
counterid: '',
tooltip: '配置项',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '',
textcls: '',
appfunctag: 'AppFunc11',
resourcetag: '',
}, },
{ {
id: '8DAB721A-F1FD-42E3-9EC7-C2871C815FF5', id: '8DAB721A-F1FD-42E3-9EC7-C2871C815FF5',
......
...@@ -293,11 +293,11 @@ export default class DstConfigEditViewBase extends Vue { ...@@ -293,11 +293,11 @@ export default class DstConfigEditViewBase extends Vue {
@Watch('viewparam',{immediate: true, deep: true}) @Watch('viewparam',{immediate: true, deep: true})
onParamData(newVal: any, oldVal: any) { onParamData(newVal: any, oldVal: any) {
if(newVal){ if(newVal){
for(let key in this.viewparams){ this.viewparams = {};
delete this.viewparams[key]; if(typeof newVal == 'string') {
}
if(typeof this.viewparams == 'string') {
Object.assign(this.viewparams, JSON.parse(this.viewparam)); Object.assign(this.viewparams, JSON.parse(this.viewparam));
}else{
this.viewparams = Util.deepCopy(this.viewparam);
} }
} }
......
...@@ -283,11 +283,11 @@ export default class DstConfigGridViewBase extends Vue { ...@@ -283,11 +283,11 @@ export default class DstConfigGridViewBase extends Vue {
@Watch('viewparam',{immediate: true, deep: true}) @Watch('viewparam',{immediate: true, deep: true})
onParamData(newVal: any, oldVal: any) { onParamData(newVal: any, oldVal: any) {
if(newVal){ if(newVal){
for(let key in this.viewparams){ this.viewparams = {};
delete this.viewparams[key]; if(typeof newVal == 'string') {
}
if(typeof this.viewparams == 'string') {
Object.assign(this.viewparams, JSON.parse(this.viewparam)); Object.assign(this.viewparams, JSON.parse(this.viewparam));
}else{
this.viewparams = Util.deepCopy(this.viewparam);
} }
} }
...@@ -1303,16 +1303,28 @@ export default class DstConfigGridViewBase extends Vue { ...@@ -1303,16 +1303,28 @@ export default class DstConfigGridViewBase extends Vue {
const deResParameters: any[] = []; const deResParameters: any[] = [];
const parameters: any[] = [ const parameters: any[] = [
{ pathName: 'dstconfigs', parameterName: 'dstconfig' }, { pathName: 'dstconfigs', parameterName: 'dstconfig' },
{ pathName: 'editview', parameterName: 'editview' },
]; ];
const _this: any = this; const _this: any = this;
const openIndexViewTab = (data: any) => { const openDrawer = (view: any, data: any) => {
const _data: any = { w: (new Date().getTime()) }; let container: Subject<any> = this.$appdrawer.openDrawer(view, tempContext, data);
Object.assign(_data, data); container.subscribe((result: any) => {
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, _data); if (!result || !Object.is(result.ret, 'OK')) {
this.$router.push(routePath); return;
}
if (!xData || !(xData.refresh instanceof Function)) {
return;
}
xData.refresh(result.datas);
});
} }
openIndexViewTab(data); const view: any = {
viewname: 'dst-config-edit-view',
height: 0,
width: 650,
title: this.$t('entities.dstconfig.views.editview.title'),
placement: 'DRAWER_RIGHT',
};
openDrawer(view, data);
} }
...@@ -1344,17 +1356,31 @@ export default class DstConfigGridViewBase extends Vue { ...@@ -1344,17 +1356,31 @@ export default class DstConfigGridViewBase extends Vue {
const deResParameters: any[] = []; const deResParameters: any[] = [];
const parameters: any[] = [ const parameters: any[] = [
{ pathName: 'dstconfigs', parameterName: 'dstconfig' }, { pathName: 'dstconfigs', parameterName: 'dstconfig' },
{ pathName: 'editview', parameterName: 'editview' },
]; ];
const _this: any = this; const _this: any = this;
if(fullargs && fullargs.copymode){ if(fullargs && fullargs.copymode){
Object.assign(data,{copymode:true}); Object.assign(data,{copymode:true});
} }
const openIndexViewTab = (data: any) => { const openDrawer = (view: any, data: any) => {
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, data); let container: Subject<any> = this.$appdrawer.openDrawer(view, tempContext, data);
this.$router.push(routePath); container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
if (!xData || !(xData.refresh instanceof Function)) {
return;
} }
openIndexViewTab(data); xData.refresh(result.datas);
});
}
const view: any = {
viewname: 'dst-config-edit-view',
height: 0,
width: 650,
title: this.$t('entities.dstconfig.views.editview.title'),
placement: 'DRAWER_RIGHT',
};
openDrawer(view, data);
} }
......
...@@ -5,12 +5,14 @@ export const PageComponents = { ...@@ -5,12 +5,14 @@ export const PageComponents = {
Vue.component('dst-data-source-grid-view', () => import('@pages/lite/dst-data-source-grid-view/dst-data-source-grid-view.vue')); Vue.component('dst-data-source-grid-view', () => import('@pages/lite/dst-data-source-grid-view/dst-data-source-grid-view.vue'));
Vue.component('dst-microservice-pickup-grid-view', () => import('@pages/lite/dst-microservice-pickup-grid-view/dst-microservice-pickup-grid-view.vue')); Vue.component('dst-microservice-pickup-grid-view', () => import('@pages/lite/dst-microservice-pickup-grid-view/dst-microservice-pickup-grid-view.vue'));
Vue.component('dst-data-source-pickup-grid-view', () => import('@pages/lite/dst-data-source-pickup-grid-view/dst-data-source-pickup-grid-view.vue')); Vue.component('dst-data-source-pickup-grid-view', () => import('@pages/lite/dst-data-source-pickup-grid-view/dst-data-source-pickup-grid-view.vue'));
Vue.component('dst-config-grid-view', () => import('@pages/lite/dst-config-grid-view/dst-config-grid-view.vue'));
Vue.component('meta-relationship-pickup-view', () => import('@pages/lite/meta-relationship-pickup-view/meta-relationship-pickup-view.vue')); Vue.component('meta-relationship-pickup-view', () => import('@pages/lite/meta-relationship-pickup-view/meta-relationship-pickup-view.vue'));
Vue.component('dst-apigrid-view', () => import('@pages/lite/dst-apigrid-view/dst-apigrid-view.vue')); Vue.component('dst-apigrid-view', () => import('@pages/lite/dst-apigrid-view/dst-apigrid-view.vue'));
Vue.component('meta-field-edit-view', () => import('@pages/lite/meta-field-edit-view/meta-field-edit-view.vue')); Vue.component('meta-field-edit-view', () => import('@pages/lite/meta-field-edit-view/meta-field-edit-view.vue'));
Vue.component('meta-data-set-grid-view', () => import('@pages/lite/meta-data-set-grid-view/meta-data-set-grid-view.vue')); Vue.component('meta-data-set-grid-view', () => import('@pages/lite/meta-data-set-grid-view/meta-data-set-grid-view.vue'));
Vue.component('dst-view-edit-view', () => import('@pages/lite/dst-view-edit-view/dst-view-edit-view.vue')); Vue.component('dst-view-edit-view', () => import('@pages/lite/dst-view-edit-view/dst-view-edit-view.vue'));
Vue.component('meta-entity-pickup-view', () => import('@pages/lite/meta-entity-pickup-view/meta-entity-pickup-view.vue')); Vue.component('meta-entity-pickup-view', () => import('@pages/lite/meta-entity-pickup-view/meta-entity-pickup-view.vue'));
Vue.component('dst-config-edit-view', () => import('@pages/lite/dst-config-edit-view/dst-config-edit-view.vue'));
Vue.component('meta-data-set-edit-view', () => import('@pages/lite/meta-data-set-edit-view/meta-data-set-edit-view.vue')); Vue.component('meta-data-set-edit-view', () => import('@pages/lite/meta-data-set-edit-view/meta-data-set-edit-view.vue'));
Vue.component('meta-model-grid-view', () => import('@pages/lite/meta-model-grid-view/meta-model-grid-view.vue')); Vue.component('meta-model-grid-view', () => import('@pages/lite/meta-model-grid-view/meta-model-grid-view.vue'));
Vue.component('dst-router-grid-view', () => import('@pages/lite/dst-router-grid-view/dst-router-grid-view.vue')); Vue.component('dst-router-grid-view', () => import('@pages/lite/dst-router-grid-view/dst-router-grid-view.vue'));
...@@ -19,11 +21,11 @@ export const PageComponents = { ...@@ -19,11 +21,11 @@ export const PageComponents = {
Vue.component('meta-field-pickup-view', () => import('@pages/lite/meta-field-pickup-view/meta-field-pickup-view.vue')); Vue.component('meta-field-pickup-view', () => import('@pages/lite/meta-field-pickup-view/meta-field-pickup-view.vue'));
Vue.component('meta-relationship-edit-view', () => import('@pages/lite/meta-relationship-edit-view/meta-relationship-edit-view.vue')); Vue.component('meta-relationship-edit-view', () => import('@pages/lite/meta-relationship-edit-view/meta-relationship-edit-view.vue'));
Vue.component('dst-data-source-pickup-view', () => import('@pages/lite/dst-data-source-pickup-view/dst-data-source-pickup-view.vue')); Vue.component('dst-data-source-pickup-view', () => import('@pages/lite/dst-data-source-pickup-view/dst-data-source-pickup-view.vue'));
Vue.component('dst-component-grid-view', () => import('@pages/lite/dst-component-grid-view/dst-component-grid-view.vue'));
Vue.component('meta-field-edit-grid-view', () => import('@pages/lite/meta-field-edit-grid-view/meta-field-edit-grid-view.vue')); Vue.component('meta-field-edit-grid-view', () => import('@pages/lite/meta-field-edit-grid-view/meta-field-edit-grid-view.vue'));
Vue.component('dst-component-grid-view', () => import('@pages/lite/dst-component-grid-view/dst-component-grid-view.vue'));
Vue.component('meta-entity-pickup-grid-view', () => import('@pages/lite/meta-entity-pickup-grid-view/meta-entity-pickup-grid-view.vue')); Vue.component('meta-entity-pickup-grid-view', () => import('@pages/lite/meta-entity-pickup-grid-view/meta-entity-pickup-grid-view.vue'));
Vue.component('meta-entity-edit-view', () => import('@pages/lite/meta-entity-edit-view/meta-entity-edit-view.vue'));
Vue.component('meta-relationship-edit-grid-view', () => import('@pages/lite/meta-relationship-edit-grid-view/meta-relationship-edit-grid-view.vue')); Vue.component('meta-relationship-edit-grid-view', () => import('@pages/lite/meta-relationship-edit-grid-view/meta-relationship-edit-grid-view.vue'));
Vue.component('meta-entity-edit-view', () => import('@pages/lite/meta-entity-edit-view/meta-entity-edit-view.vue'));
Vue.component('dst-microservice-pickup-view', () => import('@pages/lite/dst-microservice-pickup-view/dst-microservice-pickup-view.vue')); Vue.component('dst-microservice-pickup-view', () => import('@pages/lite/dst-microservice-pickup-view/dst-microservice-pickup-view.vue'));
Vue.component('meta-field-pickup-grid-view', () => import('@pages/lite/meta-field-pickup-grid-view/meta-field-pickup-grid-view.vue')); Vue.component('meta-field-pickup-grid-view', () => import('@pages/lite/meta-field-pickup-grid-view/meta-field-pickup-grid-view.vue'));
Vue.component('blade-visual-edit-view', () => import('@pages/avuedata/blade-visual-edit-view/blade-visual-edit-view.vue')); Vue.component('blade-visual-edit-view', () => import('@pages/avuedata/blade-visual-edit-view/blade-visual-edit-view.vue'));
......
...@@ -256,6 +256,7 @@ export const viewstate: any = { ...@@ -256,6 +256,7 @@ export const viewstate: any = {
'1ade7920c947bf50c32012de9962a92d', '1ade7920c947bf50c32012de9962a92d',
'33ec4b7d5a31addaec9b033067520820', '33ec4b7d5a31addaec9b033067520820',
'd613248735503950b91cb7094b036cdc', 'd613248735503950b91cb7094b036cdc',
'f20b2b6dc4d1c75c48f5da3eca3a3274',
'18d59a3ac7947d7123e0be76e7cb71c0', '18d59a3ac7947d7123e0be76e7cb71c0',
'88894333da0e2e0f7a556ecabf7b48ab', '88894333da0e2e0f7a556ecabf7b48ab',
'9c46a7edc5d5d3a08e75ca57fcb7b03c', '9c46a7edc5d5d3a08e75ca57fcb7b03c',
...@@ -273,6 +274,15 @@ export const viewstate: any = { ...@@ -273,6 +274,15 @@ export const viewstate: any = {
'2feae2829a80f67eb57a3335aad45d42', '2feae2829a80f67eb57a3335aad45d42',
], ],
}, },
{
viewtag: '8ee101d8fe3517d595bd6518026d1ab8',
viewmodule: 'lite',
viewname: 'DstConfigEditView',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{ {
viewtag: '8ef054d29badaac8974f6a19c375c422', viewtag: '8ef054d29badaac8974f6a19c375c422',
viewmodule: 'lite', viewmodule: 'lite',
...@@ -380,6 +390,16 @@ export const viewstate: any = { ...@@ -380,6 +390,16 @@ export const viewstate: any = {
refviews: [ refviews: [
], ],
}, },
{
viewtag: 'f20b2b6dc4d1c75c48f5da3eca3a3274',
viewmodule: 'lite',
viewname: 'DstConfigGridView',
viewaction: '',
viewdatachange: false,
refviews: [
'8ee101d8fe3517d595bd6518026d1ab8',
],
},
], ],
createdviews: [], createdviews: [],
} }
\ No newline at end of file
...@@ -605,6 +605,9 @@ export default class LiteIndexBase extends Vue implements ControlInterface { ...@@ -605,6 +605,9 @@ export default class LiteIndexBase extends Vue implements ControlInterface {
case 'AppFunc6': case 'AppFunc6':
this.clickAppFunc6(item); this.clickAppFunc6(item);
return; return;
case 'AppFunc11':
this.clickAppFunc11(item);
return;
case 'AppFunc8': case 'AppFunc8':
this.clickAppFunc8(item); this.clickAppFunc8(item);
return; return;
...@@ -722,6 +725,29 @@ export default class LiteIndexBase extends Vue implements ControlInterface { ...@@ -722,6 +725,29 @@ export default class LiteIndexBase extends Vue implements ControlInterface {
}) })
} }
/**
* 配置
*
* @param {*} [item={}]
* @memberof LiteIndex
*/
public clickAppFunc11(item: any = {}) {
const viewparam: any = {};
Object.assign(viewparam, {});
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'dstconfigs', parameterName: 'dstconfig' },
{ pathName: 'gridview', parameterName: 'gridview' },
];
const path: string = this.$viewTool.buildUpRoutePath(this.$route, {}, deResParameters, parameters, [], viewparam);
if(Object.is(this.$route.fullPath,path)){
return;
}
this.$nextTick(function(){
this.$router.push(path);
})
}
/** /**
* 接口 * 接口
* *
......
...@@ -184,6 +184,25 @@ export default class LiteIndexModel { ...@@ -184,6 +184,25 @@ export default class LiteIndexModel {
appfunctag: 'AppFunc4', appfunctag: 'AppFunc4',
resourcetag: '', resourcetag: '',
authtag:'web-liteIndex-menuitem4', authtag:'web-liteIndex-menuitem4',
},
{
id: 'D1F510DC-819F-45FA-AF98-55327155B417',
name: 'menuitem11',
text: '配置项',
type: 'MENUITEM',
counterid: '',
tooltip: '配置项',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '',
textcls: '',
appfunctag: 'AppFunc11',
resourcetag: '',
authtag:'web-liteIndex-menuitem11',
}, },
{ {
id: '8DAB721A-F1FD-42E3-9EC7-C2871C815FF5', id: '8DAB721A-F1FD-42E3-9EC7-C2871C815FF5',
...@@ -262,6 +281,18 @@ export default class LiteIndexModel { ...@@ -262,6 +281,18 @@ export default class LiteIndexModel {
{ pathName: 'gridview', parameterName: 'gridview' }, { pathName: 'gridview', parameterName: 'gridview' },
], ],
}, },
{
appfunctag: 'AppFunc11',
appfuncyype: 'APPVIEW',
openmode: '',
codename: 'dstconfiggridview',
deResParameters: [],
routepath: '/liteindex/:liteindex?/dstconfigs/:dstconfig?/gridview/:gridview?',
parameters: [
{ pathName: 'dstconfigs', parameterName: 'dstconfig' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
},
{ {
appfunctag: 'AppFunc8', appfunctag: 'AppFunc8',
appfuncyype: 'APPVIEW', appfuncyype: 'APPVIEW',
......
...@@ -4,6 +4,34 @@ ...@@ -4,6 +4,34 @@
<row> <row>
<i-col span="20" class="form-content"> <i-col span="20" class="form-content">
<row> <row>
<i-col v-show="detailsModel.n_cfgtype_eq.visible" :style="{}" :sm="{ span: 12, offset: 0 }" :md="{ span: 12, offset: 0 }" :lg="{ span: 12, offset: 0 }" :xl="{ span: 12, offset: 0 }">
<app-form-item name='n_cfgtype_eq' :itemRules="this.rules.n_cfgtype_eq" class='' :caption="$t('entities.dstconfig.default_searchform.details.n_cfgtype_eq')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.n_cfgtype_eq.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box
v-model="data.n_cfgtype_eq"
@enter="onEnter($event)"
:disabled="detailsModel.n_cfgtype_eq.disabled"
type='text'
style="">
</input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.n_targettype_eq.visible" :style="{}" :sm="{ span: 12, offset: 0 }" :md="{ span: 12, offset: 0 }" :lg="{ span: 12, offset: 0 }" :xl="{ span: 12, offset: 0 }">
<app-form-item name='n_targettype_eq' :itemRules="this.rules.n_targettype_eq" class='' :caption="$t('entities.dstconfig.default_searchform.details.n_targettype_eq')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.n_targettype_eq.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box
v-model="data.n_targettype_eq"
@enter="onEnter($event)"
:disabled="detailsModel.n_targettype_eq.disabled"
type='text'
style="">
</input-box>
</app-form-item>
</i-col>
</row> </row>
</i-col> </i-col>
<i-col span="4" class="search-button"> <i-col span="4" class="search-button">
...@@ -261,6 +289,9 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -261,6 +289,9 @@ export default class DefaultBase extends Vue implements ControlInterface {
* @memberof DefaultBase * @memberof DefaultBase
*/ */
public data: any = { public data: any = {
n_cfgtype_eq: null,
n_targettype_eq: null,
n_systemid_eq: null,
}; };
/** /**
...@@ -271,6 +302,12 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -271,6 +302,12 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/ */
public detailsModel: any = { public detailsModel: any = {
formpage1: new FormPageModel({ caption: '常规条件', detailType: 'FORMPAGE', name: 'formpage1', visible: true, isShowCaption: true, form: this }) formpage1: new FormPageModel({ caption: '常规条件', detailType: 'FORMPAGE', name: 'formpage1', visible: true, isShowCaption: true, form: this })
,
n_cfgtype_eq: new FormItemModel({ caption: '配置类型(等于(=))', detailType: 'FORMITEM', name: 'n_cfgtype_eq', visible: true, isShowCaption: true, form: this,required:false, disabled: false, enableCond: 3 })
,
n_targettype_eq: new FormItemModel({ caption: '引用类型(等于(=))', detailType: 'FORMITEM', name: 'n_targettype_eq', visible: true, isShowCaption: true, form: this,required:false, disabled: false, enableCond: 3 })
,
n_systemid_eq: new FormItemModel({ caption: '系统标识(等于(=))', detailType: 'FORMITEM', name: 'n_systemid_eq', visible: true, isShowCaption: true, form: this,required:false, disabled: false, enableCond: 3 })
, ,
}; };
...@@ -281,6 +318,60 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -281,6 +318,60 @@ export default class DefaultBase extends Vue implements ControlInterface {
* @memberof DefaultBase * @memberof DefaultBase
*/ */
public rules: any = { public rules: any = {
n_cfgtype_eq: [
{ type: 'string', message: '配置类型(等于(=)) 值必须为字符串类型', trigger: 'change' },
{ type: 'string', message: '配置类型(等于(=)) 值必须为字符串类型', trigger: 'blur' },
{ required: this.detailsModel.n_cfgtype_eq.required, type: 'string', message: '配置类型(等于(=)) 值不能为空', trigger: 'change' },
{ required: this.detailsModel.n_cfgtype_eq.required, type: 'string', message: '配置类型(等于(=)) 值不能为空', trigger: 'blur' },
],
n_targettype_eq: [
{ type: 'string', message: '引用类型(等于(=)) 值必须为字符串类型', trigger: 'change' },
{ type: 'string', message: '引用类型(等于(=)) 值必须为字符串类型', trigger: 'blur' },
{ required: this.detailsModel.n_targettype_eq.required, type: 'string', message: '引用类型(等于(=)) 值不能为空', trigger: 'change' },
{ required: this.detailsModel.n_targettype_eq.required, type: 'string', message: '引用类型(等于(=)) 值不能为空', trigger: 'blur' },
],
n_systemid_eq: [
{ type: 'string', message: '系统标识(等于(=)) 值必须为字符串类型', trigger: 'change' },
{ type: 'string', message: '系统标识(等于(=)) 值必须为字符串类型', trigger: 'blur' },
{ required: this.detailsModel.n_systemid_eq.required, type: 'string', message: '系统标识(等于(=)) 值不能为空', trigger: 'change' },
{ required: this.detailsModel.n_systemid_eq.required, type: 'string', message: '系统标识(等于(=)) 值不能为空', trigger: 'blur' },
],
}
/**
* 监控表单属性 n_cfgtype_eq 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof DefaultBase
*/
@Watch('data.n_cfgtype_eq')
onN_cfgtype_eqChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'n_cfgtype_eq', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 n_targettype_eq 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof DefaultBase
*/
@Watch('data.n_targettype_eq')
onN_targettype_eqChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'n_targettype_eq', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 n_systemid_eq 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof DefaultBase
*/
@Watch('data.n_systemid_eq')
onN_systemid_eqChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'n_systemid_eq', newVal: newVal, oldVal: oldVal });
} }
...@@ -304,6 +395,9 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -304,6 +395,9 @@ export default class DefaultBase extends Vue implements ControlInterface {
public formLogic({ name, newVal, oldVal }: { name: string, newVal: any, oldVal: any }): void { public formLogic({ name, newVal, oldVal }: { name: string, newVal: any, oldVal: any }): void {
} }
/** /**
...@@ -381,6 +475,9 @@ export default class DefaultBase extends Vue implements ControlInterface { ...@@ -381,6 +475,9 @@ export default class DefaultBase extends Vue implements ControlInterface {
* @memberof DefaultBase * @memberof DefaultBase
*/ */
public createDefault(){ public createDefault(){
if (this.data.hasOwnProperty('n_systemid_eq')) {
this.data['n_systemid_eq'] = this.context['dstsystemid'];
}
} }
/** /**
......
...@@ -25,6 +25,21 @@ export default class DefaultModel { ...@@ -25,6 +25,21 @@ export default class DefaultModel {
prop: 'srffrontuf', prop: 'srffrontuf',
dataType: 'TEXT', dataType: 'TEXT',
}, },
{
name: 'n_cfgtype_eq',
prop: 'cfg_type',
dataType: 'TEXT',
},
{
name: 'n_targettype_eq',
prop: 'target_type',
dataType: 'TEXT',
},
{
name: 'n_systemid_eq',
prop: 'system_id',
dataType: 'PICKUP',
},
] ]
} }
......
...@@ -55,6 +55,36 @@ export default class MainModel { ...@@ -55,6 +55,36 @@ export default class MainModel {
{ {
name: 'srfsourcekey', name: 'srfsourcekey',
}, },
{
name: 'systemid',
prop: 'system_id',
dataType: 'PICKUP',
},
{
name: 'cfgtype',
prop: 'cfg_type',
dataType: 'TEXT',
},
{
name: 'targettype',
prop: 'target_type',
dataType: 'TEXT',
},
{
name: 'userid',
prop: 'user_id',
dataType: 'TEXT',
},
{
name: 'cfg',
prop: 'cfg',
dataType: 'LONGTEXT',
},
{
name: 'updatedate',
prop: 'update_date',
dataType: 'DATETIME',
},
{ {
name: 'cfgid', name: 'cfgid',
prop: 'cfg_id', prop: 'cfg_id',
......
...@@ -31,6 +31,26 @@ export default class MainModel { ...@@ -31,6 +31,26 @@ export default class MainModel {
prop: 'system_id', prop: 'system_id',
dataType: 'PICKUP', dataType: 'PICKUP',
}, },
{
name: 'targettype',
prop: 'target_type',
dataType: 'TEXT',
},
{
name: 'userid',
prop: 'user_id',
dataType: 'TEXT',
},
{
name: 'cfgtype',
prop: 'cfg_type',
dataType: 'TEXT',
},
{
name: 'updatedate',
prop: 'update_date',
dataType: 'DATETIME',
},
{ {
name: 'srfmajortext', name: 'srfmajortext',
prop: 'cfg_type', prop: 'cfg_type',
...@@ -51,6 +71,21 @@ export default class MainModel { ...@@ -51,6 +71,21 @@ export default class MainModel {
name: 'dstconfig', name: 'dstconfig',
prop: 'cfg_id', prop: 'cfg_id',
}, },
{
name: 'n_cfgtype_eq',
prop: 'n_cfgtype_eq',
dataType: 'QUERYPARAM'
},
{
name: 'n_targettype_eq',
prop: 'n_targettype_eq',
dataType: 'QUERYPARAM'
},
{
name: 'n_systemid_eq',
prop: 'n_systemid_eq',
dataType: 'QUERYPARAM'
},
{ {
name:'size', name:'size',
......
...@@ -46,7 +46,7 @@ public class BladeVisual extends EntityMP implements Serializable { ...@@ -46,7 +46,7 @@ public class BladeVisual extends EntityMP implements Serializable {
/** /**
* 主键 * 主键
*/ */
@DEField(isKeyField=true) @DEField(isKeyField = true)
@TableId(value= "id",type=IdType.ASSIGN_ID) @TableId(value= "id",type=IdType.ASSIGN_ID)
@JSONField(name = "id") @JSONField(name = "id")
@JsonProperty("id") @JsonProperty("id")
...@@ -90,10 +90,10 @@ public class BladeVisual extends EntityMP implements Serializable { ...@@ -90,10 +90,10 @@ public class BladeVisual extends EntityMP implements Serializable {
/** /**
* 创建时间 * 创建时间
*/ */
@DEField(name = "create_time" , preType = DEPredefinedFieldType.CREATEDATE) @DEField(name = "create_time", preType = DEPredefinedFieldType.CREATEDATE)
@TableField(value = "create_time" , fill = FieldFill.INSERT) @TableField(value = "create_time", fill = FieldFill.INSERT)
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone = "GMT+8")
@JSONField(name = "createtime" , format="yyyy-MM-dd HH:mm:ss") @JSONField(name = "createtime", format = "yyyy-MM-dd HH:mm:ss")
@JsonProperty("createtime") @JsonProperty("createtime")
private Timestamp createtime; private Timestamp createtime;
/** /**
...@@ -115,10 +115,10 @@ public class BladeVisual extends EntityMP implements Serializable { ...@@ -115,10 +115,10 @@ public class BladeVisual extends EntityMP implements Serializable {
/** /**
* 修改时间 * 修改时间
*/ */
@DEField(name = "update_time" , preType = DEPredefinedFieldType.UPDATEDATE) @DEField(name = "update_time", preType = DEPredefinedFieldType.UPDATEDATE)
@TableField(value = "update_time") @TableField(value = "update_time")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone = "GMT+8")
@JSONField(name = "updatetime" , format="yyyy-MM-dd HH:mm:ss") @JSONField(name = "updatetime", format = "yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatetime") @JsonProperty("updatetime")
private Timestamp updatetime; private Timestamp updatetime;
/** /**
...@@ -132,8 +132,8 @@ public class BladeVisual extends EntityMP implements Serializable { ...@@ -132,8 +132,8 @@ public class BladeVisual extends EntityMP implements Serializable {
/** /**
* 是否已删除 * 是否已删除
*/ */
@DEField(name = "is_deleted" , preType = DEPredefinedFieldType.LOGICVALID, logicval = "0" , logicdelval="1") @DEField(name = "is_deleted", preType = DEPredefinedFieldType.LOGICVALID, logicval = "0", logicdelval = "1")
@TableLogic(value= "0",delval="1") @TableLogic(value= "0", delval = "1")
@TableField(value = "is_deleted") @TableField(value = "is_deleted")
@JSONField(name = "isdeleted") @JSONField(name = "isdeleted")
@JsonProperty("isdeleted") @JsonProperty("isdeleted")
...@@ -144,7 +144,7 @@ public class BladeVisual extends EntityMP implements Serializable { ...@@ -144,7 +144,7 @@ public class BladeVisual extends EntityMP implements Serializable {
/** /**
* 设置 [大屏标题] * 设置 [大屏标题]
*/ */
public void setTitle(String title){ public void setTitle(String title) {
this.title = title ; this.title = title ;
this.modify("title",title); this.modify("title",title);
} }
...@@ -152,7 +152,7 @@ public class BladeVisual extends EntityMP implements Serializable { ...@@ -152,7 +152,7 @@ public class BladeVisual extends EntityMP implements Serializable {
/** /**
* 设置 [大屏类型] * 设置 [大屏类型]
*/ */
public void setCategory(Integer category){ public void setCategory(Integer category) {
this.category = category ; this.category = category ;
this.modify("category",category); this.modify("category",category);
} }
...@@ -160,7 +160,7 @@ public class BladeVisual extends EntityMP implements Serializable { ...@@ -160,7 +160,7 @@ public class BladeVisual extends EntityMP implements Serializable {
/** /**
* 设置 [发布密码] * 设置 [发布密码]
*/ */
public void setPassword(String password){ public void setPassword(String password) {
this.password = password ; this.password = password ;
this.modify("password",password); this.modify("password",password);
} }
...@@ -168,7 +168,7 @@ public class BladeVisual extends EntityMP implements Serializable { ...@@ -168,7 +168,7 @@ public class BladeVisual extends EntityMP implements Serializable {
/** /**
* 设置 [大屏背景] * 设置 [大屏背景]
*/ */
public void setBackgroundurl(String backgroundurl){ public void setBackgroundurl(String backgroundurl) {
this.backgroundurl = backgroundurl ; this.backgroundurl = backgroundurl ;
this.modify("background_url",backgroundurl); this.modify("background_url",backgroundurl);
} }
...@@ -176,7 +176,7 @@ public class BladeVisual extends EntityMP implements Serializable { ...@@ -176,7 +176,7 @@ public class BladeVisual extends EntityMP implements Serializable {
/** /**
* 设置 [状态] * 设置 [状态]
*/ */
public void setStatus(Integer status){ public void setStatus(Integer status) {
this.status = status ; this.status = status ;
this.modify("status",status); this.modify("status",status);
} }
...@@ -184,7 +184,7 @@ public class BladeVisual extends EntityMP implements Serializable { ...@@ -184,7 +184,7 @@ public class BladeVisual extends EntityMP implements Serializable {
/** /**
* 设置 [创建部门] * 设置 [创建部门]
*/ */
public void setCreatedept(Long createdept){ public void setCreatedept(Long createdept) {
this.createdept = createdept ; this.createdept = createdept ;
this.modify("create_dept",createdept); this.modify("create_dept",createdept);
} }
...@@ -192,7 +192,7 @@ public class BladeVisual extends EntityMP implements Serializable { ...@@ -192,7 +192,7 @@ public class BladeVisual extends EntityMP implements Serializable {
/** /**
* 设置 [创建人] * 设置 [创建人]
*/ */
public void setCreateuser(Long createuser){ public void setCreateuser(Long createuser) {
this.createuser = createuser ; this.createuser = createuser ;
this.modify("create_user",createuser); this.modify("create_user",createuser);
} }
...@@ -200,7 +200,7 @@ public class BladeVisual extends EntityMP implements Serializable { ...@@ -200,7 +200,7 @@ public class BladeVisual extends EntityMP implements Serializable {
/** /**
* 设置 [修改人] * 设置 [修改人]
*/ */
public void setUpdateuser(Long updateuser){ public void setUpdateuser(Long updateuser) {
this.updateuser = updateuser ; this.updateuser = updateuser ;
this.modify("update_user",updateuser); this.modify("update_user",updateuser);
} }
......
...@@ -46,7 +46,7 @@ public class BladeVisualCategory extends EntityMP implements Serializable { ...@@ -46,7 +46,7 @@ public class BladeVisualCategory extends EntityMP implements Serializable {
/** /**
* 主键 * 主键
*/ */
@DEField(isKeyField=true) @DEField(isKeyField = true)
@TableId(value= "id",type=IdType.ASSIGN_ID) @TableId(value= "id",type=IdType.ASSIGN_ID)
@JSONField(name = "id") @JSONField(name = "id")
@JsonProperty("id") @JsonProperty("id")
...@@ -70,8 +70,8 @@ public class BladeVisualCategory extends EntityMP implements Serializable { ...@@ -70,8 +70,8 @@ public class BladeVisualCategory extends EntityMP implements Serializable {
/** /**
* 是否已删除 * 是否已删除
*/ */
@DEField(name = "is_deleted" , preType = DEPredefinedFieldType.LOGICVALID, logicval = "1" , logicdelval="0") @DEField(name = "is_deleted", preType = DEPredefinedFieldType.LOGICVALID, logicval = "1", logicdelval = "0")
@TableLogic(value= "1",delval="0") @TableLogic(value= "1", delval = "0")
@TableField(value = "is_deleted") @TableField(value = "is_deleted")
@JSONField(name = "isdeleted") @JSONField(name = "isdeleted")
@JsonProperty("isdeleted") @JsonProperty("isdeleted")
...@@ -82,7 +82,7 @@ public class BladeVisualCategory extends EntityMP implements Serializable { ...@@ -82,7 +82,7 @@ public class BladeVisualCategory extends EntityMP implements Serializable {
/** /**
* 设置 [分类键值] * 设置 [分类键值]
*/ */
public void setCategorykey(String categorykey){ public void setCategorykey(String categorykey) {
this.categorykey = categorykey ; this.categorykey = categorykey ;
this.modify("category_key",categorykey); this.modify("category_key",categorykey);
} }
...@@ -90,7 +90,7 @@ public class BladeVisualCategory extends EntityMP implements Serializable { ...@@ -90,7 +90,7 @@ public class BladeVisualCategory extends EntityMP implements Serializable {
/** /**
* 设置 [分类名称] * 设置 [分类名称]
*/ */
public void setCategoryvalue(String categoryvalue){ public void setCategoryvalue(String categoryvalue) {
this.categoryvalue = categoryvalue ; this.categoryvalue = categoryvalue ;
this.modify("category_value",categoryvalue); this.modify("category_value",categoryvalue);
} }
......
...@@ -46,7 +46,7 @@ public class BladeVisualConfig extends EntityMP implements Serializable { ...@@ -46,7 +46,7 @@ public class BladeVisualConfig extends EntityMP implements Serializable {
/** /**
* 主键 * 主键
*/ */
@DEField(isKeyField=true) @DEField(isKeyField = true)
@TableId(value= "id",type=IdType.ASSIGN_ID) @TableId(value= "id",type=IdType.ASSIGN_ID)
@JSONField(name = "id") @JSONField(name = "id")
@JsonProperty("id") @JsonProperty("id")
...@@ -79,7 +79,7 @@ public class BladeVisualConfig extends EntityMP implements Serializable { ...@@ -79,7 +79,7 @@ public class BladeVisualConfig extends EntityMP implements Serializable {
/** /**
* 设置 [可视化表主键] * 设置 [可视化表主键]
*/ */
public void setVisualid(Long visualid){ public void setVisualid(Long visualid) {
this.visualid = visualid ; this.visualid = visualid ;
this.modify("visual_id",visualid); this.modify("visual_id",visualid);
} }
...@@ -87,7 +87,7 @@ public class BladeVisualConfig extends EntityMP implements Serializable { ...@@ -87,7 +87,7 @@ public class BladeVisualConfig extends EntityMP implements Serializable {
/** /**
* 设置 [组件json] * 设置 [组件json]
*/ */
public void setComponent(String component){ public void setComponent(String component) {
this.component = component ; this.component = component ;
this.modify("component",component); this.modify("component",component);
} }
...@@ -95,7 +95,7 @@ public class BladeVisualConfig extends EntityMP implements Serializable { ...@@ -95,7 +95,7 @@ public class BladeVisualConfig extends EntityMP implements Serializable {
/** /**
* 设置 [配置json] * 设置 [配置json]
*/ */
public void setDetail(String detail){ public void setDetail(String detail) {
this.detail = detail ; this.detail = detail ;
this.modify("detail",detail); this.modify("detail",detail);
} }
......
...@@ -46,7 +46,7 @@ public class BladeVisualMap extends EntityMP implements Serializable { ...@@ -46,7 +46,7 @@ public class BladeVisualMap extends EntityMP implements Serializable {
/** /**
* 主键 * 主键
*/ */
@DEField(isKeyField=true) @DEField(isKeyField = true)
@TableId(value= "id",type=IdType.ASSIGN_ID) @TableId(value= "id",type=IdType.ASSIGN_ID)
@JSONField(name = "id") @JSONField(name = "id")
@JsonProperty("id") @JsonProperty("id")
...@@ -71,7 +71,7 @@ public class BladeVisualMap extends EntityMP implements Serializable { ...@@ -71,7 +71,7 @@ public class BladeVisualMap extends EntityMP implements Serializable {
/** /**
* 设置 [地图名称] * 设置 [地图名称]
*/ */
public void setName(String name){ public void setName(String name) {
this.name = name ; this.name = name ;
this.modify("name",name); this.modify("name",name);
} }
...@@ -79,7 +79,7 @@ public class BladeVisualMap extends EntityMP implements Serializable { ...@@ -79,7 +79,7 @@ public class BladeVisualMap extends EntityMP implements Serializable {
/** /**
* 设置 [地图数据] * 设置 [地图数据]
*/ */
public void setData(String data){ public void setData(String data) {
this.data = data ; this.data = data ;
this.modify("data",data); this.modify("data",data);
} }
......
...@@ -31,6 +31,7 @@ public class BladeVisualCategorySearchContext extends QueryWrapperContext<BladeV ...@@ -31,6 +31,7 @@ public class BladeVisualCategorySearchContext extends QueryWrapperContext<BladeV
/** /**
* 启用快速搜索 * 启用快速搜索
*/ */
@Override
public void setQuery(String query) public void setQuery(String query)
{ {
this.query=query; this.query=query;
......
...@@ -31,6 +31,7 @@ public class BladeVisualConfigSearchContext extends QueryWrapperContext<BladeVis ...@@ -31,6 +31,7 @@ public class BladeVisualConfigSearchContext extends QueryWrapperContext<BladeVis
/** /**
* 启用快速搜索 * 启用快速搜索
*/ */
@Override
public void setQuery(String query) public void setQuery(String query)
{ {
this.query=query; this.query=query;
......
...@@ -31,6 +31,7 @@ public class BladeVisualMapSearchContext extends QueryWrapperContext<BladeVisual ...@@ -31,6 +31,7 @@ public class BladeVisualMapSearchContext extends QueryWrapperContext<BladeVisual
/** /**
* 启用快速搜索 * 启用快速搜索
*/ */
@Override
public void setQuery(String query) public void setQuery(String query)
{ {
this.query=query; this.query=query;
......
...@@ -38,6 +38,7 @@ public class BladeVisualSearchContext extends QueryWrapperContext<BladeVisual> { ...@@ -38,6 +38,7 @@ public class BladeVisualSearchContext extends QueryWrapperContext<BladeVisual> {
/** /**
* 启用快速搜索 * 启用快速搜索
*/ */
@Override
public void setQuery(String query) public void setQuery(String query)
{ {
this.query=query; this.query=query;
......
...@@ -54,8 +54,9 @@ public class BladeVisualCategoryServiceImpl extends ServiceImpl<BladeVisualCateg ...@@ -54,8 +54,9 @@ public class BladeVisualCategoryServiceImpl extends ServiceImpl<BladeVisualCateg
@Override @Override
@Transactional @Transactional
public boolean create(BladeVisualCategory et) { public boolean create(BladeVisualCategory et) {
if(!this.retBool(this.baseMapper.insert(et))) if(!this.retBool(this.baseMapper.insert(et))) {
return false; return false;
}
CachedBeanCopier.copy(get(et.getId()),et); CachedBeanCopier.copy(get(et.getId()),et);
return true; return true;
} }
...@@ -69,8 +70,9 @@ public class BladeVisualCategoryServiceImpl extends ServiceImpl<BladeVisualCateg ...@@ -69,8 +70,9 @@ public class BladeVisualCategoryServiceImpl extends ServiceImpl<BladeVisualCateg
@Override @Override
@Transactional @Transactional
public boolean update(BladeVisualCategory et) { public boolean update(BladeVisualCategory et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("id",et.getId()))) if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("id",et.getId()))) {
return false; return false;
}
CachedBeanCopier.copy(get(et.getId()),et); CachedBeanCopier.copy(get(et.getId()),et);
return true; return true;
} }
...@@ -119,8 +121,9 @@ public class BladeVisualCategoryServiceImpl extends ServiceImpl<BladeVisualCateg ...@@ -119,8 +121,9 @@ public class BladeVisualCategoryServiceImpl extends ServiceImpl<BladeVisualCateg
@Override @Override
@Transactional @Transactional
public boolean save(BladeVisualCategory et) { public boolean save(BladeVisualCategory et) {
if(!saveOrUpdate(et)) if(!saveOrUpdate(et)) {
return false; return false;
}
return true; return true;
} }
......
...@@ -54,8 +54,9 @@ public class BladeVisualConfigServiceImpl extends ServiceImpl<BladeVisualConfigM ...@@ -54,8 +54,9 @@ public class BladeVisualConfigServiceImpl extends ServiceImpl<BladeVisualConfigM
@Override @Override
@Transactional @Transactional
public boolean create(BladeVisualConfig et) { public boolean create(BladeVisualConfig et) {
if(!this.retBool(this.baseMapper.insert(et))) if(!this.retBool(this.baseMapper.insert(et))) {
return false; return false;
}
CachedBeanCopier.copy(get(et.getId()),et); CachedBeanCopier.copy(get(et.getId()),et);
return true; return true;
} }
...@@ -69,8 +70,9 @@ public class BladeVisualConfigServiceImpl extends ServiceImpl<BladeVisualConfigM ...@@ -69,8 +70,9 @@ public class BladeVisualConfigServiceImpl extends ServiceImpl<BladeVisualConfigM
@Override @Override
@Transactional @Transactional
public boolean update(BladeVisualConfig et) { public boolean update(BladeVisualConfig et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("id",et.getId()))) if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("id",et.getId()))) {
return false; return false;
}
CachedBeanCopier.copy(get(et.getId()),et); CachedBeanCopier.copy(get(et.getId()),et);
return true; return true;
} }
...@@ -119,8 +121,9 @@ public class BladeVisualConfigServiceImpl extends ServiceImpl<BladeVisualConfigM ...@@ -119,8 +121,9 @@ public class BladeVisualConfigServiceImpl extends ServiceImpl<BladeVisualConfigM
@Override @Override
@Transactional @Transactional
public boolean save(BladeVisualConfig et) { public boolean save(BladeVisualConfig et) {
if(!saveOrUpdate(et)) if(!saveOrUpdate(et)) {
return false; return false;
}
return true; return true;
} }
......
...@@ -54,8 +54,9 @@ public class BladeVisualMapServiceImpl extends ServiceImpl<BladeVisualMapMapper, ...@@ -54,8 +54,9 @@ public class BladeVisualMapServiceImpl extends ServiceImpl<BladeVisualMapMapper,
@Override @Override
@Transactional @Transactional
public boolean create(BladeVisualMap et) { public boolean create(BladeVisualMap et) {
if(!this.retBool(this.baseMapper.insert(et))) if(!this.retBool(this.baseMapper.insert(et))) {
return false; return false;
}
CachedBeanCopier.copy(get(et.getId()),et); CachedBeanCopier.copy(get(et.getId()),et);
return true; return true;
} }
...@@ -69,8 +70,9 @@ public class BladeVisualMapServiceImpl extends ServiceImpl<BladeVisualMapMapper, ...@@ -69,8 +70,9 @@ public class BladeVisualMapServiceImpl extends ServiceImpl<BladeVisualMapMapper,
@Override @Override
@Transactional @Transactional
public boolean update(BladeVisualMap et) { public boolean update(BladeVisualMap et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("id",et.getId()))) if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("id",et.getId()))) {
return false; return false;
}
CachedBeanCopier.copy(get(et.getId()),et); CachedBeanCopier.copy(get(et.getId()),et);
return true; return true;
} }
...@@ -119,8 +121,9 @@ public class BladeVisualMapServiceImpl extends ServiceImpl<BladeVisualMapMapper, ...@@ -119,8 +121,9 @@ public class BladeVisualMapServiceImpl extends ServiceImpl<BladeVisualMapMapper,
@Override @Override
@Transactional @Transactional
public boolean save(BladeVisualMap et) { public boolean save(BladeVisualMap et) {
if(!saveOrUpdate(et)) if(!saveOrUpdate(et)) {
return false; return false;
}
return true; return true;
} }
......
...@@ -54,8 +54,9 @@ public class BladeVisualServiceImpl extends ServiceImpl<BladeVisualMapper, Blade ...@@ -54,8 +54,9 @@ public class BladeVisualServiceImpl extends ServiceImpl<BladeVisualMapper, Blade
@Override @Override
@Transactional @Transactional
public boolean create(BladeVisual et) { public boolean create(BladeVisual et) {
if(!this.retBool(this.baseMapper.insert(et))) if(!this.retBool(this.baseMapper.insert(et))) {
return false; return false;
}
CachedBeanCopier.copy(get(et.getId()),et); CachedBeanCopier.copy(get(et.getId()),et);
return true; return true;
} }
...@@ -69,8 +70,9 @@ public class BladeVisualServiceImpl extends ServiceImpl<BladeVisualMapper, Blade ...@@ -69,8 +70,9 @@ public class BladeVisualServiceImpl extends ServiceImpl<BladeVisualMapper, Blade
@Override @Override
@Transactional @Transactional
public boolean update(BladeVisual et) { public boolean update(BladeVisual et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("id",et.getId()))) if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("id",et.getId()))) {
return false; return false;
}
CachedBeanCopier.copy(get(et.getId()),et); CachedBeanCopier.copy(get(et.getId()),et);
return true; return true;
} }
...@@ -119,8 +121,9 @@ public class BladeVisualServiceImpl extends ServiceImpl<BladeVisualMapper, Blade ...@@ -119,8 +121,9 @@ public class BladeVisualServiceImpl extends ServiceImpl<BladeVisualMapper, Blade
@Override @Override
@Transactional @Transactional
public boolean save(BladeVisual et) { public boolean save(BladeVisual et) {
if(!saveOrUpdate(et)) if(!saveOrUpdate(et)) {
return false; return false;
}
return true; return true;
} }
......
...@@ -46,7 +46,7 @@ public class DstComponent extends EntityMP implements Serializable { ...@@ -46,7 +46,7 @@ public class DstComponent extends EntityMP implements Serializable {
/** /**
* 部件标识 * 部件标识
*/ */
@DEField(name = "cid" , isKeyField=true) @DEField(name = "cid" , isKeyField = true)
@TableId(value= "cid",type=IdType.ASSIGN_UUID) @TableId(value= "cid",type=IdType.ASSIGN_UUID)
@JSONField(name = "id") @JSONField(name = "id")
@JsonProperty("id") @JsonProperty("id")
...@@ -140,7 +140,7 @@ public class DstComponent extends EntityMP implements Serializable { ...@@ -140,7 +140,7 @@ public class DstComponent extends EntityMP implements Serializable {
/** /**
* 设置 [名称] * 设置 [名称]
*/ */
public void setName(String name){ public void setName(String name) {
this.name = name ; this.name = name ;
this.modify("cname",name); this.modify("cname",name);
} }
...@@ -148,7 +148,7 @@ public class DstComponent extends EntityMP implements Serializable { ...@@ -148,7 +148,7 @@ public class DstComponent extends EntityMP implements Serializable {
/** /**
* 设置 [代码名称] * 设置 [代码名称]
*/ */
public void setCodeName(String codeName){ public void setCodeName(String codeName) {
this.codeName = codeName ; this.codeName = codeName ;
this.modify("codename",codeName); this.modify("codename",codeName);
} }
...@@ -156,7 +156,7 @@ public class DstComponent extends EntityMP implements Serializable { ...@@ -156,7 +156,7 @@ public class DstComponent extends EntityMP implements Serializable {
/** /**
* 设置 [系统标识] * 设置 [系统标识]
*/ */
public void setSystemId(String systemId){ public void setSystemId(String systemId) {
this.systemId = systemId ; this.systemId = systemId ;
this.modify("systemid",systemId); this.modify("systemid",systemId);
} }
...@@ -164,7 +164,7 @@ public class DstComponent extends EntityMP implements Serializable { ...@@ -164,7 +164,7 @@ public class DstComponent extends EntityMP implements Serializable {
/** /**
* 设置 [应用标识] * 设置 [应用标识]
*/ */
public void setAppId(String appId){ public void setAppId(String appId) {
this.appId = appId ; this.appId = appId ;
this.modify("appid",appId); this.modify("appid",appId);
} }
...@@ -172,7 +172,7 @@ public class DstComponent extends EntityMP implements Serializable { ...@@ -172,7 +172,7 @@ public class DstComponent extends EntityMP implements Serializable {
/** /**
* 设置 [类型] * 设置 [类型]
*/ */
public void setType(String type){ public void setType(String type) {
this.type = type ; this.type = type ;
this.modify("ctype",type); this.modify("ctype",type);
} }
...@@ -180,7 +180,7 @@ public class DstComponent extends EntityMP implements Serializable { ...@@ -180,7 +180,7 @@ public class DstComponent extends EntityMP implements Serializable {
/** /**
* 设置 [实体标识] * 设置 [实体标识]
*/ */
public void setEntityId(String entityId){ public void setEntityId(String entityId) {
this.entityId = entityId ; this.entityId = entityId ;
this.modify("entityid",entityId); this.modify("entityid",entityId);
} }
...@@ -188,7 +188,7 @@ public class DstComponent extends EntityMP implements Serializable { ...@@ -188,7 +188,7 @@ public class DstComponent extends EntityMP implements Serializable {
/** /**
* 设置 [配置] * 设置 [配置]
*/ */
public void setConfig(String config){ public void setConfig(String config) {
this.config = config ; this.config = config ;
this.modify("cfg",config); this.modify("cfg",config);
} }
...@@ -197,7 +197,7 @@ public class DstComponent extends EntityMP implements Serializable { ...@@ -197,7 +197,7 @@ public class DstComponent extends EntityMP implements Serializable {
/** /**
* 获取 [部件标识] * 获取 [部件标识]
*/ */
public String getId(){ public String getId() {
if(ObjectUtils.isEmpty(id)){ if(ObjectUtils.isEmpty(id)){
id=(String)getDefaultKey(true); id=(String)getDefaultKey(true);
} }
......
...@@ -46,7 +46,7 @@ public class DstConfig extends EntityMP implements Serializable { ...@@ -46,7 +46,7 @@ public class DstConfig extends EntityMP implements Serializable {
/** /**
* 标识 * 标识
*/ */
@DEField(isKeyField=true) @DEField(isKeyField = true)
@TableId(value= "cfgid",type=IdType.ASSIGN_UUID) @TableId(value= "cfgid",type=IdType.ASSIGN_UUID)
@JSONField(name = "cfg_id") @JSONField(name = "cfg_id")
@JsonProperty("cfg_id") @JsonProperty("cfg_id")
...@@ -92,8 +92,8 @@ public class DstConfig extends EntityMP implements Serializable { ...@@ -92,8 +92,8 @@ public class DstConfig extends EntityMP implements Serializable {
*/ */
@DEField(preType = DEPredefinedFieldType.UPDATEDATE) @DEField(preType = DEPredefinedFieldType.UPDATEDATE)
@TableField(value = "updatedate") @TableField(value = "updatedate")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone = "GMT+8")
@JSONField(name = "update_date" , format="yyyy-MM-dd HH:mm:ss") @JSONField(name = "update_date", format = "yyyy-MM-dd HH:mm:ss")
@JsonProperty("update_date") @JsonProperty("update_date")
private Timestamp updateDate; private Timestamp updateDate;
...@@ -110,7 +110,7 @@ public class DstConfig extends EntityMP implements Serializable { ...@@ -110,7 +110,7 @@ public class DstConfig extends EntityMP implements Serializable {
/** /**
* 设置 [系统标识] * 设置 [系统标识]
*/ */
public void setSystemId(String systemId){ public void setSystemId(String systemId) {
this.systemId = systemId ; this.systemId = systemId ;
this.modify("systemid",systemId); this.modify("systemid",systemId);
} }
...@@ -118,7 +118,7 @@ public class DstConfig extends EntityMP implements Serializable { ...@@ -118,7 +118,7 @@ public class DstConfig extends EntityMP implements Serializable {
/** /**
* 设置 [配置类型] * 设置 [配置类型]
*/ */
public void setCfgType(String cfgType){ public void setCfgType(String cfgType) {
this.cfgType = cfgType ; this.cfgType = cfgType ;
this.modify("cfgtype",cfgType); this.modify("cfgtype",cfgType);
} }
...@@ -126,7 +126,7 @@ public class DstConfig extends EntityMP implements Serializable { ...@@ -126,7 +126,7 @@ public class DstConfig extends EntityMP implements Serializable {
/** /**
* 设置 [引用类型] * 设置 [引用类型]
*/ */
public void setTargetType(String targetType){ public void setTargetType(String targetType) {
this.targetType = targetType ; this.targetType = targetType ;
this.modify("targettype",targetType); this.modify("targettype",targetType);
} }
...@@ -134,7 +134,7 @@ public class DstConfig extends EntityMP implements Serializable { ...@@ -134,7 +134,7 @@ public class DstConfig extends EntityMP implements Serializable {
/** /**
* 设置 [配置内容] * 设置 [配置内容]
*/ */
public void setCfg(String cfg){ public void setCfg(String cfg) {
this.cfg = cfg ; this.cfg = cfg ;
this.modify("cfg",cfg); this.modify("cfg",cfg);
} }
...@@ -143,7 +143,7 @@ public class DstConfig extends EntityMP implements Serializable { ...@@ -143,7 +143,7 @@ public class DstConfig extends EntityMP implements Serializable {
/** /**
* 获取 [标识] * 获取 [标识]
*/ */
public String getCfgId(){ public String getCfgId() {
if(ObjectUtils.isEmpty(cfgId)){ if(ObjectUtils.isEmpty(cfgId)){
cfgId=(String)getDefaultKey(true); cfgId=(String)getDefaultKey(true);
} }
......
...@@ -46,7 +46,7 @@ public class DstDataSource extends EntityMP implements Serializable { ...@@ -46,7 +46,7 @@ public class DstDataSource extends EntityMP implements Serializable {
/** /**
* 标识 * 标识
*/ */
@DEField(defaultValue = "dsname" , defaultValueType = DEFieldDefaultValueType.PARAM , isKeyField=true) @DEField(defaultValue = "dsname" , defaultValueType = DEFieldDefaultValueType.PARAM , isKeyField = true)
@TableId(value= "dsid",type=IdType.ASSIGN_UUID) @TableId(value= "dsid",type=IdType.ASSIGN_UUID)
@JSONField(name = "ds_id") @JSONField(name = "ds_id")
@JsonProperty("ds_id") @JsonProperty("ds_id")
...@@ -78,7 +78,7 @@ public class DstDataSource extends EntityMP implements Serializable { ...@@ -78,7 +78,7 @@ public class DstDataSource extends EntityMP implements Serializable {
/** /**
* 设置 [数据源名称] * 设置 [数据源名称]
*/ */
public void setDsName(String dsName){ public void setDsName(String dsName) {
this.dsName = dsName ; this.dsName = dsName ;
this.modify("dsname",dsName); this.modify("dsname",dsName);
} }
...@@ -86,7 +86,7 @@ public class DstDataSource extends EntityMP implements Serializable { ...@@ -86,7 +86,7 @@ public class DstDataSource extends EntityMP implements Serializable {
/** /**
* 设置 [类型] * 设置 [类型]
*/ */
public void setDsType(String dsType){ public void setDsType(String dsType) {
this.dsType = dsType ; this.dsType = dsType ;
this.modify("dstype",dsType); this.modify("dstype",dsType);
} }
...@@ -94,7 +94,7 @@ public class DstDataSource extends EntityMP implements Serializable { ...@@ -94,7 +94,7 @@ public class DstDataSource extends EntityMP implements Serializable {
/** /**
* 设置 [配置] * 设置 [配置]
*/ */
public void setDsCfg(String dsCfg){ public void setDsCfg(String dsCfg) {
this.dsCfg = dsCfg ; this.dsCfg = dsCfg ;
this.modify("dscfg",dsCfg); this.modify("dscfg",dsCfg);
} }
......
...@@ -46,7 +46,7 @@ public class DstRouter extends EntityMP implements Serializable { ...@@ -46,7 +46,7 @@ public class DstRouter extends EntityMP implements Serializable {
/** /**
* 路径标识 * 路径标识
*/ */
@DEField(name = "routerid" , isKeyField=true) @DEField(name = "routerid" , isKeyField = true)
@TableId(value= "routerid",type=IdType.ASSIGN_UUID) @TableId(value= "routerid",type=IdType.ASSIGN_UUID)
@JSONField(name = "id") @JSONField(name = "id")
@JsonProperty("id") @JsonProperty("id")
...@@ -132,7 +132,7 @@ public class DstRouter extends EntityMP implements Serializable { ...@@ -132,7 +132,7 @@ public class DstRouter extends EntityMP implements Serializable {
/** /**
* 设置 [路径名称] * 设置 [路径名称]
*/ */
public void setName(String name){ public void setName(String name) {
this.name = name ; this.name = name ;
this.modify("routername",name); this.modify("routername",name);
} }
...@@ -140,7 +140,7 @@ public class DstRouter extends EntityMP implements Serializable { ...@@ -140,7 +140,7 @@ public class DstRouter extends EntityMP implements Serializable {
/** /**
* 设置 [系统标识] * 设置 [系统标识]
*/ */
public void setSystemId(String systemId){ public void setSystemId(String systemId) {
this.systemId = systemId ; this.systemId = systemId ;
this.modify("systemid",systemId); this.modify("systemid",systemId);
} }
...@@ -148,7 +148,7 @@ public class DstRouter extends EntityMP implements Serializable { ...@@ -148,7 +148,7 @@ public class DstRouter extends EntityMP implements Serializable {
/** /**
* 设置 [应用标识] * 设置 [应用标识]
*/ */
public void setAppId(String appId){ public void setAppId(String appId) {
this.appId = appId ; this.appId = appId ;
this.modify("appid",appId); this.modify("appid",appId);
} }
...@@ -156,7 +156,7 @@ public class DstRouter extends EntityMP implements Serializable { ...@@ -156,7 +156,7 @@ public class DstRouter extends EntityMP implements Serializable {
/** /**
* 设置 [路径] * 设置 [路径]
*/ */
public void setPath(String path){ public void setPath(String path) {
this.path = path ; this.path = path ;
this.modify("routerpath",path); this.modify("routerpath",path);
} }
...@@ -164,7 +164,7 @@ public class DstRouter extends EntityMP implements Serializable { ...@@ -164,7 +164,7 @@ public class DstRouter extends EntityMP implements Serializable {
/** /**
* 设置 [父路径标识] * 设置 [父路径标识]
*/ */
public void setParentid(String parentid){ public void setParentid(String parentid) {
this.parentid = parentid ; this.parentid = parentid ;
this.modify("parentid",parentid); this.modify("parentid",parentid);
} }
...@@ -172,7 +172,7 @@ public class DstRouter extends EntityMP implements Serializable { ...@@ -172,7 +172,7 @@ public class DstRouter extends EntityMP implements Serializable {
/** /**
* 设置 [meta] * 设置 [meta]
*/ */
public void setMeta(String meta){ public void setMeta(String meta) {
this.meta = meta ; this.meta = meta ;
this.modify("meta",meta); this.modify("meta",meta);
} }
...@@ -180,7 +180,7 @@ public class DstRouter extends EntityMP implements Serializable { ...@@ -180,7 +180,7 @@ public class DstRouter extends EntityMP implements Serializable {
/** /**
* 设置 [组件] * 设置 [组件]
*/ */
public void setComponent(String component){ public void setComponent(String component) {
this.component = component ; this.component = component ;
this.modify("component",component); this.modify("component",component);
} }
...@@ -189,7 +189,7 @@ public class DstRouter extends EntityMP implements Serializable { ...@@ -189,7 +189,7 @@ public class DstRouter extends EntityMP implements Serializable {
/** /**
* 获取 [路径标识] * 获取 [路径标识]
*/ */
public String getId(){ public String getId() {
if(ObjectUtils.isEmpty(id)){ if(ObjectUtils.isEmpty(id)){
id=(String)getDefaultKey(true); id=(String)getDefaultKey(true);
} }
......
...@@ -46,7 +46,7 @@ public class DstView extends EntityMP implements Serializable { ...@@ -46,7 +46,7 @@ public class DstView extends EntityMP implements Serializable {
/** /**
* 标识 * 标识
*/ */
@DEField(name = "viewid" , isKeyField=true) @DEField(name = "viewid" , isKeyField = true)
@TableId(value= "viewid",type=IdType.ASSIGN_UUID) @TableId(value= "viewid",type=IdType.ASSIGN_UUID)
@JSONField(name = "id") @JSONField(name = "id")
@JsonProperty("id") @JsonProperty("id")
...@@ -133,7 +133,7 @@ public class DstView extends EntityMP implements Serializable { ...@@ -133,7 +133,7 @@ public class DstView extends EntityMP implements Serializable {
/** /**
* 设置 [名称] * 设置 [名称]
*/ */
public void setName(String name){ public void setName(String name) {
this.name = name ; this.name = name ;
this.modify("viewname",name); this.modify("viewname",name);
} }
...@@ -141,7 +141,7 @@ public class DstView extends EntityMP implements Serializable { ...@@ -141,7 +141,7 @@ public class DstView extends EntityMP implements Serializable {
/** /**
* 设置 [视图路径] * 设置 [视图路径]
*/ */
public void setPath(String path){ public void setPath(String path) {
this.path = path ; this.path = path ;
this.modify("viewpath",path); this.modify("viewpath",path);
} }
...@@ -149,7 +149,7 @@ public class DstView extends EntityMP implements Serializable { ...@@ -149,7 +149,7 @@ public class DstView extends EntityMP implements Serializable {
/** /**
* 设置 [系统标识] * 设置 [系统标识]
*/ */
public void setSystemId(String systemId){ public void setSystemId(String systemId) {
this.systemId = systemId ; this.systemId = systemId ;
this.modify("systemid",systemId); this.modify("systemid",systemId);
} }
...@@ -157,7 +157,7 @@ public class DstView extends EntityMP implements Serializable { ...@@ -157,7 +157,7 @@ public class DstView extends EntityMP implements Serializable {
/** /**
* 设置 [应用标识] * 设置 [应用标识]
*/ */
public void setAppId(String appId){ public void setAppId(String appId) {
this.appId = appId ; this.appId = appId ;
this.modify("appid",appId); this.modify("appid",appId);
} }
...@@ -165,7 +165,7 @@ public class DstView extends EntityMP implements Serializable { ...@@ -165,7 +165,7 @@ public class DstView extends EntityMP implements Serializable {
/** /**
* 设置 [实体标识] * 设置 [实体标识]
*/ */
public void setEntityId(String entityId){ public void setEntityId(String entityId) {
this.entityId = entityId ; this.entityId = entityId ;
this.modify("entityid",entityId); this.modify("entityid",entityId);
} }
...@@ -173,7 +173,7 @@ public class DstView extends EntityMP implements Serializable { ...@@ -173,7 +173,7 @@ public class DstView extends EntityMP implements Serializable {
/** /**
* 设置 [配置] * 设置 [配置]
*/ */
public void setConfig(String config){ public void setConfig(String config) {
this.config = config ; this.config = config ;
this.modify("cfg",config); this.modify("cfg",config);
} }
...@@ -182,7 +182,7 @@ public class DstView extends EntityMP implements Serializable { ...@@ -182,7 +182,7 @@ public class DstView extends EntityMP implements Serializable {
/** /**
* 获取 [标识] * 获取 [标识]
*/ */
public String getId(){ public String getId() {
if(ObjectUtils.isEmpty(id)){ if(ObjectUtils.isEmpty(id)){
id=(String)getDefaultKey(true); id=(String)getDefaultKey(true);
} }
......
...@@ -46,7 +46,7 @@ public class MetaDataSet extends EntityMP implements Serializable { ...@@ -46,7 +46,7 @@ public class MetaDataSet extends EntityMP implements Serializable {
/** /**
* 标识 * 标识
*/ */
@DEField(isKeyField=true) @DEField(isKeyField = true)
@TableId(value= "datasetid",type=IdType.ASSIGN_UUID) @TableId(value= "datasetid",type=IdType.ASSIGN_UUID)
@JSONField(name = "dataset_id") @JSONField(name = "dataset_id")
@JsonProperty("dataset_id") @JsonProperty("dataset_id")
...@@ -107,7 +107,7 @@ public class MetaDataSet extends EntityMP implements Serializable { ...@@ -107,7 +107,7 @@ public class MetaDataSet extends EntityMP implements Serializable {
/** /**
* 设置 [名称] * 设置 [名称]
*/ */
public void setDatasetName(String datasetName){ public void setDatasetName(String datasetName) {
this.datasetName = datasetName ; this.datasetName = datasetName ;
this.modify("datasetname",datasetName); this.modify("datasetname",datasetName);
} }
...@@ -115,7 +115,7 @@ public class MetaDataSet extends EntityMP implements Serializable { ...@@ -115,7 +115,7 @@ public class MetaDataSet extends EntityMP implements Serializable {
/** /**
* 设置 [实体标识] * 设置 [实体标识]
*/ */
public void setEntityId(String entityId){ public void setEntityId(String entityId) {
this.entityId = entityId ; this.entityId = entityId ;
this.modify("entityid",entityId); this.modify("entityid",entityId);
} }
...@@ -123,7 +123,7 @@ public class MetaDataSet extends EntityMP implements Serializable { ...@@ -123,7 +123,7 @@ public class MetaDataSet extends EntityMP implements Serializable {
/** /**
* 设置 [实体] * 设置 [实体]
*/ */
public void setEntityName(String entityName){ public void setEntityName(String entityName) {
this.entityName = entityName ; this.entityName = entityName ;
this.modify("entityname",entityName); this.modify("entityname",entityName);
} }
...@@ -131,7 +131,7 @@ public class MetaDataSet extends EntityMP implements Serializable { ...@@ -131,7 +131,7 @@ public class MetaDataSet extends EntityMP implements Serializable {
/** /**
* 设置 [代码名称] * 设置 [代码名称]
*/ */
public void setCodeName(String codeName){ public void setCodeName(String codeName) {
this.codeName = codeName ; this.codeName = codeName ;
this.modify("codename",codeName); this.modify("codename",codeName);
} }
...@@ -139,7 +139,7 @@ public class MetaDataSet extends EntityMP implements Serializable { ...@@ -139,7 +139,7 @@ public class MetaDataSet extends EntityMP implements Serializable {
/** /**
* 设置 [代码] * 设置 [代码]
*/ */
public void setDsCode(String dsCode){ public void setDsCode(String dsCode) {
this.dsCode = dsCode ; this.dsCode = dsCode ;
this.modify("dscode",dsCode); this.modify("dscode",dsCode);
} }
...@@ -147,7 +147,7 @@ public class MetaDataSet extends EntityMP implements Serializable { ...@@ -147,7 +147,7 @@ public class MetaDataSet extends EntityMP implements Serializable {
/** /**
* 设置 [模型] * 设置 [模型]
*/ */
public void setDsModel(String dsModel){ public void setDsModel(String dsModel) {
this.dsModel = dsModel ; this.dsModel = dsModel ;
this.modify("dsmodel",dsModel); this.modify("dsmodel",dsModel);
} }
...@@ -156,7 +156,7 @@ public class MetaDataSet extends EntityMP implements Serializable { ...@@ -156,7 +156,7 @@ public class MetaDataSet extends EntityMP implements Serializable {
/** /**
* 获取 [标识] * 获取 [标识]
*/ */
public String getDatasetId(){ public String getDatasetId() {
if(ObjectUtils.isEmpty(datasetId)){ if(ObjectUtils.isEmpty(datasetId)){
datasetId=(String)getDefaultKey(true); datasetId=(String)getDefaultKey(true);
} }
......
...@@ -46,7 +46,7 @@ public class MetaField extends EntityMP implements Serializable { ...@@ -46,7 +46,7 @@ public class MetaField extends EntityMP implements Serializable {
/** /**
* 属性标识 * 属性标识
*/ */
@DEField(isKeyField=true) @DEField(isKeyField = true)
@TableId(value= "fieldid",type=IdType.ASSIGN_UUID) @TableId(value= "fieldid",type=IdType.ASSIGN_UUID)
@JSONField(name = "field_id") @JSONField(name = "field_id")
@JsonProperty("field_id") @JsonProperty("field_id")
...@@ -292,7 +292,7 @@ public class MetaField extends EntityMP implements Serializable { ...@@ -292,7 +292,7 @@ public class MetaField extends EntityMP implements Serializable {
/** /**
* 设置 [属性名称] * 设置 [属性名称]
*/ */
public void setFieldName(String fieldName){ public void setFieldName(String fieldName) {
this.fieldName = fieldName ; this.fieldName = fieldName ;
this.modify("fieldname",fieldName); this.modify("fieldname",fieldName);
} }
...@@ -300,7 +300,7 @@ public class MetaField extends EntityMP implements Serializable { ...@@ -300,7 +300,7 @@ public class MetaField extends EntityMP implements Serializable {
/** /**
* 设置 [代码名称] * 设置 [代码名称]
*/ */
public void setCodeName(String codeName){ public void setCodeName(String codeName) {
this.codeName = codeName ; this.codeName = codeName ;
this.modify("codename",codeName); this.modify("codename",codeName);
} }
...@@ -308,7 +308,7 @@ public class MetaField extends EntityMP implements Serializable { ...@@ -308,7 +308,7 @@ public class MetaField extends EntityMP implements Serializable {
/** /**
* 设置 [实体标识] * 设置 [实体标识]
*/ */
public void setEntityId(String entityId){ public void setEntityId(String entityId) {
this.entityId = entityId ; this.entityId = entityId ;
this.modify("entityid",entityId); this.modify("entityid",entityId);
} }
...@@ -316,7 +316,7 @@ public class MetaField extends EntityMP implements Serializable { ...@@ -316,7 +316,7 @@ public class MetaField extends EntityMP implements Serializable {
/** /**
* 设置 [实体名称] * 设置 [实体名称]
*/ */
public void setEntityName(String entityName){ public void setEntityName(String entityName) {
this.entityName = entityName ; this.entityName = entityName ;
this.modify("entityname",entityName); this.modify("entityname",entityName);
} }
...@@ -324,7 +324,7 @@ public class MetaField extends EntityMP implements Serializable { ...@@ -324,7 +324,7 @@ public class MetaField extends EntityMP implements Serializable {
/** /**
* 设置 [属性逻辑名] * 设置 [属性逻辑名]
*/ */
public void setFieldLogicName(String fieldLogicName){ public void setFieldLogicName(String fieldLogicName) {
this.fieldLogicName = fieldLogicName ; this.fieldLogicName = fieldLogicName ;
this.modify("fieldlogicname",fieldLogicName); this.modify("fieldlogicname",fieldLogicName);
} }
...@@ -332,7 +332,7 @@ public class MetaField extends EntityMP implements Serializable { ...@@ -332,7 +332,7 @@ public class MetaField extends EntityMP implements Serializable {
/** /**
* 设置 [引用属性标识] * 设置 [引用属性标识]
*/ */
public void setRefFieldId(String refFieldId){ public void setRefFieldId(String refFieldId) {
this.refFieldId = refFieldId ; this.refFieldId = refFieldId ;
this.modify("reffieldid",refFieldId); this.modify("reffieldid",refFieldId);
} }
...@@ -340,7 +340,7 @@ public class MetaField extends EntityMP implements Serializable { ...@@ -340,7 +340,7 @@ public class MetaField extends EntityMP implements Serializable {
/** /**
* 设置 [引用属性名称] * 设置 [引用属性名称]
*/ */
public void setRefFieldName(String refFieldName){ public void setRefFieldName(String refFieldName) {
this.refFieldName = refFieldName ; this.refFieldName = refFieldName ;
this.modify("reffieldname",refFieldName); this.modify("reffieldname",refFieldName);
} }
...@@ -348,7 +348,7 @@ public class MetaField extends EntityMP implements Serializable { ...@@ -348,7 +348,7 @@ public class MetaField extends EntityMP implements Serializable {
/** /**
* 设置 [引用关系标识] * 设置 [引用关系标识]
*/ */
public void setRelationId(String relationId){ public void setRelationId(String relationId) {
this.relationId = relationId ; this.relationId = relationId ;
this.modify("relationid",relationId); this.modify("relationid",relationId);
} }
...@@ -356,7 +356,7 @@ public class MetaField extends EntityMP implements Serializable { ...@@ -356,7 +356,7 @@ public class MetaField extends EntityMP implements Serializable {
/** /**
* 设置 [引用关系] * 设置 [引用关系]
*/ */
public void setRelationName(String relationName){ public void setRelationName(String relationName) {
this.relationName = relationName ; this.relationName = relationName ;
this.modify("relationname",relationName); this.modify("relationname",relationName);
} }
...@@ -364,7 +364,7 @@ public class MetaField extends EntityMP implements Serializable { ...@@ -364,7 +364,7 @@ public class MetaField extends EntityMP implements Serializable {
/** /**
* 设置 [主键] * 设置 [主键]
*/ */
public void setKeyField(Integer keyField){ public void setKeyField(Integer keyField) {
this.keyField = keyField ; this.keyField = keyField ;
this.modify("keyfield",keyField); this.modify("keyfield",keyField);
} }
...@@ -372,7 +372,7 @@ public class MetaField extends EntityMP implements Serializable { ...@@ -372,7 +372,7 @@ public class MetaField extends EntityMP implements Serializable {
/** /**
* 设置 [主信息] * 设置 [主信息]
*/ */
public void setMajorField(Integer majorField){ public void setMajorField(Integer majorField) {
this.majorField = majorField ; this.majorField = majorField ;
this.modify("majorfield",majorField); this.modify("majorfield",majorField);
} }
...@@ -380,7 +380,7 @@ public class MetaField extends EntityMP implements Serializable { ...@@ -380,7 +380,7 @@ public class MetaField extends EntityMP implements Serializable {
/** /**
* 设置 [联合主键] * 设置 [联合主键]
*/ */
public void setUnionKey(String unionKey){ public void setUnionKey(String unionKey) {
this.unionKey = unionKey ; this.unionKey = unionKey ;
this.modify("unionkey",unionKey); this.modify("unionkey",unionKey);
} }
...@@ -388,7 +388,7 @@ public class MetaField extends EntityMP implements Serializable { ...@@ -388,7 +388,7 @@ public class MetaField extends EntityMP implements Serializable {
/** /**
* 设置 [属性类型] * 设置 [属性类型]
*/ */
public void setFieldType(String fieldType){ public void setFieldType(String fieldType) {
this.fieldType = fieldType ; this.fieldType = fieldType ;
this.modify("fieldtype",fieldType); this.modify("fieldtype",fieldType);
} }
...@@ -396,7 +396,7 @@ public class MetaField extends EntityMP implements Serializable { ...@@ -396,7 +396,7 @@ public class MetaField extends EntityMP implements Serializable {
/** /**
* 设置 [预定义类型] * 设置 [预定义类型]
*/ */
public void setPredefined(String predefined){ public void setPredefined(String predefined) {
this.predefined = predefined ; this.predefined = predefined ;
this.modify("predefined",predefined); this.modify("predefined",predefined);
} }
...@@ -404,7 +404,7 @@ public class MetaField extends EntityMP implements Serializable { ...@@ -404,7 +404,7 @@ public class MetaField extends EntityMP implements Serializable {
/** /**
* 设置 [数据字典] * 设置 [数据字典]
*/ */
public void setDict(String dict){ public void setDict(String dict) {
this.dict = dict ; this.dict = dict ;
this.modify("dict",dict); this.modify("dict",dict);
} }
...@@ -412,7 +412,7 @@ public class MetaField extends EntityMP implements Serializable { ...@@ -412,7 +412,7 @@ public class MetaField extends EntityMP implements Serializable {
/** /**
* 设置 [允许为空] * 设置 [允许为空]
*/ */
public void setNullable(Integer nullable){ public void setNullable(Integer nullable) {
this.nullable = nullable ; this.nullable = nullable ;
this.modify("nullable",nullable); this.modify("nullable",nullable);
} }
...@@ -420,7 +420,7 @@ public class MetaField extends EntityMP implements Serializable { ...@@ -420,7 +420,7 @@ public class MetaField extends EntityMP implements Serializable {
/** /**
* 设置 [物理属性] * 设置 [物理属性]
*/ */
public void setPhysicalField(Integer physicalField){ public void setPhysicalField(Integer physicalField) {
this.physicalField = physicalField ; this.physicalField = physicalField ;
this.modify("physicalfield",physicalField); this.modify("physicalfield",physicalField);
} }
...@@ -428,7 +428,7 @@ public class MetaField extends EntityMP implements Serializable { ...@@ -428,7 +428,7 @@ public class MetaField extends EntityMP implements Serializable {
/** /**
* 设置 [数据类型] * 设置 [数据类型]
*/ */
public void setDataType(String dataType){ public void setDataType(String dataType) {
this.dataType = dataType ; this.dataType = dataType ;
this.modify("datatype",dataType); this.modify("datatype",dataType);
} }
...@@ -436,7 +436,7 @@ public class MetaField extends EntityMP implements Serializable { ...@@ -436,7 +436,7 @@ public class MetaField extends EntityMP implements Serializable {
/** /**
* 设置 [长度] * 设置 [长度]
*/ */
public void setDataLength(Integer dataLength){ public void setDataLength(Integer dataLength) {
this.dataLength = dataLength ; this.dataLength = dataLength ;
this.modify("datalength",dataLength); this.modify("datalength",dataLength);
} }
...@@ -444,7 +444,7 @@ public class MetaField extends EntityMP implements Serializable { ...@@ -444,7 +444,7 @@ public class MetaField extends EntityMP implements Serializable {
/** /**
* 设置 [精度] * 设置 [精度]
*/ */
public void setDataPreci(Integer dataPreci){ public void setDataPreci(Integer dataPreci) {
this.dataPreci = dataPreci ; this.dataPreci = dataPreci ;
this.modify("datapreci",dataPreci); this.modify("datapreci",dataPreci);
} }
...@@ -452,7 +452,7 @@ public class MetaField extends EntityMP implements Serializable { ...@@ -452,7 +452,7 @@ public class MetaField extends EntityMP implements Serializable {
/** /**
* 设置 [逻辑表达式] * 设置 [逻辑表达式]
*/ */
public void setExpression(String expression){ public void setExpression(String expression) {
this.expression = expression ; this.expression = expression ;
this.modify("expression",expression); this.modify("expression",expression);
} }
...@@ -460,7 +460,7 @@ public class MetaField extends EntityMP implements Serializable { ...@@ -460,7 +460,7 @@ public class MetaField extends EntityMP implements Serializable {
/** /**
* 设置 [扩展属性] * 设置 [扩展属性]
*/ */
public void setExtensionField(Integer extensionField){ public void setExtensionField(Integer extensionField) {
this.extensionField = extensionField ; this.extensionField = extensionField ;
this.modify("extensionfield",extensionField); this.modify("extensionfield",extensionField);
} }
...@@ -468,7 +468,7 @@ public class MetaField extends EntityMP implements Serializable { ...@@ -468,7 +468,7 @@ public class MetaField extends EntityMP implements Serializable {
/** /**
* 设置 [审计] * 设置 [审计]
*/ */
public void setIsEnableAudit(Integer isEnableAudit){ public void setIsEnableAudit(Integer isEnableAudit) {
this.isEnableAudit = isEnableAudit ; this.isEnableAudit = isEnableAudit ;
this.modify("isenableaudit",isEnableAudit); this.modify("isenableaudit",isEnableAudit);
} }
...@@ -476,7 +476,7 @@ public class MetaField extends EntityMP implements Serializable { ...@@ -476,7 +476,7 @@ public class MetaField extends EntityMP implements Serializable {
/** /**
* 设置 [排序] * 设置 [排序]
*/ */
public void setShowOrder(Integer showOrder){ public void setShowOrder(Integer showOrder) {
this.showOrder = showOrder ; this.showOrder = showOrder ;
this.modify("showorder",showOrder); this.modify("showorder",showOrder);
} }
...@@ -485,7 +485,7 @@ public class MetaField extends EntityMP implements Serializable { ...@@ -485,7 +485,7 @@ public class MetaField extends EntityMP implements Serializable {
/** /**
* 获取 [属性标识] * 获取 [属性标识]
*/ */
public String getFieldId(){ public String getFieldId() {
if(ObjectUtils.isEmpty(fieldId)){ if(ObjectUtils.isEmpty(fieldId)){
fieldId=(String)getDefaultKey(true); fieldId=(String)getDefaultKey(true);
} }
......
...@@ -46,7 +46,7 @@ public class MetaModel extends EntityMP implements Serializable { ...@@ -46,7 +46,7 @@ public class MetaModel extends EntityMP implements Serializable {
/** /**
* 标识 * 标识
*/ */
@DEField(name = "modelid" , isKeyField=true) @DEField(name = "modelid" , isKeyField = true)
@TableId(value= "modelid",type=IdType.ASSIGN_UUID) @TableId(value= "modelid",type=IdType.ASSIGN_UUID)
@JSONField(name = "id") @JSONField(name = "id")
@JsonProperty("id") @JsonProperty("id")
...@@ -80,7 +80,7 @@ public class MetaModel extends EntityMP implements Serializable { ...@@ -80,7 +80,7 @@ public class MetaModel extends EntityMP implements Serializable {
/** /**
* 设置 [名称] * 设置 [名称]
*/ */
public void setName(String name){ public void setName(String name) {
this.name = name ; this.name = name ;
this.modify("modelname",name); this.modify("modelname",name);
} }
...@@ -88,7 +88,7 @@ public class MetaModel extends EntityMP implements Serializable { ...@@ -88,7 +88,7 @@ public class MetaModel extends EntityMP implements Serializable {
/** /**
* 设置 [代码名称] * 设置 [代码名称]
*/ */
public void setCodeName(String codeName){ public void setCodeName(String codeName) {
this.codeName = codeName ; this.codeName = codeName ;
this.modify("codename",codeName); this.modify("codename",codeName);
} }
...@@ -96,7 +96,7 @@ public class MetaModel extends EntityMP implements Serializable { ...@@ -96,7 +96,7 @@ public class MetaModel extends EntityMP implements Serializable {
/** /**
* 设置 [配置] * 设置 [配置]
*/ */
public void setConfig(String config){ public void setConfig(String config) {
this.config = config ; this.config = config ;
this.modify("modelcfg",config); this.modify("modelcfg",config);
} }
......
...@@ -46,7 +46,7 @@ public class MetaRelationship extends EntityMP implements Serializable { ...@@ -46,7 +46,7 @@ public class MetaRelationship extends EntityMP implements Serializable {
/** /**
* 关系标识 * 关系标识
*/ */
@DEField(name = "relationid" , isKeyField=true) @DEField(name = "relationid" , isKeyField = true)
@TableId(value= "relationid",type=IdType.ASSIGN_UUID) @TableId(value= "relationid",type=IdType.ASSIGN_UUID)
@JSONField(name = "id") @JSONField(name = "id")
@JsonProperty("id") @JsonProperty("id")
...@@ -145,7 +145,7 @@ public class MetaRelationship extends EntityMP implements Serializable { ...@@ -145,7 +145,7 @@ public class MetaRelationship extends EntityMP implements Serializable {
/** /**
* 设置 [lookup] * 设置 [lookup]
*/ */
public void setLookup(List<cn.ibizlab.core.lite.domain.DstLookup> lookup){ public void setLookup(List<cn.ibizlab.core.lite.domain.DstLookup> lookup) {
this.lookup = lookup ; this.lookup = lookup ;
this.modify("lookup",(lookup!=null)?lookup:(new ArrayList())); this.modify("lookup",(lookup!=null)?lookup:(new ArrayList()));
} }
...@@ -153,7 +153,7 @@ public class MetaRelationship extends EntityMP implements Serializable { ...@@ -153,7 +153,7 @@ public class MetaRelationship extends EntityMP implements Serializable {
/** /**
* 设置 [关系名称] * 设置 [关系名称]
*/ */
public void setName(String name){ public void setName(String name) {
this.name = name ; this.name = name ;
this.modify("relationname",name); this.modify("relationname",name);
} }
...@@ -161,7 +161,7 @@ public class MetaRelationship extends EntityMP implements Serializable { ...@@ -161,7 +161,7 @@ public class MetaRelationship extends EntityMP implements Serializable {
/** /**
* 设置 [类型] * 设置 [类型]
*/ */
public void setRelationType(String relationType){ public void setRelationType(String relationType) {
this.relationType = relationType ; this.relationType = relationType ;
this.modify("reltype",relationType); this.modify("reltype",relationType);
} }
...@@ -169,7 +169,7 @@ public class MetaRelationship extends EntityMP implements Serializable { ...@@ -169,7 +169,7 @@ public class MetaRelationship extends EntityMP implements Serializable {
/** /**
* 设置 [代码名称] * 设置 [代码名称]
*/ */
public void setCodeName(String codeName){ public void setCodeName(String codeName) {
this.codeName = codeName ; this.codeName = codeName ;
this.modify("codename",codeName); this.modify("codename",codeName);
} }
...@@ -177,7 +177,7 @@ public class MetaRelationship extends EntityMP implements Serializable { ...@@ -177,7 +177,7 @@ public class MetaRelationship extends EntityMP implements Serializable {
/** /**
* 设置 [实体标识] * 设置 [实体标识]
*/ */
public void setEntityId(String entityId){ public void setEntityId(String entityId) {
this.entityId = entityId ; this.entityId = entityId ;
this.modify("entityid",entityId); this.modify("entityid",entityId);
} }
...@@ -185,7 +185,7 @@ public class MetaRelationship extends EntityMP implements Serializable { ...@@ -185,7 +185,7 @@ public class MetaRelationship extends EntityMP implements Serializable {
/** /**
* 设置 [实体名称] * 设置 [实体名称]
*/ */
public void setEntityName(String entityName){ public void setEntityName(String entityName) {
this.entityName = entityName ; this.entityName = entityName ;
this.modify("entityname",entityName); this.modify("entityname",entityName);
} }
...@@ -193,7 +193,7 @@ public class MetaRelationship extends EntityMP implements Serializable { ...@@ -193,7 +193,7 @@ public class MetaRelationship extends EntityMP implements Serializable {
/** /**
* 设置 [引用实体标识] * 设置 [引用实体标识]
*/ */
public void setRefEntityId(String refEntityId){ public void setRefEntityId(String refEntityId) {
this.refEntityId = refEntityId ; this.refEntityId = refEntityId ;
this.modify("refentityid",refEntityId); this.modify("refentityid",refEntityId);
} }
...@@ -201,7 +201,7 @@ public class MetaRelationship extends EntityMP implements Serializable { ...@@ -201,7 +201,7 @@ public class MetaRelationship extends EntityMP implements Serializable {
/** /**
* 设置 [引用实体名称] * 设置 [引用实体名称]
*/ */
public void setRefEntityName(String refEntityName){ public void setRefEntityName(String refEntityName) {
this.refEntityName = refEntityName ; this.refEntityName = refEntityName ;
this.modify("refentityname",refEntityName); this.modify("refentityname",refEntityName);
} }
...@@ -209,7 +209,7 @@ public class MetaRelationship extends EntityMP implements Serializable { ...@@ -209,7 +209,7 @@ public class MetaRelationship extends EntityMP implements Serializable {
/** /**
* 设置 [嵌套代码名称] * 设置 [嵌套代码名称]
*/ */
public void setNestedName(String nestedName){ public void setNestedName(String nestedName) {
this.nestedName = nestedName ; this.nestedName = nestedName ;
this.modify("nestedname",nestedName); this.modify("nestedname",nestedName);
} }
...@@ -218,7 +218,7 @@ public class MetaRelationship extends EntityMP implements Serializable { ...@@ -218,7 +218,7 @@ public class MetaRelationship extends EntityMP implements Serializable {
/** /**
* 获取 [关系标识] * 获取 [关系标识]
*/ */
public String getId(){ public String getId() {
if(ObjectUtils.isEmpty(id)){ if(ObjectUtils.isEmpty(id)){
id=(String)getDefaultKey(true); id=(String)getDefaultKey(true);
} }
......
...@@ -87,6 +87,7 @@ public class DstComponentSearchContext extends QueryWrapperContext<DstComponent> ...@@ -87,6 +87,7 @@ public class DstComponentSearchContext extends QueryWrapperContext<DstComponent>
/** /**
* 启用快速搜索 * 启用快速搜索
*/ */
@Override
public void setQuery(String query) public void setQuery(String query)
{ {
this.query=query; this.query=query;
......
...@@ -66,6 +66,7 @@ public class DstConfigSearchContext extends QueryWrapperContext<DstConfig> { ...@@ -66,6 +66,7 @@ public class DstConfigSearchContext extends QueryWrapperContext<DstConfig> {
/** /**
* 启用快速搜索 * 启用快速搜索
*/ */
@Override
public void setQuery(String query) public void setQuery(String query)
{ {
this.query=query; this.query=query;
......
...@@ -45,6 +45,7 @@ public class DstDataSourceSearchContext extends QueryWrapperContext<DstDataSourc ...@@ -45,6 +45,7 @@ public class DstDataSourceSearchContext extends QueryWrapperContext<DstDataSourc
/** /**
* 启用快速搜索 * 启用快速搜索
*/ */
@Override
public void setQuery(String query) public void setQuery(String query)
{ {
this.query=query; this.query=query;
......
...@@ -73,6 +73,7 @@ public class DstRouterSearchContext extends QueryWrapperContext<DstRouter> { ...@@ -73,6 +73,7 @@ public class DstRouterSearchContext extends QueryWrapperContext<DstRouter> {
/** /**
* 启用快速搜索 * 启用快速搜索
*/ */
@Override
public void setQuery(String query) public void setQuery(String query)
{ {
this.query=query; this.query=query;
......
...@@ -38,6 +38,7 @@ public class DstSystemSearchContext extends QueryWrapperContext<DstSystem> { ...@@ -38,6 +38,7 @@ public class DstSystemSearchContext extends QueryWrapperContext<DstSystem> {
/** /**
* 启用快速搜索 * 启用快速搜索
*/ */
@Override
public void setQuery(String query) public void setQuery(String query)
{ {
this.query=query; this.query=query;
......
...@@ -80,6 +80,7 @@ public class DstViewSearchContext extends QueryWrapperContext<DstView> { ...@@ -80,6 +80,7 @@ public class DstViewSearchContext extends QueryWrapperContext<DstView> {
/** /**
* 启用快速搜索 * 启用快速搜索
*/ */
@Override
public void setQuery(String query) public void setQuery(String query)
{ {
this.query=query; this.query=query;
......
...@@ -66,6 +66,7 @@ public class MetaDataSetSearchContext extends QueryWrapperContext<MetaDataSet> { ...@@ -66,6 +66,7 @@ public class MetaDataSetSearchContext extends QueryWrapperContext<MetaDataSet> {
/** /**
* 启用快速搜索 * 启用快速搜索
*/ */
@Override
public void setQuery(String query) public void setQuery(String query)
{ {
this.query=query; this.query=query;
......
...@@ -101,6 +101,7 @@ public class MetaEntitySearchContext extends QueryWrapperContext<MetaEntity> { ...@@ -101,6 +101,7 @@ public class MetaEntitySearchContext extends QueryWrapperContext<MetaEntity> {
/** /**
* 启用快速搜索 * 启用快速搜索
*/ */
@Override
public void setQuery(String query) public void setQuery(String query)
{ {
this.query=query; this.query=query;
......
...@@ -157,6 +157,7 @@ public class MetaFieldSearchContext extends QueryWrapperContext<MetaField> { ...@@ -157,6 +157,7 @@ public class MetaFieldSearchContext extends QueryWrapperContext<MetaField> {
/** /**
* 启用快速搜索 * 启用快速搜索
*/ */
@Override
public void setQuery(String query) public void setQuery(String query)
{ {
this.query=query; this.query=query;
......
...@@ -59,6 +59,7 @@ public class MetaModelSearchContext extends QueryWrapperContext<MetaModel> { ...@@ -59,6 +59,7 @@ public class MetaModelSearchContext extends QueryWrapperContext<MetaModel> {
/** /**
* 启用快速搜索 * 启用快速搜索
*/ */
@Override
public void setQuery(String query) public void setQuery(String query)
{ {
this.query=query; this.query=query;
......
...@@ -94,6 +94,7 @@ public class MetaRelationshipSearchContext extends QueryWrapperContext<MetaRelat ...@@ -94,6 +94,7 @@ public class MetaRelationshipSearchContext extends QueryWrapperContext<MetaRelat
/** /**
* 启用快速搜索 * 启用快速搜索
*/ */
@Override
public void setQuery(String query) public void setQuery(String query)
{ {
this.query=query; this.query=query;
......
...@@ -61,8 +61,9 @@ public class DstComponentServiceImpl extends ServiceImpl<DstComponentMapper, Dst ...@@ -61,8 +61,9 @@ public class DstComponentServiceImpl extends ServiceImpl<DstComponentMapper, Dst
@Transactional @Transactional
public boolean create(DstComponent et) { public boolean create(DstComponent et) {
fillParentData(et); fillParentData(et);
if(!this.retBool(this.baseMapper.insert(et))) if(!this.retBool(this.baseMapper.insert(et))) {
return false; return false;
}
CachedBeanCopier.copy(get(et.getId()),et); CachedBeanCopier.copy(get(et.getId()),et);
return true; return true;
} }
...@@ -78,8 +79,9 @@ public class DstComponentServiceImpl extends ServiceImpl<DstComponentMapper, Dst ...@@ -78,8 +79,9 @@ public class DstComponentServiceImpl extends ServiceImpl<DstComponentMapper, Dst
@Transactional @Transactional
public boolean update(DstComponent et) { public boolean update(DstComponent et) {
fillParentData(et); fillParentData(et);
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("cid",et.getId()))) if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("cid",et.getId()))) {
return false; return false;
}
CachedBeanCopier.copy(get(et.getId()),et); CachedBeanCopier.copy(get(et.getId()),et);
return true; return true;
} }
...@@ -130,8 +132,9 @@ public class DstComponentServiceImpl extends ServiceImpl<DstComponentMapper, Dst ...@@ -130,8 +132,9 @@ public class DstComponentServiceImpl extends ServiceImpl<DstComponentMapper, Dst
@Override @Override
@Transactional @Transactional
public boolean save(DstComponent et) { public boolean save(DstComponent et) {
if(!saveOrUpdate(et)) if(!saveOrUpdate(et)) {
return false; return false;
}
return true; return true;
} }
......
...@@ -57,8 +57,9 @@ public class DstConfigServiceImpl extends ServiceImpl<DstConfigMapper, DstConfig ...@@ -57,8 +57,9 @@ public class DstConfigServiceImpl extends ServiceImpl<DstConfigMapper, DstConfig
@Override @Override
@Transactional @Transactional
public boolean create(DstConfig et) { public boolean create(DstConfig et) {
if(!this.retBool(this.baseMapper.insert(et))) if(!this.retBool(this.baseMapper.insert(et))) {
return false; return false;
}
CachedBeanCopier.copy(get(et.getCfgId()),et); CachedBeanCopier.copy(get(et.getCfgId()),et);
return true; return true;
} }
...@@ -72,8 +73,9 @@ public class DstConfigServiceImpl extends ServiceImpl<DstConfigMapper, DstConfig ...@@ -72,8 +73,9 @@ public class DstConfigServiceImpl extends ServiceImpl<DstConfigMapper, DstConfig
@Override @Override
@Transactional @Transactional
public boolean update(DstConfig et) { public boolean update(DstConfig et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("cfgid",et.getCfgId()))) if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("cfgid",et.getCfgId()))) {
return false; return false;
}
CachedBeanCopier.copy(get(et.getCfgId()),et); CachedBeanCopier.copy(get(et.getCfgId()),et);
return true; return true;
} }
...@@ -122,8 +124,9 @@ public class DstConfigServiceImpl extends ServiceImpl<DstConfigMapper, DstConfig ...@@ -122,8 +124,9 @@ public class DstConfigServiceImpl extends ServiceImpl<DstConfigMapper, DstConfig
@Override @Override
@Transactional @Transactional
public boolean save(DstConfig et) { public boolean save(DstConfig et) {
if(!saveOrUpdate(et)) if(!saveOrUpdate(et)) {
return false; return false;
}
return true; return true;
} }
......
...@@ -57,8 +57,9 @@ public class DstDataSourceServiceImpl extends ServiceImpl<DstDataSourceMapper, D ...@@ -57,8 +57,9 @@ public class DstDataSourceServiceImpl extends ServiceImpl<DstDataSourceMapper, D
@Override @Override
@Transactional @Transactional
public boolean create(DstDataSource et) { public boolean create(DstDataSource et) {
if(!this.retBool(this.baseMapper.insert(et))) if(!this.retBool(this.baseMapper.insert(et))) {
return false; return false;
}
CachedBeanCopier.copy(get(et.getDsId()),et); CachedBeanCopier.copy(get(et.getDsId()),et);
return true; return true;
} }
...@@ -72,8 +73,9 @@ public class DstDataSourceServiceImpl extends ServiceImpl<DstDataSourceMapper, D ...@@ -72,8 +73,9 @@ public class DstDataSourceServiceImpl extends ServiceImpl<DstDataSourceMapper, D
@Override @Override
@Transactional @Transactional
public boolean update(DstDataSource et) { public boolean update(DstDataSource et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("dsid",et.getDsId()))) if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("dsid",et.getDsId()))) {
return false; return false;
}
CachedBeanCopier.copy(get(et.getDsId()),et); CachedBeanCopier.copy(get(et.getDsId()),et);
return true; return true;
} }
...@@ -122,8 +124,9 @@ public class DstDataSourceServiceImpl extends ServiceImpl<DstDataSourceMapper, D ...@@ -122,8 +124,9 @@ public class DstDataSourceServiceImpl extends ServiceImpl<DstDataSourceMapper, D
@Override @Override
@Transactional @Transactional
public boolean save(DstDataSource et) { public boolean save(DstDataSource et) {
if(!saveOrUpdate(et)) if(!saveOrUpdate(et)) {
return false; return false;
}
return true; return true;
} }
......
...@@ -59,8 +59,9 @@ public class DstRouterServiceImpl extends ServiceImpl<DstRouterMapper, DstRouter ...@@ -59,8 +59,9 @@ public class DstRouterServiceImpl extends ServiceImpl<DstRouterMapper, DstRouter
@Override @Override
@Transactional @Transactional
public boolean create(DstRouter et) { public boolean create(DstRouter et) {
if(!this.retBool(this.baseMapper.insert(et))) if(!this.retBool(this.baseMapper.insert(et))) {
return false; return false;
}
CachedBeanCopier.copy(get(et.getId()),et); CachedBeanCopier.copy(get(et.getId()),et);
return true; return true;
} }
...@@ -74,8 +75,9 @@ public class DstRouterServiceImpl extends ServiceImpl<DstRouterMapper, DstRouter ...@@ -74,8 +75,9 @@ public class DstRouterServiceImpl extends ServiceImpl<DstRouterMapper, DstRouter
@Override @Override
@Transactional @Transactional
public boolean update(DstRouter et) { public boolean update(DstRouter et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("routerid",et.getId()))) if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("routerid",et.getId()))) {
return false; return false;
}
CachedBeanCopier.copy(get(et.getId()),et); CachedBeanCopier.copy(get(et.getId()),et);
return true; return true;
} }
...@@ -124,8 +126,9 @@ public class DstRouterServiceImpl extends ServiceImpl<DstRouterMapper, DstRouter ...@@ -124,8 +126,9 @@ public class DstRouterServiceImpl extends ServiceImpl<DstRouterMapper, DstRouter
@Override @Override
@Transactional @Transactional
public boolean save(DstRouter et) { public boolean save(DstRouter et) {
if(!saveOrUpdate(et)) if(!saveOrUpdate(et)) {
return false; return false;
}
return true; return true;
} }
......
...@@ -69,8 +69,9 @@ public class DstSystemServiceImpl extends ServiceImpl<DstSystemMapper, DstSystem ...@@ -69,8 +69,9 @@ public class DstSystemServiceImpl extends ServiceImpl<DstSystemMapper, DstSystem
@Override @Override
@Transactional @Transactional
public boolean create(DstSystem et) { public boolean create(DstSystem et) {
if(!this.retBool(this.baseMapper.insert(et))) if(!this.retBool(this.baseMapper.insert(et))) {
return false; return false;
}
CachedBeanCopier.copy(get(et.getPssystemid()),et); CachedBeanCopier.copy(get(et.getPssystemid()),et);
return true; return true;
} }
...@@ -84,8 +85,9 @@ public class DstSystemServiceImpl extends ServiceImpl<DstSystemMapper, DstSystem ...@@ -84,8 +85,9 @@ public class DstSystemServiceImpl extends ServiceImpl<DstSystemMapper, DstSystem
@Override @Override
@Transactional @Transactional
public boolean update(DstSystem et) { public boolean update(DstSystem et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("pssystemid",et.getPssystemid()))) if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("pssystemid",et.getPssystemid()))) {
return false; return false;
}
CachedBeanCopier.copy(get(et.getPssystemid()),et); CachedBeanCopier.copy(get(et.getPssystemid()),et);
return true; return true;
} }
...@@ -134,8 +136,9 @@ public class DstSystemServiceImpl extends ServiceImpl<DstSystemMapper, DstSystem ...@@ -134,8 +136,9 @@ public class DstSystemServiceImpl extends ServiceImpl<DstSystemMapper, DstSystem
@Override @Override
@Transactional @Transactional
public boolean save(DstSystem et) { public boolean save(DstSystem et) {
if(!saveOrUpdate(et)) if(!saveOrUpdate(et)) {
return false; return false;
}
return true; return true;
} }
......
...@@ -61,8 +61,9 @@ public class DstViewServiceImpl extends ServiceImpl<DstViewMapper, DstView> impl ...@@ -61,8 +61,9 @@ public class DstViewServiceImpl extends ServiceImpl<DstViewMapper, DstView> impl
@Transactional @Transactional
public boolean create(DstView et) { public boolean create(DstView et) {
fillParentData(et); fillParentData(et);
if(!this.retBool(this.baseMapper.insert(et))) if(!this.retBool(this.baseMapper.insert(et))) {
return false; return false;
}
CachedBeanCopier.copy(get(et.getId()),et); CachedBeanCopier.copy(get(et.getId()),et);
return true; return true;
} }
...@@ -78,8 +79,9 @@ public class DstViewServiceImpl extends ServiceImpl<DstViewMapper, DstView> impl ...@@ -78,8 +79,9 @@ public class DstViewServiceImpl extends ServiceImpl<DstViewMapper, DstView> impl
@Transactional @Transactional
public boolean update(DstView et) { public boolean update(DstView et) {
fillParentData(et); fillParentData(et);
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("viewid",et.getId()))) if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("viewid",et.getId()))) {
return false; return false;
}
CachedBeanCopier.copy(get(et.getId()),et); CachedBeanCopier.copy(get(et.getId()),et);
return true; return true;
} }
...@@ -130,8 +132,9 @@ public class DstViewServiceImpl extends ServiceImpl<DstViewMapper, DstView> impl ...@@ -130,8 +132,9 @@ public class DstViewServiceImpl extends ServiceImpl<DstViewMapper, DstView> impl
@Override @Override
@Transactional @Transactional
public boolean save(DstView et) { public boolean save(DstView et) {
if(!saveOrUpdate(et)) if(!saveOrUpdate(et)) {
return false; return false;
}
return true; return true;
} }
......
...@@ -58,8 +58,9 @@ public class MetaDataSetServiceImpl extends ServiceImpl<MetaDataSetMapper, MetaD ...@@ -58,8 +58,9 @@ public class MetaDataSetServiceImpl extends ServiceImpl<MetaDataSetMapper, MetaD
@Transactional @Transactional
public boolean create(MetaDataSet et) { public boolean create(MetaDataSet et) {
fillParentData(et); fillParentData(et);
if(!this.retBool(this.baseMapper.insert(et))) if(!this.retBool(this.baseMapper.insert(et))) {
return false; return false;
}
CachedBeanCopier.copy(get(et.getDatasetId()),et); CachedBeanCopier.copy(get(et.getDatasetId()),et);
return true; return true;
} }
...@@ -75,8 +76,9 @@ public class MetaDataSetServiceImpl extends ServiceImpl<MetaDataSetMapper, MetaD ...@@ -75,8 +76,9 @@ public class MetaDataSetServiceImpl extends ServiceImpl<MetaDataSetMapper, MetaD
@Transactional @Transactional
public boolean update(MetaDataSet et) { public boolean update(MetaDataSet et) {
fillParentData(et); fillParentData(et);
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("datasetid",et.getDatasetId()))) if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("datasetid",et.getDatasetId()))) {
return false; return false;
}
CachedBeanCopier.copy(get(et.getDatasetId()),et); CachedBeanCopier.copy(get(et.getDatasetId()),et);
return true; return true;
} }
...@@ -127,8 +129,9 @@ public class MetaDataSetServiceImpl extends ServiceImpl<MetaDataSetMapper, MetaD ...@@ -127,8 +129,9 @@ public class MetaDataSetServiceImpl extends ServiceImpl<MetaDataSetMapper, MetaD
@Override @Override
@Transactional @Transactional
public boolean save(MetaDataSet et) { public boolean save(MetaDataSet et) {
if(!saveOrUpdate(et)) if(!saveOrUpdate(et)) {
return false; return false;
}
return true; return true;
} }
......
...@@ -76,8 +76,9 @@ public class MetaEntityServiceImpl extends ServiceImpl<MetaEntityMapper, MetaEnt ...@@ -76,8 +76,9 @@ public class MetaEntityServiceImpl extends ServiceImpl<MetaEntityMapper, MetaEnt
@Transactional @Transactional
public boolean create(MetaEntity et) { public boolean create(MetaEntity et) {
fillParentData(et); fillParentData(et);
if(!this.retBool(this.baseMapper.insert(et))) if(!this.retBool(this.baseMapper.insert(et))) {
return false; return false;
}
metadatasetService.saveByEntityId(et.getEntityId(),et.getDataSets()); metadatasetService.saveByEntityId(et.getEntityId(),et.getDataSets());
metafieldService.saveByEntityId(et.getEntityId(),et.getFields()); metafieldService.saveByEntityId(et.getEntityId(),et.getFields());
metarelationshipService.saveByEntityId(et.getEntityId(),et.getParentEntitys()); metarelationshipService.saveByEntityId(et.getEntityId(),et.getParentEntitys());
...@@ -97,8 +98,9 @@ public class MetaEntityServiceImpl extends ServiceImpl<MetaEntityMapper, MetaEnt ...@@ -97,8 +98,9 @@ public class MetaEntityServiceImpl extends ServiceImpl<MetaEntityMapper, MetaEnt
@Transactional @Transactional
public boolean update(MetaEntity et) { public boolean update(MetaEntity et) {
fillParentData(et); fillParentData(et);
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("entityid",et.getEntityId()))) if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("entityid",et.getEntityId()))) {
return false; return false;
}
metadatasetService.saveByEntityId(et.getEntityId(),et.getDataSets()); metadatasetService.saveByEntityId(et.getEntityId(),et.getDataSets());
metafieldService.saveByEntityId(et.getEntityId(),et.getFields()); metafieldService.saveByEntityId(et.getEntityId(),et.getFields());
metarelationshipService.saveByEntityId(et.getEntityId(),et.getParentEntitys()); metarelationshipService.saveByEntityId(et.getEntityId(),et.getParentEntitys());
...@@ -161,8 +163,9 @@ public class MetaEntityServiceImpl extends ServiceImpl<MetaEntityMapper, MetaEnt ...@@ -161,8 +163,9 @@ public class MetaEntityServiceImpl extends ServiceImpl<MetaEntityMapper, MetaEnt
@Override @Override
@Transactional @Transactional
public boolean save(MetaEntity et) { public boolean save(MetaEntity et) {
if(!saveOrUpdate(et)) if(!saveOrUpdate(et)) {
return false; return false;
}
return true; return true;
} }
......
...@@ -63,8 +63,9 @@ public class MetaFieldServiceImpl extends ServiceImpl<MetaFieldMapper, MetaField ...@@ -63,8 +63,9 @@ public class MetaFieldServiceImpl extends ServiceImpl<MetaFieldMapper, MetaField
@Transactional @Transactional
public boolean create(MetaField et) { public boolean create(MetaField et) {
fillParentData(et); fillParentData(et);
if(!this.retBool(this.baseMapper.insert(et))) if(!this.retBool(this.baseMapper.insert(et))) {
return false; return false;
}
CachedBeanCopier.copy(get(et.getFieldId()),et); CachedBeanCopier.copy(get(et.getFieldId()),et);
return true; return true;
} }
...@@ -80,8 +81,9 @@ public class MetaFieldServiceImpl extends ServiceImpl<MetaFieldMapper, MetaField ...@@ -80,8 +81,9 @@ public class MetaFieldServiceImpl extends ServiceImpl<MetaFieldMapper, MetaField
@Transactional @Transactional
public boolean update(MetaField et) { public boolean update(MetaField et) {
fillParentData(et); fillParentData(et);
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("fieldid",et.getFieldId()))) if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("fieldid",et.getFieldId()))) {
return false; return false;
}
CachedBeanCopier.copy(get(et.getFieldId()),et); CachedBeanCopier.copy(get(et.getFieldId()),et);
return true; return true;
} }
...@@ -132,8 +134,9 @@ public class MetaFieldServiceImpl extends ServiceImpl<MetaFieldMapper, MetaField ...@@ -132,8 +134,9 @@ public class MetaFieldServiceImpl extends ServiceImpl<MetaFieldMapper, MetaField
@Override @Override
@Transactional @Transactional
public boolean save(MetaField et) { public boolean save(MetaField et) {
if(!saveOrUpdate(et)) if(!saveOrUpdate(et)) {
return false; return false;
}
return true; return true;
} }
......
...@@ -54,8 +54,9 @@ public class MetaModelServiceImpl extends ServiceImpl<MetaModelMapper, MetaModel ...@@ -54,8 +54,9 @@ public class MetaModelServiceImpl extends ServiceImpl<MetaModelMapper, MetaModel
@Override @Override
@Transactional @Transactional
public boolean create(MetaModel et) { public boolean create(MetaModel et) {
if(!this.retBool(this.baseMapper.insert(et))) if(!this.retBool(this.baseMapper.insert(et))) {
return false; return false;
}
CachedBeanCopier.copy(get(et.getId()),et); CachedBeanCopier.copy(get(et.getId()),et);
return true; return true;
} }
...@@ -69,8 +70,9 @@ public class MetaModelServiceImpl extends ServiceImpl<MetaModelMapper, MetaModel ...@@ -69,8 +70,9 @@ public class MetaModelServiceImpl extends ServiceImpl<MetaModelMapper, MetaModel
@Override @Override
@Transactional @Transactional
public boolean update(MetaModel et) { public boolean update(MetaModel et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("modelid",et.getId()))) if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("modelid",et.getId()))) {
return false; return false;
}
CachedBeanCopier.copy(get(et.getId()),et); CachedBeanCopier.copy(get(et.getId()),et);
return true; return true;
} }
...@@ -126,8 +128,9 @@ public class MetaModelServiceImpl extends ServiceImpl<MetaModelMapper, MetaModel ...@@ -126,8 +128,9 @@ public class MetaModelServiceImpl extends ServiceImpl<MetaModelMapper, MetaModel
@Override @Override
@Transactional @Transactional
public boolean save(MetaModel et) { public boolean save(MetaModel et) {
if(!saveOrUpdate(et)) if(!saveOrUpdate(et)) {
return false; return false;
}
return true; return true;
} }
......
...@@ -61,8 +61,9 @@ public class MetaRelationshipServiceImpl extends ServiceImpl<MetaRelationshipMap ...@@ -61,8 +61,9 @@ public class MetaRelationshipServiceImpl extends ServiceImpl<MetaRelationshipMap
@Transactional @Transactional
public boolean create(MetaRelationship et) { public boolean create(MetaRelationship et) {
fillParentData(et); fillParentData(et);
if(!this.retBool(this.baseMapper.insert(et))) if(!this.retBool(this.baseMapper.insert(et))) {
return false; return false;
}
CachedBeanCopier.copy(get(et.getId()),et); CachedBeanCopier.copy(get(et.getId()),et);
return true; return true;
} }
...@@ -78,8 +79,9 @@ public class MetaRelationshipServiceImpl extends ServiceImpl<MetaRelationshipMap ...@@ -78,8 +79,9 @@ public class MetaRelationshipServiceImpl extends ServiceImpl<MetaRelationshipMap
@Transactional @Transactional
public boolean update(MetaRelationship et) { public boolean update(MetaRelationship et) {
fillParentData(et); fillParentData(et);
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("relationid",et.getId()))) if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("relationid",et.getId()))) {
return false; return false;
}
CachedBeanCopier.copy(get(et.getId()),et); CachedBeanCopier.copy(get(et.getId()),et);
return true; return true;
} }
...@@ -130,8 +132,9 @@ public class MetaRelationshipServiceImpl extends ServiceImpl<MetaRelationshipMap ...@@ -130,8 +132,9 @@ public class MetaRelationshipServiceImpl extends ServiceImpl<MetaRelationshipMap
@Override @Override
@Transactional @Transactional
public boolean save(MetaRelationship et) { public boolean save(MetaRelationship et) {
if(!saveOrUpdate(et)) if(!saveOrUpdate(et)) {
return false; return false;
}
return true; return true;
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<!--输出实体[BLADE_VISUAL]数据结构 --> <!--输出实体[BLADE_VISUAL]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-blade_visual-46-1"> <changeSet author="a_A_5d9d78509" id="tab-blade_visual-47-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-19-2"> <changeSet author="a_A_5d9d78509" id="tab-blade_visual_category-20-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-17-3"> <changeSet author="a_A_5d9d78509" 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-17-4"> <changeSet author="a_A_5d9d78509" 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"/>
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
<!--输出实体[DST_CONFIG]数据结构 --> <!--输出实体[DST_CONFIG]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-dst_config-23-6"> <changeSet author="a_A_5d9d78509" id="tab-dst_config-28-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"/>
...@@ -196,7 +196,7 @@ ...@@ -196,7 +196,7 @@
<!--输出实体[DST_VIEW]数据结构 --> <!--输出实体[DST_VIEW]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-dst_view-42-10"> <changeSet author="a_A_5d9d78509" id="tab-dst_view-43-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"/>
......
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
{ {
"appid":"web", "appid":"web",
"appname":"应用", "appname":"应用",
"appmenu":[{"menuid":"liteIndex", "menuname":"liteIndex", "menuitem":[{ "id":"menuitem2" , "name":"数据源" },{ "id":"menuitem1" , "name":"实体" },{ "id":"menuitem9" , "name":"模型" },{ "id":"menuitem6" , "name":"微服务" },{ "id":"menuitem8" , "name":"接口" },{ "id":"menuitem5" , "name":"应用" },{ "id":"menuitem7" , "name":"路由" },{ "id":"menuitem3" , "name":"视图" },{ "id":"menuitem4" , "name":"组件" },{ "id":"menuitem10" , "name":"大屏" }] }] "appmenu":[{"menuid":"liteIndex", "menuname":"liteIndex", "menuitem":[{ "id":"menuitem2" , "name":"数据源" },{ "id":"menuitem1" , "name":"实体" },{ "id":"menuitem9" , "name":"模型" },{ "id":"menuitem6" , "name":"微服务" },{ "id":"menuitem8" , "name":"接口" },{ "id":"menuitem5" , "name":"应用" },{ "id":"menuitem7" , "name":"路由" },{ "id":"menuitem3" , "name":"视图" },{ "id":"menuitem4" , "name":"组件" },{ "id":"menuitem11" , "name":"配置项" },{ "id":"menuitem10" , "name":"大屏" }] }]
} }
] ]
} }
...@@ -264,7 +264,6 @@ ...@@ -264,7 +264,6 @@
<version>${baomidou-jobs.version}</version> <version>${baomidou-jobs.version}</version>
</dependency> </dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>
......
...@@ -50,15 +50,17 @@ public class AuditAspect ...@@ -50,15 +50,17 @@ public class AuditAspect
request=((ServletRequestAttributes)requestAttributes).getRequest(); request=((ServletRequestAttributes)requestAttributes).getRequest();
} }
Object [] args = point.getArgs(); Object [] args = point.getArgs();
if(ObjectUtils.isEmpty(args) || args.length==0) if(ObjectUtils.isEmpty(args) || args.length==0) {
return; return;
}
Object serviceParam =args[0]; Object serviceParam =args[0];
if(serviceParam instanceof EntityBase){ if(serviceParam instanceof EntityBase){
EntityBase entity=(EntityBase)serviceParam;//创建数据 EntityBase entity=(EntityBase)serviceParam;
Map<String, Audit> auditFields= DEFieldCacheMap.getAuditFields(entity.getClass()); Map<String, Audit> auditFields= DEFieldCacheMap.getAuditFields(entity.getClass());
if(auditFields.size()==0)//是否有审计属性 //是否有审计属性
if(auditFields.size()==0) {
return; return;
}
String idField=DEFieldCacheMap.getDEKeyField(entity.getClass()); String idField=DEFieldCacheMap.getDEKeyField(entity.getClass());
Object idValue=""; Object idValue="";
...@@ -85,8 +87,9 @@ public class AuditAspect ...@@ -85,8 +87,9 @@ public class AuditAspect
Object serviceObj=point.getTarget(); Object serviceObj=point.getTarget();
Object args[]=point.getArgs(); Object args[]=point.getArgs();
if(ObjectUtils.isEmpty(args) || args.length==0) if(ObjectUtils.isEmpty(args) || args.length==0) {
return point.proceed(); return point.proceed();
}
Object arg=args[0]; Object arg=args[0];
if(arg instanceof EntityBase){ if(arg instanceof EntityBase){
...@@ -94,15 +97,17 @@ public class AuditAspect ...@@ -94,15 +97,17 @@ public class AuditAspect
Map<String, Audit> auditFields= DEFieldCacheMap.getAuditFields(entity.getClass()); Map<String, Audit> auditFields= DEFieldCacheMap.getAuditFields(entity.getClass());
//是否有审计属性 //是否有审计属性
if(auditFields.size()==0) if(auditFields.size()==0) {
return point.proceed(); return point.proceed();
}
String idField=DEFieldCacheMap.getDEKeyField(entity.getClass()); String idField=DEFieldCacheMap.getDEKeyField(entity.getClass());
Object idValue=""; Object idValue="";
if(!StringUtils.isEmpty(idField)){ if(!StringUtils.isEmpty(idField)){
idValue=entity.get(idField); idValue=entity.get(idField);
} }
if(ObjectUtils.isEmpty(idValue)) if(ObjectUtils.isEmpty(idValue)) {
return point.proceed(); return point.proceed();
}
//获取更新前实体 //获取更新前实体
EntityBase beforeEntity=getEntity(serviceObj,idValue); EntityBase beforeEntity=getEntity(serviceObj,idValue);
...@@ -132,8 +137,9 @@ public class AuditAspect ...@@ -132,8 +137,9 @@ public class AuditAspect
Object serviceObj=point.getTarget(); Object serviceObj=point.getTarget();
Object args[]=point.getArgs(); Object args[]=point.getArgs();
if(ObjectUtils.isEmpty(args) || args.length==0) if(ObjectUtils.isEmpty(args) || args.length==0) {
return point.proceed(); return point.proceed();
}
Object idValue=args[0]; Object idValue=args[0];
EntityBase entity=getEntity(serviceObj,idValue); EntityBase entity=getEntity(serviceObj,idValue);
......
...@@ -84,8 +84,9 @@ public class DEFieldDefaultValueAspect ...@@ -84,8 +84,9 @@ public class DEFieldDefaultValueAspect
Map<String, DEField> deFields = DEFieldCacheMap.getDEFields(obj.getClass()); Map<String, DEField> deFields = DEFieldCacheMap.getDEFields(obj.getClass());
AuthenticationUser curUser = AuthenticationUser.getAuthenticationUser(); AuthenticationUser curUser = AuthenticationUser.getAuthenticationUser();
String keyField=DEFieldCacheMap.getDEKeyField(obj.getClass()); String keyField=DEFieldCacheMap.getDEKeyField(obj.getClass());
if(StringUtils.isEmpty(keyField)) if(StringUtils.isEmpty(keyField)) {
return true; return true;
}
fillDEField((EntityBase)obj, deFields,actionName,curUser,keyField); fillDEField((EntityBase)obj, deFields,actionName,curUser,keyField);
} }
else if (obj instanceof List) { else if (obj instanceof List) {
...@@ -98,9 +99,10 @@ public class DEFieldDefaultValueAspect ...@@ -98,9 +99,10 @@ public class DEFieldDefaultValueAspect
deFields = DEFieldCacheMap.getDEFields(item.getClass()); deFields = DEFieldCacheMap.getDEFields(item.getClass());
curUser = AuthenticationUser.getAuthenticationUser(); curUser = AuthenticationUser.getAuthenticationUser();
keyField=DEFieldCacheMap.getDEKeyField(item.getClass()); keyField=DEFieldCacheMap.getDEKeyField(item.getClass());
if(StringUtils.isEmpty(keyField)) if(StringUtils.isEmpty(keyField)) {
return true; return true;
} }
}
fillDEField((EntityBase)item, deFields,actionName,curUser,keyField); fillDEField((EntityBase)item, deFields,actionName,curUser,keyField);
} }
} }
...@@ -116,14 +118,14 @@ public class DEFieldDefaultValueAspect ...@@ -116,14 +118,14 @@ public class DEFieldDefaultValueAspect
* @param et 当前实体对象 * @param et 当前实体对象
*/ */
private void fillDEField(EntityBase et, Map<String, DEField> deFields, String actionName,AuthenticationUser curUser,String keyField) throws Exception { private void fillDEField(EntityBase et, Map<String, DEField> deFields, String actionName,AuthenticationUser curUser,String keyField) throws Exception {
if(deFields.size()==0) if(deFields.size()==0) {
return ; return;
}
if(actionName.toLowerCase().startsWith("save")) { if(actionName.toLowerCase().startsWith("save")) {
if(ObjectUtils.isEmpty(et.get(keyField))) if(ObjectUtils.isEmpty(et.get(keyField))) {
actionName="create"; actionName="create";
} }
}
for (Map.Entry<String, DEField> entry : deFields.entrySet()) { for (Map.Entry<String, DEField> entry : deFields.entrySet()) {
String fieldname=entry.getKey(); String fieldname=entry.getKey();
//获取注解 //获取注解
......
...@@ -40,11 +40,13 @@ public class VersionCheckAspect ...@@ -40,11 +40,13 @@ public class VersionCheckAspect
Object[] args = point.getArgs(); Object[] args = point.getArgs();
Object id=args[0]; Object id=args[0];
Object dto=args[1]; Object dto=args[1];
if(ObjectUtils.isEmpty(id) || ObjectUtils.isEmpty(dto)) if(ObjectUtils.isEmpty(id) || ObjectUtils.isEmpty(dto)) {
return; return;
}
String versionField=versionCheck.versionfield(); String versionField=versionCheck.versionfield();
if(StringUtils.isEmpty(versionField)) if(StringUtils.isEmpty(versionField)) {
return; return;
}
versionCheck(versionCheck,point.getTarget(),dto,id); versionCheck(versionCheck,point.getTarget(),dto,id);
} }
...@@ -55,11 +57,13 @@ public class VersionCheckAspect ...@@ -55,11 +57,13 @@ public class VersionCheckAspect
if(args.length>=2){ if(args.length>=2){
Object id=args[args.length-2]; Object id=args[args.length-2];
Object dto=args[args.length-1]; Object dto=args[args.length-1];
if(ObjectUtils.isEmpty(id) || ObjectUtils.isEmpty(dto)) if(ObjectUtils.isEmpty(id) || ObjectUtils.isEmpty(dto)) {
return; return;
}
String versionField=versionCheck.versionfield(); String versionField=versionCheck.versionfield();
if(StringUtils.isEmpty(versionField)) if(StringUtils.isEmpty(versionField)) {
return; return;
}
versionCheck(versionCheck,point.getTarget(),dto,id); versionCheck(versionCheck,point.getTarget(),dto,id);
} }
} }
...@@ -70,19 +74,22 @@ public class VersionCheckAspect ...@@ -70,19 +74,22 @@ public class VersionCheckAspect
//忽略版本检查 //忽略版本检查
Expression dtoParamsExp = parser.parseExpression("#dto.extensionparams"); Expression dtoParamsExp = parser.parseExpression("#dto.extensionparams");
Map dtoParam=dtoParamsExp.getValue(context, Map.class); Map dtoParam=dtoParamsExp.getValue(context, Map.class);
if(!ObjectUtils.isEmpty(dtoParam) && !ObjectUtils.isEmpty(dtoParam.get(IgnoreField)) && dtoParam.get(IgnoreField).equals(1)) if(!ObjectUtils.isEmpty(dtoParam) && !ObjectUtils.isEmpty(dtoParam.get(IgnoreField)) && dtoParam.get(IgnoreField).equals(1)) {
return; return;
}
Expression newExp = parser.parseExpression(String.format("#dto.%s",versionCheck.versionfield())); Expression newExp = parser.parseExpression(String.format("#dto.%s",versionCheck.versionfield()));
Object newVersion=newExp.getValue(context); Object newVersion=newExp.getValue(context);
if(ObjectUtils.isEmpty(newVersion)) if(ObjectUtils.isEmpty(newVersion)) {
return; return;
}
//进行版本检查 //进行版本检查
Object oldVersion =getDBVersion(versionCheck,getService(resource,versionCheck.entity()),id); Object oldVersion =getDBVersion(versionCheck,getService(resource,versionCheck.entity()),id);
if(!ObjectUtils.isEmpty(oldVersion)){ if(!ObjectUtils.isEmpty(oldVersion)){
if(RuleUtils.gt(newVersion,oldVersion)) if(RuleUtils.gt(newVersion,oldVersion)) {
throw new BadRequestAlertException("数据已变更,可能后台数据已被修改,请重新加载数据","VersionCheckAspect","versionCheck"); throw new BadRequestAlertException("数据已变更,可能后台数据已被修改,请重新加载数据","VersionCheckAspect","versionCheck");
} }
} }
}
/** /**
* 获取实体服务对象 * 获取实体服务对象
......
...@@ -21,33 +21,39 @@ public class DTOBase implements Serializable { ...@@ -21,33 +21,39 @@ public class DTOBase implements Serializable {
public void modify(String field,Object val) { public void modify(String field,Object val) {
if(val==null) if(val==null) {
this.getFocusNull(true).add(field.toLowerCase()); this.getFocusNull(true).add(field.toLowerCase());
else }
else {
this.getFocusNull(true).remove(field.toLowerCase()); this.getFocusNull(true).remove(field.toLowerCase());
} }
}
public Set<String> getFocusNull() { public Set<String> getFocusNull() {
if(focusNull==null) if(focusNull==null) {
focusNull=new HashSet<>(); focusNull=new HashSet<>();
}
if(focusNull.size()>0 && extensionparams.containsKey("dirtyflagenable")) if(focusNull.size()>0 && extensionparams.containsKey("dirtyflagenable"))
{ {
Set<String> nocheck=new HashSet<>(); Set<String> nocheck=new HashSet<>();
for(String key:focusNull) for(String key:focusNull)
{ {
if(!extensionparams.containsKey(key+"dirtyflag")) if(!extensionparams.containsKey(key+"dirtyflag")) {
nocheck.add(key); nocheck.add(key);
} }
for(String key:nocheck) }
for(String key:nocheck) {
focusNull.remove(key); focusNull.remove(key);
} }
}
return focusNull; return focusNull;
} }
private Set<String> getFocusNull(boolean newflag) { private Set<String> getFocusNull(boolean newflag) {
if(focusNull==null) if(focusNull==null) {
focusNull=new HashSet<>(); focusNull=new HashSet<>();
}
return focusNull; return focusNull;
} }
......
...@@ -24,8 +24,9 @@ public class EntityBase implements Serializable { ...@@ -24,8 +24,9 @@ public class EntityBase implements Serializable {
private Set<String> focusNull; private Set<String> focusNull;
public Set<String> getFocusNull() { public Set<String> getFocusNull() {
if(focusNull==null) if(focusNull==null) {
focusNull=new HashSet<>(); focusNull=new HashSet<>();
}
return focusNull; return focusNull;
} }
...@@ -50,8 +51,9 @@ public class EntityBase implements Serializable { ...@@ -50,8 +51,9 @@ public class EntityBase implements Serializable {
private BeanMap getMap() private BeanMap getMap()
{ {
if(map==null) if(map==null) {
map=BeanMap.create(this); map=BeanMap.create(this);
}
return map; return map;
} }
...@@ -68,16 +70,15 @@ public class EntityBase implements Serializable { ...@@ -68,16 +70,15 @@ public class EntityBase implements Serializable {
this.extensionparams = extensionparams; this.extensionparams = extensionparams;
} }
public Object get(String field) { public Object get(String field) {
String fieldRealName=DEFieldCacheMap.getFieldRealName(this.getClass(),field); String fieldRealName=DEFieldCacheMap.getFieldRealName(this.getClass(),field);
if(!StringUtils.isEmpty(fieldRealName)) if(!StringUtils.isEmpty(fieldRealName)) {
return getMap().get(fieldRealName); return getMap().get(fieldRealName);
else }
else {
return this.extensionparams.get(field.toLowerCase()); return this.extensionparams.get(field.toLowerCase());
} }
}
@JsonAnyGetter @JsonAnyGetter
public Map<String , Object> any() { public Map<String , Object> any() {
...@@ -89,14 +90,17 @@ public class EntityBase implements Serializable { ...@@ -89,14 +90,17 @@ public class EntityBase implements Serializable {
field=field.toLowerCase(); field=field.toLowerCase();
String fieldRealName=DEFieldCacheMap.getFieldRealName(this.getClass(),field); String fieldRealName=DEFieldCacheMap.getFieldRealName(this.getClass(),field);
if(!StringUtils.isEmpty(fieldRealName)) { if(!StringUtils.isEmpty(fieldRealName)) {
if (value == null) if (value == null) {
getMap().put(fieldRealName, null); getMap().put(fieldRealName, null);
else }
else {
getMap().put(fieldRealName, DEFieldCacheMap.fieldValueOf(this.getClass(), fieldRealName, value)); getMap().put(fieldRealName, DEFieldCacheMap.fieldValueOf(this.getClass(), fieldRealName, value));
} }
else }
else {
this.extensionparams.put(field.toLowerCase(),value); this.extensionparams.put(field.toLowerCase(),value);
} }
}
/** /**
* 复制当前对象数据到目标对象 * 复制当前对象数据到目标对象
......
...@@ -5,25 +5,26 @@ import org.springframework.util.StringUtils; ...@@ -5,25 +5,26 @@ import org.springframework.util.StringUtils;
public class EntityMP extends EntityBase { public class EntityMP extends EntityBase {
public UpdateWrapper getUpdateWrapper(boolean clean) { public UpdateWrapper getUpdateWrapper(boolean clean) {
UpdateWrapper wrapper=new UpdateWrapper(); UpdateWrapper wrapper=new UpdateWrapper();
for(String nullField:getFocusNull()) { for(String nullField:getFocusNull()) {
wrapper.set(nullField,null); wrapper.set(nullField,null);
} }
if(clean) if(clean) {
getFocusNull().clear(); getFocusNull().clear();
}
return wrapper; return wrapper;
} }
@Override @Override
public void modify(String field,Object val) { public void modify(String field,Object val) {
if(val==null) if(val==null) {
this.getFocusNull().add(field.toLowerCase()); this.getFocusNull().add(field.toLowerCase());
else }
else {
this.getFocusNull().remove(field.toLowerCase()); this.getFocusNull().remove(field.toLowerCase());
} }
}
@Override @Override
public void reset(String field){ public void reset(String field){
...@@ -33,6 +34,5 @@ public class EntityMP extends EntityBase { ...@@ -33,6 +34,5 @@ public class EntityMP extends EntityBase {
getFocusNull().remove(resetField); getFocusNull().remove(resetField);
} }
} }
} }
...@@ -2,7 +2,5 @@ package cn.ibizlab.util.domain; ...@@ -2,7 +2,5 @@ package cn.ibizlab.util.domain;
public class EntityMongo extends EntityBase { public class EntityMongo extends EntityBase {
} }
...@@ -44,9 +44,9 @@ public class QueryBuildContext extends SearchContextBase implements ISearchConte ...@@ -44,9 +44,9 @@ public class QueryBuildContext extends SearchContextBase implements ISearchConte
*/ */
private QueryBuilder parseQueryFilter(QueryFilter queryFilter){ private QueryBuilder parseQueryFilter(QueryFilter queryFilter){
if( ObjectUtils.isEmpty(queryFilter.get$and()) && ObjectUtils.isEmpty(queryFilter.get$or()) && ObjectUtils.isEmpty(queryFilter.any())) if(ObjectUtils.isEmpty(queryFilter.get$and()) && ObjectUtils.isEmpty(queryFilter.get$or()) && ObjectUtils.isEmpty(queryFilter.any())) {
return null; return null;
}
QueryBuilder rsBuilder=QueryBuilder.start(); QueryBuilder rsBuilder=QueryBuilder.start();
QueryBuilder fieldBuilder=parseFieldMap(queryFilter.any()); QueryBuilder fieldBuilder=parseFieldMap(queryFilter.any());
QueryBuilder orBuilder=parseOrQueryFilter(queryFilter.get$or()); QueryBuilder orBuilder=parseOrQueryFilter(queryFilter.get$or());
...@@ -107,8 +107,9 @@ public class QueryBuildContext extends SearchContextBase implements ISearchConte ...@@ -107,8 +107,9 @@ public class QueryBuildContext extends SearchContextBase implements ISearchConte
* @return * @return
*/ */
private QueryBuilder parseFieldMap(Map<String , QueryFilter.SegmentCond> fieldMap) { private QueryBuilder parseFieldMap(Map<String , QueryFilter.SegmentCond> fieldMap) {
if(fieldMap.size()==0) if(fieldMap.size()==0) {
return null; return null;
}
QueryBuilder fieldBuilders=QueryBuilder.start(); QueryBuilder fieldBuilders=QueryBuilder.start();
for(Map.Entry<String, QueryFilter.SegmentCond> entry: fieldMap.entrySet()){ for(Map.Entry<String, QueryFilter.SegmentCond> entry: fieldMap.entrySet()){
getSegmentCondSql(entry.getKey(),entry.getValue(),fieldBuilders); getSegmentCondSql(entry.getKey(),entry.getValue(),fieldBuilders);
......
...@@ -63,8 +63,9 @@ public class QueryFilter { ...@@ -63,8 +63,9 @@ public class QueryFilter {
private Map<String,SegmentCond> getMap() private Map<String,SegmentCond> getMap()
{ {
if(map==null) if(map==null) {
map=new LinkedHashMap<>(); map=new LinkedHashMap<>();
}
return map; return map;
} }
...@@ -132,11 +133,12 @@ public class QueryFilter { ...@@ -132,11 +133,12 @@ public class QueryFilter {
} }
private QueryFilter op(String column, SegmentCond segmentCond) { private QueryFilter op(String column, SegmentCond segmentCond) {
if(this.getMap().containsKey(column)) {
if(this.getMap().containsKey(column))
((SegmentCond)this.getMap().get(column)).getMap().putAll(segmentCond.getMap()); ((SegmentCond)this.getMap().get(column)).getMap().putAll(segmentCond.getMap());
else }
else {
this.getMap().put(column,segmentCond); this.getMap().put(column,segmentCond);
}
return this; return this;
} }
...@@ -155,8 +157,9 @@ public class QueryFilter { ...@@ -155,8 +157,9 @@ public class QueryFilter {
private Map<String,Object> getMap() private Map<String,Object> getMap()
{ {
if(map==null) if(map==null) {
map=new LinkedHashMap<>(); map=new LinkedHashMap<>();
}
return map; return map;
} }
......
...@@ -37,17 +37,20 @@ public class QueryWrapperContext<T> extends SearchContextBase implements ISearch ...@@ -37,17 +37,20 @@ public class QueryWrapperContext<T> extends SearchContextBase implements ISearch
int pageSize=getPageable().getPageSize(); int pageSize=getPageable().getPageSize();
//构造mybatis-plus分页 //构造mybatis-plus分页
if(StringUtils.isEmpty(currentPage) || StringUtils.isEmpty(pageSize)) if(StringUtils.isEmpty(currentPage) || StringUtils.isEmpty(pageSize)) {
page=new Page(1,Short.MAX_VALUE); page=new Page(1,Short.MAX_VALUE);
else }
else {
page=new Page(currentPage+1,pageSize); page=new Page(currentPage+1,pageSize);
}
//构造mybatis-plus排序 //构造mybatis-plus排序
Sort sort = getPageable().getSort(); Sort sort = getPageable().getSort();
Iterator<Sort.Order> it_sort = sort.iterator(); Iterator<Sort.Order> it_sort = sort.iterator();
if(ObjectUtils.isEmpty(it_sort)) if(ObjectUtils.isEmpty(it_sort)) {
return page; return page;
}
ParameterizedType parameterizedType = (ParameterizedType) getClass().getGenericSuperclass(); ParameterizedType parameterizedType = (ParameterizedType) getClass().getGenericSuperclass();
Class<T> type = (Class<T>)parameterizedType.getActualTypeArguments()[0]; Class<T> type = (Class<T>)parameterizedType.getActualTypeArguments()[0];
...@@ -95,9 +98,9 @@ public class QueryWrapperContext<T> extends SearchContextBase implements ISearch ...@@ -95,9 +98,9 @@ public class QueryWrapperContext<T> extends SearchContextBase implements ISearch
* @return * @return
*/ */
private Consumer<QueryWrapper<T>> parseQueryFilter(QueryFilter queryFilter){ private Consumer<QueryWrapper<T>> parseQueryFilter(QueryFilter queryFilter){
if(queryFilter.any().size()==0 && queryFilter.get$or()==null && queryFilter.get$and()==null) {
if(queryFilter.any().size()==0 && queryFilter.get$or()==null && queryFilter.get$and()==null)
return null; return null;
}
Consumer<QueryWrapper<T>> consumer = queryWrapper -> { Consumer<QueryWrapper<T>> consumer = queryWrapper -> {
Consumer fieldConsumer=parseFieldMap(queryFilter.any()); Consumer fieldConsumer=parseFieldMap(queryFilter.any());
Consumer orConsumer=parseOrQueryFilter(queryFilter.get$or()); Consumer orConsumer=parseOrQueryFilter(queryFilter.get$or());
...@@ -121,7 +124,6 @@ public class QueryWrapperContext<T> extends SearchContextBase implements ISearch ...@@ -121,7 +124,6 @@ public class QueryWrapperContext<T> extends SearchContextBase implements ISearch
* @return * @return
*/ */
private Consumer<QueryWrapper<T>> parseOrQueryFilter(List<QueryFilter> queryFilters) { private Consumer<QueryWrapper<T>> parseOrQueryFilter(List<QueryFilter> queryFilters) {
if(queryFilters==null || queryFilters.size()==0) if(queryFilters==null || queryFilters.size()==0)
return null; return null;
Consumer<QueryWrapper<T>> consumer = queryWrapper -> { Consumer<QueryWrapper<T>> consumer = queryWrapper -> {
...@@ -139,9 +141,9 @@ public class QueryWrapperContext<T> extends SearchContextBase implements ISearch ...@@ -139,9 +141,9 @@ public class QueryWrapperContext<T> extends SearchContextBase implements ISearch
* @return * @return
*/ */
private Consumer<QueryWrapper<T>> parseAndQueryFilter(List<QueryFilter> queryFilters) { private Consumer<QueryWrapper<T>> parseAndQueryFilter(List<QueryFilter> queryFilters) {
if(queryFilters==null || queryFilters.size()==0) {
if(queryFilters==null || queryFilters.size()==0)
return null; return null;
}
Consumer<QueryWrapper<T>> consumer = queryWrapper -> { Consumer<QueryWrapper<T>> consumer = queryWrapper -> {
for(QueryFilter queryFilter: queryFilters){ for(QueryFilter queryFilter: queryFilters){
Consumer tempQueryWrapper=parseQueryFilter(queryFilter); Consumer tempQueryWrapper=parseQueryFilter(queryFilter);
...@@ -157,9 +159,9 @@ public class QueryWrapperContext<T> extends SearchContextBase implements ISearch ...@@ -157,9 +159,9 @@ public class QueryWrapperContext<T> extends SearchContextBase implements ISearch
* @return * @return
*/ */
private Consumer<QueryWrapper<T>> parseFieldMap(Map<String , QueryFilter.SegmentCond> fieldMap) { private Consumer<QueryWrapper<T>> parseFieldMap(Map<String , QueryFilter.SegmentCond> fieldMap) {
if(fieldMap.size()==0) {
if(fieldMap.size()==0)
return null; return null;
}
Consumer<QueryWrapper<T>> consumer = queryWrapper -> { Consumer<QueryWrapper<T>> consumer = queryWrapper -> {
for(Map.Entry<String, QueryFilter.SegmentCond> field: fieldMap.entrySet()){ for(Map.Entry<String, QueryFilter.SegmentCond> field: fieldMap.entrySet()){
String fieldName=field.getKey(); String fieldName=field.getKey();
......
...@@ -98,11 +98,13 @@ public class SearchContextBase implements ISearchContext{ ...@@ -98,11 +98,13 @@ public class SearchContextBase implements ISearchContext{
* @return * @return
*/ */
public Pageable getPageable() { public Pageable getPageable() {
if(ObjectUtils.isEmpty(pageSort)) if(ObjectUtils.isEmpty(pageSort)) {
return PageRequest.of(page,size); return PageRequest.of(page,size);
else }
else {
return PageRequest.of(page,size,pageSort); return PageRequest.of(page,size,pageSort);
} }
}
/** /**
* 设置排序值 * 设置排序值
......
...@@ -13,8 +13,9 @@ public class CachedBeanCopier { ...@@ -13,8 +13,9 @@ public class CachedBeanCopier {
} }
public static void copy(Object srcObj, Object destObj,boolean useConverter) { public static void copy(Object srcObj, Object destObj,boolean useConverter) {
if(srcObj==null||destObj==null) if(srcObj==null||destObj==null) {
return; return;
}
getCopier(srcObj,destObj,useConverter).copy(srcObj, destObj, null); getCopier(srcObj,destObj,useConverter).copy(srcObj, destObj, null);
} }
...@@ -29,6 +30,4 @@ public class CachedBeanCopier { ...@@ -29,6 +30,4 @@ public class CachedBeanCopier {
} }
return copier; return copier;
} }
} }
...@@ -36,13 +36,16 @@ public class DEFieldCacheMap { ...@@ -36,13 +36,16 @@ public class DEFieldCacheMap {
*/ */
public static <T> Hashtable<String,Field> getFieldMap(Class<T> clazz) { public static <T> Hashtable<String,Field> getFieldMap(Class<T> clazz) {
String className=clazz.getName(); String className=clazz.getName();
if(className.indexOf("_$")>0) if(className.indexOf("_$")>0) {
className=className.substring(0, className.lastIndexOf("_$")); className=className.substring(0, className.lastIndexOf("_$"));
if(cacheMap.containsKey(className)) }
if(cacheMap.containsKey(className)) {
return cacheMap.get(className); return cacheMap.get(className);
}
synchronized (objLock1) { synchronized (objLock1) {
if(cacheMap.containsKey(className)) if(cacheMap.containsKey(className)) {
return cacheMap.get(className); return cacheMap.get(className);
}
Hashtable<String,Field> result = new Hashtable<String,Field>(); Hashtable<String,Field> result = new Hashtable<String,Field>();
List<Field> list=new ArrayList<Field>(); List<Field> list=new ArrayList<Field>();
Hashtable<String,String> keys=new Hashtable<String,String>(); Hashtable<String,String> keys=new Hashtable<String,String>();
...@@ -58,9 +61,10 @@ public class DEFieldCacheMap { ...@@ -58,9 +61,10 @@ public class DEFieldCacheMap {
Audit auditField=field.getAnnotation(Audit.class); Audit auditField=field.getAnnotation(Audit.class);
if(!ObjectUtils.isEmpty(deField)) { if(!ObjectUtils.isEmpty(deField)) {
defields.put(field.getName(),deField); defields.put(field.getName(),deField);
if(deField.isKeyField()) if(deField.isKeyField()) {
cacheDEKeyField.put(className,field.getName()); cacheDEKeyField.put(className,field.getName());
} }
}
if(!ObjectUtils.isEmpty(auditField)) { if(!ObjectUtils.isEmpty(auditField)) {
auditfields.put(field.getName(),auditField); auditfields.put(field.getName(),auditField);
} }
...@@ -74,10 +78,12 @@ public class DEFieldCacheMap { ...@@ -74,10 +78,12 @@ public class DEFieldCacheMap {
} }
} }
public static Hashtable<String,Field> getFieldMap(String className) { public static Hashtable<String,Field> getFieldMap(String className) {
if(className.indexOf("_$")>0) if(className.indexOf("_$")>0) {
className=className.substring(0, className.lastIndexOf("_$")); className=className.substring(0, className.lastIndexOf("_$"));
if(cacheMap.containsKey(className)) }
if(cacheMap.containsKey(className)) {
return cacheMap.get(className); return cacheMap.get(className);
}
Class clazz = null; Class clazz = null;
try { try {
clazz = Class.forName(className); clazz = Class.forName(className);
...@@ -96,10 +102,12 @@ public class DEFieldCacheMap { ...@@ -96,10 +102,12 @@ public class DEFieldCacheMap {
*/ */
public static <T> Hashtable<String,DEField> getDEFields(Class<T> clazz) { public static <T> Hashtable<String,DEField> getDEFields(Class<T> clazz) {
String className=clazz.getName(); String className=clazz.getName();
if(className.indexOf("_$")>0) if(className.indexOf("_$")>0) {
className=className.substring(0, className.lastIndexOf("_$")); className=className.substring(0, className.lastIndexOf("_$"));
if(cacheDEField.containsKey(className)) }
if(cacheDEField.containsKey(className)) {
return cacheDEField.get(className); return cacheDEField.get(className);
}
else{ else{
DEFieldCacheMap.getFieldMap(className); DEFieldCacheMap.getFieldMap(className);
return cacheDEField.get(className); return cacheDEField.get(className);
...@@ -113,10 +121,12 @@ public class DEFieldCacheMap { ...@@ -113,10 +121,12 @@ public class DEFieldCacheMap {
*/ */
public static <T> Hashtable<String,Audit> getAuditFields(Class<T> clazz) { public static <T> Hashtable<String,Audit> getAuditFields(Class<T> clazz) {
String className=clazz.getName(); String className=clazz.getName();
if(className.indexOf("_$")>0) if(className.indexOf("_$")>0) {
className=className.substring(0, className.lastIndexOf("_$")); className=className.substring(0, className.lastIndexOf("_$"));
if(cacheAuditField.containsKey(className)) }
if(cacheAuditField.containsKey(className)) {
return cacheAuditField.get(className); return cacheAuditField.get(className);
}
else{ else{
DEFieldCacheMap.getFieldMap(className); DEFieldCacheMap.getFieldMap(className);
return cacheAuditField.get(className); return cacheAuditField.get(className);
...@@ -130,10 +140,12 @@ public class DEFieldCacheMap { ...@@ -130,10 +140,12 @@ public class DEFieldCacheMap {
*/ */
public static <T> String getDEKeyField(Class<T> clazz) { public static <T> String getDEKeyField(Class<T> clazz) {
String className=clazz.getName(); String className=clazz.getName();
if(className.indexOf("_$")>0) if(className.indexOf("_$")>0) {
className=className.substring(0, className.lastIndexOf("_$")); className=className.substring(0, className.lastIndexOf("_$"));
if(cacheDEKeyField.containsKey(className)) }
if(cacheDEKeyField.containsKey(className)) {
return cacheDEKeyField.get(className); return cacheDEKeyField.get(className);
}
else{ else{
DEFieldCacheMap.getFieldMap(className); DEFieldCacheMap.getFieldMap(className);
return cacheDEKeyField.get(className); return cacheDEKeyField.get(className);
...@@ -148,10 +160,12 @@ public class DEFieldCacheMap { ...@@ -148,10 +160,12 @@ public class DEFieldCacheMap {
*/ */
public static <T> List<Field> getFields(Class<T> clazz) { public static <T> List<Field> getFields(Class<T> clazz) {
String className=clazz.getName(); String className=clazz.getName();
if(className.indexOf("_$")>0) if(className.indexOf("_$")>0) {
className=className.substring(0, className.lastIndexOf("_$")); className=className.substring(0, className.lastIndexOf("_$"));
if(cacheList.containsKey(className)) }
if(cacheList.containsKey(className)) {
return cacheList.get(className); return cacheList.get(className);
}
else{ else{
DEFieldCacheMap.getFieldMap(className); DEFieldCacheMap.getFieldMap(className);
return cacheList.get(className); return cacheList.get(className);
...@@ -159,10 +173,12 @@ public class DEFieldCacheMap { ...@@ -159,10 +173,12 @@ public class DEFieldCacheMap {
} }
public static List<Field> getFields(String className) { public static List<Field> getFields(String className) {
if(className.indexOf("_$")>0) if(className.indexOf("_$")>0) {
className=className.substring(0, className.lastIndexOf("_$")); className=className.substring(0, className.lastIndexOf("_$"));
if(cacheList.containsKey(className)) }
if(cacheList.containsKey(className)) {
return cacheList.get(className); return cacheList.get(className);
}
else{ else{
DEFieldCacheMap.getFieldMap(className); DEFieldCacheMap.getFieldMap(className);
return cacheList.get(className); return cacheList.get(className);
...@@ -176,10 +192,12 @@ public class DEFieldCacheMap { ...@@ -176,10 +192,12 @@ public class DEFieldCacheMap {
*/ */
public static <T> Hashtable<String,String> getFieldKeys(Class<T> clazz) { public static <T> Hashtable<String,String> getFieldKeys(Class<T> clazz) {
String className=clazz.getName(); String className=clazz.getName();
if(className.indexOf("_$")>0) if(className.indexOf("_$")>0) {
className=className.substring(0, className.lastIndexOf("_$")); className=className.substring(0, className.lastIndexOf("_$"));
if(cacheKey.containsKey(className)) }
if(cacheKey.containsKey(className)) {
return cacheKey.get(className); return cacheKey.get(className);
}
else{ else{
DEFieldCacheMap.getFieldMap(className); DEFieldCacheMap.getFieldMap(className);
return cacheKey.get(className); return cacheKey.get(className);
...@@ -189,21 +207,26 @@ public class DEFieldCacheMap { ...@@ -189,21 +207,26 @@ public class DEFieldCacheMap {
public static <T> String getFieldRealName(Class<T> clazz,String fieldname) { public static <T> String getFieldRealName(Class<T> clazz,String fieldname) {
fieldname=fieldname.toLowerCase(); fieldname=fieldname.toLowerCase();
Hashtable<String,String> keys=DEFieldCacheMap.getFieldKeys(clazz); Hashtable<String,String> keys=DEFieldCacheMap.getFieldKeys(clazz);
if(keys.containsKey(fieldname)) if(keys.containsKey(fieldname)) {
return keys.get(fieldname); return keys.get(fieldname);
else if(keys.containsKey(fieldname.replace("_",""))) }
else if(keys.containsKey(fieldname.replace("_",""))) {
return keys.get(fieldname.replace("_","")); return keys.get(fieldname.replace("_",""));
else }
else {
return ""; return "";
} }
}
public static <T> Field getField(Class<T> clazz,String fieldname) { public static <T> Field getField(Class<T> clazz,String fieldname) {
String fieldRealName=DEFieldCacheMap.getFieldRealName(clazz,fieldname); String fieldRealName=DEFieldCacheMap.getFieldRealName(clazz,fieldname);
if(!StringUtils.isEmpty(fieldRealName)) if(!StringUtils.isEmpty(fieldRealName)) {
return DEFieldCacheMap.getFieldMap(clazz).get(fieldRealName); return DEFieldCacheMap.getFieldMap(clazz).get(fieldRealName);
else }
else {
return null; return null;
} }
}
public static <T> String getFieldColumnName(Class<T> clazz,String fieldname) { public static <T> String getFieldColumnName(Class<T> clazz,String fieldname) {
Field field = DEFieldCacheMap.getField(clazz,fieldname); Field field = DEFieldCacheMap.getField(clazz,fieldname);
...@@ -226,6 +249,4 @@ public class DEFieldCacheMap { ...@@ -226,6 +249,4 @@ public class DEFieldCacheMap {
} }
return resultValue; return resultValue;
} }
} }
\ No newline at end of file
...@@ -19,30 +19,34 @@ public class DataObject { ...@@ -19,30 +19,34 @@ public class DataObject {
final static public DateFormat dayFormat = new SimpleDateFormat("yyyy-MM-dd"); final static public DateFormat dayFormat = new SimpleDateFormat("yyyy-MM-dd");
final static public String getStringValue(Object objValue, String strDefault) { final static public String getStringValue(Object objValue, String strDefault) {
if (objValue == null) return strDefault; if (objValue == null) {
if (objValue instanceof String) return (String) objValue; return strDefault;
}
if (objValue instanceof String) {
return (String) objValue;
}
if (objValue instanceof java.sql.Timestamp||objValue instanceof java.sql.Date||objValue instanceof java.util.Date) { if (objValue instanceof java.sql.Timestamp||objValue instanceof java.sql.Date||objValue instanceof java.util.Date) {
String rt=datetimeFormat.format(objValue); String rt=datetimeFormat.format(objValue);
if(rt.endsWith(" 00:00:00")) if(rt.endsWith(" 00:00:00")) {
rt=dayFormat.format(objValue); rt=dayFormat.format(objValue);
else if(rt.endsWith(":00")) }
else if(rt.endsWith(":00")) {
rt=datetimeFormat2.format(objValue); rt=datetimeFormat2.format(objValue);
}
return rt; return rt;
} }
return objValue.toString(); return objValue.toString();
} }
public static <T> Object objectValueOf(Class<T> type,Object fieldValue) { public static <T> Object objectValueOf(Class<T> type,Object fieldValue) {
if(fieldValue==null) if(fieldValue==null) {
return null; return null;
}
Object resultValue=fieldValue; Object resultValue=fieldValue;
String targetType=type.getSimpleName(); String targetType=type.getSimpleName();
if(targetType.equalsIgnoreCase(fieldValue.getClass().getSimpleName())) if(targetType.equalsIgnoreCase(fieldValue.getClass().getSimpleName())){
return resultValue; return resultValue;
}
if(targetType.equals("Boolean")){ if(targetType.equals("Boolean")){
resultValue=getBooleanValue(fieldValue,false); resultValue=getBooleanValue(fieldValue,false);
} }
...@@ -79,10 +83,9 @@ public class DataObject { ...@@ -79,10 +83,9 @@ public class DataObject {
else if(targetType.equals("String")) { else if(targetType.equals("String")) {
resultValue= getStringValue(fieldValue,null); resultValue= getStringValue(fieldValue,null);
} }
if(resultValue==null) {
if(resultValue==null)
return null; return null;
}
return resultValue; return resultValue;
} }
...@@ -95,8 +98,9 @@ public class DataObject { ...@@ -95,8 +98,9 @@ public class DataObject {
if (objValue == null) { if (objValue == null) {
return jDefault; return jDefault;
} }
if(objValue instanceof JSONObject) if(objValue instanceof JSONObject) {
return (JSONObject)objValue; return (JSONObject)objValue;
}
String strValue = objValue.toString(); String strValue = objValue.toString();
try { try {
return JSONObject.parseObject(strValue); return JSONObject.parseObject(strValue);
...@@ -111,8 +115,9 @@ public class DataObject { ...@@ -111,8 +115,9 @@ public class DataObject {
if (objValue == null) { if (objValue == null) {
return jDefault; return jDefault;
} }
if(objValue instanceof JSONArray) if(objValue instanceof JSONArray) {
return (JSONArray)objValue; return (JSONArray)objValue;
}
String strValue = objValue.toString(); String strValue = objValue.toString();
try { try {
return JSONArray.parseArray(strValue); return JSONArray.parseArray(strValue);
...@@ -133,9 +138,10 @@ public class DataObject { ...@@ -133,9 +138,10 @@ public class DataObject {
List<String> chk1=new ArrayList<>(); List<String> chk1=new ArrayList<>();
for(int i=0;i<arr.size();i++) for(int i=0;i<arr.size();i++)
{ {
if(arr.get(i) instanceof String) if(arr.get(i) instanceof String) {
chk1.add(arr.getString(i)); chk1.add(arr.getString(i));
} }
}
return chk1; return chk1;
} }
else else
...@@ -146,8 +152,9 @@ public class DataObject { ...@@ -146,8 +152,9 @@ public class DataObject {
} }
final static public Boolean getBooleanValue(Object objValue,Boolean bDefault) { final static public Boolean getBooleanValue(Object objValue,Boolean bDefault) {
if (objValue == null) return bDefault; if (objValue == null) {
return bDefault;
}
if (objValue instanceof Boolean) { if (objValue instanceof Boolean) {
return (Boolean) objValue; return (Boolean) objValue;
} }
...@@ -155,20 +162,24 @@ public class DataObject { ...@@ -155,20 +162,24 @@ public class DataObject {
} }
final static public char[] getCharacterValue(Object objValue,char[] cDefault) { final static public char[] getCharacterValue(Object objValue,char[] cDefault) {
if (objValue == null) return cDefault; if (objValue == null) {
return cDefault;
}
return objValue.toString().toCharArray(); return objValue.toString().toCharArray();
} }
final static public Double getDoubleValue(Object objValue,Double dDefault) { final static public Double getDoubleValue(Object objValue,Double dDefault) {
if (objValue == null) return dDefault; if (objValue == null) {
return dDefault;
}
if (objValue instanceof Double) { if (objValue instanceof Double) {
return (Double) objValue; return (Double) objValue;
} }
String strValue = objValue.toString(); String strValue = objValue.toString();
if (StringUtils.isEmpty(strValue)) return null; if (StringUtils.isEmpty(strValue)) {
return null;
}
strValue = strValue.replace(",", ""); strValue = strValue.replace(",", "");
return Double.parseDouble(strValue); return Double.parseDouble(strValue);
} }
...@@ -179,8 +190,9 @@ public class DataObject { ...@@ -179,8 +190,9 @@ public class DataObject {
return nDefault; return nDefault;
} }
if(objValue instanceof Integer) if(objValue instanceof Integer) {
return (Integer)objValue; return (Integer)objValue;
}
if (objValue instanceof Double) { if (objValue instanceof Double) {
return ((Double) objValue).intValue(); return ((Double) objValue).intValue();
...@@ -191,8 +203,9 @@ public class DataObject { ...@@ -191,8 +203,9 @@ public class DataObject {
} }
String strValue = objValue.toString(); String strValue = objValue.toString();
if(StringUtils.isEmpty(strValue)) if(StringUtils.isEmpty(strValue)) {
return nDefault; return nDefault;
}
strValue = strValue.replace(",", ""); strValue = strValue.replace(",", "");
return Integer.parseInt(strValue); return Integer.parseInt(strValue);
} }
...@@ -204,12 +217,13 @@ public class DataObject { ...@@ -204,12 +217,13 @@ public class DataObject {
} }
try { try {
if(objValue instanceof Float) if(objValue instanceof Float) {
return (Float)objValue; return (Float)objValue;
}
String strValue = objValue.toString(); String strValue = objValue.toString();
if(StringUtils.isEmpty(strValue)) if(StringUtils.isEmpty(strValue)) {
return fDefault; return fDefault;
}
strValue = strValue.replace(",", ""); strValue = strValue.replace(",", "");
return Float.parseFloat(strValue); return Float.parseFloat(strValue);
} catch (Exception ex) { } catch (Exception ex) {
...@@ -233,8 +247,9 @@ public class DataObject { ...@@ -233,8 +247,9 @@ public class DataObject {
return BigDecimal.valueOf((Long)objValue); return BigDecimal.valueOf((Long)objValue);
} }
String strValue = objValue.toString(); String strValue = objValue.toString();
if(StringUtils.isEmpty(strValue)) if(StringUtils.isEmpty(strValue)) {
return fDefault; return fDefault;
}
strValue = strValue.replace(",", ""); strValue = strValue.replace(",", "");
return BigDecimal.valueOf(Double.parseDouble(strValue)); return BigDecimal.valueOf(Double.parseDouble(strValue));
} catch (Exception ex) { } catch (Exception ex) {
...@@ -253,9 +268,10 @@ public class DataObject { ...@@ -253,9 +268,10 @@ public class DataObject {
} }
else { else {
Long l=getLongValue(objValue,null); Long l=getLongValue(objValue,null);
if(l!=null) if(l!=null) {
return BigInteger.valueOf(l); return BigInteger.valueOf(l);
} }
}
} catch (Exception ex) { } catch (Exception ex) {
} }
...@@ -283,8 +299,9 @@ public class DataObject { ...@@ -283,8 +299,9 @@ public class DataObject {
} }
String strValue = objValue.toString(); String strValue = objValue.toString();
if(StringUtils.isEmpty(strValue)) if(StringUtils.isEmpty(strValue)) {
return nDefault; return nDefault;
}
strValue = strValue.replace(",", ""); strValue = strValue.replace(",", "");
return Long.parseLong(strValue); return Long.parseLong(strValue);
} catch (Exception ex) { } catch (Exception ex) {
...@@ -294,7 +311,9 @@ public class DataObject { ...@@ -294,7 +311,9 @@ public class DataObject {
final static public byte[] getBinaryValue(Object objValue, byte[] def) { final static public byte[] getBinaryValue(Object objValue, byte[] def) {
if (objValue == null) return def; if (objValue == null) {
return def;
}
if(objValue instanceof byte[]){ if(objValue instanceof byte[]){
return (byte[])objValue; return (byte[])objValue;
} }
...@@ -312,7 +331,9 @@ public class DataObject { ...@@ -312,7 +331,9 @@ public class DataObject {
* @ * @
*/ */
final static public java.sql.Timestamp getTimestampValue(Object objValue,java.sql.Timestamp tDefault) { final static public java.sql.Timestamp getTimestampValue(Object objValue,java.sql.Timestamp tDefault) {
if (objValue == null) return tDefault; if (objValue == null) {
return tDefault;
}
if (objValue instanceof java.sql.Timestamp) { if (objValue instanceof java.sql.Timestamp) {
java.sql.Timestamp ti = (java.sql.Timestamp) objValue; java.sql.Timestamp ti = (java.sql.Timestamp) objValue;
...@@ -332,7 +353,9 @@ public class DataObject { ...@@ -332,7 +353,9 @@ public class DataObject {
if (objValue instanceof String) { if (objValue instanceof String) {
String strValue = (String) objValue; String strValue = (String) objValue;
strValue = strValue.trim(); strValue = strValue.trim();
if (StringUtils.isEmpty(strValue)) return null; if (StringUtils.isEmpty(strValue)) {
return null;
}
try { try {
java.util.Date date = parse((String) objValue); java.util.Date date = parse((String) objValue);
...@@ -373,7 +396,9 @@ public class DataObject { ...@@ -373,7 +396,9 @@ public class DataObject {
* @ * @
*/ */
public static Object testDateTime(String strInput, TimeZone timeZone) throws Exception{ public static Object testDateTime(String strInput, TimeZone timeZone) throws Exception{
if (StringUtils.isEmpty(strInput)) return null; if (StringUtils.isEmpty(strInput)) {
return null;
}
Date dtDate = parse(strInput, timeZone); Date dtDate = parse(strInput, timeZone);
java.sql.Timestamp retDate = new java.sql.Timestamp(dtDate.getTime()); java.sql.Timestamp retDate = new java.sql.Timestamp(dtDate.getTime());
return retDate; return retDate;
...@@ -425,8 +450,9 @@ public class DataObject { ...@@ -425,8 +450,9 @@ public class DataObject {
if(strTimeString.indexOf("T")!=-1){ if(strTimeString.indexOf("T")!=-1){
strPart = strTimeString.split("[T]"); strPart = strTimeString.split("[T]");
} }
else else{
strPart = strTimeString.split(" "); strPart = strTimeString.split(" ");
}
if (strPart.length == 2) { if (strPart.length == 2) {
// 两个部分 // 两个部分
String strDate = ""; String strDate = "";
...@@ -589,6 +615,4 @@ public class DataObject { ...@@ -589,6 +615,4 @@ public class DataObject {
return new Timestamp(cl.getTime().getTime()); return new Timestamp(cl.getTime().getTime());
} }
} }
...@@ -42,12 +42,14 @@ public class AppController { ...@@ -42,12 +42,14 @@ public class AppController {
while(it.hasNext()) { while(it.hasNext()) {
GrantedAuthority authority = (GrantedAuthority)it.next(); GrantedAuthority authority = (GrantedAuthority)it.next();
String strAuthority=authority.getAuthority(); String strAuthority=authority.getAuthority();
if(strAuthority.startsWith("UNIRES_"+systemId)) if(strAuthority.startsWith("UNIRES_"+systemId)) {
uniRes.add(strAuthority.substring(systemId.length()+8)); uniRes.add(strAuthority.substring(systemId.length()+8));
else if(strAuthority.startsWith("APPMENU_"+systemId)) }
else if(strAuthority.startsWith("APPMENU_"+systemId)){
appMenu.add(strAuthority.substring(systemId.length()+9)); appMenu.add(strAuthority.substring(systemId.length()+9));
} }
} }
}
Map<String,Object> context = new HashMap<>(); Map<String,Object> context = new HashMap<>();
context.putAll(curUser.getSessionParams()); context.putAll(curUser.getSessionParams());
context.put("srfusername",curUser.getPersonname()); context.put("srfusername",curUser.getPersonname());
...@@ -55,10 +57,12 @@ public class AppController { ...@@ -55,10 +57,12 @@ public class AppController {
appData.put("unires",uniRes); appData.put("unires",uniRes);
appData.put("appmenu",appMenu); appData.put("appmenu",appMenu);
appData.put("enablepermissionvalid",enablePermissionValid); appData.put("enablepermissionvalid",enablePermissionValid);
if(curUser.getSuperuser()==1) if(curUser.getSuperuser()==1){
appData.put("enablepermissionvalid",false); appData.put("enablepermissionvalid",false);
else }
else{
appData.put("enablepermissionvalid",enablePermissionValid); appData.put("enablepermissionvalid",enablePermissionValid);
}
fillAppData(appData); fillAppData(appData);
return ResponseEntity.status(HttpStatus.OK).body(appData); return ResponseEntity.status(HttpStatus.OK).body(appData);
} }
...@@ -76,16 +80,18 @@ public class AppController { ...@@ -76,16 +80,18 @@ public class AppController {
@RequestMapping(method = RequestMethod.PUT, value = "/configs/{configType}/{targetType}") @RequestMapping(method = RequestMethod.PUT, value = "/configs/{configType}/{targetType}")
public ResponseEntity<Boolean> saveConfig(@PathVariable("configType") String configType, @PathVariable("targetType") String targetType, @RequestBody JSONObject config) { public ResponseEntity<Boolean> saveConfig(@PathVariable("configType") String configType, @PathVariable("targetType") String targetType, @RequestBody JSONObject config) {
String userId=AuthenticationUser.getAuthenticationUser().getUserid(); String userId=AuthenticationUser.getAuthenticationUser().getUserid();
if(StringUtils.isEmpty(userId)) if(StringUtils.isEmpty(userId)){
throw new BadRequestAlertException("保存配置失败,参数缺失","IBZConfig",configType); throw new BadRequestAlertException("保存配置失败,参数缺失","IBZConfig",configType);
}
return ResponseEntity.ok(ibzConfigService.saveConfig(configType,targetType,userId,config)); return ResponseEntity.ok(ibzConfigService.saveConfig(configType,targetType,userId,config));
} }
@RequestMapping(method = RequestMethod.GET, value = "/configs/{configType}/{targetType}") @RequestMapping(method = RequestMethod.GET, value = "/configs/{configType}/{targetType}")
public ResponseEntity<JSONObject> getConfig(@PathVariable("configType") String configType, @PathVariable("targetType") String targetType) { public ResponseEntity<JSONObject> getConfig(@PathVariable("configType") String configType, @PathVariable("targetType") String targetType) {
String userId=AuthenticationUser.getAuthenticationUser().getUserid(); String userId=AuthenticationUser.getAuthenticationUser().getUserid();
if(StringUtils.isEmpty(userId)) if(StringUtils.isEmpty(userId)){
throw new BadRequestAlertException("获取配置失败,参数缺失","IBZConfig",configType); throw new BadRequestAlertException("获取配置失败,参数缺失","IBZConfig",configType);
}
return ResponseEntity.ok(ibzConfigService.getConfig(configType,targetType,userId)); return ResponseEntity.ok(ibzConfigService.getConfig(configType,targetType,userId));
} }
......
...@@ -38,18 +38,22 @@ public class AuthPermissionEvaluator implements PermissionEvaluator { ...@@ -38,18 +38,22 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
@Override @Override
@SneakyThrows @SneakyThrows
public boolean hasPermission(Authentication authentication, Object entity, Object action) { public boolean hasPermission(Authentication authentication, Object entity, Object action) {
if(!enablePermissionValid) if(!enablePermissionValid){
return true; return true;
}
Object principal = authentication.getPrincipal(); Object principal = authentication.getPrincipal();
if(ObjectUtils.isEmpty(principal)) if(ObjectUtils.isEmpty(principal)){
return false; return false;
}
AuthenticationUser authenticationUser= (AuthenticationUser) authentication.getPrincipal(); AuthenticationUser authenticationUser= (AuthenticationUser) authentication.getPrincipal();
if(authenticationUser.getSuperuser()==1) if(authenticationUser.getSuperuser()==1){
return true; return true;
}
String strAction=String.valueOf(action); String strAction=String.valueOf(action);
Set<String> userAuthorities = getAuthorities(authentication,strAction); Set<String> userAuthorities = getAuthorities(authentication,strAction);
if(userAuthorities.size()==0) if(userAuthorities.size()==0){
return false; return false;
}
if(isAllData(strAction,userAuthorities)){ if(isAllData(strAction,userAuthorities)){
return true; return true;
} }
...@@ -102,8 +106,9 @@ public class AuthPermissionEvaluator implements PermissionEvaluator { ...@@ -102,8 +106,9 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
*/ */
@SneakyThrows @SneakyThrows
private void setPermissionCondToSearchContext(EntityBase entity, QueryWrapperContext qc , Set<String> userAuthorities ,AuthenticationUser authenticationUser){ private void setPermissionCondToSearchContext(EntityBase entity, QueryWrapperContext qc , Set<String> userAuthorities ,AuthenticationUser authenticationUser){
if(entity==null) if(entity==null){
return ; return ;
}
Map<String,String> permissionField=getPermissionField(entity);//获取组织、部门预置属性 Map<String,String> permissionField=getPermissionField(entity);//获取组织、部门预置属性
String orgField=permissionField.get("orgfield"); String orgField=permissionField.get("orgfield");
String orgDeptField=permissionField.get("orgsecfield"); String orgDeptField=permissionField.get("orgsecfield");
...@@ -185,9 +190,10 @@ public class AuthPermissionEvaluator implements PermissionEvaluator { ...@@ -185,9 +190,10 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
Iterator it = authorities.iterator(); Iterator it = authorities.iterator();
while(it.hasNext()) { while(it.hasNext()) {
GrantedAuthority authority = (GrantedAuthority)it.next(); GrantedAuthority authority = (GrantedAuthority)it.next();
if(authority.getAuthority().contains(action)) if(authority.getAuthority().contains(action)){
userAuthorities.add(authority.getAuthority()); userAuthorities.add(authority.getAuthority());
} }
}
return userAuthorities; return userAuthorities;
} }
...@@ -253,23 +259,27 @@ public class AuthPermissionEvaluator implements PermissionEvaluator { ...@@ -253,23 +259,27 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
} }
if(action.endsWith("Create") || action.endsWith("Save")){ if(action.endsWith("Create") || action.endsWith("Save")){
if(!ObjectUtils.isEmpty(orgFieldValue) && !userOrg.contains(orgFieldValue)) if(!ObjectUtils.isEmpty(orgFieldValue) && !userOrg.contains(orgFieldValue)){
return false; return false;
if(!ObjectUtils.isEmpty(orgDeptFieldValue) && !userOrgDept.contains(orgDeptFieldValue)) }
if(!ObjectUtils.isEmpty(orgDeptFieldValue) && !userOrgDept.contains(orgDeptFieldValue)){
return false; return false;
if(!ObjectUtils.isEmpty(crateManFieldValue) && !authenticationUser.getUserid().equals(crateManFieldValue)) }
if(!ObjectUtils.isEmpty(crateManFieldValue) && !authenticationUser.getUserid().equals(crateManFieldValue)){
return false; return false;
}
return true; return true;
} }
else{ else{
if(!ObjectUtils.isEmpty(orgFieldValue) && userOrg.contains(orgFieldValue)) if(!ObjectUtils.isEmpty(orgFieldValue) && userOrg.contains(orgFieldValue)){
return true; return true;
if(!ObjectUtils.isEmpty(orgDeptFieldValue) && userOrgDept.contains(orgDeptFieldValue)) }
if(!ObjectUtils.isEmpty(orgDeptFieldValue) && userOrgDept.contains(orgDeptFieldValue)){
return true; return true;
if(!ObjectUtils.isEmpty(crateManFieldValue) && authenticationUser.getUserid().equals(crateManFieldValue)) }
if(!ObjectUtils.isEmpty(crateManFieldValue) && authenticationUser.getUserid().equals(crateManFieldValue)){
return true; return true;
}
return false; return false;
} }
} }
...@@ -293,13 +303,19 @@ public class AuthPermissionEvaluator implements PermissionEvaluator { ...@@ -293,13 +303,19 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
String fieldName=entry.getKey();//获取注解字段 String fieldName=entry.getKey();//获取注解字段
DEField fieldAnnotation=entry.getValue();//获取注解值 DEField fieldAnnotation=entry.getValue();//获取注解值
DEPredefinedFieldType prefieldType=fieldAnnotation.preType(); DEPredefinedFieldType prefieldType=fieldAnnotation.preType();
if(prefieldType==prefieldType.ORGID)//用户配置系统预置属性-组织机构标识 //用户配置系统预置属性-组织机构标识
if(prefieldType==prefieldType.ORGID){
orgField=fieldName; orgField=fieldName;
if(prefieldType==prefieldType.ORGSECTORID)//用户配置系统预置属性-部门标识 }
//用户配置系统预置属性-部门标识
if(prefieldType==prefieldType.ORGSECTORID){
orgDeptField=fieldName; orgDeptField=fieldName;
if(prefieldType==prefieldType.CREATEMAN)//用户配置系统预置属性-部门标识 }
//用户配置系统预置属性-部门标识
if(prefieldType==prefieldType.CREATEMAN){
createManField=fieldName; createManField=fieldName;
} }
}
permissionFiled.put("orgfield",orgField); permissionFiled.put("orgfield",orgField);
permissionFiled.put("orgsecfield",orgDeptField); permissionFiled.put("orgsecfield",orgDeptField);
permissionFiled.put("createmanfield",createManField); permissionFiled.put("createmanfield",createManField);
......
...@@ -260,11 +260,13 @@ public class AuthenticationUser implements UserDetails ...@@ -260,11 +260,13 @@ public class AuthenticationUser implements UserDetails
return this.sessionParams; return this.sessionParams;
} }
private Map<String, Object> getUserSessionParam() { private Map<String, Object> getUserSessionParam() {
if(userSessionParam!=null) if(userSessionParam!=null){
return userSessionParam; return userSessionParam;
else }
else{
return new HashMap<>(); return new HashMap<>();
} }
}
public void setOrgInfo(Map<String, Set<String>> orgInfo) { public void setOrgInfo(Map<String, Set<String>> orgInfo) {
this.orgInfo = orgInfo; this.orgInfo = orgInfo;
......
...@@ -29,8 +29,9 @@ public class IBZConfigService extends ServiceImpl<IBZConfigMapper, IBZConfig> im ...@@ -29,8 +29,9 @@ public class IBZConfigService extends ServiceImpl<IBZConfigMapper, IBZConfig> im
@Cacheable( value="ibzrt_configs",key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2") @Cacheable( value="ibzrt_configs",key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2")
public JSONObject getConfig(String cfgType,String targetType,String userId) public JSONObject getConfig(String cfgType,String targetType,String userId)
{ {
if(StringUtils.isEmpty(userId)||StringUtils.isEmpty(cfgType)||StringUtils.isEmpty(targetType)) if(StringUtils.isEmpty(userId)||StringUtils.isEmpty(cfgType)||StringUtils.isEmpty(targetType)){
throw new BadRequestAlertException("获取配置失败,参数缺失","IBZConfig",cfgType); throw new BadRequestAlertException("获取配置失败,参数缺失","IBZConfig",cfgType);
}
IBZConfig config=this.getOne(Wrappers.query(IBZConfig.builder().systemId(systemId).cfgType(cfgType).targetType(targetType).userId(userId).build()),false); IBZConfig config=this.getOne(Wrappers.query(IBZConfig.builder().systemId(systemId).cfgType(cfgType).targetType(targetType).userId(userId).build()),false);
if(config==null) { if(config==null) {
config=this.getOne(Wrappers.query(IBZConfig.builder().systemId(systemId).cfgType(cfgType).targetType(targetType).userId(adminuserid).build()),false); config=this.getOne(Wrappers.query(IBZConfig.builder().systemId(systemId).cfgType(cfgType).targetType(targetType).userId(adminuserid).build()),false);
...@@ -44,19 +45,22 @@ public class IBZConfigService extends ServiceImpl<IBZConfigMapper, IBZConfig> im ...@@ -44,19 +45,22 @@ public class IBZConfigService extends ServiceImpl<IBZConfigMapper, IBZConfig> im
@CacheEvict( value="ibzrt_configs",key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2") @CacheEvict( value="ibzrt_configs",key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2")
public boolean saveConfig(String cfgType,String targetType,String userId,JSONObject config) public boolean saveConfig(String cfgType,String targetType,String userId,JSONObject config)
{ {
if(StringUtils.isEmpty(userId)||StringUtils.isEmpty(cfgType)||StringUtils.isEmpty(targetType)) if(StringUtils.isEmpty(userId)||StringUtils.isEmpty(cfgType)||StringUtils.isEmpty(targetType)){
throw new BadRequestAlertException("保存配置失败,参数缺失","IBZConfig",cfgType); throw new BadRequestAlertException("保存配置失败,参数缺失","IBZConfig",cfgType);
}
String cfg="{}"; String cfg="{}";
if(config!=null) if(config!=null){
cfg=JSONObject.toJSONString(config); cfg=JSONObject.toJSONString(config);
}
return this.saveOrUpdate(IBZConfig.builder().systemId(systemId).cfgType(cfgType).targetType(targetType).userId(userId).cfg(cfg).updateDate(DataObject.getNow()).build()); return this.saveOrUpdate(IBZConfig.builder().systemId(systemId).cfgType(cfgType).targetType(targetType).userId(userId).cfg(cfg).updateDate(DataObject.getNow()).build());
} }
@CacheEvict( value="ibzrt_configs",key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2") @CacheEvict( value="ibzrt_configs",key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2")
public void resetConfig(String cfgType,String targetType,String userId) public void resetConfig(String cfgType,String targetType,String userId)
{ {
if(StringUtils.isEmpty(userId)||StringUtils.isEmpty(cfgType)||StringUtils.isEmpty(targetType)) if(StringUtils.isEmpty(userId)||StringUtils.isEmpty(cfgType)||StringUtils.isEmpty(targetType)){
throw new BadRequestAlertException("重置配置失败,参数缺失","IBZConfig",cfgType); throw new BadRequestAlertException("重置配置失败,参数缺失","IBZConfig",cfgType);
}
this.remove(Wrappers.query(IBZConfig.builder().systemId(systemId).cfgType(cfgType).targetType(targetType).userId(userId).build())); this.remove(Wrappers.query(IBZConfig.builder().systemId(systemId).cfgType(cfgType).targetType(targetType).userId(userId).build()));
} }
......
...@@ -26,10 +26,10 @@ public class IBZUAAUserService implements AuthenticationUserService{ ...@@ -26,10 +26,10 @@ public class IBZUAAUserService implements AuthenticationUserService{
@Override @Override
public AuthenticationUser loadUserByUsername(String username) { public AuthenticationUser loadUserByUsername(String username) {
AuthenticationUser user=uaaFeignClient.loginByUsername(username); AuthenticationUser user=uaaFeignClient.loginByUsername(username);
if(user==null) if(user==null){
throw new BadRequestAlertException("登录失败","IBZUAAUser",username); throw new BadRequestAlertException("登录失败","IBZUAAUser",username);
}
return user; return user;
} }
...@@ -48,8 +48,9 @@ public class IBZUAAUserService implements AuthenticationUserService{ ...@@ -48,8 +48,9 @@ public class IBZUAAUserService implements AuthenticationUserService{
logininfo.setLoginname(loginname); logininfo.setLoginname(loginname);
logininfo.setPassword(password); logininfo.setPassword(password);
AuthenticationUser user=uaaFeignClient.login(logininfo); AuthenticationUser user=uaaFeignClient.login(logininfo);
if(user==null) if(user==null){
throw new BadRequestAlertException("登录失败","IBZUAAUser",username); throw new BadRequestAlertException("登录失败","IBZUAAUser",username);
}
return user; return user;
} }
......
...@@ -34,14 +34,18 @@ public class IBZUSERServiceImpl extends ServiceImpl<IBZUSERMapper, IBZUSER> impl ...@@ -34,14 +34,18 @@ public class IBZUSERServiceImpl extends ServiceImpl<IBZUSERMapper, IBZUSER> impl
String[] data=username.split("[|]"); String[] data=username.split("[|]");
String loginname=""; String loginname="";
String domains=""; String domains="";
if(data.length>0) if(data.length>0){
loginname=data[0].trim(); loginname=data[0].trim();
if(data.length>1) }
if(data.length>1){
domains=data[1].trim(); domains=data[1].trim();
if(!StringUtils.isEmpty(loginname)) }
if(!StringUtils.isEmpty(loginname)){
conds.eq("loginname",loginname); conds.eq("loginname",loginname);
if(!StringUtils.isEmpty(domains)) }
if(!StringUtils.isEmpty(domains)){
conds.eq("domains",domains); conds.eq("domains",domains);
}
IBZUSER user = this.getOne(conds); IBZUSER user = this.getOne(conds);
if (user == null) { if (user == null) {
throw new UsernameNotFoundException("用户" + username + "未找到"); throw new UsernameNotFoundException("用户" + username + "未找到");
...@@ -55,10 +59,12 @@ public class IBZUSERServiceImpl extends ServiceImpl<IBZUSERMapper, IBZUSER> impl ...@@ -55,10 +59,12 @@ public class IBZUSERServiceImpl extends ServiceImpl<IBZUSERMapper, IBZUSER> impl
@Override @Override
public AuthenticationUser loadUserByLogin(String username, String password){ public AuthenticationUser loadUserByLogin(String username, String password){
AuthenticationUser authuserdetail = loadUserByUsername(username); AuthenticationUser authuserdetail = loadUserByUsername(username);
if(pwencrymode==1) if(pwencrymode==1){
password = DigestUtils.md5DigestAsHex(password.getBytes()); password = DigestUtils.md5DigestAsHex(password.getBytes());
else if(pwencrymode==2) }
else if(pwencrymode==2){
password = DigestUtils.md5DigestAsHex(String.format("%1$s||%2$s", username, password).getBytes()); password = DigestUtils.md5DigestAsHex(String.format("%1$s||%2$s", username, password).getBytes());
}
if(!authuserdetail.getPassword().equals( password )){ if(!authuserdetail.getPassword().equals( password )){
throw new BadRequestAlertException("用户名密码错误","IBZUSER",username); throw new BadRequestAlertException("用户名密码错误","IBZUSER",username);
} }
......
...@@ -33,8 +33,9 @@ public class SimpleFileService implements FileService { ...@@ -33,8 +33,9 @@ public class SimpleFileService implements FileService {
String fileFullPath = this.fileRoot+"ibizutil"+File.separator+fileid+File.separator+fileName; String fileFullPath = this.fileRoot+"ibizutil"+File.separator+fileid+File.separator+fileName;
File file = new File(fileFullPath); File file = new File(fileFullPath);
File parent = new File(file.getParent()); File parent = new File(file.getParent());
if(!parent.exists()) if(!parent.exists()){
parent.mkdirs(); parent.mkdirs();
}
FileCopyUtils.copy(multipartFile.getInputStream(),Files.newOutputStream(file.toPath())); FileCopyUtils.copy(multipartFile.getInputStream(),Files.newOutputStream(file.toPath()));
item=new FileItem(fileid,fileName,fileid,fileName,(int)multipartFile.getSize(),extname); item=new FileItem(fileid,fileName,fileid,fileName,(int)multipartFile.getSize(),extname);
} catch (IOException e) { } catch (IOException e) {
......
...@@ -29,8 +29,9 @@ public class FeignRequestInterceptor implements RequestInterceptor { ...@@ -29,8 +29,9 @@ public class FeignRequestInterceptor implements RequestInterceptor {
if (headerNames != null) { if (headerNames != null) {
while (headerNames.hasMoreElements()) { while (headerNames.hasMoreElements()) {
String name = headerNames.nextElement(); String name = headerNames.nextElement();
if(name.equalsIgnoreCase("transfer-encoding")) if(name.equalsIgnoreCase("transfer-encoding")){
continue; continue;
}
String values = request.getHeader(name); String values = request.getHeader(name);
requestTemplate.header(name, values); requestTemplate.header(name, values);
} }
......
...@@ -41,7 +41,4 @@ public class SearchContextHandlerMethodArgumentResolver implements HandlerMethod ...@@ -41,7 +41,4 @@ public class SearchContextHandlerMethodArgumentResolver implements HandlerMethod
String json=objectMapper.writeValueAsString(set); String json=objectMapper.writeValueAsString(set);
return objectMapper.readValue(json,parameter.getParameterType()); return objectMapper.readValue(json,parameter.getParameterType());
} }
} }
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册