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

ibiz4j 发布系统代码 [ibiz-task,任务调度]

上级 354fe565
......@@ -13,7 +13,7 @@
<template v-else>
<i v-if="isFirst" class='fa fa-cogs app-menu-icon'></i>
</template>
<span ref="circleText" :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name}`)">{{$t(`app.menus.${ctrlName}.${item.name}`)}}</span>
<span ref="circleText" :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name.toLowerCase()}`)">{{$t(`app.menus.${ctrlName}.${item.name.toLowerCase()}`)}}</span>
</template>
<app-menu-item :isCollapse="isCollapse" :menus="item.items" :ctrlName="ctrlName" :isFirst="false" :counterdata="counterdata" :popper-class="popperClass"></app-menu-item>
</el-submenu>
......@@ -23,18 +23,18 @@
<el-menu-item :class="[{'isFirst' : isFirst},item.textcls]" v-show="!item.hidden" :index="item.name" :key="item.id">
<template v-if="item.icon && item.icon != ''">
<img :src="item.icon" class='app-menu-icon' />
<span v-if="(isFirst && isCollapse) ? true : false" ref="circleText" :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name}`)">{{$t(`app.menus.${ctrlName}.${item.name}`)}}</span>
<span v-if="(isFirst && isCollapse) ? true : false" ref="circleText" :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name.toLowerCase()}`)">{{$t(`app.menus.${ctrlName}.${item.name.toLowerCase()}`)}}</span>
</template>
<template v-else-if="item.iconcls && item.iconcls != ''">
<i :class="[item.iconcls, 'app-menu-icon']"></i>
<span v-if="(isFirst && isCollapse) ? true : false" ref="circleText" :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name}`)">{{$t(`app.menus.${ctrlName}.${item.name}`)}}</span>
<span v-if="(isFirst && isCollapse) ? true : false" ref="circleText" :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name.toLowerCase()}`)">{{$t(`app.menus.${ctrlName}.${item.name.toLowerCase()}`)}}</span>
</template>
<template v-else>
<i v-if="isFirst" class='fa fa-cogs app-menu-icon'></i>
<span v-if="(isFirst && isCollapse) ? true : false" ref="circleText" :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name}`)">{{$t(`app.menus.${ctrlName}.${item.name}`)}}</span>
<span v-if="(isFirst && isCollapse) ? true : false" ref="circleText" :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name.toLowerCase()}`)">{{$t(`app.menus.${ctrlName}.${item.name.toLowerCase()}`)}}</span>
</template>
<template slot="title">
<span :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name}`)">{{$t(`app.menus.${ctrlName}.${item.name}`)}}</span>
<span :class="{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name.toLowerCase()}`)">{{$t(`app.menus.${ctrlName}.${item.name.toLowerCase()}`)}}</span>
<template v-if="counterdata && counterdata[item.counterid] && counterdata[item.counterid] > 0">
<span class="pull-right">
<badge :count="counterdata[item.counterid]" :overflow-count="9999"></badge>
......
......@@ -8,7 +8,7 @@
<img :src="item.iconcls" v-else-if="!Object.is(item.iconcls, '')" />
<i class="fa fa-cogs" v-else></i>
</span>
<span>{{$t(`app.menus.${ctrlName}.${item.name}`)}}</span>
<span>{{$t(`app.menus.${ctrlName}.${item.name.toLowerCase()}`)}}</span>
<span class="line"></span>
</p>
<p style=" display: 'flex' ">
......@@ -37,7 +37,7 @@
<img :src="item.iconcls" v-else-if="!Object.is(item.iconcls, '')" />
<i class="fa fa-cogs" v-else></i>
</span>
<h4>{{$t(`app.menus.${ctrlName}.${item.name}`)}}</h4>
<h4>{{$t(`app.menus.${ctrlName}.${item.name.toLowerCase()}`)}}</h4>
</div>
</card>
</template>
......
......@@ -9,14 +9,6 @@ import GridViewEngine from './grid-view-engine';
*/
export default class GridView8Engine extends GridViewEngine {
/**
* 表格部件
*
* @type {*}
* @memberof GridView8Engine
*/
protected grid: any;
/**
* 表格部件
*
......
......@@ -33,6 +33,8 @@ function getAppLocale(){
nomore:"དེ་ལས་མང་བ་མི་འདུག",
other:"གཞན་དག",
valueNotEmpty:"སྟོང་མི་ཆོག",
createFailed:"གསར་འཛུགས་ཕམ་པ།",
isExist:"གནས་པ་",
},
local:{
new: "གསར་འཛུགས།",
......
......@@ -33,6 +33,8 @@ function getAppLocale(){
nomore:"No more",
other:"other",
valueNotEmpty:"The value cannot be null",
createFailed:"Create Failed",
isExist:"Exist",
},
local:{
new: "New",
......
......@@ -33,6 +33,8 @@ function getAppLocale(){
nomore:"没有更多了",
other:"其他",
valueNotEmpty:"值不能为空",
createFailed:"创建失败",
isExist:"已存在",
},
local:{
new: "新建",
......
......@@ -86,17 +86,17 @@ mock.onDelete(new RegExp(/^\/jobslocks\/batch$/)).reply((config: any) => {
return [status, {}];
});
// Select
mock.onGet(new RegExp(/^\/jobslocks\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:jobslock 方法: Select");
// CheckKey
mock.onPost(new RegExp(/^\/jobslocks\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:jobslock 方法: CheckKey");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id'];
const matchArray:any = new RegExp(/^\/jobslocks\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url);
const matchArray:any = new RegExp(/^\/jobslocks\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -106,13 +106,23 @@ mock.onGet(new RegExp(/^\/jobslocks\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['id'] == tempValue['id'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, _items];
return [status, data];
});
// Create
......@@ -140,44 +150,6 @@ mock.onPost(new RegExp(/^\/jobslocks\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config
console.groupEnd();
return [status, mockDatas[0]];
});
// Update
mock.onPut(new RegExp(/^\/jobslocks\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:jobslock 方法: Update");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id'];
const matchArray:any = new RegExp(/^\/jobslocks\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['id'] == tempValue['id'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// GetDraft
mock.onGet(new RegExp(/^\/jobslocks\/getdraft$/)).reply((config: any) => {
......@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/jobslocks\/getdraft$/)).reply((config: any) => {
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/jobslocks\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:jobslock 方法: CheckKey");
// Save
mock.onPost(new RegExp(/^\/jobslocks\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:jobslock 方法: Save");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id'];
const matchArray:any = new RegExp(/^\/jobslocks\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
const matchArray:any = new RegExp(/^\/jobslocks\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -233,16 +205,16 @@ mock.onPost(new RegExp(/^\/jobslocks\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).rep
return [status, data];
});
// Save
mock.onPost(new RegExp(/^\/jobslocks\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:jobslock 方法: Save");
// Update
mock.onPut(new RegExp(/^\/jobslocks\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:jobslock 方法: Update");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id'];
const matchArray:any = new RegExp(/^\/jobslocks\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
const matchArray:any = new RegExp(/^\/jobslocks\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -322,10 +294,38 @@ mock.onGet(new RegExp(/^\/jobslocks\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((c
// URI参数传递情况未实现
// URI参数传递情况未实现
// Select
mock.onGet(new RegExp(/^\/jobslocks\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:jobslock 方法: Select");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id'];
const matchArray:any = new RegExp(/^\/jobslocks\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.groupEnd();
console.groupEnd();
return [status, _items];
});
// Remove
mock.onDelete(new RegExp(/^\/jobslocks\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:jobslock 方法: Remove");
// Get
mock.onGet(new RegExp(/^\/jobslocks\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:jobslock 方法: Get");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
......@@ -351,9 +351,9 @@ mock.onDelete(new RegExp(/^\/jobslocks\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((confi
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/jobslocks\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:jobslock 方法: Get");
// Remove
mock.onDelete(new RegExp(/^\/jobslocks\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:jobslock 方法: Remove");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
......
......@@ -86,17 +86,17 @@ mock.onDelete(new RegExp(/^\/jobslogs\/batch$/)).reply((config: any) => {
return [status, {}];
});
// Select
mock.onGet(new RegExp(/^\/jobslogs\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:jobslog 方法: Select");
// CheckKey
mock.onPost(new RegExp(/^\/jobslogs\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:jobslog 方法: CheckKey");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id'];
const matchArray:any = new RegExp(/^\/jobslogs\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url);
const matchArray:any = new RegExp(/^\/jobslogs\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -106,13 +106,23 @@ mock.onGet(new RegExp(/^\/jobslogs\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((c
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['id'] == tempValue['id'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, _items];
return [status, data];
});
// Create
......@@ -140,44 +150,6 @@ mock.onPost(new RegExp(/^\/jobslogs\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config:
console.groupEnd();
return [status, mockDatas[0]];
});
// Update
mock.onPut(new RegExp(/^\/jobslogs\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:jobslog 方法: Update");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id'];
const matchArray:any = new RegExp(/^\/jobslogs\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['id'] == tempValue['id'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// GetDraft
mock.onGet(new RegExp(/^\/jobslogs\/getdraft$/)).reply((config: any) => {
......@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/jobslogs\/getdraft$/)).reply((config: any) => {
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/jobslogs\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:jobslog 方法: CheckKey");
// Save
mock.onPost(new RegExp(/^\/jobslogs\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:jobslog 方法: Save");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id'];
const matchArray:any = new RegExp(/^\/jobslogs\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
const matchArray:any = new RegExp(/^\/jobslogs\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -233,16 +205,16 @@ mock.onPost(new RegExp(/^\/jobslogs\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).repl
return [status, data];
});
// Save
mock.onPost(new RegExp(/^\/jobslogs\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:jobslog 方法: Save");
// Update
mock.onPut(new RegExp(/^\/jobslogs\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:jobslog 方法: Update");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id'];
const matchArray:any = new RegExp(/^\/jobslogs\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
const matchArray:any = new RegExp(/^\/jobslogs\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -322,10 +294,38 @@ mock.onGet(new RegExp(/^\/jobslogs\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((co
// URI参数传递情况未实现
// URI参数传递情况未实现
// Select
mock.onGet(new RegExp(/^\/jobslogs\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:jobslog 方法: Select");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id'];
const matchArray:any = new RegExp(/^\/jobslogs\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.groupEnd();
console.groupEnd();
return [status, _items];
});
// Remove
mock.onDelete(new RegExp(/^\/jobslogs\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:jobslog 方法: Remove");
// Get
mock.onGet(new RegExp(/^\/jobslogs\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:jobslog 方法: Get");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
......@@ -351,9 +351,9 @@ mock.onDelete(new RegExp(/^\/jobslogs\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/jobslogs\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:jobslog 方法: Get");
// Remove
mock.onDelete(new RegExp(/^\/jobslogs\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:jobslog 方法: Remove");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
......
......@@ -86,17 +86,17 @@ mock.onDelete(new RegExp(/^\/jobsregistries\/batch$/)).reply((config: any) => {
return [status, {}];
});
// Select
mock.onGet(new RegExp(/^\/jobsregistries\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:jobsregistry 方法: Select");
// CheckKey
mock.onPost(new RegExp(/^\/jobsregistries\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:jobsregistry 方法: CheckKey");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id'];
const matchArray:any = new RegExp(/^\/jobsregistries\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url);
const matchArray:any = new RegExp(/^\/jobsregistries\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -106,13 +106,23 @@ mock.onGet(new RegExp(/^\/jobsregistries\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).re
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['id'] == tempValue['id'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, _items];
return [status, data];
});
// Create
......@@ -140,44 +150,6 @@ mock.onPost(new RegExp(/^\/jobsregistries\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((c
console.groupEnd();
return [status, mockDatas[0]];
});
// Update
mock.onPut(new RegExp(/^\/jobsregistries\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:jobsregistry 方法: Update");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id'];
const matchArray:any = new RegExp(/^\/jobsregistries\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['id'] == tempValue['id'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// GetDraft
mock.onGet(new RegExp(/^\/jobsregistries\/getdraft$/)).reply((config: any) => {
......@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/jobsregistries\/getdraft$/)).reply((config: any) => {
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/jobsregistries\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:jobsregistry 方法: CheckKey");
// Save
mock.onPost(new RegExp(/^\/jobsregistries\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:jobsregistry 方法: Save");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id'];
const matchArray:any = new RegExp(/^\/jobsregistries\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
const matchArray:any = new RegExp(/^\/jobsregistries\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -233,16 +205,16 @@ mock.onPost(new RegExp(/^\/jobsregistries\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)
return [status, data];
});
// Save
mock.onPost(new RegExp(/^\/jobsregistries\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:jobsregistry 方法: Save");
// Update
mock.onPut(new RegExp(/^\/jobsregistries\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:jobsregistry 方法: Update");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id'];
const matchArray:any = new RegExp(/^\/jobsregistries\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
const matchArray:any = new RegExp(/^\/jobsregistries\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -322,10 +294,38 @@ mock.onGet(new RegExp(/^\/jobsregistries\/fetchdefault(\?[\w-./?%&=,]*)*$/)).rep
// URI参数传递情况未实现
// URI参数传递情况未实现
// Select
mock.onGet(new RegExp(/^\/jobsregistries\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:jobsregistry 方法: Select");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id'];
const matchArray:any = new RegExp(/^\/jobsregistries\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.groupEnd();
console.groupEnd();
return [status, _items];
});
// Remove
mock.onDelete(new RegExp(/^\/jobsregistries\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:jobsregistry 方法: Remove");
// Get
mock.onGet(new RegExp(/^\/jobsregistries\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:jobsregistry 方法: Get");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
......@@ -351,9 +351,9 @@ mock.onDelete(new RegExp(/^\/jobsregistries\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/jobsregistries\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:jobsregistry 方法: Get");
// Remove
mock.onDelete(new RegExp(/^\/jobsregistries\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:jobsregistry 方法: Remove");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
......
......@@ -39,7 +39,7 @@ export default class JobsInfoServiceBase extends EntityService {
// 实体接口
/**
* Select接口方法
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -47,9 +47,8 @@ export default class JobsInfoServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof JobsInfoServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().get(`/jobsinfos/${context.jobsinfo}/select`,isloading);
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/jobsinfos/${context.jobsinfo}/checkkey`,data,isloading);
return res;
}
......@@ -78,7 +77,7 @@ export default class JobsInfoServiceBase extends EntityService {
}
/**
* Update接口方法
* Execute接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -86,16 +85,13 @@ export default class JobsInfoServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof JobsInfoServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/jobsinfos/${context.jobsinfo}`,data,isloading);
public async Execute(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/jobsinfos/${context.jobsinfo}/execute`,data,isloading);
return res;
}
/**
* Remove接口方法
* ExecuteBatch接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -103,9 +99,9 @@ export default class JobsInfoServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof JobsInfoServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().delete(`/jobsinfos/${context.jobsinfo}`,isloading);
return res;
public async ExecuteBatch(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/jobsinfos/executebatch`,tempData,isloading);
}
/**
......@@ -140,21 +136,7 @@ export default class JobsInfoServiceBase extends EntityService {
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof JobsInfoServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/jobsinfos/${context.jobsinfo}/checkkey`,data,isloading);
return res;
}
/**
* Execute接口方法
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -162,25 +144,11 @@ export default class JobsInfoServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof JobsInfoServiceBase
*/
public async Execute(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/jobsinfos/${context.jobsinfo}/execute`,data,isloading);
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().delete(`/jobsinfos/${context.jobsinfo}`,isloading);
return res;
}
/**
* ExecuteBatch接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof JobsInfoServiceBase
*/
public async ExecuteBatch(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/jobsinfos/executebatch`,tempData,isloading);
}
/**
* Save接口方法
*
......@@ -226,6 +194,23 @@ export default class JobsInfoServiceBase extends EntityService {
return res;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof JobsInfoServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/jobsinfos/${context.jobsinfo}`,data,isloading);
return res;
}
/**
* FetchDefault接口方法
*
......@@ -254,4 +239,19 @@ export default class JobsInfoServiceBase extends EntityService {
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/jobsinfos/searchdefault`,tempData,isloading);
}
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof JobsInfoServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().get(`/jobsinfos/${context.jobsinfo}/select`,isloading);
return res;
}
}
\ No newline at end of file
......@@ -39,7 +39,7 @@ export default class JobsLockServiceBase extends EntityService {
// 实体接口
/**
* Select接口方法
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -47,9 +47,8 @@ export default class JobsLockServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof JobsLockServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().get(`/jobslocks/${context.jobslock}/select`,isloading);
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/jobslocks/${context.jobslock}/checkkey`,data,isloading);
return res;
}
......@@ -77,37 +76,6 @@ export default class JobsLockServiceBase extends EntityService {
return res;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof JobsLockServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/jobslocks/${context.jobslock}`,data,isloading);
return res;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof JobsLockServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().delete(`/jobslocks/${context.jobslock}`,isloading);
return res;
}
/**
* Get接口方法
*
......@@ -140,7 +108,7 @@ export default class JobsLockServiceBase extends EntityService {
}
/**
* CheckKey接口方法
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -148,8 +116,8 @@ export default class JobsLockServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof JobsLockServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/jobslocks/${context.jobslock}/checkkey`,data,isloading);
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().delete(`/jobslocks/${context.jobslock}`,isloading);
return res;
}
......@@ -170,6 +138,23 @@ export default class JobsLockServiceBase extends EntityService {
return res;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof JobsLockServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/jobslocks/${context.jobslock}`,data,isloading);
return res;
}
/**
* FetchDefault接口方法
*
......@@ -198,4 +183,19 @@ export default class JobsLockServiceBase extends EntityService {
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/jobslocks/searchdefault`,tempData,isloading);
}
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof JobsLockServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().get(`/jobslocks/${context.jobslock}/select`,isloading);
return res;
}
}
\ No newline at end of file
......@@ -39,7 +39,7 @@ export default class JobsLogServiceBase extends EntityService {
// 实体接口
/**
* Select接口方法
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -47,9 +47,8 @@ export default class JobsLogServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof JobsLogServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().get(`/jobslogs/${context.jobslog}/select`,isloading);
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/jobslogs/${context.jobslog}/checkkey`,data,isloading);
return res;
}
......@@ -77,37 +76,6 @@ export default class JobsLogServiceBase extends EntityService {
return res;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof JobsLogServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/jobslogs/${context.jobslog}`,data,isloading);
return res;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof JobsLogServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().delete(`/jobslogs/${context.jobslog}`,isloading);
return res;
}
/**
* Get接口方法
*
......@@ -140,7 +108,7 @@ export default class JobsLogServiceBase extends EntityService {
}
/**
* CheckKey接口方法
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -148,8 +116,8 @@ export default class JobsLogServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof JobsLogServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/jobslogs/${context.jobslog}/checkkey`,data,isloading);
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().delete(`/jobslogs/${context.jobslog}`,isloading);
return res;
}
......@@ -170,6 +138,23 @@ export default class JobsLogServiceBase extends EntityService {
return res;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof JobsLogServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/jobslogs/${context.jobslog}`,data,isloading);
return res;
}
/**
* FetchDefault接口方法
*
......@@ -198,4 +183,19 @@ export default class JobsLogServiceBase extends EntityService {
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/jobslogs/searchdefault`,tempData,isloading);
}
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof JobsLogServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().get(`/jobslogs/${context.jobslog}/select`,isloading);
return res;
}
}
\ No newline at end of file
......@@ -39,7 +39,7 @@ export default class JobsRegistryServiceBase extends EntityService {
// 实体接口
/**
* Select接口方法
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -47,9 +47,8 @@ export default class JobsRegistryServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof JobsRegistryServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().get(`/jobsregistries/${context.jobsregistry}/select`,isloading);
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/jobsregistries/${context.jobsregistry}/checkkey`,data,isloading);
return res;
}
......@@ -77,37 +76,6 @@ export default class JobsRegistryServiceBase extends EntityService {
return res;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof JobsRegistryServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/jobsregistries/${context.jobsregistry}`,data,isloading);
return res;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof JobsRegistryServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().delete(`/jobsregistries/${context.jobsregistry}`,isloading);
return res;
}
/**
* Get接口方法
*
......@@ -140,7 +108,7 @@ export default class JobsRegistryServiceBase extends EntityService {
}
/**
* CheckKey接口方法
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -148,8 +116,8 @@ export default class JobsRegistryServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof JobsRegistryServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/jobsregistries/${context.jobsregistry}/checkkey`,data,isloading);
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().delete(`/jobsregistries/${context.jobsregistry}`,isloading);
return res;
}
......@@ -170,6 +138,23 @@ export default class JobsRegistryServiceBase extends EntityService {
return res;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof JobsRegistryServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/jobsregistries/${context.jobsregistry}`,data,isloading);
return res;
}
/**
* FetchDefault接口方法
*
......@@ -198,4 +183,19 @@ export default class JobsRegistryServiceBase extends EntityService {
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/jobsregistries/searchdefault`,tempData,isloading);
}
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof JobsRegistryServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().get(`/jobsregistries/${context.jobsregistry}/select`,isloading);
return res;
}
}
\ No newline at end of file
......@@ -23,7 +23,7 @@
<template v-else>
<i class='fa fa-cogs app-menu-icon'></i>
</template>
<span class='text' :title="$t('app.menus.taskindexview.' + item0.name)">{{$t('app.menus.taskindexview.' + item0.name)}}</span>
<span class='text' :title="$t('app.menus.taskindexview.' + item0.name.toLowerCase())">{{$t('app.menus.taskindexview.' + item0.name.toLowerCase())}}</span>
</template>
<template v-for="item1 in item0.items">
<template v-if="item1.items && Array.isArray(item1.items) && item1.items.length > 0">
......@@ -35,7 +35,7 @@
<template v-else-if="item1.iconcls && item1.iconcls != ''">
<i :class="[item1.iconcls, 'app-menu-icon']"></i>
</template>
<span class='text' :title="$t('app.menus.taskindexview.' + item1.name)">{{$t('app.menus.taskindexview.' + item1.name)}}</span>
<span class='text' :title="$t('app.menus.taskindexview.' + item1.name.toLowerCase())">{{$t('app.menus.taskindexview.' + item1.name.toLowerCase())}}</span>
</template>
<template v-for="item2 in item1.items">
<template v-if="item2.type =='MENUITEM'">
......@@ -47,7 +47,7 @@
<i :class="[item2.iconcls, 'app-menu-icon']"></i>
</template>
<template slot="title">
<span class="text" :title="$t('app.menus.taskindexview.' + item2.name)">{{$t('app.menus.taskindexview.' + item2.name)}}</span>
<span class="text" :title="$t('app.menus.taskindexview.' + item2.name.toLowerCase())">{{$t('app.menus.taskindexview.' + item2.name.toLowerCase())}}</span>
<template v-if="counterdata && counterdata[item2.counterid] && counterdata[item2.counterid] > 0">
<span class="pull-right">
<badge :count="counterdata[item2.counterid]" :overflow-count="9999"></badge>
......@@ -69,7 +69,7 @@
<i :class="[item1.iconcls, 'app-menu-icon']"></i>
</template>
<template slot="title">
<span class="text" :title="$t('app.menus.taskindexview.' + item1.name)">{{$t('app.menus.taskindexview.' + item1.name)}} </span>
<span class="text" :title="$t('app.menus.taskindexview.' + item1.name.toLowerCase())">{{$t('app.menus.taskindexview.' + item1.name.toLowerCase())}} </span>
<template v-if="counterdata && counterdata[item1.counterid] && counterdata[item1.counterid] > 0">
<span class="pull-right">
<badge :count="counterdata[item1.counterid]" :overflow-count="9999"></badge>
......@@ -95,7 +95,7 @@
<i class='fa fa-cogs app-menu-icon'></i>
</template>
<template slot="title">
<span class="text" :title="$t('app.menus.taskindexview.' + item0.name)">{{$t('app.menus.taskindexview.' + item0.name)}}</span>
<span class="text" :title="$t('app.menus.taskindexview.' + item0.name.toLowerCase())">{{$t('app.menus.taskindexview.' + item0.name.toLowerCase())}}</span>
<template v-if="counterdata && counterdata[item0.counterid] && counterdata[item0.counterid] > 0">
<span class="pull-right">
<badge :count="counterdata[item0.counterid]" :overflow-count="9999"></badge>
......
......@@ -749,8 +749,8 @@ export default class DefaultBase extends Vue implements ControlInterface {
let post: Promise<any> = this.service.loadDraft(this.loaddraftAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => {
if (!response.status || response.status !== 200) {
if (response.errorMessage) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
if (response.data && response.data.message) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
}
return;
}
......
......@@ -994,8 +994,8 @@ export default class MainBase extends Vue implements ControlInterface {
const post: Promise<any> = this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => {
if (!response.status || response.status !== 200) {
if (response.errorMessage) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
if (response.data && response.data.message) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
}
return;
}
......@@ -1045,7 +1045,7 @@ export default class MainBase extends Vue implements ControlInterface {
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
});
}
......@@ -1130,7 +1130,7 @@ export default class MainBase extends Vue implements ControlInterface {
resolve(response);
}).catch((response: any) => {
if (response && response.status != 200) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.message});
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
return;
}
if (!response || !response.status || !response.data) {
......@@ -1251,6 +1251,9 @@ export default class MainBase extends Vue implements ControlInterface {
const parentdata: any = {};
this.$emit('beforeload', parentdata);
Object.assign(arg, parentdata);
let tempViewParams:any = parentdata.viewparams?parentdata.viewparams:{};
Object.assign(tempViewParams,JSON.parse(JSON.stringify(this.viewparams)));
Object.assign(arg,{viewparams:tempViewParams});
const post: Promise<any> = this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => {
if (!response || response.status !== 200) {
......@@ -2147,8 +2150,8 @@ export default class MainBase extends Vue implements ControlInterface {
let post: Promise<any> = this.service.loadDraft(this.loaddraftAction, JSON.parse(JSON.stringify(this.context)), args[0], this.showBusyIndicator);
post.then((response: any) => {
if (!response.status || response.status !== 200) {
if (response.errorMessage) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
if (response.data && response.data.message) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
}
return;
}
......
......@@ -742,8 +742,8 @@ export default class DefaultBase extends Vue implements ControlInterface {
let post: Promise<any> = this.service.loadDraft(this.loaddraftAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => {
if (!response.status || response.status !== 200) {
if (response.errorMessage) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
if (response.data && response.data.message) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
}
return;
}
......
......@@ -950,8 +950,8 @@ export default class MainBase extends Vue implements ControlInterface {
const post: Promise<any> = this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => {
if (!response.status || response.status !== 200) {
if (response.errorMessage) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
if (response.data && response.data.message) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
}
return;
}
......@@ -1001,7 +1001,7 @@ export default class MainBase extends Vue implements ControlInterface {
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
});
}
......@@ -1086,7 +1086,7 @@ export default class MainBase extends Vue implements ControlInterface {
resolve(response);
}).catch((response: any) => {
if (response && response.status != 200) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.message});
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
return;
}
if (!response || !response.status || !response.data) {
......@@ -1207,6 +1207,9 @@ export default class MainBase extends Vue implements ControlInterface {
const parentdata: any = {};
this.$emit('beforeload', parentdata);
Object.assign(arg, parentdata);
let tempViewParams:any = parentdata.viewparams?parentdata.viewparams:{};
Object.assign(tempViewParams,JSON.parse(JSON.stringify(this.viewparams)));
Object.assign(arg,{viewparams:tempViewParams});
const post: Promise<any> = this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => {
if (!response || response.status !== 200) {
......@@ -2089,8 +2092,8 @@ export default class MainBase extends Vue implements ControlInterface {
let post: Promise<any> = this.service.loadDraft(this.loaddraftAction, JSON.parse(JSON.stringify(this.context)), args[0], this.showBusyIndicator);
post.then((response: any) => {
if (!response.status || response.status !== 200) {
if (response.errorMessage) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
if (response.data && response.data.message) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
}
return;
}
......
......@@ -713,8 +713,8 @@ export default class DefaultBase extends Vue implements ControlInterface {
let post: Promise<any> = this.service.loadDraft(this.loaddraftAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => {
if (!response.status || response.status !== 200) {
if (response.errorMessage) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
if (response.data && response.data.message) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
}
return;
}
......
......@@ -868,8 +868,8 @@ export default class MainBase extends Vue implements ControlInterface {
const post: Promise<any> = this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => {
if (!response.status || response.status !== 200) {
if (response.errorMessage) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
if (response.data && response.data.message) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
}
return;
}
......@@ -919,7 +919,7 @@ export default class MainBase extends Vue implements ControlInterface {
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
});
}
......@@ -1004,7 +1004,7 @@ export default class MainBase extends Vue implements ControlInterface {
resolve(response);
}).catch((response: any) => {
if (response && response.status != 200) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.message});
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
return;
}
if (!response || !response.status || !response.data) {
......@@ -1125,6 +1125,9 @@ export default class MainBase extends Vue implements ControlInterface {
const parentdata: any = {};
this.$emit('beforeload', parentdata);
Object.assign(arg, parentdata);
let tempViewParams:any = parentdata.viewparams?parentdata.viewparams:{};
Object.assign(tempViewParams,JSON.parse(JSON.stringify(this.viewparams)));
Object.assign(arg,{viewparams:tempViewParams});
const post: Promise<any> = this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => {
if (!response || response.status !== 200) {
......@@ -2003,8 +2006,8 @@ export default class MainBase extends Vue implements ControlInterface {
let post: Promise<any> = this.service.loadDraft(this.loaddraftAction, JSON.parse(JSON.stringify(this.context)), args[0], this.showBusyIndicator);
post.then((response: any) => {
if (!response.status || response.status !== 200) {
if (response.errorMessage) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
if (response.data && response.data.message) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
}
return;
}
......
......@@ -77,6 +77,32 @@
<workingDirectory>../../app_web</workingDirectory>
</configuration>
</execution>
<execution>
<id>prepare</id>
<configuration>
<executable>cp</executable>
<arguments>
<argument>../../${project.artifactId}.jar</argument>
<argument>${project.basedir}/src/main/docker/</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>buildpush</id>
<configuration>
<executable>docker</executable>
<arguments>
<argument>buildx</argument>
<argument>build</argument>
<argument>--platform</argument>
<argument>linux/amd64,linux/arm64</argument>
<argument>-t</argument>
<argument>${docker.image.prefix}/${project.artifactId}:latest</argument>
<argument>${project.basedir}/src/main/docker</argument>
<argument>--push</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
......@@ -114,7 +140,7 @@
</resource>
</resources>
</configuration>
</plugin>
</plugin>
</plugins>
</build>
</profile>
......
FROM openjdk:8-jre-alpine
FROM adoptopenjdk/openjdk8:jdk8u242-b08-centos
ENV TZ=Asia/Shanghai \
SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \
......
......@@ -7,22 +7,6 @@ logging:
#zuul网关路由设置
zuul:
routes:
jobs_log:
path: /jobslogs/**
serviceId: ${ibiz.ref.service.ibztask-api:ibztask-api}
stripPrefix: false
jobs_registry:
path: /jobsregistries/**
serviceId: ${ibiz.ref.service.ibztask-api:ibztask-api}
stripPrefix: false
jobs_info:
path: /jobsinfos/**
serviceId: ${ibiz.ref.service.ibztask-api:ibztask-api}
stripPrefix: false
jobs_lock:
path: /jobslocks/**
serviceId: ${ibiz.ref.service.ibztask-api:ibztask-api}
stripPrefix: false
loginv7:
path: /v7/login
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
......@@ -79,5 +63,21 @@ zuul:
path: /sysauthlogs
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix: false
jobs_log:
path: /jobslogs/**
serviceId: ${ibiz.ref.service.ibztask-api:ibztask-api}
stripPrefix: false
jobs_registry:
path: /jobsregistries/**
serviceId: ${ibiz.ref.service.ibztask-api:ibztask-api}
stripPrefix: false
jobs_info:
path: /jobsinfos/**
serviceId: ${ibiz.ref.service.ibztask-api:ibztask-api}
stripPrefix: false
jobs_lock:
path: /jobslocks/**
serviceId: ${ibiz.ref.service.ibztask-api:ibztask-api}
stripPrefix: false
sensitive-headers:
- Cookie,Set-Cookie,Authorization
......@@ -217,8 +217,8 @@ public class JobsInfoServiceImpl extends ServiceImpl<JobsInfoMapper, JobsInfo> i
*/
@Override
public Page<JobsInfo> searchDefault(JobsInfoSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<JobsInfo> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<JobsInfo>(pages.getRecords(), context.getPageable(), pages.getTotal());
com.baomidou.mybatisplus.extension.plugins.pagination.Page<JobsInfo> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<JobsInfo>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
......
......@@ -184,8 +184,8 @@ public class JobsLockServiceImpl extends ServiceImpl<JobsLockMapper, JobsLock> i
*/
@Override
public Page<JobsLock> searchDefault(JobsLockSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<JobsLock> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<JobsLock>(pages.getRecords(), context.getPageable(), pages.getTotal());
com.baomidou.mybatisplus.extension.plugins.pagination.Page<JobsLock> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<JobsLock>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
......
......@@ -184,8 +184,8 @@ public class JobsLogServiceImpl extends ServiceImpl<JobsLogMapper, JobsLog> impl
*/
@Override
public Page<JobsLog> searchDefault(JobsLogSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<JobsLog> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<JobsLog>(pages.getRecords(), context.getPageable(), pages.getTotal());
com.baomidou.mybatisplus.extension.plugins.pagination.Page<JobsLog> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<JobsLog>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
......
......@@ -184,8 +184,8 @@ public class JobsRegistryServiceImpl extends ServiceImpl<JobsRegistryMapper, Job
*/
@Override
public Page<JobsRegistry> searchDefault(JobsRegistrySearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<JobsRegistry> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<JobsRegistry>(pages.getRecords(), context.getPageable(), pages.getTotal());
com.baomidou.mybatisplus.extension.plugins.pagination.Page<JobsRegistry> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<JobsRegistry>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
......
package cn.ibizlab.core.util.config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;
/**
* 通用配置类
*/
@Configuration
public class CommonAutoConfig {
@Value("${jbpm.enable.multi.con:true}")
private String flag;
/**
* 处理逻辑节点支持多来源配置
*/
@Component
public class InstallSystemParamsCommandLineRunner implements CommandLineRunner {
@Override
public void run(String... var1){
System.setProperty("jbpm.enable.multi.con", flag);
}
}
}
......@@ -4,7 +4,7 @@
<!--输出实体[JOBS_INFO]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-jobs_info-5-1">
<changeSet author="root" id="tab-jobs_info-5-1">
<createTable tableName="JOBS_INFO">
<column name="ID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_JOBS_INFO_ID"/>
......@@ -42,7 +42,7 @@
<!--输出实体[JOBS_LOCK]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-jobs_lock-1-2">
<changeSet author="root" id="tab-jobs_lock-1-2">
<createTable tableName="JOBS_LOCK">
<column name="ID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_JOBS_LOCK_ID"/>
......@@ -58,7 +58,7 @@
<!--输出实体[JOBS_LOG]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-jobs_log-1-3">
<changeSet author="root" id="tab-jobs_log-1-3">
<createTable tableName="JOBS_LOG">
<column name="ID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_JOBS_LOG_ID"/>
......@@ -86,7 +86,7 @@
<!--输出实体[JOBS_REGISTRY]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-jobs_registry-1-4">
<changeSet author="root" id="tab-jobs_registry-1-4">
<createTable tableName="JOBS_REGISTRY">
<column name="ID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_JOBS_REGISTRY_ID"/>
......
......@@ -73,7 +73,41 @@
</resource>
</resources>
</configuration>
</plugin>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>prepare</id>
<configuration>
<executable>cp</executable>
<arguments>
<argument>../../${project.artifactId}.jar</argument>
<argument>${project.basedir}/src/main/docker/</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>buildpush</id>
<configuration>
<executable>docker</executable>
<arguments>
<argument>buildx</argument>
<argument>build</argument>
<argument>--platform</argument>
<argument>linux/amd64,linux/arm64</argument>
<argument>-t</argument>
<argument>${docker.image.prefix}/${project.artifactId}:latest</argument>
<argument>${project.basedir}/src/main/docker</argument>
<argument>--push</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
......
FROM openjdk:8-jre-alpine
FROM adoptopenjdk/openjdk8:jdk8u242-b08-centos
ENV TZ=Asia/Shanghai \
SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \
......
......@@ -65,25 +65,15 @@ public class JobsInfoResource {
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsInfo-Update-all')")
@ApiOperation(value = "更新任务信息", tags = {"任务信息" }, notes = "更新任务信息")
@RequestMapping(method = RequestMethod.PUT, value = "/jobsinfos/{jobsinfo_id}")
public ResponseEntity<JobsInfoDTO> update(@PathVariable("jobsinfo_id") String jobsinfo_id, @RequestBody JobsInfoDTO jobsinfodto) {
JobsInfo domain = jobsinfoMapping.toDomain(jobsinfodto);
domain .setId(jobsinfo_id);
jobsinfoService.update(domain );
JobsInfoDTO dto = jobsinfoMapping.toDto(domain);
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsInfo-Get-all')")
@ApiOperation(value = "获取任务信息", tags = {"任务信息" }, notes = "获取任务信息")
@RequestMapping(method = RequestMethod.GET, value = "/jobsinfos/{jobsinfo_id}")
public ResponseEntity<JobsInfoDTO> get(@PathVariable("jobsinfo_id") String jobsinfo_id) {
JobsInfo domain = jobsinfoService.get(jobsinfo_id);
JobsInfoDTO dto = jobsinfoMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsInfo-Update-all')")
@ApiOperation(value = "批量更新任务信息", tags = {"任务信息" }, notes = "批量更新任务信息")
@RequestMapping(method = RequestMethod.PUT, value = "/jobsinfos/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<JobsInfoDTO> jobsinfodtos) {
jobsinfoService.updateBatch(jobsinfoMapping.toDomain(jobsinfodtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsInfo-Remove-all')")
@ApiOperation(value = "删除任务信息", tags = {"任务信息" }, notes = "删除任务信息")
@RequestMapping(method = RequestMethod.DELETE, value = "/jobsinfos/{jobsinfo_id}")
......@@ -99,20 +89,23 @@ public class JobsInfoResource {
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsInfo-Get-all')")
@ApiOperation(value = "获取任务信息", tags = {"任务信息" }, notes = "获取任务信息")
@RequestMapping(method = RequestMethod.GET, value = "/jobsinfos/{jobsinfo_id}")
public ResponseEntity<JobsInfoDTO> get(@PathVariable("jobsinfo_id") String jobsinfo_id) {
JobsInfo domain = jobsinfoService.get(jobsinfo_id);
JobsInfoDTO dto = jobsinfoMapping.toDto(domain);
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsInfo-Update-all')")
@ApiOperation(value = "更新任务信息", tags = {"任务信息" }, notes = "更新任务信息")
@RequestMapping(method = RequestMethod.PUT, value = "/jobsinfos/{jobsinfo_id}")
public ResponseEntity<JobsInfoDTO> update(@PathVariable("jobsinfo_id") String jobsinfo_id, @RequestBody JobsInfoDTO jobsinfodto) {
JobsInfo domain = jobsinfoMapping.toDomain(jobsinfodto);
domain .setId(jobsinfo_id);
jobsinfoService.update(domain );
JobsInfoDTO dto = jobsinfoMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "获取任务信息草稿", tags = {"任务信息" }, notes = "获取任务信息草稿")
@RequestMapping(method = RequestMethod.GET, value = "/jobsinfos/getdraft")
public ResponseEntity<JobsInfoDTO> getDraft(JobsInfoDTO dto) {
JobsInfo domain = jobsinfoMapping.toDomain(dto);
return ResponseEntity.status(HttpStatus.OK).body(jobsinfoMapping.toDto(jobsinfoService.getDraft(domain)));
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsInfo-Update-all')")
@ApiOperation(value = "批量更新任务信息", tags = {"任务信息" }, notes = "批量更新任务信息")
@RequestMapping(method = RequestMethod.PUT, value = "/jobsinfos/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<JobsInfoDTO> jobsinfodtos) {
jobsinfoService.updateBatch(jobsinfoMapping.toDomain(jobsinfodtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@ApiOperation(value = "检查任务信息", tags = {"任务信息" }, notes = "检查任务信息")
......@@ -140,6 +133,13 @@ public class JobsInfoResource {
return ResponseEntity.status(HttpStatus.OK).body(result);
}
@ApiOperation(value = "获取任务信息草稿", tags = {"任务信息" }, notes = "获取任务信息草稿")
@RequestMapping(method = RequestMethod.GET, value = "/jobsinfos/getdraft")
public ResponseEntity<JobsInfoDTO> getDraft(JobsInfoDTO dto) {
JobsInfo domain = jobsinfoMapping.toDomain(dto);
return ResponseEntity.status(HttpStatus.OK).body(jobsinfoMapping.toDto(jobsinfoService.getDraft(domain)));
}
@ApiOperation(value = "保存任务信息", tags = {"任务信息" }, notes = "保存任务信息")
@RequestMapping(method = RequestMethod.POST, value = "/jobsinfos/save")
public ResponseEntity<JobsInfoDTO> save(@RequestBody JobsInfoDTO jobsinfodto) {
......
......@@ -65,25 +65,15 @@ public class JobsLockResource {
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLock-Update-all')")
@ApiOperation(value = "更新任务锁", tags = {"任务锁" }, notes = "更新任务锁")
@RequestMapping(method = RequestMethod.PUT, value = "/jobslocks/{jobslock_id}")
public ResponseEntity<JobsLockDTO> update(@PathVariable("jobslock_id") String jobslock_id, @RequestBody JobsLockDTO jobslockdto) {
JobsLock domain = jobslockMapping.toDomain(jobslockdto);
domain .setId(jobslock_id);
jobslockService.update(domain );
JobsLockDTO dto = jobslockMapping.toDto(domain);
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLock-Get-all')")
@ApiOperation(value = "获取任务锁", tags = {"任务锁" }, notes = "获取任务锁")
@RequestMapping(method = RequestMethod.GET, value = "/jobslocks/{jobslock_id}")
public ResponseEntity<JobsLockDTO> get(@PathVariable("jobslock_id") String jobslock_id) {
JobsLock domain = jobslockService.get(jobslock_id);
JobsLockDTO dto = jobslockMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLock-Update-all')")
@ApiOperation(value = "批量更新任务锁", tags = {"任务锁" }, notes = "批量更新任务锁")
@RequestMapping(method = RequestMethod.PUT, value = "/jobslocks/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<JobsLockDTO> jobslockdtos) {
jobslockService.updateBatch(jobslockMapping.toDomain(jobslockdtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLock-Remove-all')")
@ApiOperation(value = "删除任务锁", tags = {"任务锁" }, notes = "删除任务锁")
@RequestMapping(method = RequestMethod.DELETE, value = "/jobslocks/{jobslock_id}")
......@@ -99,20 +89,23 @@ public class JobsLockResource {
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLock-Get-all')")
@ApiOperation(value = "获取任务锁", tags = {"任务锁" }, notes = "获取任务锁")
@RequestMapping(method = RequestMethod.GET, value = "/jobslocks/{jobslock_id}")
public ResponseEntity<JobsLockDTO> get(@PathVariable("jobslock_id") String jobslock_id) {
JobsLock domain = jobslockService.get(jobslock_id);
JobsLockDTO dto = jobslockMapping.toDto(domain);
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLock-Update-all')")
@ApiOperation(value = "更新任务锁", tags = {"任务锁" }, notes = "更新任务锁")
@RequestMapping(method = RequestMethod.PUT, value = "/jobslocks/{jobslock_id}")
public ResponseEntity<JobsLockDTO> update(@PathVariable("jobslock_id") String jobslock_id, @RequestBody JobsLockDTO jobslockdto) {
JobsLock domain = jobslockMapping.toDomain(jobslockdto);
domain .setId(jobslock_id);
jobslockService.update(domain );
JobsLockDTO dto = jobslockMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "获取任务锁草稿", tags = {"任务锁" }, notes = "获取任务锁草稿")
@RequestMapping(method = RequestMethod.GET, value = "/jobslocks/getdraft")
public ResponseEntity<JobsLockDTO> getDraft(JobsLockDTO dto) {
JobsLock domain = jobslockMapping.toDomain(dto);
return ResponseEntity.status(HttpStatus.OK).body(jobslockMapping.toDto(jobslockService.getDraft(domain)));
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLock-Update-all')")
@ApiOperation(value = "批量更新任务锁", tags = {"任务锁" }, notes = "批量更新任务锁")
@RequestMapping(method = RequestMethod.PUT, value = "/jobslocks/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<JobsLockDTO> jobslockdtos) {
jobslockService.updateBatch(jobslockMapping.toDomain(jobslockdtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@ApiOperation(value = "检查任务锁", tags = {"任务锁" }, notes = "检查任务锁")
......@@ -121,6 +114,13 @@ public class JobsLockResource {
return ResponseEntity.status(HttpStatus.OK).body(jobslockService.checkKey(jobslockMapping.toDomain(jobslockdto)));
}
@ApiOperation(value = "获取任务锁草稿", tags = {"任务锁" }, notes = "获取任务锁草稿")
@RequestMapping(method = RequestMethod.GET, value = "/jobslocks/getdraft")
public ResponseEntity<JobsLockDTO> getDraft(JobsLockDTO dto) {
JobsLock domain = jobslockMapping.toDomain(dto);
return ResponseEntity.status(HttpStatus.OK).body(jobslockMapping.toDto(jobslockService.getDraft(domain)));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLock-Save-all')")
@ApiOperation(value = "保存任务锁", tags = {"任务锁" }, notes = "保存任务锁")
@RequestMapping(method = RequestMethod.POST, value = "/jobslocks/save")
......
......@@ -65,25 +65,15 @@ public class JobsLogResource {
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLog-Update-all')")
@ApiOperation(value = "更新任务调度日志", tags = {"任务调度日志" }, notes = "更新任务调度日志")
@RequestMapping(method = RequestMethod.PUT, value = "/jobslogs/{jobslog_id}")
public ResponseEntity<JobsLogDTO> update(@PathVariable("jobslog_id") String jobslog_id, @RequestBody JobsLogDTO jobslogdto) {
JobsLog domain = jobslogMapping.toDomain(jobslogdto);
domain .setId(jobslog_id);
jobslogService.update(domain );
JobsLogDTO dto = jobslogMapping.toDto(domain);
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLog-Get-all')")
@ApiOperation(value = "获取任务调度日志", tags = {"任务调度日志" }, notes = "获取任务调度日志")
@RequestMapping(method = RequestMethod.GET, value = "/jobslogs/{jobslog_id}")
public ResponseEntity<JobsLogDTO> get(@PathVariable("jobslog_id") String jobslog_id) {
JobsLog domain = jobslogService.get(jobslog_id);
JobsLogDTO dto = jobslogMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLog-Update-all')")
@ApiOperation(value = "批量更新任务调度日志", tags = {"任务调度日志" }, notes = "批量更新任务调度日志")
@RequestMapping(method = RequestMethod.PUT, value = "/jobslogs/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<JobsLogDTO> jobslogdtos) {
jobslogService.updateBatch(jobslogMapping.toDomain(jobslogdtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLog-Remove-all')")
@ApiOperation(value = "删除任务调度日志", tags = {"任务调度日志" }, notes = "删除任务调度日志")
@RequestMapping(method = RequestMethod.DELETE, value = "/jobslogs/{jobslog_id}")
......@@ -99,20 +89,23 @@ public class JobsLogResource {
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLog-Get-all')")
@ApiOperation(value = "获取任务调度日志", tags = {"任务调度日志" }, notes = "获取任务调度日志")
@RequestMapping(method = RequestMethod.GET, value = "/jobslogs/{jobslog_id}")
public ResponseEntity<JobsLogDTO> get(@PathVariable("jobslog_id") String jobslog_id) {
JobsLog domain = jobslogService.get(jobslog_id);
JobsLogDTO dto = jobslogMapping.toDto(domain);
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLog-Update-all')")
@ApiOperation(value = "更新任务调度日志", tags = {"任务调度日志" }, notes = "更新任务调度日志")
@RequestMapping(method = RequestMethod.PUT, value = "/jobslogs/{jobslog_id}")
public ResponseEntity<JobsLogDTO> update(@PathVariable("jobslog_id") String jobslog_id, @RequestBody JobsLogDTO jobslogdto) {
JobsLog domain = jobslogMapping.toDomain(jobslogdto);
domain .setId(jobslog_id);
jobslogService.update(domain );
JobsLogDTO dto = jobslogMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "获取任务调度日志草稿", tags = {"任务调度日志" }, notes = "获取任务调度日志草稿")
@RequestMapping(method = RequestMethod.GET, value = "/jobslogs/getdraft")
public ResponseEntity<JobsLogDTO> getDraft(JobsLogDTO dto) {
JobsLog domain = jobslogMapping.toDomain(dto);
return ResponseEntity.status(HttpStatus.OK).body(jobslogMapping.toDto(jobslogService.getDraft(domain)));
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLog-Update-all')")
@ApiOperation(value = "批量更新任务调度日志", tags = {"任务调度日志" }, notes = "批量更新任务调度日志")
@RequestMapping(method = RequestMethod.PUT, value = "/jobslogs/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<JobsLogDTO> jobslogdtos) {
jobslogService.updateBatch(jobslogMapping.toDomain(jobslogdtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@ApiOperation(value = "检查任务调度日志", tags = {"任务调度日志" }, notes = "检查任务调度日志")
......@@ -121,6 +114,13 @@ public class JobsLogResource {
return ResponseEntity.status(HttpStatus.OK).body(jobslogService.checkKey(jobslogMapping.toDomain(jobslogdto)));
}
@ApiOperation(value = "获取任务调度日志草稿", tags = {"任务调度日志" }, notes = "获取任务调度日志草稿")
@RequestMapping(method = RequestMethod.GET, value = "/jobslogs/getdraft")
public ResponseEntity<JobsLogDTO> getDraft(JobsLogDTO dto) {
JobsLog domain = jobslogMapping.toDomain(dto);
return ResponseEntity.status(HttpStatus.OK).body(jobslogMapping.toDto(jobslogService.getDraft(domain)));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLog-Save-all')")
@ApiOperation(value = "保存任务调度日志", tags = {"任务调度日志" }, notes = "保存任务调度日志")
@RequestMapping(method = RequestMethod.POST, value = "/jobslogs/save")
......
......@@ -65,25 +65,15 @@ public class JobsRegistryResource {
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsRegistry-Update-all')")
@ApiOperation(value = "更新任务注册信息", tags = {"任务注册信息" }, notes = "更新任务注册信息")
@RequestMapping(method = RequestMethod.PUT, value = "/jobsregistries/{jobsregistry_id}")
public ResponseEntity<JobsRegistryDTO> update(@PathVariable("jobsregistry_id") String jobsregistry_id, @RequestBody JobsRegistryDTO jobsregistrydto) {
JobsRegistry domain = jobsregistryMapping.toDomain(jobsregistrydto);
domain .setId(jobsregistry_id);
jobsregistryService.update(domain );
JobsRegistryDTO dto = jobsregistryMapping.toDto(domain);
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsRegistry-Get-all')")
@ApiOperation(value = "获取任务注册信息", tags = {"任务注册信息" }, notes = "获取任务注册信息")
@RequestMapping(method = RequestMethod.GET, value = "/jobsregistries/{jobsregistry_id}")
public ResponseEntity<JobsRegistryDTO> get(@PathVariable("jobsregistry_id") String jobsregistry_id) {
JobsRegistry domain = jobsregistryService.get(jobsregistry_id);
JobsRegistryDTO dto = jobsregistryMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsRegistry-Update-all')")
@ApiOperation(value = "批量更新任务注册信息", tags = {"任务注册信息" }, notes = "批量更新任务注册信息")
@RequestMapping(method = RequestMethod.PUT, value = "/jobsregistries/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<JobsRegistryDTO> jobsregistrydtos) {
jobsregistryService.updateBatch(jobsregistryMapping.toDomain(jobsregistrydtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsRegistry-Remove-all')")
@ApiOperation(value = "删除任务注册信息", tags = {"任务注册信息" }, notes = "删除任务注册信息")
@RequestMapping(method = RequestMethod.DELETE, value = "/jobsregistries/{jobsregistry_id}")
......@@ -99,20 +89,23 @@ public class JobsRegistryResource {
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsRegistry-Get-all')")
@ApiOperation(value = "获取任务注册信息", tags = {"任务注册信息" }, notes = "获取任务注册信息")
@RequestMapping(method = RequestMethod.GET, value = "/jobsregistries/{jobsregistry_id}")
public ResponseEntity<JobsRegistryDTO> get(@PathVariable("jobsregistry_id") String jobsregistry_id) {
JobsRegistry domain = jobsregistryService.get(jobsregistry_id);
JobsRegistryDTO dto = jobsregistryMapping.toDto(domain);
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsRegistry-Update-all')")
@ApiOperation(value = "更新任务注册信息", tags = {"任务注册信息" }, notes = "更新任务注册信息")
@RequestMapping(method = RequestMethod.PUT, value = "/jobsregistries/{jobsregistry_id}")
public ResponseEntity<JobsRegistryDTO> update(@PathVariable("jobsregistry_id") String jobsregistry_id, @RequestBody JobsRegistryDTO jobsregistrydto) {
JobsRegistry domain = jobsregistryMapping.toDomain(jobsregistrydto);
domain .setId(jobsregistry_id);
jobsregistryService.update(domain );
JobsRegistryDTO dto = jobsregistryMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "获取任务注册信息草稿", tags = {"任务注册信息" }, notes = "获取任务注册信息草稿")
@RequestMapping(method = RequestMethod.GET, value = "/jobsregistries/getdraft")
public ResponseEntity<JobsRegistryDTO> getDraft(JobsRegistryDTO dto) {
JobsRegistry domain = jobsregistryMapping.toDomain(dto);
return ResponseEntity.status(HttpStatus.OK).body(jobsregistryMapping.toDto(jobsregistryService.getDraft(domain)));
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsRegistry-Update-all')")
@ApiOperation(value = "批量更新任务注册信息", tags = {"任务注册信息" }, notes = "批量更新任务注册信息")
@RequestMapping(method = RequestMethod.PUT, value = "/jobsregistries/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<JobsRegistryDTO> jobsregistrydtos) {
jobsregistryService.updateBatch(jobsregistryMapping.toDomain(jobsregistrydtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@ApiOperation(value = "检查任务注册信息", tags = {"任务注册信息" }, notes = "检查任务注册信息")
......@@ -121,6 +114,13 @@ public class JobsRegistryResource {
return ResponseEntity.status(HttpStatus.OK).body(jobsregistryService.checkKey(jobsregistryMapping.toDomain(jobsregistrydto)));
}
@ApiOperation(value = "获取任务注册信息草稿", tags = {"任务注册信息" }, notes = "获取任务注册信息草稿")
@RequestMapping(method = RequestMethod.GET, value = "/jobsregistries/getdraft")
public ResponseEntity<JobsRegistryDTO> getDraft(JobsRegistryDTO dto) {
JobsRegistry domain = jobsregistryMapping.toDomain(dto);
return ResponseEntity.status(HttpStatus.OK).body(jobsregistryMapping.toDto(jobsregistryService.getDraft(domain)));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsRegistry-Save-all')")
@ApiOperation(value = "保存任务注册信息", tags = {"任务注册信息" }, notes = "保存任务注册信息")
@RequestMapping(method = RequestMethod.POST, value = "/jobsregistries/save")
......
......@@ -28,9 +28,11 @@ import org.springframework.expression.ExpressionParser;
import org.springframework.expression.spel.standard.SpelExpressionParser;
import org.springframework.expression.spel.support.StandardEvaluationContext;
import org.springframework.stereotype.Component;
import org.springframework.util.ClassUtils;
import org.springframework.util.DigestUtils;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import org.springframework.core.annotation.Order;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamReader;
......@@ -51,6 +53,7 @@ import java.util.concurrent.ConcurrentMap;
@Aspect
@Component
@Slf4j
@Order(100)
public class DELogicAspect {
private static BpmnXMLConverter bpmnXMLConverter = new BpmnXMLConverter();
......@@ -80,7 +83,7 @@ public class DELogicAspect {
if(!ObjectUtils.isEmpty(entity)) {
String id = DEFieldCacheMap.getDEKeyField(entity.getClass());
if(StringUtils.isEmpty(id)) {
log.debug("无法获取实体主键属性[{}]",entity.getClass().getSimpleName());
log.debug("无法获取实体主键属性[{}]",getEntityName(entity));
return point.proceed();
}
entity.set(id, arg);
......@@ -101,6 +104,17 @@ public class DELogicAspect {
return point.proceed();
}
/**
* 判断类是否被代理类代理
*/
private String getEntityName(Object entity){
String entityName = entity.getClass().getSimpleName();
if(entityName.contains("$$")){
entityName = ClassUtils.getUserClass(entity.getClass()).getSimpleName();
}
return entityName;
}
/**
* 前附加逻辑
*
......@@ -108,7 +122,7 @@ public class DELogicAspect {
* @param action
*/
private void executeBeforeLogic(EntityBase entity, String action) {
Resource bpmnFile = getLocalModel(entity.getClass().getSimpleName(), action, LogicExecMode.BEFORE);
Resource bpmnFile = getLocalModel(getEntityName(entity), action, LogicExecMode.BEFORE);
if (bpmnFile != null && bpmnFile.exists() && isValid(bpmnFile, entity, action)) {
executeLogic(bpmnFile, entity, action);
}
......@@ -121,7 +135,7 @@ public class DELogicAspect {
* @param action
*/
private void executeAfterLogic(EntityBase entity, String action) {
Resource bpmnFile = getLocalModel(entity.getClass().getSimpleName(), action, LogicExecMode.AFTER);
Resource bpmnFile = getLocalModel(getEntityName(entity), action, LogicExecMode.AFTER);
if (bpmnFile != null && bpmnFile.exists() && isValid(bpmnFile, entity, action)) {
executeLogic(bpmnFile, entity, action);
}
......@@ -134,7 +148,7 @@ public class DELogicAspect {
* @param action
*/
private void executeLogic(EntityBase entity, String action) {
Resource bpmnFile = getLocalModel(entity.getClass().getSimpleName(), action, LogicExecMode.EXEC);
Resource bpmnFile = getLocalModel(getEntityName(entity), action, LogicExecMode.EXEC);
if (bpmnFile != null && bpmnFile.exists() && isValid(bpmnFile, entity, action)) {
executeLogic(bpmnFile, entity, action);
}
......@@ -148,7 +162,7 @@ public class DELogicAspect {
*/
private void executeLogic(Resource bpmnFile, Object entity, String action) {
try {
log.debug("开始执行实体处理逻辑[{}:{}:{}:本地模式]", entity.getClass().getSimpleName(), action, bpmnFile.getFilename());
log.debug("开始执行实体处理逻辑[{}:{}:{}:本地模式]", getEntityName(entity), action, bpmnFile.getFilename());
String bpmnId = DigestUtils.md5DigestAsHex(bpmnFile.getURL().getPath().getBytes());
DELogic logic = getDELogic(bpmnFile);
if (logic == null) {
......@@ -172,9 +186,9 @@ public class DELogicAspect {
}
}
kieSession.startProcess(mainProcess.getId());
log.debug("实体处理逻辑[{}:{}:{}:本地模式]执行结束", entity.getClass().getSimpleName(), action, bpmnFile.getFilename());
} catch (IOException e) {
log.error("实体处理逻辑[{}:{}:{}:本地模式]发生异常", entity.getClass().getSimpleName(), action, bpmnFile.getFilename());
log.debug("实体处理逻辑[{}:{}:{}:本地模式]执行结束", getEntityName(entity), action, bpmnFile.getFilename());
} catch (Exception e) {
log.error("实体处理逻辑[{}:{}:{}:本地模式]发生异常", getEntityName(entity), action, bpmnFile.getFilename());
throw new BadRequestAlertException("执行实体处理逻辑发生异常" + e.getMessage(), "DELogicAspect", "executeLogic");
}
}
......@@ -414,7 +428,7 @@ public class DELogicAspect {
* @return
*/
private boolean isValid(Resource bpmn, Object entity, Object action) {
String logicId = String.format("%s%s%s", entity.getClass().getSimpleName(), action, bpmn.getFilename()).toLowerCase();
String logicId = String.format("%s%s%s", getEntityName(entity), action, bpmn.getFilename()).toLowerCase();
if (validLogic.containsKey(logicId)) {
return true;
} else {
......
package cn.ibizlab.util.cache.cache;
import cn.ibizlab.util.helper.Globs;
import org.springframework.cache.caffeine.CaffeineCache;
import com.github.benmanes.caffeine.cache.Cache;
import javax.validation.constraints.NotNull;
import java.util.Set;
import java.util.stream.Collectors;
/**
* 自定义的Caffeine缓存
*/
public class CusCaffeineCache extends CaffeineCache{
public CusCaffeineCache(String name, Cache<Object, Object> cache) {
super(name,cache);
}
public CusCaffeineCache(String name, Cache<Object, Object> cache, boolean allowNullValues) {
super(name,cache,allowNullValues);
}
@Override
public void evict(@NotNull Object key) {
if (key instanceof String && ((String) key).startsWith("glob:")) {
String globPattern = ((String)key).split("glob:")[1];
// 将Glob匹配转换成正则匹配
String regexPattern = Globs.toUnixRegexPattern(globPattern);
// String regexPattern = Globs.toWindowsRegexPattern(globPattern);
Cache<Object,Object> cache = super.getNativeCache();
Set<Object> keySet = cache.asMap().keySet();
keySet = keySet.stream().filter(o->o.toString().matches(regexPattern)).collect(Collectors.toSet());
cache.invalidateAll(keySet);
}else{
super.evict(key);
}
}
}
......@@ -4,6 +4,8 @@ import org.springframework.data.redis.cache.RedisCache;
import org.springframework.data.redis.cache.RedisCacheConfiguration;
import org.springframework.data.redis.cache.RedisCacheWriter;
import javax.validation.constraints.NotNull;
/**
* 自定义的redis缓存
*/
......@@ -12,4 +14,18 @@ public class CusRedisCache extends RedisCache {
public CusRedisCache(String name, RedisCacheWriter redisCacheWriter, RedisCacheConfiguration configuration) {
super(name, redisCacheWriter, configuration);
}
@Override
public void evict(@NotNull Object key) {
if (key instanceof String && ((String) key).startsWith("glob:")) {
String globPattern = ((String)key).split("glob:")[1];
byte[] globPatternBytes = super.getCacheConfiguration().getConversionService().convert(globPattern,byte[].class);
if(globPatternBytes!=null){
super.getNativeCache().clean(super.getName(),globPatternBytes);
}
}else{
super.evict(key);
}
}
}
......@@ -15,6 +15,7 @@ import java.util.Collections;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.TimeUnit;
import cn.ibizlab.util.cache.cache.CusCaffeineCache;
import cn.ibizlab.util.cache.cache.CusRedisCache;
import cn.ibizlab.util.cache.cache.LayeringCache;
......@@ -80,7 +81,7 @@ public class LayeringCacheManager implements CacheManager {
* @return
*/
protected Cache createCache(String cacheName) {
return new LayeringCache(cacheName,new CaffeineCache(cacheName, this.cacheBuilder.build(), true),new CusRedisCache(cacheName, redisCacheWriter, redisConfiguration),redisTemplate);
return new LayeringCache(cacheName,new CusCaffeineCache(cacheName, this.cacheBuilder.build(), true),new CusRedisCache(cacheName, redisCacheWriter, redisConfiguration),redisTemplate);
}
/**
......
......@@ -3,6 +3,7 @@ package cn.ibizlab.util.client;
import org.springframework.stereotype.Component;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
import java.io.Serializable;
@Component
public class IBZWFFallback implements IBZWFFeignClient {
......@@ -26,4 +27,25 @@ public class IBZWFFallback implements IBZWFFeignClient {
public JSONObject wfstart(String system, String appname, String entity, String businessKey, JSONObject instance) {
return null;
}
@Override
public Map<String, Map<String, Object>> getTask(String system, String userId, String entity, String instTag, String instTag2 ,String taskType) {
return null;
}
@Override
public Map<String, Map<String, Object>> getTaskByStep(String system, String userId, String entity, String instTag, String instTag2 , String taskType, String srfwfstep) {
return null;
}
@Override
public Integer getDataAccessMode(String system, String entity, Serializable businessKey) {
return null;
}
@Override
public Map<String, Map<String, Object>> getMyTask(String system, String appName, String entity) {
return null;
}
}
......@@ -4,6 +4,7 @@ import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
import java.io.Serializable;
@FeignClient(value = "${ibiz.ref.service.wf:ibzwf-api}",contextId = "wf",fallback = IBZWFFallback.class)
public interface IBZWFFeignClient
......@@ -25,4 +26,19 @@ public interface IBZWFFeignClient
@PathVariable("entity") String entity,
@PathVariable("businessKey") String businessKey, @RequestBody JSONObject instance);
@RequestMapping(method = RequestMethod.POST, value = "/{system}-user-{userId}/{insttag}/{insttag2}/{entity}/tasks")
Map<String, Map<String, Object>> getTask(@PathVariable("system") String system, @PathVariable("userId") String userId,
@PathVariable("entity") String entity, @PathVariable("insttag") String instTag, @PathVariable("insttag2") String instTag2, @RequestParam("srfwf") String taskType);
@RequestMapping(method = RequestMethod.POST, value = "/{system}-user-{userId}/{insttag}/{insttag2}/{entity}/tasks")
Map<String, Map<String, Object>> getTaskByStep(@PathVariable("system") String system, @PathVariable("userId") String userId,
@PathVariable("entity") String entity, @PathVariable("insttag") String instTag, @PathVariable("insttag2") String instTag2 , @RequestParam("srfwf") String taskType, @RequestParam("n_taskdefinitionkey_eq") String srfwfstep);
@RequestMapping(method = RequestMethod.GET, value = "/{system}/{entity}/{businessKey}/dataaccessmode")
Integer getDataAccessMode(@PathVariable("system") String system, @PathVariable("entity") String entity, @PathVariable("businessKey") Serializable businessKey);
@RequestMapping(method = RequestMethod.GET, value = "/{system}-app-{appname}/{entity}/mytasks")
Map<String,Map<String,Object>> getMyTask(@PathVariable("system") String system,@PathVariable("appname") String appName,
@PathVariable("entity") String entity);
}
......@@ -17,4 +17,6 @@ public class DELogic implements Serializable {
List<DELogic> refLogic;
List<Resource> refRuleFiles;
String md5;
int logicMode;
long loadedTime;
}
......@@ -43,5 +43,21 @@ public enum DEFieldDefaultValueType {
/**
* 默认值
*/
NONE
NONE,
/**
* 用户自定义
*/
USER,
/**
* 用户自定义2
*/
USER2,
/**
* 用户自定义3
*/
USER3,
/**
* 用户自定义4
*/
USER4
}
......@@ -55,5 +55,17 @@ public enum DEPredefinedFieldType {
/**
* 不处理
*/
NONE
NONE,
/**
* 动态父类型
*/
PARENTTYPE,
/**
* 动态父标识
*/
PARENTID,
/**
* 动态父名称
*/
PARENTNAME
}
......@@ -9,6 +9,8 @@ import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.context.request.NativeWebRequest;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.multipart.MaxUploadSizeExceededException;
import org.zalando.problem.DefaultProblem;
import org.zalando.problem.Problem;
import org.zalando.problem.ProblemBuilder;
......@@ -105,4 +107,31 @@ public class ExceptionTranslator implements ProblemHandling {
headers.add("X-ibz-params", entityName);
return headers;
}
/**
* 上传文件大小超出限制异常
*/
@Value("${spring.servlet.multipart.max-file-size}")
private String maxFileSize;
@ExceptionHandler(MaxUploadSizeExceededException.class)
public ResponseEntity<Problem> handlerMaxUploadFile(MaxUploadSizeExceededException ex,NativeWebRequest request){
Problem problem = Problem.builder()
.withStatus(Status.BAD_REQUEST)
.withDetail("上传文件不能大于"+maxFileSize)
.with("message", "上传文件不能大于"+maxFileSize)
.with("exmessage",""+ex.getMessage())
.build();
return create(ex, problem, request);
}
@ExceptionHandler(Exception.class)
public ResponseEntity<Problem> handlerTest(Exception ex,NativeWebRequest request){
Problem problem = Problem.builder()
.withStatus(Status.INTERNAL_SERVER_ERROR)
.withDetail("内部服务器异常")
.with("message", "内部服务器异常")
.with("exmessage",""+ex.getMessage())
.build();
return create(ex, problem, request);
}
}
......@@ -67,6 +67,11 @@ public class SearchContextBase implements ISearchContext{
* 工作流流程标识
*/
public String processDefinitionKey;
/**
* 工作流标识
*/
@JsonProperty("srfwf")
public String srfWF;
/**
* 获取工作流步骤标识
......
package cn.ibizlab.util.helper;
import java.util.regex.PatternSyntaxException;
/**
* Copy from class sun.nio.fs.Globs
*/
public class Globs {
private Globs() { }
private static final String regexMetaChars = ".^$+{[]|()";
private static final String globMetaChars = "\\*?[{";
private static boolean isRegexMeta(char c) {
return regexMetaChars.indexOf(c) != -1;
}
private static boolean isGlobMeta(char c) {
return globMetaChars.indexOf(c) != -1;
}
private static char EOL = 0; //TBD
private static char next(String glob, int i) {
if (i < glob.length()) {
return glob.charAt(i);
}
return EOL;
}
/**
* Creates a regex pattern from the given glob expression.
*
* @throws PatternSyntaxException
*/
private static String toRegexPattern(String globPattern, boolean isDos) {
boolean inGroup = false;
StringBuilder regex = new StringBuilder("^");
int i = 0;
while (i < globPattern.length()) {
char c = globPattern.charAt(i++);
switch (c) {
case '\\':
// escape special characters
if (i == globPattern.length()) {
throw new PatternSyntaxException("No character to escape",
globPattern, i - 1);
}
char next = globPattern.charAt(i++);
if (isGlobMeta(next) || isRegexMeta(next)) {
regex.append('\\');
}
regex.append(next);
break;
case '/':
if (isDos) {
regex.append("\\\\");
} else {
regex.append(c);
}
break;
case '[':
// don't match name separator in class
if (isDos) {
regex.append("[[^\\\\]&&[");
} else {
regex.append("[[^/]&&[");
}
if (next(globPattern, i) == '^') {
// escape the regex negation char if it appears
regex.append("\\^");
i++;
} else {
// negation
if (next(globPattern, i) == '!') {
regex.append('^');
i++;
}
// hyphen allowed at start
if (next(globPattern, i) == '-') {
regex.append('-');
i++;
}
}
boolean hasRangeStart = false;
char last = 0;
while (i < globPattern.length()) {
c = globPattern.charAt(i++);
if (c == ']') {
break;
}
if (c == '/' || (isDos && c == '\\')) {
throw new PatternSyntaxException("Explicit 'name separator' in class",
globPattern, i - 1);
}
// TBD: how to specify ']' in a class?
if (c == '\\' || c == '[' ||
c == '&' && next(globPattern, i) == '&') {
// escape '\', '[' or "&&" for regex class
regex.append('\\');
}
regex.append(c);
if (c == '-') {
if (!hasRangeStart) {
throw new PatternSyntaxException("Invalid range",
globPattern, i - 1);
}
if ((c = next(globPattern, i++)) == EOL || c == ']') {
break;
}
if (c < last) {
throw new PatternSyntaxException("Invalid range",
globPattern, i - 3);
}
regex.append(c);
hasRangeStart = false;
} else {
hasRangeStart = true;
last = c;
}
}
if (c != ']') {
throw new PatternSyntaxException("Missing ']", globPattern, i - 1);
}
regex.append("]]");
break;
case '{':
if (inGroup) {
throw new PatternSyntaxException("Cannot nest groups",
globPattern, i - 1);
}
regex.append("(?:(?:");
inGroup = true;
break;
case '}':
if (inGroup) {
regex.append("))");
inGroup = false;
} else {
regex.append('}');
}
break;
case ',':
if (inGroup) {
regex.append(")|(?:");
} else {
regex.append(',');
}
break;
case '*':
if (next(globPattern, i) == '*') {
// crosses directory boundaries
regex.append(".*");
i++;
} else {
// within directory boundary
if (isDos) {
regex.append("[^\\\\]*");
} else {
regex.append("[^/]*");
}
}
break;
case '?':
if (isDos) {
regex.append("[^\\\\]");
} else {
regex.append("[^/]");
}
break;
default:
if (isRegexMeta(c)) {
regex.append('\\');
}
regex.append(c);
}
}
if (inGroup) {
throw new PatternSyntaxException("Missing '}", globPattern, i - 1);
}
return regex.append('$').toString();
}
public static String toUnixRegexPattern(String globPattern) {
return toRegexPattern(globPattern, false);
}
public static String toWindowsRegexPattern(String globPattern) {
return toRegexPattern(globPattern, true);
}
}
......@@ -280,22 +280,26 @@ public class RuleUtils
}
return finalTime.getTime()<tm.getTime();
}
else if (finalObject instanceof Integer)
{
return (((Integer) finalObject).intValue() < ((Integer)exp).intValue());
}
else if (finalObject instanceof Double)
{
return (((Double) finalObject).doubleValue() < ((Double)exp).doubleValue());
}
else if (finalObject instanceof Float)
{
return (((Float) finalObject).floatValue() < ((Float)exp).floatValue());
}
else if (finalObject instanceof String)
{
return finalObject.toString().compareToIgnoreCase(exp.toString())<0;
}
else if (finalObject instanceof Integer)
{
return Integer.parseInt(finalObject.toString()) < Integer.parseInt(exp.toString());
}
else if (finalObject instanceof Double)
{
return Double.parseDouble(finalObject.toString()) < Double.parseDouble(exp.toString());
}
else if (finalObject instanceof Float)
{
return Float.parseFloat(finalObject.toString()) < Float.parseFloat(exp.toString());
}
else if (finalObject instanceof String)
{
return finalObject.toString().compareToIgnoreCase(exp.toString())<0;
}
else if (finalObject instanceof Long)
{
return Long.parseLong(finalObject.toString()) < Long.parseLong(exp.toString());
}
else
return false;
}
......
......@@ -12,6 +12,7 @@ import org.springframework.http.ResponseEntity;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import java.util.*;
@RestController
......@@ -95,6 +96,26 @@ public class AppController {
return ResponseEntity.ok(ibzConfigService.getConfig(configType,targetType,userId));
}
@RequestMapping(method = RequestMethod.GET, value = "/configs/share/{id}")
public ResponseEntity<JSONObject> getShareConfig(@PathVariable("id") String id) {
JSONObject jo = ibzConfigService.getShareConfig(id);
if (jo == null) {
throw new BadRequestAlertException("无效的共享配置数据", "IBZConfig", id);
}
return ResponseEntity.ok(jo);
}
@RequestMapping(method = RequestMethod.GET, value = "/configs/share/{configType}/{targetType}")
public ResponseEntity<String> shareConfig(@PathVariable("configType") String configType, @PathVariable("targetType") String targetType) {
String userId = AuthenticationUser.getAuthenticationUser().getUserid();
if (StringUtils.isEmpty(userId)) {
throw new BadRequestAlertException("分享配置失败,参数缺失", "IBZConfig", configType);
}
String id = IdWorker.get32UUID();
ibzConfigService.saveShareConfig(id, configType, targetType, userId);
return ResponseEntity.ok(id);
}
/**
* 应用参数扩展
* @param appData
......
......@@ -13,6 +13,7 @@ import org.springframework.security.core.Authentication;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.stereotype.Component;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import java.io.Serializable;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
......@@ -300,20 +301,22 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
Map <String, DEField> preFields= DEFieldCacheMap.getDEFields(entityBase.getClass()); //从缓存中获取当前类预置属性
for (Map.Entry<String,DEField> entry : preFields.entrySet()){
String fieldName=entry.getKey();//获取注解字段
DEField fieldAnnotation=entry.getValue();//获取注解值
String fieldName=fieldAnnotation.name();//获取注解字段
DEPredefinedFieldType prefieldType=fieldAnnotation.preType();
//用户配置系统预置属性-组织机构标识
if(prefieldType==prefieldType.ORGID){
orgField=fieldName;
}
//用户配置系统预置属性-部门标识
if(prefieldType==prefieldType.ORGSECTORID){
orgDeptField=fieldName;
}
//用户配置系统预置属性-部门标识
if(prefieldType==prefieldType.CREATEMAN){
createManField=fieldName;
if(!StringUtils.isEmpty(fieldName)){
//用户配置系统预置属性-组织机构标识
if(prefieldType==prefieldType.ORGID){
orgField=fieldName;
}
//用户配置系统预置属性-部门标识
if(prefieldType==prefieldType.ORGSECTORID){
orgDeptField=fieldName;
}
//用户配置系统预置属性-部门标识
if(prefieldType==prefieldType.CREATEMAN){
createManField=fieldName;
}
}
}
permissionFiled.put("orgfield",orgField);
......
......@@ -20,7 +20,7 @@ public class AuthenticationEntryPoint implements org.springframework.security.we
/**
* 当用户尝试访问安全的REST资源而不提供任何凭据时,将调用此方法发送401 响应
*/
response.sendError(HttpServletResponse.SC_UNAUTHORIZED, authException==null?"Unauthorized":authException.getMessage());
response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "账号身份已过期,请重新登录。");
}
......
......@@ -9,6 +9,10 @@ import java.io.Serializable;
@AllArgsConstructor
@JsonIgnoreProperties(ignoreUnknown = true)
public class AuthenticationInfo implements Serializable {
private final String token;
private final AuthenticationUser user;
private String token;
private AuthenticationUser user;
public AuthenticationInfo() {
}
}
......@@ -260,7 +260,6 @@ public class AuthenticationUser implements UserDetails
{
sessionParams = getUserSessionParam();
sessionParams.put("srfsystemid",this.getSrfsystemid());
sessionParams.put("srfdynainstid",this.getSrfdynainstid());
sessionParams.put("srfpersonid", this.getUserid());
sessionParams.put("srfpersonname", this.getPersonname());
sessionParams.put("srforgsectorid", this.getMdeptid());
......
......@@ -24,7 +24,7 @@ public interface AuthenticationUserService extends UserDetailsService {
@Cacheable( value="ibzuaa_users", key = "'getByUsername:'+#p0")
AuthenticationUser loadUserByLogin(String username,String password);
@CacheEvict( value="ibzuaa_users", key = "'getByUsername:'+#p0")
@CacheEvict( value="ibzuaa_users", key = "'glob:*getByUsername:'+#p0")
default void resetByUsername(String username){}
......
......@@ -64,4 +64,14 @@ public class IBZConfigService extends ServiceImpl<IBZConfigMapper, IBZConfig> im
this.remove(Wrappers.query(IBZConfig.builder().systemId(systemId).cfgType(cfgType).targetType(targetType).userId(userId).build()));
}
@Cacheable(value="ibzrt_shareconfigs",key = "'cfgid:'+#p0")
public JSONObject saveShareConfig(String id, String cfgType,String targetType,String userId){
return this.getConfig(cfgType, targetType, userId);
}
@Cacheable(value="ibzrt_shareconfigs",key = "'cfgid:'+#p0")
public JSONObject getShareConfig(String id){
return null;
}
}
\ No newline at end of file
package cn.ibizlab.util.web;
import cn.ibizlab.util.filter.SearchContextBase;
import cn.ibizlab.util.domain.DTOBase;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.core.MethodParameter;
......@@ -24,7 +25,7 @@ public class SearchContextHandlerMethodArgumentResolver implements HandlerMethod
@Override
public boolean supportsParameter(MethodParameter parameter) {
return SearchContextBase.class.isAssignableFrom(parameter.getParameterType());
return SearchContextBase.class.isAssignableFrom(parameter.getParameterType()) || DTOBase.class.isAssignableFrom(parameter.getParameterType());
}
@Override
......@@ -35,7 +36,7 @@ public class SearchContextHandlerMethodArgumentResolver implements HandlerMethod
for (String key : params.keySet()) {
set.put(key,params.get(key)[0]);
}
if((!set.containsKey("size")) ){
if(SearchContextBase.class.isAssignableFrom(parameter.getParameterType()) && (!set.containsKey("size"))){
set.put("size", pageLimit);
}
String json = objectMapper.writeValueAsString(set);
......
......@@ -23,7 +23,7 @@ spring:
datasource:
username: a_A_5d9d78509
password: '@6dEfb3@'
url: jdbc:mysql://172.16.180.232:3306/a_A_5d9d78509?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
url: jdbc:mysql://172.16.180.232:3306/a_A_5d9d78509?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true&serverTimezone=GMT%2B8
driver-class-name: com.mysql.jdbc.Driver
filters: stat,wall,log4j2
#配置初始化大小/最小/最大
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册