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

ibiz4j 发布系统代码 [ibiz-uaa,UAA鉴权]

上级 0eeca172
......@@ -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;
/**
* 表格部件
*
......
......@@ -38,6 +38,8 @@ function getAppLocale(){
nomore:"དེ་ལས་མང་བ་མི་འདུག",
other:"གཞན་དག",
valueNotEmpty:"སྟོང་མི་ཆོག",
createFailed:"གསར་འཛུགས་ཕམ་པ།",
isExist:"གནས་པ་",
},
local:{
new: "གསར་འཛུགས།",
......
......@@ -38,6 +38,8 @@ function getAppLocale(){
nomore:"No more",
other:"other",
valueNotEmpty:"The value cannot be null",
createFailed:"Create Failed",
isExist:"Exist",
},
local:{
new: "New",
......
......@@ -38,6 +38,8 @@ function getAppLocale(){
nomore:"没有更多了",
other:"其他",
valueNotEmpty:"值不能为空",
createFailed:"创建失败",
isExist:"已存在",
},
local:{
new: "新建",
......
......@@ -87,16 +87,16 @@ mock.onDelete(new RegExp(/^\/sysapps\/batch$/)).reply((config: any) => {
});
// Select
mock.onGet(new RegExp(/^\/sysapps\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:sysapp 方法: Select");
// CheckKey
mock.onPost(new RegExp(/^\/sysapps\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:sysapp 方法: 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(/^\/sysapps\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url);
const matchArray:any = new RegExp(/^\/sysapps\/([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(/^\/sysapps\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((co
});
});
}
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
......@@ -141,44 +151,6 @@ mock.onPost(new RegExp(/^\/sysapps\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config:
return [status, mockDatas[0]];
});
// Update
mock.onPut(new RegExp(/^\/sysapps\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:sysapp 方法: 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(/^\/sysapps\/([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(/^\/sysapps\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:sysapp 方法: GetDraft");
......@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/sysapps\/getdraft$/)).reply((config: any) => {
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/sysapps\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:sysapp 方法: CheckKey");
// Save
mock.onPost(new RegExp(/^\/sysapps\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:sysapp 方法: 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(/^\/sysapps\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
const matchArray:any = new RegExp(/^\/sysapps\/([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(/^\/sysapps\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply
return [status, data];
});
// Save
mock.onPost(new RegExp(/^\/sysapps\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:sysapp 方法: Save");
// Update
mock.onPut(new RegExp(/^\/sysapps\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:sysapp 方法: 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(/^\/sysapps\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
const matchArray:any = new RegExp(/^\/sysapps\/([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(/^\/sysapps\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((con
// URI参数传递情况未实现
// URI参数传递情况未实现
// Select
mock.onGet(new RegExp(/^\/sysapps\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:sysapp 方法: 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(/^\/sysapps\/([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(/^\/sysapps\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:sysapp 方法: Remove");
// Get
mock.onGet(new RegExp(/^\/sysapps\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:sysapp 方法: 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(/^\/sysapps\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config:
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/sysapps\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:sysapp 方法: Get");
// Remove
mock.onDelete(new RegExp(/^\/sysapps\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:sysapp 方法: Remove");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
......
......@@ -87,16 +87,16 @@ mock.onDelete(new RegExp(/^\/sysauthlogs\/batch$/)).reply((config: any) => {
});
// Select
mock.onGet(new RegExp(/^\/sysauthlogs\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:sysauthlog 方法: Select");
// CheckKey
mock.onPost(new RegExp(/^\/sysauthlogs\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:sysauthlog 方法: 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> = ['logid'];
const matchArray:any = new RegExp(/^\/sysauthlogs\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url);
const matchArray:any = new RegExp(/^\/sysauthlogs\/([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(/^\/sysauthlogs\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.logid, tempValue.logid));
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.logid, tempValue.logid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['logid'] == tempValue['logid'] ){
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
......@@ -141,44 +151,6 @@ mock.onPost(new RegExp(/^\/sysauthlogs\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((conf
return [status, mockDatas[0]];
});
// Update
mock.onPut(new RegExp(/^\/sysauthlogs\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:sysauthlog 方法: 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> = ['logid'];
const matchArray:any = new RegExp(/^\/sysauthlogs\/([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.logid, tempValue.logid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['logid'] == tempValue['logid'] ){
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(/^\/sysauthlogs\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:sysauthlog 方法: GetDraft");
......@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/sysauthlogs\/getdraft$/)).reply((config: any) => {
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/sysauthlogs\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:sysauthlog 方法: CheckKey");
// Save
mock.onPost(new RegExp(/^\/sysauthlogs\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:sysauthlog 方法: 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> = ['logid'];
const matchArray:any = new RegExp(/^\/sysauthlogs\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
const matchArray:any = new RegExp(/^\/sysauthlogs\/([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(/^\/sysauthlogs\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).r
return [status, data];
});
// Save
mock.onPost(new RegExp(/^\/sysauthlogs\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:sysauthlog 方法: Save");
// Update
mock.onPut(new RegExp(/^\/sysauthlogs\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:sysauthlog 方法: 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> = ['logid'];
const matchArray:any = new RegExp(/^\/sysauthlogs\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
const matchArray:any = new RegExp(/^\/sysauthlogs\/([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(/^\/sysauthlogs\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply(
// URI参数传递情况未实现
// URI参数传递情况未实现
// Select
mock.onGet(new RegExp(/^\/sysauthlogs\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:sysauthlog 方法: 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> = ['logid'];
const matchArray:any = new RegExp(/^\/sysauthlogs\/([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.logid, tempValue.logid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.groupEnd();
console.groupEnd();
return [status, _items];
});
// Remove
mock.onDelete(new RegExp(/^\/sysauthlogs\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:sysauthlog 方法: Remove");
// Get
mock.onGet(new RegExp(/^\/sysauthlogs\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:sysauthlog 方法: 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(/^\/sysauthlogs\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((con
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/sysauthlogs\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:sysauthlog 方法: Get");
// Remove
mock.onDelete(new RegExp(/^\/sysauthlogs\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:sysauthlog 方法: Remove");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
......
......@@ -87,16 +87,16 @@ mock.onDelete(new RegExp(/^\/sysopenaccesses\/batch$/)).reply((config: any) => {
});
// Select
mock.onGet(new RegExp(/^\/sysopenaccesses\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:sysopenaccess 方法: Select");
// CheckKey
mock.onPost(new RegExp(/^\/sysopenaccesses\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:sysopenaccess 方法: 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(/^\/sysopenaccesses\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url);
const matchArray:any = new RegExp(/^\/sysopenaccesses\/([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(/^\/sysopenaccesses\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).r
});
});
}
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
......@@ -141,44 +151,6 @@ mock.onPost(new RegExp(/^\/sysopenaccesses\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((
return [status, mockDatas[0]];
});
// Update
mock.onPut(new RegExp(/^\/sysopenaccesses\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:sysopenaccess 方法: 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(/^\/sysopenaccesses\/([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(/^\/sysopenaccesses\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:sysopenaccess 方法: GetDraft");
......@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/sysopenaccesses\/getdraft$/)).reply((config: any) => {
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/sysopenaccesses\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:sysopenaccess 方法: CheckKey");
// Save
mock.onPost(new RegExp(/^\/sysopenaccesses\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:sysopenaccess 方法: 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(/^\/sysopenaccesses\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
const matchArray:any = new RegExp(/^\/sysopenaccesses\/([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(/^\/sysopenaccesses\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/
return [status, data];
});
// Save
mock.onPost(new RegExp(/^\/sysopenaccesses\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:sysopenaccess 方法: Save");
// Update
mock.onPut(new RegExp(/^\/sysopenaccesses\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:sysopenaccess 方法: 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(/^\/sysopenaccesses\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
const matchArray:any = new RegExp(/^\/sysopenaccesses\/([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(/^\/sysopenaccesses\/fetchdefault(\?[\w-./?%&=,]*)*$/)).re
// URI参数传递情况未实现
// URI参数传递情况未实现
// Select
mock.onGet(new RegExp(/^\/sysopenaccesses\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:sysopenaccess 方法: 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(/^\/sysopenaccesses\/([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(/^\/sysopenaccesses\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:sysopenaccess 方法: Remove");
// Get
mock.onGet(new RegExp(/^\/sysopenaccesses\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:sysopenaccess 方法: 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(/^\/sysopenaccesses\/([a-zA-Z0-9\-\;]{1,35})$/)).reply(
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/sysopenaccesses\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:sysopenaccess 方法: Get");
// Remove
mock.onDelete(new RegExp(/^\/sysopenaccesses\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:sysopenaccess 方法: Remove");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
......
......@@ -87,16 +87,16 @@ mock.onDelete(new RegExp(/^\/syspermissions\/batch$/)).reply((config: any) => {
});
// Select
mock.onGet(new RegExp(/^\/syspermissions\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:syspermission 方法: Select");
// CheckKey
mock.onPost(new RegExp(/^\/syspermissions\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:syspermission 方法: 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> = ['permissionid'];
const matchArray:any = new RegExp(/^\/syspermissions\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url);
const matchArray:any = new RegExp(/^\/syspermissions\/([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(/^\/syspermissions\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).re
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.permissionid, tempValue.permissionid));
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.permissionid, tempValue.permissionid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['permissionid'] == tempValue['permissionid'] ){
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
......@@ -141,44 +151,6 @@ mock.onPost(new RegExp(/^\/syspermissions\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((c
return [status, mockDatas[0]];
});
// Update
mock.onPut(new RegExp(/^\/syspermissions\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:syspermission 方法: 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> = ['permissionid'];
const matchArray:any = new RegExp(/^\/syspermissions\/([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.permissionid, tempValue.permissionid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['permissionid'] == tempValue['permissionid'] ){
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(/^\/syspermissions\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:syspermission 方法: GetDraft");
......@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/syspermissions\/getdraft$/)).reply((config: any) => {
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/syspermissions\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:syspermission 方法: CheckKey");
// Save
mock.onPost(new RegExp(/^\/syspermissions\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:syspermission 方法: 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> = ['permissionid'];
const matchArray:any = new RegExp(/^\/syspermissions\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
const matchArray:any = new RegExp(/^\/syspermissions\/([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(/^\/syspermissions\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)
return [status, data];
});
// Save
mock.onPost(new RegExp(/^\/syspermissions\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:syspermission 方法: Save");
// Update
mock.onPut(new RegExp(/^\/syspermissions\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:syspermission 方法: 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> = ['permissionid'];
const matchArray:any = new RegExp(/^\/syspermissions\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
const matchArray:any = new RegExp(/^\/syspermissions\/([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(/^\/syspermissions\/fetchdefault(\?[\w-./?%&=,]*)*$/)).rep
// URI参数传递情况未实现
// URI参数传递情况未实现
// Select
mock.onGet(new RegExp(/^\/syspermissions\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:syspermission 方法: 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> = ['permissionid'];
const matchArray:any = new RegExp(/^\/syspermissions\/([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.permissionid, tempValue.permissionid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.groupEnd();
console.groupEnd();
return [status, _items];
});
// Remove
mock.onDelete(new RegExp(/^\/syspermissions\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:syspermission 方法: Remove");
// Get
mock.onGet(new RegExp(/^\/syspermissions\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:syspermission 方法: 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(/^\/syspermissions\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/syspermissions\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:syspermission 方法: Get");
// Remove
mock.onDelete(new RegExp(/^\/syspermissions\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:syspermission 方法: Remove");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
......
......@@ -87,16 +87,16 @@ mock.onDelete(new RegExp(/^\/sysroles\/batch$/)).reply((config: any) => {
});
// Select
mock.onGet(new RegExp(/^\/sysroles\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:sysrole 方法: Select");
// CheckKey
mock.onPost(new RegExp(/^\/sysroles\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:sysrole 方法: 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> = ['roleid'];
const matchArray:any = new RegExp(/^\/sysroles\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url);
const matchArray:any = new RegExp(/^\/sysroles\/([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(/^\/sysroles\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((c
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.roleid, tempValue.roleid));
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.roleid, tempValue.roleid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['roleid'] == tempValue['roleid'] ){
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
......@@ -141,44 +151,6 @@ mock.onPost(new RegExp(/^\/sysroles\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config:
return [status, mockDatas[0]];
});
// Update
mock.onPut(new RegExp(/^\/sysroles\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:sysrole 方法: 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> = ['roleid'];
const matchArray:any = new RegExp(/^\/sysroles\/([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.roleid, tempValue.roleid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['roleid'] == tempValue['roleid'] ){
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(/^\/sysroles\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:sysrole 方法: GetDraft");
......@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/sysroles\/getdraft$/)).reply((config: any) => {
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/sysroles\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:sysrole 方法: CheckKey");
// NoRepeat
mock.onPost(new RegExp(/^\/sysroles\/?([a-zA-Z0-9\-\;]{0,35})\/norepeat$/)).reply((config: any) => {
console.groupCollapsed("实体:sysrole 方法: NoRepeat");
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> = ['roleid'];
const matchArray:any = new RegExp(/^\/sysroles\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
const matchArray:any = new RegExp(/^\/sysroles\/([a-zA-Z0-9\-\;]{1,35})\/norepeat$/).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(/^\/sysroles\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).repl
return [status, data];
});
// NoRepeat
mock.onPost(new RegExp(/^\/sysroles\/?([a-zA-Z0-9\-\;]{0,35})\/norepeat$/)).reply((config: any) => {
console.groupCollapsed("实体:sysrole 方法: NoRepeat");
// Save
mock.onPost(new RegExp(/^\/sysroles\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:sysrole 方法: 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> = ['roleid'];
const matchArray:any = new RegExp(/^\/sysroles\/([a-zA-Z0-9\-\;]{1,35})\/norepeat$/).exec(config.url);
const matchArray:any = new RegExp(/^\/sysroles\/([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) => {
......@@ -271,16 +243,16 @@ mock.onPost(new RegExp(/^\/sysroles\/?([a-zA-Z0-9\-\;]{0,35})\/norepeat$/)).repl
return [status, data];
});
// Save
mock.onPost(new RegExp(/^\/sysroles\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:sysrole 方法: Save");
// Update
mock.onPut(new RegExp(/^\/sysroles\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:sysrole 方法: 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> = ['roleid'];
const matchArray:any = new RegExp(/^\/sysroles\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
const matchArray:any = new RegExp(/^\/sysroles\/([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) => {
......@@ -404,10 +376,38 @@ mock.onGet(new RegExp(/^\/sysroles\/fetchnorepeat(\?[\w-./?%&=,]*)*$/)).reply((c
// URI参数传递情况未实现
// URI参数传递情况未实现
// Select
mock.onGet(new RegExp(/^\/sysroles\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:sysrole 方法: 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> = ['roleid'];
const matchArray:any = new RegExp(/^\/sysroles\/([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.roleid, tempValue.roleid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.groupEnd();
console.groupEnd();
return [status, _items];
});
// Remove
mock.onDelete(new RegExp(/^\/sysroles\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:sysrole 方法: Remove");
// Get
mock.onGet(new RegExp(/^\/sysroles\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:sysrole 方法: Get");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
......@@ -433,9 +433,9 @@ mock.onDelete(new RegExp(/^\/sysroles\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/sysroles\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:sysrole 方法: Get");
// Remove
mock.onDelete(new RegExp(/^\/sysroles\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:sysrole 方法: Remove");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
......
......@@ -87,16 +87,16 @@ mock.onDelete(new RegExp(/^\/sysuserauths\/batch$/)).reply((config: any) => {
});
// Select
mock.onGet(new RegExp(/^\/sysuserauths\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:sysuserauth 方法: Select");
// CheckKey
mock.onPost(new RegExp(/^\/sysuserauths\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:sysuserauth 方法: 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(/^\/sysuserauths\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url);
const matchArray:any = new RegExp(/^\/sysuserauths\/([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(/^\/sysuserauths\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).repl
});
});
}
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
......@@ -141,44 +151,6 @@ mock.onPost(new RegExp(/^\/sysuserauths\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((con
return [status, mockDatas[0]];
});
// Update
mock.onPut(new RegExp(/^\/sysuserauths\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:sysuserauth 方法: 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(/^\/sysuserauths\/([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(/^\/sysuserauths\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:sysuserauth 方法: GetDraft");
......@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/sysuserauths\/getdraft$/)).reply((config: any) => {
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/sysuserauths\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:sysuserauth 方法: CheckKey");
// Save
mock.onPost(new RegExp(/^\/sysuserauths\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:sysuserauth 方法: 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(/^\/sysuserauths\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
const matchArray:any = new RegExp(/^\/sysuserauths\/([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(/^\/sysuserauths\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).
return [status, data];
});
// Save
mock.onPost(new RegExp(/^\/sysuserauths\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:sysuserauth 方法: Save");
// Update
mock.onPut(new RegExp(/^\/sysuserauths\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:sysuserauth 方法: 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(/^\/sysuserauths\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
const matchArray:any = new RegExp(/^\/sysuserauths\/([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(/^\/sysuserauths\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply
// URI参数传递情况未实现
// URI参数传递情况未实现
// Select
mock.onGet(new RegExp(/^\/sysuserauths\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:sysuserauth 方法: 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(/^\/sysuserauths\/([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(/^\/sysuserauths\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:sysuserauth 方法: Remove");
// Get
mock.onGet(new RegExp(/^\/sysuserauths\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:sysuserauth 方法: 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(/^\/sysuserauths\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((co
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/sysuserauths\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:sysuserauth 方法: Get");
// Remove
mock.onDelete(new RegExp(/^\/sysuserauths\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:sysuserauth 方法: Remove");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
......
......@@ -843,7 +843,7 @@ export default class SYS_PERMISSIONMPickupViewBase extends Vue {
}
if(model.datas.length>0){
model.datas.forEach((data:any,index:any)=>{
Object.assign(data,{srfmajortext: data['permissionname']});
Object.assign(data,{srfmajortext: data.hasOwnProperty('srfmajortext') ? data['srfmajortext'] : data['permissionname']});
})
}
model.datas.forEach((item: any) => {
......
......@@ -1144,6 +1144,8 @@ export default class SysRolePermissionGridViewBase extends Vue {
public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) {
let localContext:any = null;
let localViewParam:any =null;
let tempContext:any = this.$util.deepCopy(this.context);
let data:any = this.$util.deepCopy(args[0]);
let batchAddPSAppViews:Array<any>=[];
batchAddPSAppViews=[
{view:{viewname:'sys-permissionmpickup-view',height: 0,width: 0,title: '权限表数据多项选择视图'},
......@@ -1163,7 +1165,7 @@ export default class SysRolePermissionGridViewBase extends Vue {
let otherViewModel:any = batchAddPSAppViews.find((item:any) =>{
return (item.res && (item.res[0] == this.context.srfparentdename));
})
let container: Subject<any> = this.$appmodal.openModal(openViewModel.view, JSON.parse(JSON.stringify(this.context)), args[0]);
let container: Subject<any> = this.$appmodal.openModal(openViewModel.view, tempContext, data);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
......
......@@ -843,7 +843,7 @@ export default class SysRolePermissionMPickupViewBase extends Vue {
}
if(model.datas.length>0){
model.datas.forEach((data:any,index:any)=>{
Object.assign(data,{srfmajortext: data['permissionid']});
Object.assign(data,{srfmajortext: data.hasOwnProperty('srfmajortext') ? data['srfmajortext'] : data['permissionid']});
})
}
model.datas.forEach((item: any) => {
......
......@@ -843,7 +843,7 @@ export default class SYS_ROLEMPickupViewBase extends Vue {
}
if(model.datas.length>0){
model.datas.forEach((data:any,index:any)=>{
Object.assign(data,{srfmajortext: data['rolename']});
Object.assign(data,{srfmajortext: data.hasOwnProperty('srfmajortext') ? data['srfmajortext'] : data['rolename']});
})
}
model.datas.forEach((item: any) => {
......
......@@ -1144,6 +1144,8 @@ export default class SYS_USER_ROLEGridViewBase extends Vue {
public newdata(args: any[],fullargs?:any[], params?: any, $event?: any, xData?: any) {
let localContext:any = null;
let localViewParam:any =null;
let tempContext:any = this.$util.deepCopy(this.context);
let data:any = this.$util.deepCopy(args[0]);
let batchAddPSAppViews:Array<any>=[];
batchAddPSAppViews=[
{view:{viewname:'sys-rolempickup-view',height: 0,width: 0,title: '角色数据多项选择视图'},
......@@ -1163,7 +1165,7 @@ export default class SYS_USER_ROLEGridViewBase extends Vue {
let otherViewModel:any = batchAddPSAppViews.find((item:any) =>{
return (item.res && (item.res[0] == this.context.srfparentdename));
})
let container: Subject<any> = this.$appmodal.openModal(openViewModel.view, JSON.parse(JSON.stringify(this.context)), args[0]);
let container: Subject<any> = this.$appmodal.openModal(openViewModel.view, tempContext, data);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
......
......@@ -843,7 +843,7 @@ export default class SYS_USER_ROLEMPickupViewBase extends Vue {
}
if(model.datas.length>0){
model.datas.forEach((data:any,index:any)=>{
Object.assign(data,{srfmajortext: data['userid']});
Object.assign(data,{srfmajortext: data.hasOwnProperty('srfmajortext') ? data['srfmajortext'] : data['userid']});
})
}
model.datas.forEach((item: any) => {
......
......@@ -843,7 +843,7 @@ export default class SYS_USERMPickupViewBase extends Vue {
}
if(model.datas.length>0){
model.datas.forEach((data:any,index:any)=>{
Object.assign(data,{srfmajortext: data['personname']});
Object.assign(data,{srfmajortext: data.hasOwnProperty('srfmajortext') ? data['srfmajortext'] : data['personname']});
})
}
model.datas.forEach((item: any) => {
......
......@@ -39,7 +39,7 @@ export default class SysAppServiceBase extends EntityService {
// 实体接口
/**
* Select接口方法
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -47,9 +47,8 @@ export default class SysAppServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysAppServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().get(`/sysapps/${context.sysapp}/select`,isloading);
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/sysapps/${context.sysapp}/checkkey`,data,isloading);
return res;
}
......@@ -78,7 +77,7 @@ export default class SysAppServiceBase extends EntityService {
}
/**
* Update接口方法
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -86,30 +85,14 @@ export default class SysAppServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysAppServiceBase
*/
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(`/sysapps/${context.sysapp}`,data,isloading);
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/sysapps/${context.sysapp}`,isloading);
return res;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAppServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().delete(`/sysapps/${context.sysapp}`,isloading);
return res;
}
/**
* Get接口方法
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -117,14 +100,15 @@ export default class SysAppServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysAppServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/sysapps/${context.sysapp}`,isloading);
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/sysapps/getdraft`,isloading);
res.data.sysapp = data.sysapp;
return res;
}
/**
* GetDraft接口方法
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -132,15 +116,13 @@ export default class SysAppServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysAppServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/sysapps/getdraft`,isloading);
res.data.sysapp = data.sysapp;
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().delete(`/sysapps/${context.sysapp}`,isloading);
return res;
}
/**
* CheckKey接口方法
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -148,13 +130,16 @@ export default class SysAppServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysAppServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/sysapps/${context.sysapp}/checkkey`,data,isloading);
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/sysapps/${context.sysapp}/save`,data,isloading);
return res;
}
/**
* Save接口方法
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -162,10 +147,10 @@ export default class SysAppServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysAppServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/sysapps/${context.sysapp}/save`,data,isloading);
let res:any = await Http.getInstance().put(`/sysapps/${context.sysapp}`,data,isloading);
return res;
}
......@@ -198,4 +183,19 @@ export default class SysAppServiceBase extends EntityService {
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/sysapps/searchdefault`,tempData,isloading);
}
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAppServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().get(`/sysapps/${context.sysapp}/select`,isloading);
return res;
}
}
\ No newline at end of file
......@@ -39,7 +39,7 @@ export default class SysAuthLogServiceBase extends EntityService {
// 实体接口
/**
* Select接口方法
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -47,9 +47,8 @@ export default class SysAuthLogServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysAuthLogServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().get(`/sysauthlogs/${context.sysauthlog}/select`,isloading);
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/sysauthlogs/${context.sysauthlog}/checkkey`,data,isloading);
return res;
}
......@@ -78,7 +77,7 @@ export default class SysAuthLogServiceBase extends EntityService {
}
/**
* Update接口方法
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -86,30 +85,14 @@ export default class SysAuthLogServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysAuthLogServiceBase
*/
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(`/sysauthlogs/${context.sysauthlog}`,data,isloading);
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/sysauthlogs/${context.sysauthlog}`,isloading);
return res;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAuthLogServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().delete(`/sysauthlogs/${context.sysauthlog}`,isloading);
return res;
}
/**
* Get接口方法
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -117,14 +100,15 @@ export default class SysAuthLogServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysAuthLogServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/sysauthlogs/${context.sysauthlog}`,isloading);
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/sysauthlogs/getdraft`,isloading);
res.data.sysauthlog = data.sysauthlog;
return res;
}
/**
* GetDraft接口方法
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -132,15 +116,13 @@ export default class SysAuthLogServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysAuthLogServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/sysauthlogs/getdraft`,isloading);
res.data.sysauthlog = data.sysauthlog;
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().delete(`/sysauthlogs/${context.sysauthlog}`,isloading);
return res;
}
/**
* CheckKey接口方法
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -148,13 +130,16 @@ export default class SysAuthLogServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysAuthLogServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/sysauthlogs/${context.sysauthlog}/checkkey`,data,isloading);
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/sysauthlogs/${context.sysauthlog}/save`,data,isloading);
return res;
}
/**
* Save接口方法
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -162,10 +147,10 @@ export default class SysAuthLogServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysAuthLogServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/sysauthlogs/${context.sysauthlog}/save`,data,isloading);
let res:any = await Http.getInstance().put(`/sysauthlogs/${context.sysauthlog}`,data,isloading);
return res;
}
......@@ -198,4 +183,19 @@ export default class SysAuthLogServiceBase extends EntityService {
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/sysauthlogs/searchdefault`,tempData,isloading);
}
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAuthLogServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().get(`/sysauthlogs/${context.sysauthlog}/select`,isloading);
return res;
}
}
\ No newline at end of file
......@@ -39,7 +39,7 @@ export default class SysOpenAccessServiceBase extends EntityService {
// 实体接口
/**
* Select接口方法
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -47,9 +47,8 @@ export default class SysOpenAccessServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysOpenAccessServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().get(`/sysopenaccesses/${context.sysopenaccess}/select`,isloading);
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/sysopenaccesses/${context.sysopenaccess}/checkkey`,data,isloading);
return res;
}
......@@ -78,7 +77,7 @@ export default class SysOpenAccessServiceBase extends EntityService {
}
/**
* Update接口方法
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -86,30 +85,14 @@ export default class SysOpenAccessServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysOpenAccessServiceBase
*/
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(`/sysopenaccesses/${context.sysopenaccess}`,data,isloading);
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/sysopenaccesses/${context.sysopenaccess}`,isloading);
return res;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysOpenAccessServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().delete(`/sysopenaccesses/${context.sysopenaccess}`,isloading);
return res;
}
/**
* Get接口方法
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -117,14 +100,15 @@ export default class SysOpenAccessServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysOpenAccessServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/sysopenaccesses/${context.sysopenaccess}`,isloading);
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/sysopenaccesses/getdraft`,isloading);
res.data.sysopenaccess = data.sysopenaccess;
return res;
}
/**
* GetDraft接口方法
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -132,15 +116,13 @@ export default class SysOpenAccessServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysOpenAccessServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/sysopenaccesses/getdraft`,isloading);
res.data.sysopenaccess = data.sysopenaccess;
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().delete(`/sysopenaccesses/${context.sysopenaccess}`,isloading);
return res;
}
/**
* CheckKey接口方法
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -148,13 +130,16 @@ export default class SysOpenAccessServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysOpenAccessServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/sysopenaccesses/${context.sysopenaccess}/checkkey`,data,isloading);
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/sysopenaccesses/${context.sysopenaccess}/save`,data,isloading);
return res;
}
/**
* Save接口方法
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -162,10 +147,10 @@ export default class SysOpenAccessServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysOpenAccessServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/sysopenaccesses/${context.sysopenaccess}/save`,data,isloading);
let res:any = await Http.getInstance().put(`/sysopenaccesses/${context.sysopenaccess}`,data,isloading);
return res;
}
......@@ -198,4 +183,19 @@ export default class SysOpenAccessServiceBase extends EntityService {
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/sysopenaccesses/searchdefault`,tempData,isloading);
}
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysOpenAccessServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().get(`/sysopenaccesses/${context.sysopenaccess}/select`,isloading);
return res;
}
}
\ No newline at end of file
......@@ -39,7 +39,7 @@ export default class SysPermissionServiceBase extends EntityService {
// 实体接口
/**
* Select接口方法
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -47,9 +47,8 @@ export default class SysPermissionServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysPermissionServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().get(`/syspermissions/${context.syspermission}/select`,isloading);
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/syspermissions/${context.syspermission}/checkkey`,data,isloading);
return res;
}
......@@ -79,7 +78,7 @@ export default class SysPermissionServiceBase extends EntityService {
}
/**
* Update接口方法
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -87,30 +86,14 @@ export default class SysPermissionServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysPermissionServiceBase
*/
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(`/syspermissions/${context.syspermission}`,data,isloading);
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/syspermissions/${context.syspermission}`,isloading);
return res;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysPermissionServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().delete(`/syspermissions/${context.syspermission}`,isloading);
return res;
}
/**
* Get接口方法
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -118,14 +101,15 @@ export default class SysPermissionServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysPermissionServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/syspermissions/${context.syspermission}`,isloading);
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/syspermissions/getdraft`,isloading);
res.data.syspermission = data.syspermission;
return res;
}
/**
* GetDraft接口方法
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -133,15 +117,13 @@ export default class SysPermissionServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysPermissionServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/syspermissions/getdraft`,isloading);
res.data.syspermission = data.syspermission;
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().delete(`/syspermissions/${context.syspermission}`,isloading);
return res;
}
/**
* CheckKey接口方法
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -149,13 +131,16 @@ export default class SysPermissionServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysPermissionServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/syspermissions/${context.syspermission}/checkkey`,data,isloading);
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/syspermissions/${context.syspermission}/save`,data,isloading);
return res;
}
/**
* Save接口方法
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -163,10 +148,10 @@ export default class SysPermissionServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysPermissionServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/syspermissions/${context.syspermission}/save`,data,isloading);
let res:any = await Http.getInstance().put(`/syspermissions/${context.syspermission}`,data,isloading);
return res;
}
......@@ -199,4 +184,19 @@ export default class SysPermissionServiceBase extends EntityService {
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/syspermissions/searchdefault`,tempData,isloading);
}
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysPermissionServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().get(`/syspermissions/${context.syspermission}/select`,isloading);
return res;
}
}
\ No newline at end of file
......@@ -39,7 +39,7 @@ export default class SysRoleServiceBase extends EntityService {
// 实体接口
/**
* Select接口方法
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -47,9 +47,8 @@ export default class SysRoleServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysRoleServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().get(`/sysroles/${context.sysrole}/select`,isloading);
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/sysroles/${context.sysrole}/checkkey`,data,isloading);
return res;
}
......@@ -80,7 +79,7 @@ export default class SysRoleServiceBase extends EntityService {
}
/**
* Update接口方法
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -88,30 +87,14 @@ export default class SysRoleServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysRoleServiceBase
*/
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(`/sysroles/${context.sysrole}`,data,isloading);
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/sysroles/${context.sysrole}`,isloading);
return res;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysRoleServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().delete(`/sysroles/${context.sysrole}`,isloading);
return res;
}
/**
* Get接口方法
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -119,14 +102,15 @@ export default class SysRoleServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysRoleServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/sysroles/${context.sysrole}`,isloading);
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/sysroles/getdraft`,isloading);
res.data.sysrole = data.sysrole;
return res;
}
/**
* GetDraft接口方法
* NoRepeat接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -134,15 +118,13 @@ export default class SysRoleServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysRoleServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/sysroles/getdraft`,isloading);
res.data.sysrole = data.sysrole;
public async NoRepeat(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/sysroles/${context.sysrole}/norepeat`,data,isloading);
return res;
}
/**
* CheckKey接口方法
* NoRepeatBatch接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -150,13 +132,13 @@ export default class SysRoleServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysRoleServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/sysroles/${context.sysrole}/checkkey`,data,isloading);
return res;
public async NoRepeatBatch(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/sysroles/norepeatbatch`,tempData,isloading);
}
/**
* NoRepeat接口方法
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -164,13 +146,13 @@ export default class SysRoleServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysRoleServiceBase
*/
public async NoRepeat(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/sysroles/${context.sysrole}/norepeat`,data,isloading);
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().delete(`/sysroles/${context.sysrole}`,isloading);
return res;
}
/**
* NoRepeatBatch接口方法
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -178,13 +160,16 @@ export default class SysRoleServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysRoleServiceBase
*/
public async NoRepeatBatch(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/sysroles/norepeatbatch`,tempData,isloading);
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/sysroles/${context.sysrole}/save`,data,isloading);
return res;
}
/**
* Save接口方法
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -192,10 +177,10 @@ export default class SysRoleServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysRoleServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/sysroles/${context.sysrole}/save`,data,isloading);
let res:any = await Http.getInstance().put(`/sysroles/${context.sysrole}`,data,isloading);
return res;
}
......@@ -257,4 +242,19 @@ export default class SysRoleServiceBase extends EntityService {
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/sysroles/searchnorepeat`,tempData,isloading);
}
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysRoleServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().get(`/sysroles/${context.sysrole}/select`,isloading);
return res;
}
}
\ No newline at end of file
......@@ -39,7 +39,7 @@ export default class SysUserAuthServiceBase extends EntityService {
// 实体接口
/**
* Select接口方法
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -47,9 +47,8 @@ export default class SysUserAuthServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysUserAuthServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().get(`/sysuserauths/${context.sysuserauth}/select`,isloading);
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/sysuserauths/${context.sysuserauth}/checkkey`,data,isloading);
return res;
}
......@@ -78,7 +77,7 @@ export default class SysUserAuthServiceBase extends EntityService {
}
/**
* Update接口方法
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -86,30 +85,14 @@ export default class SysUserAuthServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysUserAuthServiceBase
*/
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(`/sysuserauths/${context.sysuserauth}`,data,isloading);
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/sysuserauths/${context.sysuserauth}`,isloading);
return res;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysUserAuthServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().delete(`/sysuserauths/${context.sysuserauth}`,isloading);
return res;
}
/**
* Get接口方法
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -117,14 +100,15 @@ export default class SysUserAuthServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysUserAuthServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/sysuserauths/${context.sysuserauth}`,isloading);
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/sysuserauths/getdraft`,isloading);
res.data.sysuserauth = data.sysuserauth;
return res;
}
/**
* GetDraft接口方法
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -132,15 +116,13 @@ export default class SysUserAuthServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysUserAuthServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/sysuserauths/getdraft`,isloading);
res.data.sysuserauth = data.sysuserauth;
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().delete(`/sysuserauths/${context.sysuserauth}`,isloading);
return res;
}
/**
* CheckKey接口方法
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -148,13 +130,16 @@ export default class SysUserAuthServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysUserAuthServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/sysuserauths/${context.sysuserauth}/checkkey`,data,isloading);
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/sysuserauths/${context.sysuserauth}/save`,data,isloading);
return res;
}
/**
* Save接口方法
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -162,10 +147,10 @@ export default class SysUserAuthServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysUserAuthServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/sysuserauths/${context.sysuserauth}/save`,data,isloading);
let res:any = await Http.getInstance().put(`/sysuserauths/${context.sysuserauth}`,data,isloading);
return res;
}
......@@ -198,4 +183,19 @@ export default class SysUserAuthServiceBase extends EntityService {
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/sysuserauths/searchdefault`,tempData,isloading);
}
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysUserAuthServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().get(`/sysuserauths/${context.sysuserauth}/select`,isloading);
return res;
}
}
\ No newline at end of file
......@@ -39,7 +39,7 @@ export default class SysUserRoleServiceBase extends EntityService {
// 实体接口
/**
* Select接口方法
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -47,19 +47,22 @@ export default class SysUserRoleServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysUserRoleServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.sysuser && context.sysuserrole){
let res:any = Http.getInstance().get(`/sysusers/${context.sysuser}/sysuserroles/${context.sysuserrole}/select`,isloading);
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/sysusers/${context.sysuser}/sysuserroles/${context.sysuserrole}/checkkey`,data,isloading);
return res;
}
if(context.sysrole && context.sysuserrole){
let res:any = Http.getInstance().get(`/sysroles/${context.sysrole}/sysuserroles/${context.sysuserrole}/select`,isloading);
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/sysroles/${context.sysrole}/sysuserroles/${context.sysuserrole}/checkkey`,data,isloading);
return res;
}
let res:any = Http.getInstance().get(`/sysuserroles/${context.sysuserrole}/select`,isloading);
let res:any = Http.getInstance().post(`/sysuserroles/${context.sysuserrole}/checkkey`,data,isloading);
return res;
}
......@@ -115,59 +118,6 @@ export default class SysUserRoleServiceBase extends EntityService {
return res;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysUserRoleServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.sysuser && context.sysuserrole){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/sysusers/${context.sysuser}/sysuserroles/${context.sysuserrole}`,data,isloading);
return res;
}
if(context.sysrole && context.sysuserrole){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/sysroles/${context.sysrole}/sysuserroles/${context.sysuserrole}`,data,isloading);
return res;
}
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/sysuserroles/${context.sysuserrole}`,data,isloading);
return res;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysUserRoleServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.sysuser && context.sysuserrole){
let res:any = Http.getInstance().delete(`/sysusers/${context.sysuser}/sysuserroles/${context.sysuserrole}`,isloading);
return res;
}
if(context.sysrole && context.sysuserrole){
let res:any = Http.getInstance().delete(`/sysroles/${context.sysrole}/sysuserroles/${context.sysuserrole}`,isloading);
return res;
}
let res:any = Http.getInstance().delete(`/sysuserroles/${context.sysuserrole}`,isloading);
return res;
}
/**
* Get接口方法
*
......@@ -222,7 +172,7 @@ export default class SysUserRoleServiceBase extends EntityService {
}
/**
* CheckKey接口方法
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -230,27 +180,52 @@ export default class SysUserRoleServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysUserRoleServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.sysuser && context.sysuserrole){
let res:any = Http.getInstance().delete(`/sysusers/${context.sysuser}/sysuserroles/${context.sysuserrole}`,isloading);
return res;
}
if(context.sysrole && context.sysuserrole){
let res:any = Http.getInstance().delete(`/sysroles/${context.sysrole}/sysuserroles/${context.sysuserrole}`,isloading);
return res;
}
let res:any = Http.getInstance().delete(`/sysuserroles/${context.sysuserrole}`,isloading);
return res;
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysUserRoleServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.sysuser && context.sysuserrole){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/sysusers/${context.sysuser}/sysuserroles/${context.sysuserrole}/checkkey`,data,isloading);
let res:any = await Http.getInstance().post(`/sysusers/${context.sysuser}/sysuserroles/${context.sysuserrole}/save`,data,isloading);
return res;
}
if(context.sysrole && context.sysuserrole){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/sysroles/${context.sysrole}/sysuserroles/${context.sysuserrole}/checkkey`,data,isloading);
let res:any = await Http.getInstance().post(`/sysroles/${context.sysrole}/sysuserroles/${context.sysuserrole}/save`,data,isloading);
return res;
}
let res:any = Http.getInstance().post(`/sysuserroles/${context.sysuserrole}/checkkey`,data,isloading);
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/sysuserroles/${context.sysuserrole}/save`,data,isloading);
return res;
}
/**
* Save接口方法
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -258,24 +233,24 @@ export default class SysUserRoleServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysUserRoleServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.sysuser && context.sysuserrole){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/sysusers/${context.sysuser}/sysuserroles/${context.sysuserrole}/save`,data,isloading);
let res:any = await Http.getInstance().put(`/sysusers/${context.sysuser}/sysuserroles/${context.sysuserrole}`,data,isloading);
return res;
}
if(context.sysrole && context.sysuserrole){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/sysroles/${context.sysrole}/sysuserroles/${context.sysuserrole}/save`,data,isloading);
let res:any = await Http.getInstance().put(`/sysroles/${context.sysrole}/sysuserroles/${context.sysuserrole}`,data,isloading);
return res;
}
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/sysuserroles/${context.sysuserrole}/save`,data,isloading);
let res:any = await Http.getInstance().put(`/sysuserroles/${context.sysuserrole}`,data,isloading);
return res;
}
......@@ -326,4 +301,29 @@ export default class SysUserRoleServiceBase extends EntityService {
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/sysuserroles/searchdefault`,tempData,isloading);
}
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysUserRoleServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.sysuser && context.sysuserrole){
let res:any = Http.getInstance().get(`/sysusers/${context.sysuser}/sysuserroles/${context.sysuserrole}/select`,isloading);
return res;
}
if(context.sysrole && context.sysuserrole){
let res:any = Http.getInstance().get(`/sysroles/${context.sysrole}/sysuserroles/${context.sysuserrole}/select`,isloading);
return res;
}
let res:any = Http.getInstance().get(`/sysuserroles/${context.sysuserrole}/select`,isloading);
return res;
}
}
\ No newline at end of file
......@@ -39,7 +39,7 @@ export default class SysUserServiceBase extends EntityService {
// 实体接口
/**
* Select接口方法
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -47,9 +47,8 @@ export default class SysUserServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysUserServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().get(`/sysusers/${context.sysuser}/select`,isloading);
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/sysusers/${context.sysuser}/checkkey`,data,isloading);
return res;
}
......@@ -79,24 +78,7 @@ export default class SysUserServiceBase extends EntityService {
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysUserServiceBase
*/
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(`/sysusers/${context.sysuser}`,data,isloading);
return res;
}
/**
* Remove接口方法
* DeleteSysUser接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -104,8 +86,8 @@ export default class SysUserServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysUserServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().delete(`/sysusers/${context.sysuser}`,isloading);
public async DeleteSysUser(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/sysusers/${context.sysuser}/deletesysuser`,data,isloading);
return res;
}
......@@ -141,7 +123,7 @@ export default class SysUserServiceBase extends EntityService {
}
/**
* CheckKey接口方法
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -149,13 +131,13 @@ export default class SysUserServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysUserServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/sysusers/${context.sysuser}/checkkey`,data,isloading);
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().delete(`/sysusers/${context.sysuser}`,isloading);
return res;
}
/**
* DeleteSysUser接口方法
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -163,13 +145,16 @@ export default class SysUserServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysUserServiceBase
*/
public async DeleteSysUser(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/sysusers/${context.sysuser}/deletesysuser`,data,isloading);
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/sysusers/${context.sysuser}/save`,data,isloading);
return res;
}
/**
* Save接口方法
* SaveSysUser接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -177,16 +162,13 @@ export default class SysUserServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysUserServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/sysusers/${context.sysuser}/save`,data,isloading);
public async SaveSysUser(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/sysusers/${context.sysuser}/savesysuser`,data,isloading);
return res;
}
/**
* SaveSysUser接口方法
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
......@@ -194,8 +176,11 @@ export default class SysUserServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof SysUserServiceBase
*/
public async SaveSysUser(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/sysusers/${context.sysuser}/savesysuser`,data,isloading);
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(`/sysusers/${context.sysuser}`,data,isloading);
return res;
}
......@@ -227,4 +212,19 @@ export default class SysUserServiceBase extends EntityService {
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/sysusers/searchdefault`,tempData,isloading);
}
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysUserServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().get(`/sysusers/${context.sysuser}/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.main.' + item0.name)">{{$t('app.menus.main.' + item0.name)}}</span>
<span class='text' :title="$t('app.menus.main.' + item0.name.toLowerCase())">{{$t('app.menus.main.' + 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.main.' + item1.name)">{{$t('app.menus.main.' + item1.name)}}</span>
<span class='text' :title="$t('app.menus.main.' + item1.name.toLowerCase())">{{$t('app.menus.main.' + 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.main.' + item2.name)">{{$t('app.menus.main.' + item2.name)}}</span>
<span class="text" :title="$t('app.menus.main.' + item2.name.toLowerCase())">{{$t('app.menus.main.' + 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.main.' + item1.name)">{{$t('app.menus.main.' + item1.name)}} </span>
<span class="text" :title="$t('app.menus.main.' + item1.name.toLowerCase())">{{$t('app.menus.main.' + 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.main.' + item0.name)">{{$t('app.menus.main.' + item0.name)}}</span>
<span class="text" :title="$t('app.menus.main.' + item0.name.toLowerCase())">{{$t('app.menus.main.' + 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>
......
......@@ -692,8 +692,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;
}
......
......@@ -1125,8 +1125,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;
}
......@@ -1176,7 +1176,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 : "" });
});
}
......@@ -1261,7 +1261,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) {
......@@ -1382,6 +1382,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) {
......@@ -2283,8 +2286,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;
}
......
......@@ -843,8 +843,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;
}
......
......@@ -952,8 +952,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;
}
......@@ -1003,7 +1003,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 : "" });
});
}
......@@ -1088,7 +1088,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) {
......@@ -1209,6 +1209,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) {
......@@ -2093,8 +2096,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;
}
......
......@@ -933,8 +933,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;
}
......@@ -984,7 +984,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 : "" });
});
}
......@@ -1069,7 +1069,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) {
......@@ -1190,6 +1190,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) {
......@@ -2085,8 +2088,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;
}
......
......@@ -634,8 +634,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;
}
......
......@@ -810,8 +810,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;
}
......@@ -861,7 +861,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 : "" });
});
}
......@@ -946,7 +946,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) {
......@@ -1067,6 +1067,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) {
......@@ -1931,8 +1934,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;
}
......
......@@ -634,8 +634,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;
}
......
......@@ -845,8 +845,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;
}
......@@ -896,7 +896,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 : "" });
});
}
......@@ -981,7 +981,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) {
......@@ -1102,6 +1102,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) {
......@@ -1963,8 +1966,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;
}
......
......@@ -670,8 +670,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;
}
......
......@@ -901,8 +901,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;
}
......@@ -952,7 +952,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 : "" });
});
}
......@@ -1037,7 +1037,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) {
......@@ -1158,6 +1158,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) {
......@@ -2034,8 +2037,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;
}
......
......@@ -670,8 +670,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;
}
......
......@@ -887,8 +887,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;
}
......@@ -938,7 +938,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 : "" });
});
}
......@@ -1023,7 +1023,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) {
......@@ -1144,6 +1144,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) {
......@@ -2011,8 +2014,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;
}
......
......@@ -778,8 +778,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;
}
......
......@@ -894,8 +894,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;
}
......@@ -945,7 +945,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 : "" });
});
}
......@@ -1030,7 +1030,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) {
......@@ -1151,6 +1151,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) {
......@@ -2027,8 +2030,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>
......
FROM openjdk:8-jre-alpine
FROM adoptopenjdk/openjdk8:jdk8u242-b08-centos
ENV TZ=Asia/Shanghai \
SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \
......
......@@ -111,7 +111,7 @@ public class SysRole extends EntityMP implements Serializable {
/**
* 建立人
*/
@DEField(preType = DEPredefinedFieldType.CREATEMAN)
@DEField(name = "createman", preType = DEPredefinedFieldType.CREATEMAN)
@TableField(value = "createman", fill = FieldFill.INSERT)
@JSONField(name = "createman")
@JsonProperty("createman")
......
......@@ -162,7 +162,7 @@ public class SysUser extends EntityMP implements Serializable {
/**
* 单位
*/
@DEField(preType = DEPredefinedFieldType.ORGID)
@DEField(name = "orgid", preType = DEPredefinedFieldType.ORGID)
@TableField(value = "orgid")
@JSONField(name = "orgid")
@JsonProperty("orgid")
......
......@@ -31,7 +31,7 @@ public interface SysOpenAccessMapper extends BaseMapper<SysOpenAccess> {
@CacheEvict(value ="sysopenaccess", key = "'row:'+#p0.id")
int updateById(@Param(Constants.ENTITY) SysOpenAccess entity);
@Override
@CacheEvict(value ="sysopenaccess", key = "'row:'+#p0.id")
@CacheEvict(value ="sysopenaccess", key = "'row:'+#p0.id" ,condition ="#p0 != null")
int update(@Param(Constants.ENTITY) SysOpenAccess entity, @Param("ew") Wrapper<SysOpenAccess> updateWrapper);
@Override
@CacheEvict(value ="sysopenaccess", key = "'row:'+#p0")
......
......@@ -32,7 +32,7 @@ public interface SysRoleMapper extends BaseMapper<SysRole> {
@CacheEvict(value ="sysrole", key = "'row:'+#p0.roleid")
int updateById(@Param(Constants.ENTITY) SysRole entity);
@Override
@CacheEvict(value ="sysrole", key = "'row:'+#p0.roleid")
@CacheEvict(value ="sysrole", key = "'row:'+#p0.roleid" ,condition ="#p0 != null")
int update(@Param(Constants.ENTITY) SysRole entity, @Param("ew") Wrapper<SysRole> updateWrapper);
@Override
@CacheEvict(value ="sysrole", key = "'row:'+#p0")
......
......@@ -31,7 +31,7 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
@CacheEvict(value ="sysuser", key = "'row:'+#p0.userid")
int updateById(@Param(Constants.ENTITY) SysUser entity);
@Override
@CacheEvict(value ="sysuser", key = "'row:'+#p0.userid")
@CacheEvict(value ="sysuser", key = "'row:'+#p0.userid" ,condition ="#p0 != null")
int update(@Param(Constants.ENTITY) SysUser entity, @Param("ew") Wrapper<SysUser> updateWrapper);
@Override
@CacheEvict(value ="sysuser", key = "'row:'+#p0")
......
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);
}
}
}
......@@ -6,7 +6,7 @@
<!--输出实体[SYS_AUTHLOG]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_authlog-6-1">
<changeSet author="root" id="tab-sys_authlog-6-1">
<createTable tableName="IBZAUTHLOG">
<column name="LOGID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_AUTHLOG_LOGID"/>
......@@ -32,7 +32,7 @@
<!--输出实体[SYS_OPEN_ACCESS]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_open_access-37-2">
<changeSet author="root" id="tab-sys_open_access-37-2">
<createTable tableName="IBZOPENACCESS">
<column name="ACCESSID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_OPEN_ACCESS_ACCESSID"/>
......@@ -64,7 +64,7 @@
<!--输出实体[SYS_PSSYSTEM]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_pssystem-1-3">
<changeSet author="root" id="tab-sys_pssystem-1-3">
<createTable tableName="IBZPSSYSTEM">
<column name="PSSYSTEMID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_PSSYSTEM_PSSYSTEMID"/>
......@@ -84,7 +84,7 @@
<!--输出实体[SYS_PERMISSION]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_permission-9-4">
<changeSet author="root" id="tab-sys_permission-9-4">
<createTable tableName="IBZPERMISSION">
<column name="SYS_PERMISSIONID" remarks="" type="VARCHAR(200)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_PERMISSION_SYS_PERMISSI"/>
......@@ -106,7 +106,7 @@
<!--输出实体[SYS_ROLE]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_role-50-5">
<changeSet author="root" id="tab-sys_role-50-5">
<createTable tableName="IBZROLE">
<column name="SYS_ROLEID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_ROLE_SYS_ROLEID"/>
......@@ -130,7 +130,7 @@
<!--输出实体[SYS_ROLE_PERMISSION]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_role_permission-25-6">
<changeSet author="root" id="tab-sys_role_permission-25-6">
<createTable tableName="IBZROLE_PERMISSION">
<column name="SYS_ROLE_PERMISSIONID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_ROLE_PERMISSION_SYS_ROL"/>
......@@ -150,7 +150,7 @@
<!--输出实体[SYS_USER_AUTH]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_user_auth-25-7">
<changeSet author="root" id="tab-sys_user_auth-25-7">
<createTable tableName="IBZUSERAUTH">
<column name="AUTHID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_USER_AUTH_AUTHID"/>
......@@ -168,7 +168,7 @@
<!--输出实体[SYS_USER_ROLE]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_user_role-15-8">
<changeSet author="root" id="tab-sys_user_role-15-8">
<createTable tableName="IBZUSER_ROLE">
<column name="SYS_USER_ROLEID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_USER_ROLE_SYS_USER_ROLE"/>
......@@ -189,13 +189,13 @@
<!--输出实体[SYS_PSSYSTEM]外键关系 -->
<!--输出实体[SYS_PERMISSION]外键关系 -->
<!--输出实体[SYS_ROLE]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-sys_role-50-9">
<changeSet author="root" id="fk-sys_role-50-9">
<addForeignKeyConstraint baseColumnNames="PROLEID" baseTableName="IBZROLE" constraintName="DER1N_SYS_ROLE_SYS_ROLE_PROLEI" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SYS_ROLEID" referencedTableName="IBZROLE" validate="true"/>
</changeSet>
<!--输出实体[SYS_ROLE_PERMISSION]外键关系 -->
<!--输出实体[SYS_USER_AUTH]外键关系 -->
<!--输出实体[SYS_USER_ROLE]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-sys_user_role-15-10">
<changeSet author="root" id="fk-sys_user_role-15-10">
<addForeignKeyConstraint baseColumnNames="SYS_ROLEID" baseTableName="IBZUSER_ROLE" constraintName="DER1N_SYS_USER_ROLE_SYS_ROLE_S" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SYS_ROLEID" referencedTableName="IBZROLE" validate="true"/>
</changeSet>
......
......@@ -74,6 +74,40 @@
</resources>
</configuration>
</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 \
......
......@@ -63,23 +63,14 @@ public class SysAppResource {
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@ApiOperation(value = "更新应用", tags = {"应用" }, notes = "更新应用")
@RequestMapping(method = RequestMethod.PUT, value = "/sysapps/{sysapp_id}")
public ResponseEntity<SysAppDTO> update(@PathVariable("sysapp_id") String sysapp_id, @RequestBody SysAppDTO sysappdto) {
SysApp domain = sysappMapping.toDomain(sysappdto);
domain .setId(sysapp_id);
sysappService.update(domain );
@ApiOperation(value = "获取应用", tags = {"应用" }, notes = "获取应用")
@RequestMapping(method = RequestMethod.GET, value = "/sysapps/{sysapp_id}")
public ResponseEntity<SysAppDTO> get(@PathVariable("sysapp_id") String sysapp_id) {
SysApp domain = sysappService.get(sysapp_id);
SysAppDTO dto = sysappMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "批量更新应用", tags = {"应用" }, notes = "批量更新应用")
@RequestMapping(method = RequestMethod.PUT, value = "/sysapps/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<SysAppDTO> sysappdtos) {
sysappService.updateBatch(sysappMapping.toDomain(sysappdtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@ApiOperation(value = "删除应用", tags = {"应用" }, notes = "删除应用")
@RequestMapping(method = RequestMethod.DELETE, value = "/sysapps/{sysapp_id}")
public ResponseEntity<Boolean> remove(@PathVariable("sysapp_id") String sysapp_id) {
......@@ -93,19 +84,21 @@ public class SysAppResource {
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@ApiOperation(value = "获取应用", tags = {"应用" }, notes = "获取应用")
@RequestMapping(method = RequestMethod.GET, value = "/sysapps/{sysapp_id}")
public ResponseEntity<SysAppDTO> get(@PathVariable("sysapp_id") String sysapp_id) {
SysApp domain = sysappService.get(sysapp_id);
@ApiOperation(value = "更新应用", tags = {"应用" }, notes = "更新应用")
@RequestMapping(method = RequestMethod.PUT, value = "/sysapps/{sysapp_id}")
public ResponseEntity<SysAppDTO> update(@PathVariable("sysapp_id") String sysapp_id, @RequestBody SysAppDTO sysappdto) {
SysApp domain = sysappMapping.toDomain(sysappdto);
domain .setId(sysapp_id);
sysappService.update(domain );
SysAppDTO dto = sysappMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "获取应用草稿", tags = {"应用" }, notes = "获取应用草稿")
@RequestMapping(method = RequestMethod.GET, value = "/sysapps/getdraft")
public ResponseEntity<SysAppDTO> getDraft(SysAppDTO dto) {
SysApp domain = sysappMapping.toDomain(dto);
return ResponseEntity.status(HttpStatus.OK).body(sysappMapping.toDto(sysappService.getDraft(domain)));
@ApiOperation(value = "批量更新应用", tags = {"应用" }, notes = "批量更新应用")
@RequestMapping(method = RequestMethod.PUT, value = "/sysapps/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<SysAppDTO> sysappdtos) {
sysappService.updateBatch(sysappMapping.toDomain(sysappdtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@ApiOperation(value = "检查应用", tags = {"应用" }, notes = "检查应用")
......@@ -114,6 +107,13 @@ public class SysAppResource {
return ResponseEntity.status(HttpStatus.OK).body(sysappService.checkKey(sysappMapping.toDomain(sysappdto)));
}
@ApiOperation(value = "获取应用草稿", tags = {"应用" }, notes = "获取应用草稿")
@RequestMapping(method = RequestMethod.GET, value = "/sysapps/getdraft")
public ResponseEntity<SysAppDTO> getDraft(SysAppDTO dto) {
SysApp domain = sysappMapping.toDomain(dto);
return ResponseEntity.status(HttpStatus.OK).body(sysappMapping.toDto(sysappService.getDraft(domain)));
}
@ApiOperation(value = "保存应用", tags = {"应用" }, notes = "保存应用")
@RequestMapping(method = RequestMethod.POST, value = "/sysapps/save")
public ResponseEntity<SysAppDTO> save(@RequestBody SysAppDTO sysappdto) {
......
......@@ -63,25 +63,15 @@ public class SysAuthLogResource {
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysAuthLog-Update-all')")
@ApiOperation(value = "更新认证日志", tags = {"认证日志" }, notes = "更新认证日志")
@RequestMapping(method = RequestMethod.PUT, value = "/sysauthlogs/{sysauthlog_id}")
public ResponseEntity<SysAuthLogDTO> update(@PathVariable("sysauthlog_id") String sysauthlog_id, @RequestBody SysAuthLogDTO sysauthlogdto) {
SysAuthLog domain = sysauthlogMapping.toDomain(sysauthlogdto);
domain .setLogid(sysauthlog_id);
sysauthlogService.update(domain );
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysAuthLog-Get-all')")
@ApiOperation(value = "获取认证日志", tags = {"认证日志" }, notes = "获取认证日志")
@RequestMapping(method = RequestMethod.GET, value = "/sysauthlogs/{sysauthlog_id}")
public ResponseEntity<SysAuthLogDTO> get(@PathVariable("sysauthlog_id") String sysauthlog_id) {
SysAuthLog domain = sysauthlogService.get(sysauthlog_id);
SysAuthLogDTO dto = sysauthlogMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysAuthLog-Update-all')")
@ApiOperation(value = "批量更新认证日志", tags = {"认证日志" }, notes = "批量更新认证日志")
@RequestMapping(method = RequestMethod.PUT, value = "/sysauthlogs/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<SysAuthLogDTO> sysauthlogdtos) {
sysauthlogService.updateBatch(sysauthlogMapping.toDomain(sysauthlogdtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysAuthLog-Remove-all')")
@ApiOperation(value = "删除认证日志", tags = {"认证日志" }, notes = "删除认证日志")
@RequestMapping(method = RequestMethod.DELETE, value = "/sysauthlogs/{sysauthlog_id}")
......@@ -97,20 +87,23 @@ public class SysAuthLogResource {
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysAuthLog-Get-all')")
@ApiOperation(value = "获取认证日志", tags = {"认证日志" }, notes = "获取认证日志")
@RequestMapping(method = RequestMethod.GET, value = "/sysauthlogs/{sysauthlog_id}")
public ResponseEntity<SysAuthLogDTO> get(@PathVariable("sysauthlog_id") String sysauthlog_id) {
SysAuthLog domain = sysauthlogService.get(sysauthlog_id);
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysAuthLog-Update-all')")
@ApiOperation(value = "更新认证日志", tags = {"认证日志" }, notes = "更新认证日志")
@RequestMapping(method = RequestMethod.PUT, value = "/sysauthlogs/{sysauthlog_id}")
public ResponseEntity<SysAuthLogDTO> update(@PathVariable("sysauthlog_id") String sysauthlog_id, @RequestBody SysAuthLogDTO sysauthlogdto) {
SysAuthLog domain = sysauthlogMapping.toDomain(sysauthlogdto);
domain .setLogid(sysauthlog_id);
sysauthlogService.update(domain );
SysAuthLogDTO dto = sysauthlogMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "获取认证日志草稿", tags = {"认证日志" }, notes = "获取认证日志草稿")
@RequestMapping(method = RequestMethod.GET, value = "/sysauthlogs/getdraft")
public ResponseEntity<SysAuthLogDTO> getDraft(SysAuthLogDTO dto) {
SysAuthLog domain = sysauthlogMapping.toDomain(dto);
return ResponseEntity.status(HttpStatus.OK).body(sysauthlogMapping.toDto(sysauthlogService.getDraft(domain)));
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysAuthLog-Update-all')")
@ApiOperation(value = "批量更新认证日志", tags = {"认证日志" }, notes = "批量更新认证日志")
@RequestMapping(method = RequestMethod.PUT, value = "/sysauthlogs/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<SysAuthLogDTO> sysauthlogdtos) {
sysauthlogService.updateBatch(sysauthlogMapping.toDomain(sysauthlogdtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@ApiOperation(value = "检查认证日志", tags = {"认证日志" }, notes = "检查认证日志")
......@@ -119,6 +112,13 @@ public class SysAuthLogResource {
return ResponseEntity.status(HttpStatus.OK).body(sysauthlogService.checkKey(sysauthlogMapping.toDomain(sysauthlogdto)));
}
@ApiOperation(value = "获取认证日志草稿", tags = {"认证日志" }, notes = "获取认证日志草稿")
@RequestMapping(method = RequestMethod.GET, value = "/sysauthlogs/getdraft")
public ResponseEntity<SysAuthLogDTO> getDraft(SysAuthLogDTO dto) {
SysAuthLog domain = sysauthlogMapping.toDomain(dto);
return ResponseEntity.status(HttpStatus.OK).body(sysauthlogMapping.toDto(sysauthlogService.getDraft(domain)));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysAuthLog-Save-all')")
@ApiOperation(value = "保存认证日志", tags = {"认证日志" }, notes = "保存认证日志")
@RequestMapping(method = RequestMethod.POST, value = "/sysauthlogs/save")
......
......@@ -65,25 +65,15 @@ public class SysOpenAccessResource {
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysOpenAccess-Update-all')")
@ApiOperation(value = "更新第三方认证平台", tags = {"第三方认证平台" }, notes = "更新第三方认证平台")
@RequestMapping(method = RequestMethod.PUT, value = "/sysopenaccesses/{sysopenaccess_id}")
public ResponseEntity<SysOpenAccessDTO> update(@PathVariable("sysopenaccess_id") String sysopenaccess_id, @RequestBody SysOpenAccessDTO sysopenaccessdto) {
SysOpenAccess domain = sysopenaccessMapping.toDomain(sysopenaccessdto);
domain .setId(sysopenaccess_id);
sysopenaccessService.update(domain );
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysOpenAccess-Get-all')")
@ApiOperation(value = "获取第三方认证平台", tags = {"第三方认证平台" }, notes = "获取第三方认证平台")
@RequestMapping(method = RequestMethod.GET, value = "/sysopenaccesses/{sysopenaccess_id}")
public ResponseEntity<SysOpenAccessDTO> get(@PathVariable("sysopenaccess_id") String sysopenaccess_id) {
SysOpenAccess domain = sysopenaccessService.get(sysopenaccess_id);
SysOpenAccessDTO dto = sysopenaccessMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysOpenAccess-Update-all')")
@ApiOperation(value = "批量更新第三方认证平台", tags = {"第三方认证平台" }, notes = "批量更新第三方认证平台")
@RequestMapping(method = RequestMethod.PUT, value = "/sysopenaccesses/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<SysOpenAccessDTO> sysopenaccessdtos) {
sysopenaccessService.updateBatch(sysopenaccessMapping.toDomain(sysopenaccessdtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysOpenAccess-Remove-all')")
@ApiOperation(value = "删除第三方认证平台", tags = {"第三方认证平台" }, notes = "删除第三方认证平台")
@RequestMapping(method = RequestMethod.DELETE, value = "/sysopenaccesses/{sysopenaccess_id}")
......@@ -99,20 +89,23 @@ public class SysOpenAccessResource {
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysOpenAccess-Get-all')")
@ApiOperation(value = "获取第三方认证平台", tags = {"第三方认证平台" }, notes = "获取第三方认证平台")
@RequestMapping(method = RequestMethod.GET, value = "/sysopenaccesses/{sysopenaccess_id}")
public ResponseEntity<SysOpenAccessDTO> get(@PathVariable("sysopenaccess_id") String sysopenaccess_id) {
SysOpenAccess domain = sysopenaccessService.get(sysopenaccess_id);
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysOpenAccess-Update-all')")
@ApiOperation(value = "更新第三方认证平台", tags = {"第三方认证平台" }, notes = "更新第三方认证平台")
@RequestMapping(method = RequestMethod.PUT, value = "/sysopenaccesses/{sysopenaccess_id}")
public ResponseEntity<SysOpenAccessDTO> update(@PathVariable("sysopenaccess_id") String sysopenaccess_id, @RequestBody SysOpenAccessDTO sysopenaccessdto) {
SysOpenAccess domain = sysopenaccessMapping.toDomain(sysopenaccessdto);
domain .setId(sysopenaccess_id);
sysopenaccessService.update(domain );
SysOpenAccessDTO dto = sysopenaccessMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "获取第三方认证平台草稿", tags = {"第三方认证平台" }, notes = "获取第三方认证平台草稿")
@RequestMapping(method = RequestMethod.GET, value = "/sysopenaccesses/getdraft")
public ResponseEntity<SysOpenAccessDTO> getDraft(SysOpenAccessDTO dto) {
SysOpenAccess domain = sysopenaccessMapping.toDomain(dto);
return ResponseEntity.status(HttpStatus.OK).body(sysopenaccessMapping.toDto(sysopenaccessService.getDraft(domain)));
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysOpenAccess-Update-all')")
@ApiOperation(value = "批量更新第三方认证平台", tags = {"第三方认证平台" }, notes = "批量更新第三方认证平台")
@RequestMapping(method = RequestMethod.PUT, value = "/sysopenaccesses/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<SysOpenAccessDTO> sysopenaccessdtos) {
sysopenaccessService.updateBatch(sysopenaccessMapping.toDomain(sysopenaccessdtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@ApiOperation(value = "检查第三方认证平台", tags = {"第三方认证平台" }, notes = "检查第三方认证平台")
......@@ -121,6 +114,13 @@ public class SysOpenAccessResource {
return ResponseEntity.status(HttpStatus.OK).body(sysopenaccessService.checkKey(sysopenaccessMapping.toDomain(sysopenaccessdto)));
}
@ApiOperation(value = "获取第三方认证平台草稿", tags = {"第三方认证平台" }, notes = "获取第三方认证平台草稿")
@RequestMapping(method = RequestMethod.GET, value = "/sysopenaccesses/getdraft")
public ResponseEntity<SysOpenAccessDTO> getDraft(SysOpenAccessDTO dto) {
SysOpenAccess domain = sysopenaccessMapping.toDomain(dto);
return ResponseEntity.status(HttpStatus.OK).body(sysopenaccessMapping.toDto(sysopenaccessService.getDraft(domain)));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysOpenAccess-Save-all')")
@ApiOperation(value = "保存第三方认证平台", tags = {"第三方认证平台" }, notes = "保存第三方认证平台")
@RequestMapping(method = RequestMethod.POST, value = "/sysopenaccesses/save")
......
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);
}
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册