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

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

上级 fc87b6f1
......@@ -148,6 +148,7 @@ export default {
menuitem7: "路由",
menuitem3: "视图",
menuitem4: "组件",
menuitem11: "配置项",
menuitem10: "大屏",
},
},
......
......@@ -148,6 +148,7 @@ export default {
menuitem7: "路由",
menuitem3: "视图",
menuitem4: "组件",
menuitem11: "配置项",
menuitem10: "大屏",
},
},
......
......@@ -23,8 +23,6 @@ export default {
details: {
group1: "配置基本信息",
formpage1: "基本信息",
group2: "操作信息",
formpage2: "其它",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "标识",
......@@ -33,6 +31,12 @@ export default {
srfuf: "",
srfdeid: "",
srfsourcekey: "",
systemid: "系统标识",
cfgtype: "配置类型",
targettype: "引用类型",
userid: "用户标识",
cfg: "配置内容",
updatedate: "更新时间",
cfgid: "标识",
},
uiactions: {
......@@ -40,6 +44,11 @@ export default {
},
main_grid: {
columns: {
cfgtype: "配置类型",
targettype: "引用类型",
systemid: "系统标识",
userid: "用户标识",
updatedate: "更新时间",
},
nodata:"",
uiactions: {
......@@ -48,10 +57,71 @@ export default {
default_searchform: {
details: {
formpage1: "常规条件",
n_cfgtype_eq: "配置类型(等于(=))",
n_targettype_eq: "引用类型(等于(=))",
n_systemid_eq: "系统标识(等于(=))",
},
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: {
tbitem3: {
caption: "Save",
......@@ -118,62 +188,4 @@ export default {
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 {
details: {
group1: "配置基本信息",
formpage1: "基本信息",
group2: "操作信息",
formpage2: "其它",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "标识",
......@@ -32,6 +30,12 @@ export default {
srfuf: "",
srfdeid: "",
srfsourcekey: "",
systemid: "系统标识",
cfgtype: "配置类型",
targettype: "引用类型",
userid: "用户标识",
cfg: "配置内容",
updatedate: "更新时间",
cfgid: "标识",
},
uiactions: {
......@@ -39,6 +43,11 @@ export default {
},
main_grid: {
columns: {
cfgtype: "配置类型",
targettype: "引用类型",
systemid: "系统标识",
userid: "用户标识",
updatedate: "更新时间",
},
nodata:"",
uiactions: {
......@@ -47,10 +56,71 @@ export default {
default_searchform: {
details: {
formpage1: "常规条件",
n_cfgtype_eq: "配置类型(等于(=))",
n_targettype_eq: "引用类型(等于(=))",
n_systemid_eq: "系统标识(等于(=))",
},
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: {
tbitem3: {
caption: "保存",
......@@ -117,62 +187,4 @@ export default {
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) => {
textcls: '',
appfunctag: 'AppFunc4',
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',
......
......@@ -293,11 +293,11 @@ export default class DstConfigEditViewBase extends Vue {
@Watch('viewparam',{immediate: true, deep: true})
onParamData(newVal: any, oldVal: any) {
if(newVal){
for(let key in this.viewparams){
delete this.viewparams[key];
}
if(typeof this.viewparams == 'string') {
this.viewparams = {};
if(typeof newVal == 'string') {
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 {
@Watch('viewparam',{immediate: true, deep: true})
onParamData(newVal: any, oldVal: any) {
if(newVal){
for(let key in this.viewparams){
delete this.viewparams[key];
}
if(typeof this.viewparams == 'string') {
this.viewparams = {};
if(typeof newVal == 'string') {
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 {
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'dstconfigs', parameterName: 'dstconfig' },
{ pathName: 'editview', parameterName: 'editview' },
];
const _this: any = this;
const openIndexViewTab = (data: any) => {
const _data: any = { w: (new Date().getTime()) };
Object.assign(_data, data);
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, _data);
this.$router.push(routePath);
const openDrawer = (view: any, data: any) => {
let container: Subject<any> = this.$appdrawer.openDrawer(view, tempContext, data);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
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 {
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'dstconfigs', parameterName: 'dstconfig' },
{ pathName: 'editview', parameterName: 'editview' },
];
const _this: any = this;
if(fullargs && fullargs.copymode){
Object.assign(data,{copymode:true});
}
const openIndexViewTab = (data: any) => {
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, data);
this.$router.push(routePath);
const openDrawer = (view: any, data: any) => {
let container: Subject<any> = this.$appdrawer.openDrawer(view, tempContext, data);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
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);
}
......
......@@ -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-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-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('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-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('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-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'));
......@@ -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-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-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('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-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-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('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'));
......
......@@ -256,6 +256,7 @@ export const viewstate: any = {
'1ade7920c947bf50c32012de9962a92d',
'33ec4b7d5a31addaec9b033067520820',
'd613248735503950b91cb7094b036cdc',
'f20b2b6dc4d1c75c48f5da3eca3a3274',
'18d59a3ac7947d7123e0be76e7cb71c0',
'88894333da0e2e0f7a556ecabf7b48ab',
'9c46a7edc5d5d3a08e75ca57fcb7b03c',
......@@ -273,6 +274,15 @@ export const viewstate: any = {
'2feae2829a80f67eb57a3335aad45d42',
],
},
{
viewtag: '8ee101d8fe3517d595bd6518026d1ab8',
viewmodule: 'lite',
viewname: 'DstConfigEditView',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{
viewtag: '8ef054d29badaac8974f6a19c375c422',
viewmodule: 'lite',
......@@ -380,6 +390,16 @@ export const viewstate: any = {
refviews: [
],
},
{
viewtag: 'f20b2b6dc4d1c75c48f5da3eca3a3274',
viewmodule: 'lite',
viewname: 'DstConfigGridView',
viewaction: '',
viewdatachange: false,
refviews: [
'8ee101d8fe3517d595bd6518026d1ab8',
],
},
],
createdviews: [],
}
\ No newline at end of file
......@@ -605,6 +605,9 @@ export default class LiteIndexBase extends Vue implements ControlInterface {
case 'AppFunc6':
this.clickAppFunc6(item);
return;
case 'AppFunc11':
this.clickAppFunc11(item);
return;
case 'AppFunc8':
this.clickAppFunc8(item);
return;
......@@ -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 {
appfunctag: 'AppFunc4',
resourcetag: '',
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',
......@@ -262,6 +281,18 @@ export default class LiteIndexModel {
{ 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',
appfuncyype: 'APPVIEW',
......
......@@ -4,7 +4,35 @@
<row>
<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>
</i-col>
<i-col span="4" class="search-button">
<row v-show="Object.keys(data).length>0">
......@@ -261,6 +289,9 @@ export default class DefaultBase extends Vue implements ControlInterface {
* @memberof DefaultBase
*/
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 {
*/
public detailsModel: any = {
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 {
* @memberof DefaultBase
*/
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 {
public formLogic({ name, newVal, oldVal }: { name: string, newVal: any, oldVal: any }): void {
}
/**
......@@ -381,6 +475,9 @@ export default class DefaultBase extends Vue implements ControlInterface {
* @memberof DefaultBase
*/
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 {
prop: 'srffrontuf',
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 {
{
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',
prop: 'cfg_id',
......
......@@ -31,6 +31,26 @@ export default class MainModel {
prop: 'system_id',
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',
prop: 'cfg_type',
......@@ -51,6 +71,21 @@ export default class MainModel {
name: 'dstconfig',
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',
......
......@@ -46,7 +46,7 @@ public class BladeVisual extends EntityMP implements Serializable {
/**
* 主键
*/
@DEField(isKeyField=true)
@DEField(isKeyField = true)
@TableId(value= "id",type=IdType.ASSIGN_ID)
@JSONField(name = "id")
@JsonProperty("id")
......@@ -90,10 +90,10 @@ public class BladeVisual extends EntityMP implements Serializable {
/**
* 创建时间
*/
@DEField(name = "create_time" , preType = DEPredefinedFieldType.CREATEDATE)
@TableField(value = "create_time" , fill = FieldFill.INSERT)
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createtime" , format="yyyy-MM-dd HH:mm:ss")
@DEField(name = "create_time", preType = DEPredefinedFieldType.CREATEDATE)
@TableField(value = "create_time", fill = FieldFill.INSERT)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone = "GMT+8")
@JSONField(name = "createtime", format = "yyyy-MM-dd HH:mm:ss")
@JsonProperty("createtime")
private Timestamp createtime;
/**
......@@ -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")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatetime" , format="yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone = "GMT+8")
@JSONField(name = "updatetime", format = "yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatetime")
private Timestamp updatetime;
/**
......@@ -132,8 +132,8 @@ public class BladeVisual extends EntityMP implements Serializable {
/**
* 是否已删除
*/
@DEField(name = "is_deleted" , preType = DEPredefinedFieldType.LOGICVALID, logicval = "0" , logicdelval="1")
@TableLogic(value= "0",delval="1")
@DEField(name = "is_deleted", preType = DEPredefinedFieldType.LOGICVALID, logicval = "0", logicdelval = "1")
@TableLogic(value= "0", delval = "1")
@TableField(value = "is_deleted")
@JSONField(name = "isdeleted")
@JsonProperty("isdeleted")
......@@ -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.modify("title",title);
}
......@@ -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.modify("category",category);
}
......@@ -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.modify("password",password);
}
......@@ -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.modify("background_url",backgroundurl);
}
......@@ -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.modify("status",status);
}
......@@ -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.modify("create_dept",createdept);
}
......@@ -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.modify("create_user",createuser);
}
......@@ -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.modify("update_user",updateuser);
}
......
......@@ -46,7 +46,7 @@ public class BladeVisualCategory extends EntityMP implements Serializable {
/**
* 主键
*/
@DEField(isKeyField=true)
@DEField(isKeyField = true)
@TableId(value= "id",type=IdType.ASSIGN_ID)
@JSONField(name = "id")
@JsonProperty("id")
......@@ -70,8 +70,8 @@ public class BladeVisualCategory extends EntityMP implements Serializable {
/**
* 是否已删除
*/
@DEField(name = "is_deleted" , preType = DEPredefinedFieldType.LOGICVALID, logicval = "1" , logicdelval="0")
@TableLogic(value= "1",delval="0")
@DEField(name = "is_deleted", preType = DEPredefinedFieldType.LOGICVALID, logicval = "1", logicdelval = "0")
@TableLogic(value= "1", delval = "0")
@TableField(value = "is_deleted")
@JSONField(name = "isdeleted")
@JsonProperty("isdeleted")
......@@ -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.modify("category_key",categorykey);
}
......@@ -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.modify("category_value",categoryvalue);
}
......
......@@ -46,7 +46,7 @@ public class BladeVisualConfig extends EntityMP implements Serializable {
/**
* 主键
*/
@DEField(isKeyField=true)
@DEField(isKeyField = true)
@TableId(value= "id",type=IdType.ASSIGN_ID)
@JSONField(name = "id")
@JsonProperty("id")
......@@ -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.modify("visual_id",visualid);
}
......@@ -87,7 +87,7 @@ public class BladeVisualConfig extends EntityMP implements Serializable {
/**
* 设置 [组件json]
*/
public void setComponent(String component){
public void setComponent(String component) {
this.component = component ;
this.modify("component",component);
}
......@@ -95,7 +95,7 @@ public class BladeVisualConfig extends EntityMP implements Serializable {
/**
* 设置 [配置json]
*/
public void setDetail(String detail){
public void setDetail(String detail) {
this.detail = detail ;
this.modify("detail",detail);
}
......
......@@ -46,7 +46,7 @@ public class BladeVisualMap extends EntityMP implements Serializable {
/**
* 主键
*/
@DEField(isKeyField=true)
@DEField(isKeyField = true)
@TableId(value= "id",type=IdType.ASSIGN_ID)
@JSONField(name = "id")
@JsonProperty("id")
......@@ -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.modify("name",name);
}
......@@ -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.modify("data",data);
}
......
......@@ -31,6 +31,7 @@ public class BladeVisualCategorySearchContext extends QueryWrapperContext<BladeV
/**
* 启用快速搜索
*/
@Override
public void setQuery(String query)
{
this.query=query;
......
......@@ -31,6 +31,7 @@ public class BladeVisualConfigSearchContext extends QueryWrapperContext<BladeVis
/**
* 启用快速搜索
*/
@Override
public void setQuery(String query)
{
this.query=query;
......
......@@ -31,6 +31,7 @@ public class BladeVisualMapSearchContext extends QueryWrapperContext<BladeVisual
/**
* 启用快速搜索
*/
@Override
public void setQuery(String query)
{
this.query=query;
......
......@@ -38,6 +38,7 @@ public class BladeVisualSearchContext extends QueryWrapperContext<BladeVisual> {
/**
* 启用快速搜索
*/
@Override
public void setQuery(String query)
{
this.query=query;
......
......@@ -54,8 +54,9 @@ public class BladeVisualCategoryServiceImpl extends ServiceImpl<BladeVisualCateg
@Override
@Transactional
public boolean create(BladeVisualCategory et) {
if(!this.retBool(this.baseMapper.insert(et)))
if(!this.retBool(this.baseMapper.insert(et))) {
return false;
}
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
......@@ -69,8 +70,9 @@ public class BladeVisualCategoryServiceImpl extends ServiceImpl<BladeVisualCateg
@Override
@Transactional
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;
}
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
......@@ -119,8 +121,9 @@ public class BladeVisualCategoryServiceImpl extends ServiceImpl<BladeVisualCateg
@Override
@Transactional
public boolean save(BladeVisualCategory et) {
if(!saveOrUpdate(et))
if(!saveOrUpdate(et)) {
return false;
}
return true;
}
......
......@@ -54,8 +54,9 @@ public class BladeVisualConfigServiceImpl extends ServiceImpl<BladeVisualConfigM
@Override
@Transactional
public boolean create(BladeVisualConfig et) {
if(!this.retBool(this.baseMapper.insert(et)))
if(!this.retBool(this.baseMapper.insert(et))) {
return false;
}
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
......@@ -69,8 +70,9 @@ public class BladeVisualConfigServiceImpl extends ServiceImpl<BladeVisualConfigM
@Override
@Transactional
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;
}
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
......@@ -119,8 +121,9 @@ public class BladeVisualConfigServiceImpl extends ServiceImpl<BladeVisualConfigM
@Override
@Transactional
public boolean save(BladeVisualConfig et) {
if(!saveOrUpdate(et))
if(!saveOrUpdate(et)) {
return false;
}
return true;
}
......
......@@ -54,8 +54,9 @@ public class BladeVisualMapServiceImpl extends ServiceImpl<BladeVisualMapMapper,
@Override
@Transactional
public boolean create(BladeVisualMap et) {
if(!this.retBool(this.baseMapper.insert(et)))
if(!this.retBool(this.baseMapper.insert(et))) {
return false;
}
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
......@@ -69,8 +70,9 @@ public class BladeVisualMapServiceImpl extends ServiceImpl<BladeVisualMapMapper,
@Override
@Transactional
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;
}
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
......@@ -119,8 +121,9 @@ public class BladeVisualMapServiceImpl extends ServiceImpl<BladeVisualMapMapper,
@Override
@Transactional
public boolean save(BladeVisualMap et) {
if(!saveOrUpdate(et))
if(!saveOrUpdate(et)) {
return false;
}
return true;
}
......
......@@ -54,8 +54,9 @@ public class BladeVisualServiceImpl extends ServiceImpl<BladeVisualMapper, Blade
@Override
@Transactional
public boolean create(BladeVisual et) {
if(!this.retBool(this.baseMapper.insert(et)))
if(!this.retBool(this.baseMapper.insert(et))) {
return false;
}
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
......@@ -69,8 +70,9 @@ public class BladeVisualServiceImpl extends ServiceImpl<BladeVisualMapper, Blade
@Override
@Transactional
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;
}
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
......@@ -119,8 +121,9 @@ public class BladeVisualServiceImpl extends ServiceImpl<BladeVisualMapper, Blade
@Override
@Transactional
public boolean save(BladeVisual et) {
if(!saveOrUpdate(et))
if(!saveOrUpdate(et)) {
return false;
}
return true;
}
......
......@@ -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)
@JSONField(name = "id")
@JsonProperty("id")
......@@ -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.modify("cname",name);
}
......@@ -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.modify("codename",codeName);
}
......@@ -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.modify("systemid",systemId);
}
......@@ -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.modify("appid",appId);
}
......@@ -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.modify("ctype",type);
}
......@@ -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.modify("entityid",entityId);
}
......@@ -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.modify("cfg",config);
}
......@@ -197,7 +197,7 @@ public class DstComponent extends EntityMP implements Serializable {
/**
* 获取 [部件标识]
*/
public String getId(){
public String getId() {
if(ObjectUtils.isEmpty(id)){
id=(String)getDefaultKey(true);
}
......
......@@ -46,7 +46,7 @@ public class DstConfig extends EntityMP implements Serializable {
/**
* 标识
*/
@DEField(isKeyField=true)
@DEField(isKeyField = true)
@TableId(value= "cfgid",type=IdType.ASSIGN_UUID)
@JSONField(name = "cfg_id")
@JsonProperty("cfg_id")
......@@ -92,8 +92,8 @@ public class DstConfig extends EntityMP implements Serializable {
*/
@DEField(preType = DEPredefinedFieldType.UPDATEDATE)
@TableField(value = "updatedate")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "update_date" , format="yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone = "GMT+8")
@JSONField(name = "update_date", format = "yyyy-MM-dd HH:mm:ss")
@JsonProperty("update_date")
private Timestamp updateDate;
......@@ -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.modify("systemid",systemId);
}
......@@ -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.modify("cfgtype",cfgType);
}
......@@ -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.modify("targettype",targetType);
}
......@@ -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.modify("cfg",cfg);
}
......@@ -143,7 +143,7 @@ public class DstConfig extends EntityMP implements Serializable {
/**
* 获取 [标识]
*/
public String getCfgId(){
public String getCfgId() {
if(ObjectUtils.isEmpty(cfgId)){
cfgId=(String)getDefaultKey(true);
}
......
......@@ -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)
@JSONField(name = "ds_id")
@JsonProperty("ds_id")
......@@ -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.modify("dsname",dsName);
}
......@@ -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.modify("dstype",dsType);
}
......@@ -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.modify("dscfg",dsCfg);
}
......
......@@ -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)
@JSONField(name = "id")
@JsonProperty("id")
......@@ -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.modify("routername",name);
}
......@@ -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.modify("systemid",systemId);
}
......@@ -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.modify("appid",appId);
}
......@@ -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.modify("routerpath",path);
}
......@@ -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.modify("parentid",parentid);
}
......@@ -172,7 +172,7 @@ public class DstRouter extends EntityMP implements Serializable {
/**
* 设置 [meta]
*/
public void setMeta(String meta){
public void setMeta(String meta) {
this.meta = meta ;
this.modify("meta",meta);
}
......@@ -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.modify("component",component);
}
......@@ -189,7 +189,7 @@ public class DstRouter extends EntityMP implements Serializable {
/**
* 获取 [路径标识]
*/
public String getId(){
public String getId() {
if(ObjectUtils.isEmpty(id)){
id=(String)getDefaultKey(true);
}
......
......@@ -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)
@JSONField(name = "id")
@JsonProperty("id")
......@@ -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.modify("viewname",name);
}
......@@ -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.modify("viewpath",path);
}
......@@ -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.modify("systemid",systemId);
}
......@@ -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.modify("appid",appId);
}
......@@ -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.modify("entityid",entityId);
}
......@@ -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.modify("cfg",config);
}
......@@ -182,7 +182,7 @@ public class DstView extends EntityMP implements Serializable {
/**
* 获取 [标识]
*/
public String getId(){
public String getId() {
if(ObjectUtils.isEmpty(id)){
id=(String)getDefaultKey(true);
}
......
......@@ -46,7 +46,7 @@ public class MetaDataSet extends EntityMP implements Serializable {
/**
* 标识
*/
@DEField(isKeyField=true)
@DEField(isKeyField = true)
@TableId(value= "datasetid",type=IdType.ASSIGN_UUID)
@JSONField(name = "dataset_id")
@JsonProperty("dataset_id")
......@@ -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.modify("datasetname",datasetName);
}
......@@ -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.modify("entityid",entityId);
}
......@@ -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.modify("entityname",entityName);
}
......@@ -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.modify("codename",codeName);
}
......@@ -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.modify("dscode",dsCode);
}
......@@ -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.modify("dsmodel",dsModel);
}
......@@ -156,7 +156,7 @@ public class MetaDataSet extends EntityMP implements Serializable {
/**
* 获取 [标识]
*/
public String getDatasetId(){
public String getDatasetId() {
if(ObjectUtils.isEmpty(datasetId)){
datasetId=(String)getDefaultKey(true);
}
......
......@@ -46,7 +46,7 @@ public class MetaField extends EntityMP implements Serializable {
/**
* 属性标识
*/
@DEField(isKeyField=true)
@DEField(isKeyField = true)
@TableId(value= "fieldid",type=IdType.ASSIGN_UUID)
@JSONField(name = "field_id")
@JsonProperty("field_id")
......@@ -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.modify("fieldname",fieldName);
}
......@@ -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.modify("codename",codeName);
}
......@@ -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.modify("entityid",entityId);
}
......@@ -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.modify("entityname",entityName);
}
......@@ -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.modify("fieldlogicname",fieldLogicName);
}
......@@ -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.modify("reffieldid",refFieldId);
}
......@@ -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.modify("reffieldname",refFieldName);
}
......@@ -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.modify("relationid",relationId);
}
......@@ -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.modify("relationname",relationName);
}
......@@ -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.modify("keyfield",keyField);
}
......@@ -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.modify("majorfield",majorField);
}
......@@ -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.modify("unionkey",unionKey);
}
......@@ -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.modify("fieldtype",fieldType);
}
......@@ -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.modify("predefined",predefined);
}
......@@ -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.modify("dict",dict);
}
......@@ -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.modify("nullable",nullable);
}
......@@ -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.modify("physicalfield",physicalField);
}
......@@ -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.modify("datatype",dataType);
}
......@@ -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.modify("datalength",dataLength);
}
......@@ -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.modify("datapreci",dataPreci);
}
......@@ -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.modify("expression",expression);
}
......@@ -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.modify("extensionfield",extensionField);
}
......@@ -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.modify("isenableaudit",isEnableAudit);
}
......@@ -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.modify("showorder",showOrder);
}
......@@ -485,7 +485,7 @@ public class MetaField extends EntityMP implements Serializable {
/**
* 获取 [属性标识]
*/
public String getFieldId(){
public String getFieldId() {
if(ObjectUtils.isEmpty(fieldId)){
fieldId=(String)getDefaultKey(true);
}
......
......@@ -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)
@JSONField(name = "id")
@JsonProperty("id")
......@@ -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.modify("modelname",name);
}
......@@ -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.modify("codename",codeName);
}
......@@ -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.modify("modelcfg",config);
}
......
......@@ -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)
@JSONField(name = "id")
@JsonProperty("id")
......@@ -145,7 +145,7 @@ public class MetaRelationship extends EntityMP implements Serializable {
/**
* 设置 [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.modify("lookup",(lookup!=null)?lookup:(new ArrayList()));
}
......@@ -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.modify("relationname",name);
}
......@@ -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.modify("reltype",relationType);
}
......@@ -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.modify("codename",codeName);
}
......@@ -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.modify("entityid",entityId);
}
......@@ -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.modify("entityname",entityName);
}
......@@ -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.modify("refentityid",refEntityId);
}
......@@ -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.modify("refentityname",refEntityName);
}
......@@ -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.modify("nestedname",nestedName);
}
......@@ -218,7 +218,7 @@ public class MetaRelationship extends EntityMP implements Serializable {
/**
* 获取 [关系标识]
*/
public String getId(){
public String getId() {
if(ObjectUtils.isEmpty(id)){
id=(String)getDefaultKey(true);
}
......
......@@ -87,6 +87,7 @@ public class DstComponentSearchContext extends QueryWrapperContext<DstComponent>
/**
* 启用快速搜索
*/
@Override
public void setQuery(String query)
{
this.query=query;
......
......@@ -66,6 +66,7 @@ public class DstConfigSearchContext extends QueryWrapperContext<DstConfig> {
/**
* 启用快速搜索
*/
@Override
public void setQuery(String query)
{
this.query=query;
......
......@@ -45,6 +45,7 @@ public class DstDataSourceSearchContext extends QueryWrapperContext<DstDataSourc
/**
* 启用快速搜索
*/
@Override
public void setQuery(String query)
{
this.query=query;
......
......@@ -73,6 +73,7 @@ public class DstRouterSearchContext extends QueryWrapperContext<DstRouter> {
/**
* 启用快速搜索
*/
@Override
public void setQuery(String query)
{
this.query=query;
......
......@@ -38,6 +38,7 @@ public class DstSystemSearchContext extends QueryWrapperContext<DstSystem> {
/**
* 启用快速搜索
*/
@Override
public void setQuery(String query)
{
this.query=query;
......
......@@ -80,6 +80,7 @@ public class DstViewSearchContext extends QueryWrapperContext<DstView> {
/**
* 启用快速搜索
*/
@Override
public void setQuery(String query)
{
this.query=query;
......
......@@ -66,6 +66,7 @@ public class MetaDataSetSearchContext extends QueryWrapperContext<MetaDataSet> {
/**
* 启用快速搜索
*/
@Override
public void setQuery(String query)
{
this.query=query;
......
......@@ -101,6 +101,7 @@ public class MetaEntitySearchContext extends QueryWrapperContext<MetaEntity> {
/**
* 启用快速搜索
*/
@Override
public void setQuery(String query)
{
this.query=query;
......
......@@ -157,6 +157,7 @@ public class MetaFieldSearchContext extends QueryWrapperContext<MetaField> {
/**
* 启用快速搜索
*/
@Override
public void setQuery(String query)
{
this.query=query;
......
......@@ -59,6 +59,7 @@ public class MetaModelSearchContext extends QueryWrapperContext<MetaModel> {
/**
* 启用快速搜索
*/
@Override
public void setQuery(String query)
{
this.query=query;
......
......@@ -94,6 +94,7 @@ public class MetaRelationshipSearchContext extends QueryWrapperContext<MetaRelat
/**
* 启用快速搜索
*/
@Override
public void setQuery(String query)
{
this.query=query;
......
......@@ -61,8 +61,9 @@ public class DstComponentServiceImpl extends ServiceImpl<DstComponentMapper, Dst
@Transactional
public boolean create(DstComponent et) {
fillParentData(et);
if(!this.retBool(this.baseMapper.insert(et)))
if(!this.retBool(this.baseMapper.insert(et))) {
return false;
}
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
......@@ -78,8 +79,9 @@ public class DstComponentServiceImpl extends ServiceImpl<DstComponentMapper, Dst
@Transactional
public boolean update(DstComponent 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;
}
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
......@@ -130,8 +132,9 @@ public class DstComponentServiceImpl extends ServiceImpl<DstComponentMapper, Dst
@Override
@Transactional
public boolean save(DstComponent et) {
if(!saveOrUpdate(et))
if(!saveOrUpdate(et)) {
return false;
}
return true;
}
......
......@@ -57,8 +57,9 @@ public class DstConfigServiceImpl extends ServiceImpl<DstConfigMapper, DstConfig
@Override
@Transactional
public boolean create(DstConfig et) {
if(!this.retBool(this.baseMapper.insert(et)))
if(!this.retBool(this.baseMapper.insert(et))) {
return false;
}
CachedBeanCopier.copy(get(et.getCfgId()),et);
return true;
}
......@@ -72,8 +73,9 @@ public class DstConfigServiceImpl extends ServiceImpl<DstConfigMapper, DstConfig
@Override
@Transactional
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;
}
CachedBeanCopier.copy(get(et.getCfgId()),et);
return true;
}
......@@ -122,8 +124,9 @@ public class DstConfigServiceImpl extends ServiceImpl<DstConfigMapper, DstConfig
@Override
@Transactional
public boolean save(DstConfig et) {
if(!saveOrUpdate(et))
if(!saveOrUpdate(et)) {
return false;
}
return true;
}
......
......@@ -57,8 +57,9 @@ public class DstDataSourceServiceImpl extends ServiceImpl<DstDataSourceMapper, D
@Override
@Transactional
public boolean create(DstDataSource et) {
if(!this.retBool(this.baseMapper.insert(et)))
if(!this.retBool(this.baseMapper.insert(et))) {
return false;
}
CachedBeanCopier.copy(get(et.getDsId()),et);
return true;
}
......@@ -72,8 +73,9 @@ public class DstDataSourceServiceImpl extends ServiceImpl<DstDataSourceMapper, D
@Override
@Transactional
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;
}
CachedBeanCopier.copy(get(et.getDsId()),et);
return true;
}
......@@ -122,8 +124,9 @@ public class DstDataSourceServiceImpl extends ServiceImpl<DstDataSourceMapper, D
@Override
@Transactional
public boolean save(DstDataSource et) {
if(!saveOrUpdate(et))
if(!saveOrUpdate(et)) {
return false;
}
return true;
}
......
......@@ -59,8 +59,9 @@ public class DstRouterServiceImpl extends ServiceImpl<DstRouterMapper, DstRouter
@Override
@Transactional
public boolean create(DstRouter et) {
if(!this.retBool(this.baseMapper.insert(et)))
if(!this.retBool(this.baseMapper.insert(et))) {
return false;
}
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
......@@ -74,8 +75,9 @@ public class DstRouterServiceImpl extends ServiceImpl<DstRouterMapper, DstRouter
@Override
@Transactional
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;
}
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
......@@ -124,8 +126,9 @@ public class DstRouterServiceImpl extends ServiceImpl<DstRouterMapper, DstRouter
@Override
@Transactional
public boolean save(DstRouter et) {
if(!saveOrUpdate(et))
if(!saveOrUpdate(et)) {
return false;
}
return true;
}
......
......@@ -69,8 +69,9 @@ public class DstSystemServiceImpl extends ServiceImpl<DstSystemMapper, DstSystem
@Override
@Transactional
public boolean create(DstSystem et) {
if(!this.retBool(this.baseMapper.insert(et)))
if(!this.retBool(this.baseMapper.insert(et))) {
return false;
}
CachedBeanCopier.copy(get(et.getPssystemid()),et);
return true;
}
......@@ -84,8 +85,9 @@ public class DstSystemServiceImpl extends ServiceImpl<DstSystemMapper, DstSystem
@Override
@Transactional
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;
}
CachedBeanCopier.copy(get(et.getPssystemid()),et);
return true;
}
......@@ -134,8 +136,9 @@ public class DstSystemServiceImpl extends ServiceImpl<DstSystemMapper, DstSystem
@Override
@Transactional
public boolean save(DstSystem et) {
if(!saveOrUpdate(et))
if(!saveOrUpdate(et)) {
return false;
}
return true;
}
......
......@@ -61,8 +61,9 @@ public class DstViewServiceImpl extends ServiceImpl<DstViewMapper, DstView> impl
@Transactional
public boolean create(DstView et) {
fillParentData(et);
if(!this.retBool(this.baseMapper.insert(et)))
if(!this.retBool(this.baseMapper.insert(et))) {
return false;
}
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
......@@ -78,8 +79,9 @@ public class DstViewServiceImpl extends ServiceImpl<DstViewMapper, DstView> impl
@Transactional
public boolean update(DstView 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;
}
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
......@@ -130,8 +132,9 @@ public class DstViewServiceImpl extends ServiceImpl<DstViewMapper, DstView> impl
@Override
@Transactional
public boolean save(DstView et) {
if(!saveOrUpdate(et))
if(!saveOrUpdate(et)) {
return false;
}
return true;
}
......
......@@ -58,8 +58,9 @@ public class MetaDataSetServiceImpl extends ServiceImpl<MetaDataSetMapper, MetaD
@Transactional
public boolean create(MetaDataSet et) {
fillParentData(et);
if(!this.retBool(this.baseMapper.insert(et)))
if(!this.retBool(this.baseMapper.insert(et))) {
return false;
}
CachedBeanCopier.copy(get(et.getDatasetId()),et);
return true;
}
......@@ -75,8 +76,9 @@ public class MetaDataSetServiceImpl extends ServiceImpl<MetaDataSetMapper, MetaD
@Transactional
public boolean update(MetaDataSet 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;
}
CachedBeanCopier.copy(get(et.getDatasetId()),et);
return true;
}
......@@ -127,8 +129,9 @@ public class MetaDataSetServiceImpl extends ServiceImpl<MetaDataSetMapper, MetaD
@Override
@Transactional
public boolean save(MetaDataSet et) {
if(!saveOrUpdate(et))
if(!saveOrUpdate(et)) {
return false;
}
return true;
}
......
......@@ -76,8 +76,9 @@ public class MetaEntityServiceImpl extends ServiceImpl<MetaEntityMapper, MetaEnt
@Transactional
public boolean create(MetaEntity et) {
fillParentData(et);
if(!this.retBool(this.baseMapper.insert(et)))
if(!this.retBool(this.baseMapper.insert(et))) {
return false;
}
metadatasetService.saveByEntityId(et.getEntityId(),et.getDataSets());
metafieldService.saveByEntityId(et.getEntityId(),et.getFields());
metarelationshipService.saveByEntityId(et.getEntityId(),et.getParentEntitys());
......@@ -97,8 +98,9 @@ public class MetaEntityServiceImpl extends ServiceImpl<MetaEntityMapper, MetaEnt
@Transactional
public boolean update(MetaEntity 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;
}
metadatasetService.saveByEntityId(et.getEntityId(),et.getDataSets());
metafieldService.saveByEntityId(et.getEntityId(),et.getFields());
metarelationshipService.saveByEntityId(et.getEntityId(),et.getParentEntitys());
......@@ -161,8 +163,9 @@ public class MetaEntityServiceImpl extends ServiceImpl<MetaEntityMapper, MetaEnt
@Override
@Transactional
public boolean save(MetaEntity et) {
if(!saveOrUpdate(et))
if(!saveOrUpdate(et)) {
return false;
}
return true;
}
......
......@@ -63,8 +63,9 @@ public class MetaFieldServiceImpl extends ServiceImpl<MetaFieldMapper, MetaField
@Transactional
public boolean create(MetaField et) {
fillParentData(et);
if(!this.retBool(this.baseMapper.insert(et)))
if(!this.retBool(this.baseMapper.insert(et))) {
return false;
}
CachedBeanCopier.copy(get(et.getFieldId()),et);
return true;
}
......@@ -80,8 +81,9 @@ public class MetaFieldServiceImpl extends ServiceImpl<MetaFieldMapper, MetaField
@Transactional
public boolean update(MetaField 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;
}
CachedBeanCopier.copy(get(et.getFieldId()),et);
return true;
}
......@@ -132,8 +134,9 @@ public class MetaFieldServiceImpl extends ServiceImpl<MetaFieldMapper, MetaField
@Override
@Transactional
public boolean save(MetaField et) {
if(!saveOrUpdate(et))
if(!saveOrUpdate(et)) {
return false;
}
return true;
}
......
......@@ -54,8 +54,9 @@ public class MetaModelServiceImpl extends ServiceImpl<MetaModelMapper, MetaModel
@Override
@Transactional
public boolean create(MetaModel et) {
if(!this.retBool(this.baseMapper.insert(et)))
if(!this.retBool(this.baseMapper.insert(et))) {
return false;
}
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
......@@ -69,8 +70,9 @@ public class MetaModelServiceImpl extends ServiceImpl<MetaModelMapper, MetaModel
@Override
@Transactional
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;
}
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
......@@ -126,8 +128,9 @@ public class MetaModelServiceImpl extends ServiceImpl<MetaModelMapper, MetaModel
@Override
@Transactional
public boolean save(MetaModel et) {
if(!saveOrUpdate(et))
if(!saveOrUpdate(et)) {
return false;
}
return true;
}
......
......@@ -61,8 +61,9 @@ public class MetaRelationshipServiceImpl extends ServiceImpl<MetaRelationshipMap
@Transactional
public boolean create(MetaRelationship et) {
fillParentData(et);
if(!this.retBool(this.baseMapper.insert(et)))
if(!this.retBool(this.baseMapper.insert(et))) {
return false;
}
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
......@@ -78,8 +79,9 @@ public class MetaRelationshipServiceImpl extends ServiceImpl<MetaRelationshipMap
@Transactional
public boolean update(MetaRelationship 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;
}
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
......@@ -130,8 +132,9 @@ public class MetaRelationshipServiceImpl extends ServiceImpl<MetaRelationshipMap
@Override
@Transactional
public boolean save(MetaRelationship et) {
if(!saveOrUpdate(et))
if(!saveOrUpdate(et)) {
return false;
}
return true;
}
......
......@@ -4,7 +4,7 @@
<!--输出实体[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">
<column name="ID" remarks="" type="BIGINT">
<constraints primaryKey="true" primaryKeyName="PK_BLADE_VISUAL_ID"/>
......@@ -36,7 +36,7 @@
<!--输出实体[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">
<column name="ID" remarks="" type="BIGINT">
<constraints primaryKey="true" primaryKeyName="PK_BLADE_VISUAL_CATEGORY_ID"/>
......@@ -52,7 +52,7 @@
<!--输出实体[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">
<column name="ID" remarks="" type="BIGINT">
<constraints primaryKey="true" primaryKeyName="PK_BLADE_VISUAL_CONFIG_ID"/>
......@@ -68,7 +68,7 @@
<!--输出实体[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">
<column name="ID" remarks="" type="BIGINT">
<constraints primaryKey="true" primaryKeyName="PK_BLADE_VISUAL_MAP_ID"/>
......@@ -110,7 +110,7 @@
<!--输出实体[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">
<column name="CFGID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DST_CONFIG_CFGID"/>
......@@ -196,7 +196,7 @@
<!--输出实体[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">
<column name="VIEWID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DST_VIEW_VIEWID"/>
......
......@@ -137,7 +137,7 @@
{
"appid":"web",
"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 @@
<version>${baomidou-jobs.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
......
......@@ -50,15 +50,17 @@ public class AuditAspect
request=((ServletRequestAttributes)requestAttributes).getRequest();
}
Object [] args = point.getArgs();
if(ObjectUtils.isEmpty(args) || args.length==0)
if(ObjectUtils.isEmpty(args) || args.length==0) {
return;
}
Object serviceParam =args[0];
if(serviceParam instanceof EntityBase){
EntityBase entity=(EntityBase)serviceParam;//创建数据
EntityBase entity=(EntityBase)serviceParam;
Map<String, Audit> auditFields= DEFieldCacheMap.getAuditFields(entity.getClass());
if(auditFields.size()==0)//是否有审计属性
//是否有审计属性
if(auditFields.size()==0) {
return;
}
String idField=DEFieldCacheMap.getDEKeyField(entity.getClass());
Object idValue="";
......@@ -85,8 +87,9 @@ public class AuditAspect
Object serviceObj=point.getTarget();
Object args[]=point.getArgs();
if(ObjectUtils.isEmpty(args) || args.length==0)
if(ObjectUtils.isEmpty(args) || args.length==0) {
return point.proceed();
}
Object arg=args[0];
if(arg instanceof EntityBase){
......@@ -94,15 +97,17 @@ public class AuditAspect
Map<String, Audit> auditFields= DEFieldCacheMap.getAuditFields(entity.getClass());
//是否有审计属性
if(auditFields.size()==0)
if(auditFields.size()==0) {
return point.proceed();
}
String idField=DEFieldCacheMap.getDEKeyField(entity.getClass());
Object idValue="";
if(!StringUtils.isEmpty(idField)){
idValue=entity.get(idField);
}
if(ObjectUtils.isEmpty(idValue))
if(ObjectUtils.isEmpty(idValue)) {
return point.proceed();
}
//获取更新前实体
EntityBase beforeEntity=getEntity(serviceObj,idValue);
......@@ -132,8 +137,9 @@ public class AuditAspect
Object serviceObj=point.getTarget();
Object args[]=point.getArgs();
if(ObjectUtils.isEmpty(args) || args.length==0)
if(ObjectUtils.isEmpty(args) || args.length==0) {
return point.proceed();
}
Object idValue=args[0];
EntityBase entity=getEntity(serviceObj,idValue);
......
......@@ -84,8 +84,9 @@ public class DEFieldDefaultValueAspect
Map<String, DEField> deFields = DEFieldCacheMap.getDEFields(obj.getClass());
AuthenticationUser curUser = AuthenticationUser.getAuthenticationUser();
String keyField=DEFieldCacheMap.getDEKeyField(obj.getClass());
if(StringUtils.isEmpty(keyField))
if(StringUtils.isEmpty(keyField)) {
return true;
}
fillDEField((EntityBase)obj, deFields,actionName,curUser,keyField);
}
else if (obj instanceof List) {
......@@ -98,8 +99,9 @@ public class DEFieldDefaultValueAspect
deFields = DEFieldCacheMap.getDEFields(item.getClass());
curUser = AuthenticationUser.getAuthenticationUser();
keyField=DEFieldCacheMap.getDEKeyField(item.getClass());
if(StringUtils.isEmpty(keyField))
if(StringUtils.isEmpty(keyField)) {
return true;
}
}
fillDEField((EntityBase)item, deFields,actionName,curUser,keyField);
}
......@@ -116,14 +118,14 @@ public class DEFieldDefaultValueAspect
* @param et 当前实体对象
*/
private void fillDEField(EntityBase et, Map<String, DEField> deFields, String actionName,AuthenticationUser curUser,String keyField) throws Exception {
if(deFields.size()==0)
return ;
if(deFields.size()==0) {
return;
}
if(actionName.toLowerCase().startsWith("save")) {
if(ObjectUtils.isEmpty(et.get(keyField)))
if(ObjectUtils.isEmpty(et.get(keyField))) {
actionName="create";
}
}
for (Map.Entry<String, DEField> entry : deFields.entrySet()) {
String fieldname=entry.getKey();
//获取注解
......
......@@ -40,11 +40,13 @@ public class VersionCheckAspect
Object[] args = point.getArgs();
Object id=args[0];
Object dto=args[1];
if(ObjectUtils.isEmpty(id) || ObjectUtils.isEmpty(dto))
if(ObjectUtils.isEmpty(id) || ObjectUtils.isEmpty(dto)) {
return;
}
String versionField=versionCheck.versionfield();
if(StringUtils.isEmpty(versionField))
if(StringUtils.isEmpty(versionField)) {
return;
}
versionCheck(versionCheck,point.getTarget(),dto,id);
}
......@@ -55,11 +57,13 @@ public class VersionCheckAspect
if(args.length>=2){
Object id=args[args.length-2];
Object dto=args[args.length-1];
if(ObjectUtils.isEmpty(id) || ObjectUtils.isEmpty(dto))
if(ObjectUtils.isEmpty(id) || ObjectUtils.isEmpty(dto)) {
return;
}
String versionField=versionCheck.versionfield();
if(StringUtils.isEmpty(versionField))
if(StringUtils.isEmpty(versionField)) {
return;
}
versionCheck(versionCheck,point.getTarget(),dto,id);
}
}
......@@ -70,17 +74,20 @@ public class VersionCheckAspect
//忽略版本检查
Expression dtoParamsExp = parser.parseExpression("#dto.extensionparams");
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;
}
Expression newExp = parser.parseExpression(String.format("#dto.%s",versionCheck.versionfield()));
Object newVersion=newExp.getValue(context);
if(ObjectUtils.isEmpty(newVersion))
if(ObjectUtils.isEmpty(newVersion)) {
return;
}
//进行版本检查
Object oldVersion =getDBVersion(versionCheck,getService(resource,versionCheck.entity()),id);
if(!ObjectUtils.isEmpty(oldVersion)){
if(RuleUtils.gt(newVersion,oldVersion))
if(RuleUtils.gt(newVersion,oldVersion)) {
throw new BadRequestAlertException("数据已变更,可能后台数据已被修改,请重新加载数据","VersionCheckAspect","versionCheck");
}
}
}
......
......@@ -21,33 +21,39 @@ public class DTOBase implements Serializable {
public void modify(String field,Object val) {
if(val==null)
if(val==null) {
this.getFocusNull(true).add(field.toLowerCase());
else
}
else {
this.getFocusNull(true).remove(field.toLowerCase());
}
}
public Set<String> getFocusNull() {
if(focusNull==null)
if(focusNull==null) {
focusNull=new HashSet<>();
}
if(focusNull.size()>0 && extensionparams.containsKey("dirtyflagenable"))
{
Set<String> nocheck=new HashSet<>();
for(String key:focusNull)
{
if(!extensionparams.containsKey(key+"dirtyflag"))
if(!extensionparams.containsKey(key+"dirtyflag")) {
nocheck.add(key);
}
}
for(String key:nocheck)
for(String key:nocheck) {
focusNull.remove(key);
}
}
return focusNull;
}
private Set<String> getFocusNull(boolean newflag) {
if(focusNull==null)
if(focusNull==null) {
focusNull=new HashSet<>();
}
return focusNull;
}
......
......@@ -24,8 +24,9 @@ public class EntityBase implements Serializable {
private Set<String> focusNull;
public Set<String> getFocusNull() {
if(focusNull==null)
if(focusNull==null) {
focusNull=new HashSet<>();
}
return focusNull;
}
......@@ -50,8 +51,9 @@ public class EntityBase implements Serializable {
private BeanMap getMap()
{
if(map==null)
map=BeanMap.create(this);
if(map==null) {
map=BeanMap.create(this);
}
return map;
}
......@@ -68,17 +70,16 @@ public class EntityBase implements Serializable {
this.extensionparams = extensionparams;
}
public Object get(String field) {
String fieldRealName=DEFieldCacheMap.getFieldRealName(this.getClass(),field);
if(!StringUtils.isEmpty(fieldRealName))
if(!StringUtils.isEmpty(fieldRealName)) {
return getMap().get(fieldRealName);
else
}
else {
return this.extensionparams.get(field.toLowerCase());
}
}
@JsonAnyGetter
public Map<String , Object> any() {
return extensionparams;
......@@ -89,13 +90,16 @@ public class EntityBase implements Serializable {
field=field.toLowerCase();
String fieldRealName=DEFieldCacheMap.getFieldRealName(this.getClass(),field);
if(!StringUtils.isEmpty(fieldRealName)) {
if (value == null)
if (value == null) {
getMap().put(fieldRealName, null);
else
}
else {
getMap().put(fieldRealName, DEFieldCacheMap.fieldValueOf(this.getClass(), fieldRealName, value));
}
}
else
else {
this.extensionparams.put(field.toLowerCase(),value);
}
}
/**
......
......@@ -5,24 +5,25 @@ import org.springframework.util.StringUtils;
public class EntityMP extends EntityBase {
public UpdateWrapper getUpdateWrapper(boolean clean) {
UpdateWrapper wrapper=new UpdateWrapper();
for(String nullField:getFocusNull()) {
wrapper.set(nullField,null);
}
if(clean)
if(clean) {
getFocusNull().clear();
}
return wrapper;
}
@Override
public void modify(String field,Object val) {
if(val==null)
if(val==null) {
this.getFocusNull().add(field.toLowerCase());
else
}
else {
this.getFocusNull().remove(field.toLowerCase());
}
}
@Override
......@@ -33,6 +34,5 @@ public class EntityMP extends EntityBase {
getFocusNull().remove(resetField);
}
}
}
......@@ -2,7 +2,5 @@ package cn.ibizlab.util.domain;
public class EntityMongo extends EntityBase {
}
......@@ -44,9 +44,9 @@ public class QueryBuildContext extends SearchContextBase implements ISearchConte
*/
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;
}
QueryBuilder rsBuilder=QueryBuilder.start();
QueryBuilder fieldBuilder=parseFieldMap(queryFilter.any());
QueryBuilder orBuilder=parseOrQueryFilter(queryFilter.get$or());
......@@ -107,8 +107,9 @@ public class QueryBuildContext extends SearchContextBase implements ISearchConte
* @return
*/
private QueryBuilder parseFieldMap(Map<String , QueryFilter.SegmentCond> fieldMap) {
if(fieldMap.size()==0)
if(fieldMap.size()==0) {
return null;
}
QueryBuilder fieldBuilders=QueryBuilder.start();
for(Map.Entry<String, QueryFilter.SegmentCond> entry: fieldMap.entrySet()){
getSegmentCondSql(entry.getKey(),entry.getValue(),fieldBuilders);
......
......@@ -63,8 +63,9 @@ public class QueryFilter {
private Map<String,SegmentCond> getMap()
{
if(map==null)
if(map==null) {
map=new LinkedHashMap<>();
}
return map;
}
......@@ -132,11 +133,12 @@ public class QueryFilter {
}
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());
else
}
else {
this.getMap().put(column,segmentCond);
}
return this;
}
......@@ -155,8 +157,9 @@ public class QueryFilter {
private Map<String,Object> getMap()
{
if(map==null)
if(map==null) {
map=new LinkedHashMap<>();
}
return map;
}
......
......@@ -37,17 +37,20 @@ public class QueryWrapperContext<T> extends SearchContextBase implements ISearch
int pageSize=getPageable().getPageSize();
//构造mybatis-plus分页
if(StringUtils.isEmpty(currentPage) || StringUtils.isEmpty(pageSize))
if(StringUtils.isEmpty(currentPage) || StringUtils.isEmpty(pageSize)) {
page=new Page(1,Short.MAX_VALUE);
else
}
else {
page=new Page(currentPage+1,pageSize);
}
//构造mybatis-plus排序
Sort sort = getPageable().getSort();
Iterator<Sort.Order> it_sort = sort.iterator();
if(ObjectUtils.isEmpty(it_sort))
if(ObjectUtils.isEmpty(it_sort)) {
return page;
}
ParameterizedType parameterizedType = (ParameterizedType) getClass().getGenericSuperclass();
Class<T> type = (Class<T>)parameterizedType.getActualTypeArguments()[0];
......@@ -95,9 +98,9 @@ public class QueryWrapperContext<T> extends SearchContextBase implements ISearch
* @return
*/
private Consumer<QueryWrapper<T>> parseQueryFilter(QueryFilter queryFilter){
if(queryFilter.any().size()==0 && queryFilter.get$or()==null && queryFilter.get$and()==null)
return null;
if(queryFilter.any().size()==0 && queryFilter.get$or()==null && queryFilter.get$and()==null) {
return null;
}
Consumer<QueryWrapper<T>> consumer = queryWrapper -> {
Consumer fieldConsumer=parseFieldMap(queryFilter.any());
Consumer orConsumer=parseOrQueryFilter(queryFilter.get$or());
......@@ -121,7 +124,6 @@ public class QueryWrapperContext<T> extends SearchContextBase implements ISearch
* @return
*/
private Consumer<QueryWrapper<T>> parseOrQueryFilter(List<QueryFilter> queryFilters) {
if(queryFilters==null || queryFilters.size()==0)
return null;
Consumer<QueryWrapper<T>> consumer = queryWrapper -> {
......@@ -139,10 +141,10 @@ public class QueryWrapperContext<T> extends SearchContextBase implements ISearch
* @return
*/
private Consumer<QueryWrapper<T>> parseAndQueryFilter(List<QueryFilter> queryFilters) {
if(queryFilters==null || queryFilters.size()==0)
if(queryFilters==null || queryFilters.size()==0) {
return null;
Consumer<QueryWrapper<T>> consumer = queryWrapper -> {
}
Consumer<QueryWrapper<T>> consumer = queryWrapper -> {
for(QueryFilter queryFilter: queryFilters){
Consumer tempQueryWrapper=parseQueryFilter(queryFilter);
queryWrapper.and(tempQueryWrapper);
......@@ -157,9 +159,9 @@ public class QueryWrapperContext<T> extends SearchContextBase implements ISearch
* @return
*/
private Consumer<QueryWrapper<T>> parseFieldMap(Map<String , QueryFilter.SegmentCond> fieldMap) {
if(fieldMap.size()==0)
if(fieldMap.size()==0) {
return null;
}
Consumer<QueryWrapper<T>> consumer = queryWrapper -> {
for(Map.Entry<String, QueryFilter.SegmentCond> field: fieldMap.entrySet()){
String fieldName=field.getKey();
......
......@@ -98,10 +98,12 @@ public class SearchContextBase implements ISearchContext{
* @return
*/
public Pageable getPageable() {
if(ObjectUtils.isEmpty(pageSort))
return PageRequest.of(page,size);
else
return PageRequest.of(page,size,pageSort);
if(ObjectUtils.isEmpty(pageSort)) {
return PageRequest.of(page,size);
}
else {
return PageRequest.of(page,size,pageSort);
}
}
/**
......
......@@ -13,8 +13,9 @@ public class CachedBeanCopier {
}
public static void copy(Object srcObj, Object destObj,boolean useConverter) {
if(srcObj==null||destObj==null)
if(srcObj==null||destObj==null) {
return;
}
getCopier(srcObj,destObj,useConverter).copy(srcObj, destObj, null);
}
......@@ -29,6 +30,4 @@ public class CachedBeanCopier {
}
return copier;
}
}
......@@ -36,13 +36,16 @@ public class DEFieldCacheMap {
*/
public static <T> Hashtable<String,Field> getFieldMap(Class<T> clazz) {
String className=clazz.getName();
if(className.indexOf("_$")>0)
className=className.substring(0, className.lastIndexOf("_$"));
if(cacheMap.containsKey(className))
return cacheMap.get(className);
if(className.indexOf("_$")>0) {
className=className.substring(0, className.lastIndexOf("_$"));
}
if(cacheMap.containsKey(className)) {
return cacheMap.get(className);
}
synchronized (objLock1) {
if(cacheMap.containsKey(className))
return cacheMap.get(className);
if(cacheMap.containsKey(className)) {
return cacheMap.get(className);
}
Hashtable<String,Field> result = new Hashtable<String,Field>();
List<Field> list=new ArrayList<Field>();
Hashtable<String,String> keys=new Hashtable<String,String>();
......@@ -58,8 +61,9 @@ public class DEFieldCacheMap {
Audit auditField=field.getAnnotation(Audit.class);
if(!ObjectUtils.isEmpty(deField)) {
defields.put(field.getName(),deField);
if(deField.isKeyField())
cacheDEKeyField.put(className,field.getName());
if(deField.isKeyField()) {
cacheDEKeyField.put(className,field.getName());
}
}
if(!ObjectUtils.isEmpty(auditField)) {
auditfields.put(field.getName(),auditField);
......@@ -74,10 +78,12 @@ public class DEFieldCacheMap {
}
}
public static Hashtable<String,Field> getFieldMap(String className) {
if(className.indexOf("_$")>0)
className=className.substring(0, className.lastIndexOf("_$"));
if(cacheMap.containsKey(className))
return cacheMap.get(className);
if(className.indexOf("_$")>0) {
className=className.substring(0, className.lastIndexOf("_$"));
}
if(cacheMap.containsKey(className)) {
return cacheMap.get(className);
}
Class clazz = null;
try {
clazz = Class.forName(className);
......@@ -96,10 +102,12 @@ public class DEFieldCacheMap {
*/
public static <T> Hashtable<String,DEField> getDEFields(Class<T> clazz) {
String className=clazz.getName();
if(className.indexOf("_$")>0)
if(className.indexOf("_$")>0) {
className=className.substring(0, className.lastIndexOf("_$"));
if(cacheDEField.containsKey(className))
}
if(cacheDEField.containsKey(className)) {
return cacheDEField.get(className);
}
else{
DEFieldCacheMap.getFieldMap(className);
return cacheDEField.get(className);
......@@ -113,10 +121,12 @@ public class DEFieldCacheMap {
*/
public static <T> Hashtable<String,Audit> getAuditFields(Class<T> clazz) {
String className=clazz.getName();
if(className.indexOf("_$")>0)
if(className.indexOf("_$")>0) {
className=className.substring(0, className.lastIndexOf("_$"));
if(cacheAuditField.containsKey(className))
}
if(cacheAuditField.containsKey(className)) {
return cacheAuditField.get(className);
}
else{
DEFieldCacheMap.getFieldMap(className);
return cacheAuditField.get(className);
......@@ -130,10 +140,12 @@ public class DEFieldCacheMap {
*/
public static <T> String getDEKeyField(Class<T> clazz) {
String className=clazz.getName();
if(className.indexOf("_$")>0)
if(className.indexOf("_$")>0) {
className=className.substring(0, className.lastIndexOf("_$"));
if(cacheDEKeyField.containsKey(className))
}
if(cacheDEKeyField.containsKey(className)) {
return cacheDEKeyField.get(className);
}
else{
DEFieldCacheMap.getFieldMap(className);
return cacheDEKeyField.get(className);
......@@ -148,10 +160,12 @@ public class DEFieldCacheMap {
*/
public static <T> List<Field> getFields(Class<T> clazz) {
String className=clazz.getName();
if(className.indexOf("_$")>0)
if(className.indexOf("_$")>0) {
className=className.substring(0, className.lastIndexOf("_$"));
if(cacheList.containsKey(className))
}
if(cacheList.containsKey(className)) {
return cacheList.get(className);
}
else{
DEFieldCacheMap.getFieldMap(className);
return cacheList.get(className);
......@@ -159,10 +173,12 @@ public class DEFieldCacheMap {
}
public static List<Field> getFields(String className) {
if(className.indexOf("_$")>0)
if(className.indexOf("_$")>0) {
className=className.substring(0, className.lastIndexOf("_$"));
if(cacheList.containsKey(className))
}
if(cacheList.containsKey(className)) {
return cacheList.get(className);
}
else{
DEFieldCacheMap.getFieldMap(className);
return cacheList.get(className);
......@@ -176,10 +192,12 @@ public class DEFieldCacheMap {
*/
public static <T> Hashtable<String,String> getFieldKeys(Class<T> clazz) {
String className=clazz.getName();
if(className.indexOf("_$")>0)
if(className.indexOf("_$")>0) {
className=className.substring(0, className.lastIndexOf("_$"));
if(cacheKey.containsKey(className))
}
if(cacheKey.containsKey(className)) {
return cacheKey.get(className);
}
else{
DEFieldCacheMap.getFieldMap(className);
return cacheKey.get(className);
......@@ -189,20 +207,25 @@ public class DEFieldCacheMap {
public static <T> String getFieldRealName(Class<T> clazz,String fieldname) {
fieldname=fieldname.toLowerCase();
Hashtable<String,String> keys=DEFieldCacheMap.getFieldKeys(clazz);
if(keys.containsKey(fieldname))
if(keys.containsKey(fieldname)) {
return keys.get(fieldname);
else if(keys.containsKey(fieldname.replace("_","")))
}
else if(keys.containsKey(fieldname.replace("_",""))) {
return keys.get(fieldname.replace("_",""));
else
}
else {
return "";
}
}
public static <T> Field getField(Class<T> clazz,String fieldname) {
String fieldRealName=DEFieldCacheMap.getFieldRealName(clazz,fieldname);
if(!StringUtils.isEmpty(fieldRealName))
if(!StringUtils.isEmpty(fieldRealName)) {
return DEFieldCacheMap.getFieldMap(clazz).get(fieldRealName);
else
}
else {
return null;
}
}
public static <T> String getFieldColumnName(Class<T> clazz,String fieldname) {
......@@ -226,6 +249,4 @@ public class DEFieldCacheMap {
}
return resultValue;
}
}
\ No newline at end of file
......@@ -19,30 +19,34 @@ public class DataObject {
final static public DateFormat dayFormat = new SimpleDateFormat("yyyy-MM-dd");
final static public String getStringValue(Object objValue, String strDefault) {
if (objValue == null) return strDefault;
if (objValue instanceof String) return (String) objValue;
if (objValue == null) {
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) {
String rt=datetimeFormat.format(objValue);
if(rt.endsWith(" 00:00:00"))
if(rt.endsWith(" 00:00:00")) {
rt=dayFormat.format(objValue);
else if(rt.endsWith(":00"))
}
else if(rt.endsWith(":00")) {
rt=datetimeFormat2.format(objValue);
}
return rt;
}
return objValue.toString();
}
public static <T> Object objectValueOf(Class<T> type,Object fieldValue) {
if(fieldValue==null)
if(fieldValue==null) {
return null;
}
Object resultValue=fieldValue;
String targetType=type.getSimpleName();
if(targetType.equalsIgnoreCase(fieldValue.getClass().getSimpleName()))
if(targetType.equalsIgnoreCase(fieldValue.getClass().getSimpleName())){
return resultValue;
}
if(targetType.equals("Boolean")){
resultValue=getBooleanValue(fieldValue,false);
}
......@@ -79,10 +83,9 @@ public class DataObject {
else if(targetType.equals("String")) {
resultValue= getStringValue(fieldValue,null);
}
if(resultValue==null)
if(resultValue==null) {
return null;
}
return resultValue;
}
......@@ -95,8 +98,9 @@ public class DataObject {
if (objValue == null) {
return jDefault;
}
if(objValue instanceof JSONObject)
if(objValue instanceof JSONObject) {
return (JSONObject)objValue;
}
String strValue = objValue.toString();
try {
return JSONObject.parseObject(strValue);
......@@ -111,8 +115,9 @@ public class DataObject {
if (objValue == null) {
return jDefault;
}
if(objValue instanceof JSONArray)
if(objValue instanceof JSONArray) {
return (JSONArray)objValue;
}
String strValue = objValue.toString();
try {
return JSONArray.parseArray(strValue);
......@@ -133,8 +138,9 @@ public class DataObject {
List<String> chk1=new ArrayList<>();
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));
}
}
return chk1;
}
......@@ -146,8 +152,9 @@ public class DataObject {
}
final static public Boolean getBooleanValue(Object objValue,Boolean bDefault) {
if (objValue == null) return bDefault;
if (objValue == null) {
return bDefault;
}
if (objValue instanceof Boolean) {
return (Boolean) objValue;
}
......@@ -155,20 +162,24 @@ public class DataObject {
}
final static public char[] getCharacterValue(Object objValue,char[] cDefault) {
if (objValue == null) return cDefault;
if (objValue == null) {
return cDefault;
}
return objValue.toString().toCharArray();
}
final static public Double getDoubleValue(Object objValue,Double dDefault) {
if (objValue == null) return dDefault;
if (objValue == null) {
return dDefault;
}
if (objValue instanceof Double) {
return (Double) objValue;
}
String strValue = objValue.toString();
if (StringUtils.isEmpty(strValue)) return null;
if (StringUtils.isEmpty(strValue)) {
return null;
}
strValue = strValue.replace(",", "");
return Double.parseDouble(strValue);
}
......@@ -179,8 +190,9 @@ public class DataObject {
return nDefault;
}
if(objValue instanceof Integer)
if(objValue instanceof Integer) {
return (Integer)objValue;
}
if (objValue instanceof Double) {
return ((Double) objValue).intValue();
......@@ -191,8 +203,9 @@ public class DataObject {
}
String strValue = objValue.toString();
if(StringUtils.isEmpty(strValue))
if(StringUtils.isEmpty(strValue)) {
return nDefault;
}
strValue = strValue.replace(",", "");
return Integer.parseInt(strValue);
}
......@@ -204,12 +217,13 @@ public class DataObject {
}
try {
if(objValue instanceof Float)
if(objValue instanceof Float) {
return (Float)objValue;
}
String strValue = objValue.toString();
if(StringUtils.isEmpty(strValue))
if(StringUtils.isEmpty(strValue)) {
return fDefault;
}
strValue = strValue.replace(",", "");
return Float.parseFloat(strValue);
} catch (Exception ex) {
......@@ -233,8 +247,9 @@ public class DataObject {
return BigDecimal.valueOf((Long)objValue);
}
String strValue = objValue.toString();
if(StringUtils.isEmpty(strValue))
if(StringUtils.isEmpty(strValue)) {
return fDefault;
}
strValue = strValue.replace(",", "");
return BigDecimal.valueOf(Double.parseDouble(strValue));
} catch (Exception ex) {
......@@ -253,8 +268,9 @@ public class DataObject {
}
else {
Long l=getLongValue(objValue,null);
if(l!=null)
if(l!=null) {
return BigInteger.valueOf(l);
}
}
} catch (Exception ex) {
......@@ -283,8 +299,9 @@ public class DataObject {
}
String strValue = objValue.toString();
if(StringUtils.isEmpty(strValue))
if(StringUtils.isEmpty(strValue)) {
return nDefault;
}
strValue = strValue.replace(",", "");
return Long.parseLong(strValue);
} catch (Exception ex) {
......@@ -294,7 +311,9 @@ public class DataObject {
final static public byte[] getBinaryValue(Object objValue, byte[] def) {
if (objValue == null) return def;
if (objValue == null) {
return def;
}
if(objValue instanceof byte[]){
return (byte[])objValue;
}
......@@ -312,7 +331,9 @@ public class DataObject {
* @
*/
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) {
java.sql.Timestamp ti = (java.sql.Timestamp) objValue;
......@@ -332,7 +353,9 @@ public class DataObject {
if (objValue instanceof String) {
String strValue = (String) objValue;
strValue = strValue.trim();
if (StringUtils.isEmpty(strValue)) return null;
if (StringUtils.isEmpty(strValue)) {
return null;
}
try {
java.util.Date date = parse((String) objValue);
......@@ -373,7 +396,9 @@ public class DataObject {
* @
*/
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);
java.sql.Timestamp retDate = new java.sql.Timestamp(dtDate.getTime());
return retDate;
......@@ -425,8 +450,9 @@ public class DataObject {
if(strTimeString.indexOf("T")!=-1){
strPart = strTimeString.split("[T]");
}
else
else{
strPart = strTimeString.split(" ");
}
if (strPart.length == 2) {
// 两个部分
String strDate = "";
......@@ -589,6 +615,4 @@ public class DataObject {
return new Timestamp(cl.getTime().getTime());
}
}
......@@ -42,10 +42,12 @@ public class AppController {
while(it.hasNext()) {
GrantedAuthority authority = (GrantedAuthority)it.next();
String strAuthority=authority.getAuthority();
if(strAuthority.startsWith("UNIRES_"+systemId))
if(strAuthority.startsWith("UNIRES_"+systemId)) {
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));
}
}
}
Map<String,Object> context = new HashMap<>();
......@@ -55,10 +57,12 @@ public class AppController {
appData.put("unires",uniRes);
appData.put("appmenu",appMenu);
appData.put("enablepermissionvalid",enablePermissionValid);
if(curUser.getSuperuser()==1)
if(curUser.getSuperuser()==1){
appData.put("enablepermissionvalid",false);
else
}
else{
appData.put("enablepermissionvalid",enablePermissionValid);
}
fillAppData(appData);
return ResponseEntity.status(HttpStatus.OK).body(appData);
}
......@@ -76,16 +80,18 @@ public class AppController {
@RequestMapping(method = RequestMethod.PUT, value = "/configs/{configType}/{targetType}")
public ResponseEntity<Boolean> saveConfig(@PathVariable("configType") String configType, @PathVariable("targetType") String targetType, @RequestBody JSONObject config) {
String userId=AuthenticationUser.getAuthenticationUser().getUserid();
if(StringUtils.isEmpty(userId))
if(StringUtils.isEmpty(userId)){
throw new BadRequestAlertException("保存配置失败,参数缺失","IBZConfig",configType);
}
return ResponseEntity.ok(ibzConfigService.saveConfig(configType,targetType,userId,config));
}
@RequestMapping(method = RequestMethod.GET, value = "/configs/{configType}/{targetType}")
public ResponseEntity<JSONObject> getConfig(@PathVariable("configType") String configType, @PathVariable("targetType") String targetType) {
String userId=AuthenticationUser.getAuthenticationUser().getUserid();
if(StringUtils.isEmpty(userId))
if(StringUtils.isEmpty(userId)){
throw new BadRequestAlertException("获取配置失败,参数缺失","IBZConfig",configType);
}
return ResponseEntity.ok(ibzConfigService.getConfig(configType,targetType,userId));
}
......
......@@ -56,5 +56,5 @@ public class AuthenticationController
authuserdetail= userDetailsService.loadUserByUsername(userDetails.getUsername());
}
return ResponseEntity.ok().body(authuserdetail);
}
}
}
......@@ -38,18 +38,22 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
@Override
@SneakyThrows
public boolean hasPermission(Authentication authentication, Object entity, Object action) {
if(!enablePermissionValid)
if(!enablePermissionValid){
return true;
}
Object principal = authentication.getPrincipal();
if(ObjectUtils.isEmpty(principal))
if(ObjectUtils.isEmpty(principal)){
return false;
}
AuthenticationUser authenticationUser= (AuthenticationUser) authentication.getPrincipal();
if(authenticationUser.getSuperuser()==1)
if(authenticationUser.getSuperuser()==1){
return true;
}
String strAction=String.valueOf(action);
Set<String> userAuthorities = getAuthorities(authentication,strAction);
if(userAuthorities.size()==0)
if(userAuthorities.size()==0){
return false;
}
if(isAllData(strAction,userAuthorities)){
return true;
}
......@@ -102,8 +106,9 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
*/
@SneakyThrows
private void setPermissionCondToSearchContext(EntityBase entity, QueryWrapperContext qc , Set<String> userAuthorities ,AuthenticationUser authenticationUser){
if(entity==null)
if(entity==null){
return ;
}
Map<String,String> permissionField=getPermissionField(entity);//获取组织、部门预置属性
String orgField=permissionField.get("orgfield");
String orgDeptField=permissionField.get("orgsecfield");
......@@ -185,8 +190,9 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
Iterator it = authorities.iterator();
while(it.hasNext()) {
GrantedAuthority authority = (GrantedAuthority)it.next();
if(authority.getAuthority().contains(action))
if(authority.getAuthority().contains(action)){
userAuthorities.add(authority.getAuthority());
}
}
return userAuthorities;
}
......@@ -253,23 +259,27 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
}
if(action.endsWith("Create") || action.endsWith("Save")){
if(!ObjectUtils.isEmpty(orgFieldValue) && !userOrg.contains(orgFieldValue))
if(!ObjectUtils.isEmpty(orgFieldValue) && !userOrg.contains(orgFieldValue)){
return false;
if(!ObjectUtils.isEmpty(orgDeptFieldValue) && !userOrgDept.contains(orgDeptFieldValue))
}
if(!ObjectUtils.isEmpty(orgDeptFieldValue) && !userOrgDept.contains(orgDeptFieldValue)){
return false;
if(!ObjectUtils.isEmpty(crateManFieldValue) && !authenticationUser.getUserid().equals(crateManFieldValue))
}
if(!ObjectUtils.isEmpty(crateManFieldValue) && !authenticationUser.getUserid().equals(crateManFieldValue)){
return false;
}
return true;
}
else{
if(!ObjectUtils.isEmpty(orgFieldValue) && userOrg.contains(orgFieldValue))
if(!ObjectUtils.isEmpty(orgFieldValue) && userOrg.contains(orgFieldValue)){
return true;
if(!ObjectUtils.isEmpty(orgDeptFieldValue) && userOrgDept.contains(orgDeptFieldValue))
}
if(!ObjectUtils.isEmpty(orgDeptFieldValue) && userOrgDept.contains(orgDeptFieldValue)){
return true;
if(!ObjectUtils.isEmpty(crateManFieldValue) && authenticationUser.getUserid().equals(crateManFieldValue))
}
if(!ObjectUtils.isEmpty(crateManFieldValue) && authenticationUser.getUserid().equals(crateManFieldValue)){
return true;
}
return false;
}
}
......@@ -293,12 +303,18 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
String fieldName=entry.getKey();//获取注解字段
DEField fieldAnnotation=entry.getValue();//获取注解值
DEPredefinedFieldType prefieldType=fieldAnnotation.preType();
if(prefieldType==prefieldType.ORGID)//用户配置系统预置属性-组织机构标识
//用户配置系统预置属性-组织机构标识
if(prefieldType==prefieldType.ORGID){
orgField=fieldName;
if(prefieldType==prefieldType.ORGSECTORID)//用户配置系统预置属性-部门标识
}
//用户配置系统预置属性-部门标识
if(prefieldType==prefieldType.ORGSECTORID){
orgDeptField=fieldName;
if(prefieldType==prefieldType.CREATEMAN)//用户配置系统预置属性-部门标识
}
//用户配置系统预置属性-部门标识
if(prefieldType==prefieldType.CREATEMAN){
createManField=fieldName;
}
}
permissionFiled.put("orgfield",orgField);
permissionFiled.put("orgsecfield",orgDeptField);
......
......@@ -260,10 +260,12 @@ public class AuthenticationUser implements UserDetails
return this.sessionParams;
}
private Map<String, Object> getUserSessionParam() {
if(userSessionParam!=null)
if(userSessionParam!=null){
return userSessionParam;
else
}
else{
return new HashMap<>();
}
}
public void setOrgInfo(Map<String, Set<String>> orgInfo) {
......
......@@ -29,8 +29,9 @@ public class IBZConfigService extends ServiceImpl<IBZConfigMapper, IBZConfig> im
@Cacheable( value="ibzrt_configs",key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2")
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);
}
IBZConfig config=this.getOne(Wrappers.query(IBZConfig.builder().systemId(systemId).cfgType(cfgType).targetType(targetType).userId(userId).build()),false);
if(config==null) {
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
@CacheEvict( value="ibzrt_configs",key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2")
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);
}
String cfg="{}";
if(config!=null)
if(config!=null){
cfg=JSONObject.toJSONString(config);
}
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")
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);
}
this.remove(Wrappers.query(IBZConfig.builder().systemId(systemId).cfgType(cfgType).targetType(targetType).userId(userId).build()));
}
......
......@@ -26,10 +26,10 @@ public class IBZUAAUserService implements AuthenticationUserService{
@Override
public AuthenticationUser loadUserByUsername(String username) {
AuthenticationUser user=uaaFeignClient.loginByUsername(username);
if(user==null)
if(user==null){
throw new BadRequestAlertException("登录失败","IBZUAAUser",username);
}
return user;
}
......@@ -48,8 +48,9 @@ public class IBZUAAUserService implements AuthenticationUserService{
logininfo.setLoginname(loginname);
logininfo.setPassword(password);
AuthenticationUser user=uaaFeignClient.login(logininfo);
if(user==null)
if(user==null){
throw new BadRequestAlertException("登录失败","IBZUAAUser",username);
}
return user;
}
......
......@@ -34,14 +34,18 @@ public class IBZUSERServiceImpl extends ServiceImpl<IBZUSERMapper, IBZUSER> impl
String[] data=username.split("[|]");
String loginname="";
String domains="";
if(data.length>0)
if(data.length>0){
loginname=data[0].trim();
if(data.length>1)
}
if(data.length>1){
domains=data[1].trim();
if(!StringUtils.isEmpty(loginname))
}
if(!StringUtils.isEmpty(loginname)){
conds.eq("loginname",loginname);
if(!StringUtils.isEmpty(domains))
}
if(!StringUtils.isEmpty(domains)){
conds.eq("domains",domains);
}
IBZUSER user = this.getOne(conds);
if (user == null) {
throw new UsernameNotFoundException("用户" + username + "未找到");
......@@ -55,10 +59,12 @@ public class IBZUSERServiceImpl extends ServiceImpl<IBZUSERMapper, IBZUSER> impl
@Override
public AuthenticationUser loadUserByLogin(String username, String password){
AuthenticationUser authuserdetail = loadUserByUsername(username);
if(pwencrymode==1)
if(pwencrymode==1){
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());
}
if(!authuserdetail.getPassword().equals( password )){
throw new BadRequestAlertException("用户名密码错误","IBZUSER",username);
}
......
......@@ -33,8 +33,9 @@ public class SimpleFileService implements FileService {
String fileFullPath = this.fileRoot+"ibizutil"+File.separator+fileid+File.separator+fileName;
File file = new File(fileFullPath);
File parent = new File(file.getParent());
if(!parent.exists())
if(!parent.exists()){
parent.mkdirs();
}
FileCopyUtils.copy(multipartFile.getInputStream(),Files.newOutputStream(file.toPath()));
item=new FileItem(fileid,fileName,fileid,fileName,(int)multipartFile.getSize(),extname);
} catch (IOException e) {
......
......@@ -29,8 +29,9 @@ public class FeignRequestInterceptor implements RequestInterceptor {
if (headerNames != null) {
while (headerNames.hasMoreElements()) {
String name = headerNames.nextElement();
if(name.equalsIgnoreCase("transfer-encoding"))
if(name.equalsIgnoreCase("transfer-encoding")){
continue;
}
String values = request.getHeader(name);
requestTemplate.header(name, values);
}
......
......@@ -41,7 +41,4 @@ public class SearchContextHandlerMethodArgumentResolver implements HandlerMethod
String json=objectMapper.writeValueAsString(set);
return objectMapper.readValue(json,parameter.getParameterType());
}
}
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册