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

Mosher 发布系统代码 [后台服务,演示应用]

上级 4e84de0d
......@@ -33,6 +33,7 @@ export default {
createdate: "建立时间",
field: "大整型",
field2: "大数值",
ibizsample0002id: "首页图表数据源标识",
},
views: {
sf5editview: {
......
......@@ -32,6 +32,7 @@ export default {
createdate: "建立时间",
field: "大整型",
field2: "大数值",
ibizsample0002id: "首页图表数据源标识",
},
views: {
sf5editview: {
......
......@@ -87,6 +87,35 @@ mock.onDelete(new RegExp(/^\/ibizsample0001s\/batch$/)).reply((config: any) => {
});
// Select
mock.onPost(new RegExp(/^\/ibizsample0002s\/([a-zA-Z0-9\-\;]{1,35})\/ibizsample0001s\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:ibizsample0001 方法: 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> = ['ibizsample0002id','ibizsample0001id'];
const matchArray:any = new RegExp(/^\/ibizsample0002s\/([a-zA-Z0-9\-\;]{1,35})\/ibizsample0001s\/([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.ibizsample0001id, tempValue.ibizsample0001id));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.groupEnd();
console.groupEnd();
return [status, _items];
});
// Select
mock.onPost(new RegExp(/^\/ibizsample0001s\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:ibizsample0001 方法: Select");
......@@ -114,6 +143,33 @@ mock.onPost(new RegExp(/^\/ibizsample0001s\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).
console.groupEnd();
return [status, _items];
});
// Create
mock.onPost(new RegExp(/^\/ibizsample0002s\/([a-zA-Z0-9\-\;]{1,35})\/ibizsample0001s\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:ibizsample0001 方法: Create");
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> = ['ibizsample0002id','ibizsample0001id'];
const matchArray:any = new RegExp(/^\/ibizsample0002s\/([a-zA-Z0-9\-\;]{1,35})\/ibizsample0001s\/([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]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// Create
mock.onPost(new RegExp(/^\/ibizsample0001s\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
......@@ -140,6 +196,33 @@ mock.onPost(new RegExp(/^\/ibizsample0001s\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((
console.groupEnd();
return [status, mockDatas[0]];
});
// Update
mock.onPut(new RegExp(/^\/ibizsample0002s\/([a-zA-Z0-9\-\;]{1,35})\/ibizsample0001s\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:ibizsample0001 方法: 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> = ['ibizsample0002id','ibizsample0001id'];
const matchArray:any = new RegExp(/^\/ibizsample0002s\/([a-zA-Z0-9\-\;]{1,35})\/ibizsample0001s\/([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]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// Update
mock.onPut(new RegExp(/^\/ibizsample0001s\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
......@@ -179,6 +262,25 @@ mock.onPut(new RegExp(/^\/ibizsample0001s\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((c
return [status, data];
});
// GetDraft
mock.onGet(new RegExp(/^\/ibizsample0002s\/([a-zA-Z0-9\-\;]{1,35})\/ibizsample0001s\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:ibizsample0001 方法: GetDraft");
console.table({url:config.url, method: config.method, data:config.data});
// GetDraft
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// GetDraft
mock.onGet(new RegExp(/^\/ibizsample0001s\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:ibizsample0001 方法: GetDraft");
......@@ -194,6 +296,33 @@ mock.onGet(new RegExp(/^\/ibizsample0001s\/getdraft$/)).reply((config: any) => {
console.groupEnd();
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/ibizsample0002s\/([a-zA-Z0-9\-\;]{1,35})\/ibizsample0001s\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:ibizsample0001 方法: 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> = ['ibizsample0002id','ibizsample0001id'];
const matchArray:any = new RegExp(/^\/ibizsample0002s\/([a-zA-Z0-9\-\;]{1,35})\/ibizsample0001s\/([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) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/ibizsample0001s\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
......@@ -232,6 +361,33 @@ mock.onPost(new RegExp(/^\/ibizsample0001s\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/
console.groupEnd();
return [status, data];
});
// Save
mock.onPost(new RegExp(/^\/ibizsample0002s\/([a-zA-Z0-9\-\;]{1,35})\/ibizsample0001s\/([a-zA-Z0-9\-\;]{1,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:ibizsample0001 方法: 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> = ['ibizsample0002id','ibizsample0001id'];
const matchArray:any = new RegExp(/^\/ibizsample0002s\/([a-zA-Z0-9\-\;]{1,35})\/ibizsample0001s\/([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) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// Save
mock.onPost(new RegExp(/^\/ibizsample0001s\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
......@@ -270,6 +426,51 @@ mock.onPost(new RegExp(/^\/ibizsample0001s\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).r
console.groupEnd();
return [status, data];
});
// FetchDefault
mock.onGet(new RegExp(/^\/ibizsample0002s\/([a-zA-Z0-9\-\;]{1,35})\/ibizsample0001s\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:ibizsample0001 方法: FetchDefault");
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> = ['ibizsample0002id'];
let tempValue: any = {};
const matchArray:any = new RegExp(/^\/ibizsample0002s\/([a-zA-Z0-9\-\;]{1,35})\/ibizsample0001s\/fetchdefault$/).exec(config.url);
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 : [];
if (items.length > 0 && paramArray.length > 0) {
paramArray.forEach((paramkey: any) => {
if (tempValue[paramkey] && tempValue[paramkey].indexOf(";") > 0) {
let keysGrounp: Array<any> = tempValue[paramkey].split(new RegExp(/[\;]/));
let tempArray: Array<any> = [];
keysGrounp.forEach((singlekey: any) => {
let _items = items.filter((item: any) => { return item[paramkey] == singlekey });
if(_items.length >0){
tempArray.push(..._items);
}
})
items = tempArray;
} else {
items = items.filter((item: any) => { return item[paramkey] == tempValue[paramkey] });
}
})
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(items);
console.groupEnd();
console.groupEnd();
return [status, items];
});
// FetchDefault
mock.onGet(new RegExp(/^\/ibizsample0001s\/fetchdefault$/)).reply((config: any) => {
......@@ -314,6 +515,33 @@ mock.onGet(new RegExp(/^\/ibizsample0001s\/fetchdefault(\?[\w-./?%&=,]*)*$/)).re
console.groupEnd();
return [status, records ? records : []];
});
// FilterUpdate
mock.onPost(new RegExp(/^\/ibizsample0002s\/([a-zA-Z0-9\-\;]{1,35})\/ibizsample0001s\/([a-zA-Z0-9\-\;]{1,35})\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:ibizsample0001 方法: FilterUpdate");
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> = ['ibizsample0002id','ibizsample0001id'];
const matchArray:any = new RegExp(/^\/ibizsample0002s\/([a-zA-Z0-9\-\;]{1,35})\/ibizsample0001s\/([a-zA-Z0-9\-\;]{1,35})\/fetchdefault$/).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]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// FilterUpdate
mock.onPost(new RegExp(/^\/ibizsample0001s\/?([a-zA-Z0-9\-\;]{0,35})\/fetchdefault$/)).reply((config: any) => {
......@@ -352,6 +580,33 @@ mock.onPost(new RegExp(/^\/ibizsample0001s\/?([a-zA-Z0-9\-\;]{0,35})\/fetchdefau
console.groupEnd();
return [status, data];
});
// FilterSearch
mock.onPost(new RegExp(/^\/ibizsample0002s\/([a-zA-Z0-9\-\;]{1,35})\/ibizsample0001s\/([a-zA-Z0-9\-\;]{1,35})\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:ibizsample0001 方法: FilterSearch");
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> = ['ibizsample0002id','ibizsample0001id'];
const matchArray:any = new RegExp(/^\/ibizsample0002s\/([a-zA-Z0-9\-\;]{1,35})\/ibizsample0001s\/([a-zA-Z0-9\-\;]{1,35})\/fetchdefault$/).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]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// FilterSearch
mock.onPost(new RegExp(/^\/ibizsample0001s\/?([a-zA-Z0-9\-\;]{0,35})\/fetchdefault$/)).reply((config: any) => {
......@@ -390,6 +645,33 @@ mock.onPost(new RegExp(/^\/ibizsample0001s\/?([a-zA-Z0-9\-\;]{0,35})\/fetchdefau
console.groupEnd();
return [status, data];
});
// FilterGet
mock.onPost(new RegExp(/^\/ibizsample0002s\/([a-zA-Z0-9\-\;]{1,35})\/ibizsample0001s\/([a-zA-Z0-9\-\;]{1,35})\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:ibizsample0001 方法: FilterGet");
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> = ['ibizsample0002id','ibizsample0001id'];
const matchArray:any = new RegExp(/^\/ibizsample0002s\/([a-zA-Z0-9\-\;]{1,35})\/ibizsample0001s\/([a-zA-Z0-9\-\;]{1,35})\/fetchdefault$/).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]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// FilterGet
mock.onPost(new RegExp(/^\/ibizsample0001s\/?([a-zA-Z0-9\-\;]{0,35})\/fetchdefault$/)).reply((config: any) => {
......@@ -428,6 +710,33 @@ mock.onPost(new RegExp(/^\/ibizsample0001s\/?([a-zA-Z0-9\-\;]{0,35})\/fetchdefau
console.groupEnd();
return [status, data];
});
// FilterCreate
mock.onPost(new RegExp(/^\/ibizsample0002s\/([a-zA-Z0-9\-\;]{1,35})\/ibizsample0001s\/([a-zA-Z0-9\-\;]{1,35})\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:ibizsample0001 方法: FilterCreate");
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> = ['ibizsample0002id','ibizsample0001id'];
const matchArray:any = new RegExp(/^\/ibizsample0002s\/([a-zA-Z0-9\-\;]{1,35})\/ibizsample0001s\/([a-zA-Z0-9\-\;]{1,35})\/fetchdefault$/).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]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// FilterCreate
mock.onPost(new RegExp(/^\/ibizsample0001s\/?([a-zA-Z0-9\-\;]{0,35})\/fetchdefault$/)).reply((config: any) => {
......@@ -466,6 +775,33 @@ mock.onPost(new RegExp(/^\/ibizsample0001s\/?([a-zA-Z0-9\-\;]{0,35})\/fetchdefau
console.groupEnd();
return [status, data];
});
// FilterGetDraft
mock.onPost(new RegExp(/^\/ibizsample0002s\/([a-zA-Z0-9\-\;]{1,35})\/ibizsample0001s\/([a-zA-Z0-9\-\;]{1,35})\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:ibizsample0001 方法: FilterGetDraft");
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> = ['ibizsample0002id','ibizsample0001id'];
const matchArray:any = new RegExp(/^\/ibizsample0002s\/([a-zA-Z0-9\-\;]{1,35})\/ibizsample0001s\/([a-zA-Z0-9\-\;]{1,35})\/fetchdefault$/).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]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// FilterGetDraft
mock.onPost(new RegExp(/^\/ibizsample0001s\/?([a-zA-Z0-9\-\;]{0,35})\/fetchdefault$/)).reply((config: any) => {
......@@ -504,6 +840,33 @@ mock.onPost(new RegExp(/^\/ibizsample0001s\/?([a-zA-Z0-9\-\;]{0,35})\/fetchdefau
console.groupEnd();
return [status, data];
});
// FilterRemove
mock.onPost(new RegExp(/^\/ibizsample0002s\/([a-zA-Z0-9\-\;]{1,35})\/ibizsample0001s\/([a-zA-Z0-9\-\;]{1,35})\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:ibizsample0001 方法: FilterRemove");
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> = ['ibizsample0002id','ibizsample0001id'];
const matchArray:any = new RegExp(/^\/ibizsample0002s\/([a-zA-Z0-9\-\;]{1,35})\/ibizsample0001s\/([a-zA-Z0-9\-\;]{1,35})\/fetchdefault$/).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]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// FilterRemove
mock.onPost(new RegExp(/^\/ibizsample0001s\/?([a-zA-Z0-9\-\;]{0,35})\/fetchdefault$/)).reply((config: any) => {
......@@ -542,6 +905,33 @@ mock.onPost(new RegExp(/^\/ibizsample0001s\/?([a-zA-Z0-9\-\;]{0,35})\/fetchdefau
console.groupEnd();
return [status, data];
});
// FilterFetch
mock.onPost(new RegExp(/^\/ibizsample0002s\/([a-zA-Z0-9\-\;]{1,35})\/ibizsample0001s\/([a-zA-Z0-9\-\;]{1,35})\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:ibizsample0001 方法: FilterFetch");
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> = ['ibizsample0002id','ibizsample0001id'];
const matchArray:any = new RegExp(/^\/ibizsample0002s\/([a-zA-Z0-9\-\;]{1,35})\/ibizsample0001s\/([a-zA-Z0-9\-\;]{1,35})\/fetchdefault$/).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]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// FilterFetch
mock.onPost(new RegExp(/^\/ibizsample0001s\/?([a-zA-Z0-9\-\;]{0,35})\/fetchdefault$/)).reply((config: any) => {
......@@ -582,6 +972,34 @@ mock.onPost(new RegExp(/^\/ibizsample0001s\/?([a-zA-Z0-9\-\;]{0,35})\/fetchdefau
});
// Remove
mock.onDelete(new RegExp(/^\/ibizsample0002s\/([a-zA-Z0-9\-\;]{1,35})\/ibizsample0001s\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:ibizsample0001 方法: Remove");
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> = ['ibizsample0002id','ibizsample0001id'];
const matchArray:any = new RegExp(/^\/ibizsample0002s\/([a-zA-Z0-9\-\;]{1,35})\/ibizsample0001s\/([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.ibizsample0001id, tempValue.ibizsample0001id));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Remove
mock.onDelete(new RegExp(/^\/ibizsample0001s\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:ibizsample0001 方法: Remove");
......@@ -610,6 +1028,34 @@ mock.onDelete(new RegExp(/^\/ibizsample0001s\/([a-zA-Z0-9\-\;]{1,35})$/)).reply(
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/ibizsample0002s\/([a-zA-Z0-9\-\;]{1,35})\/ibizsample0001s\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:ibizsample0001 方法: Get");
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> = ['ibizsample0002id','ibizsample0001id'];
const matchArray:any = new RegExp(/^\/ibizsample0002s\/([a-zA-Z0-9\-\;]{1,35})\/ibizsample0001s\/([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.ibizsample0001id, tempValue.ibizsample0001id));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/ibizsample0001s\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:ibizsample0001 方法: Get");
......
......@@ -119,6 +119,21 @@ const router = new Router({
},
component: () => import('@pages/sample/ibizuniproduct-pickup-view/ibizuniproduct-pickup-view.vue'),
},
{
path: 'ibizsample0002s/:ibizsample0002?/ibizsample0001s/:ibizsample0001?/sf4editview/:sf4editview?',
meta: {
caption: 'entities.ibizsample0001.views.sf4editview.caption',
info:'',
parameters: [
{ pathName: 'index', parameterName: 'index' },
{ pathName: 'ibizsample0002s', parameterName: 'ibizsample0002' },
{ pathName: 'ibizsample0001s', parameterName: 'ibizsample0001' },
{ pathName: 'sf4editview', parameterName: 'sf4editview' },
],
requireAuth: true,
},
component: () => import('@pages/sample/ibizsample0001-sf4-edit-view/ibizsample0001-sf4-edit-view.vue'),
},
{
path: 'ibizsample0001s/:ibizsample0001?/sf4editview/:sf4editview?',
meta: {
......@@ -175,6 +190,21 @@ const router = new Router({
},
component: () => import('@pages/sample/ibizorder-bar-chart-view/ibizorder-bar-chart-view.vue'),
},
{
path: 'ibizsample0002s/:ibizsample0002?/ibizsample0001s/:ibizsample0001?/sf2editview/:sf2editview?',
meta: {
caption: 'entities.ibizsample0001.views.sf2editview.caption',
info:'',
parameters: [
{ pathName: 'index', parameterName: 'index' },
{ pathName: 'ibizsample0002s', parameterName: 'ibizsample0002' },
{ pathName: 'ibizsample0001s', parameterName: 'ibizsample0001' },
{ pathName: 'sf2editview', parameterName: 'sf2editview' },
],
requireAuth: true,
},
component: () => import('@pages/sample/ibizsample0001-sf2-edit-view/ibizsample0001-sf2-edit-view.vue'),
},
{
path: 'ibizsample0001s/:ibizsample0001?/sf2editview/:sf2editview?',
meta: {
......@@ -1449,6 +1479,21 @@ const router = new Router({
},
component: () => import('@pages/sample/ibizorder-sf7-edit-view/ibizorder-sf7-edit-view.vue'),
},
{
path: 'ibizsample0002s/:ibizsample0002?/ibizsample0001s/:ibizsample0001?/sf5editview/:sf5editview?',
meta: {
caption: 'entities.ibizsample0001.views.sf5editview.caption',
info:'',
parameters: [
{ pathName: 'index', parameterName: 'index' },
{ pathName: 'ibizsample0002s', parameterName: 'ibizsample0002' },
{ pathName: 'ibizsample0001s', parameterName: 'ibizsample0001' },
{ pathName: 'sf5editview', parameterName: 'sf5editview' },
],
requireAuth: true,
},
component: () => import('@pages/sample/ibizsample0001-sf5-edit-view/ibizsample0001-sf5-edit-view.vue'),
},
{
path: 'ibizsample0001s/:ibizsample0001?/sf5editview/:sf5editview?',
meta: {
......@@ -1616,6 +1661,20 @@ const router = new Router({
},
component: () => import('@pages/sample/ibizsample0018-grid-view/ibizsample0018-grid-view.vue'),
},
{
path: '/ibizsample0002s/:ibizsample0002?/ibizsample0001s/:ibizsample0001?/sf5editview/:sf5editview?',
meta: {
caption: 'entities.ibizsample0001.views.sf5editview.caption',
info:'',
parameters: [
{ pathName: 'ibizsample0002s', parameterName: 'ibizsample0002' },
{ pathName: 'ibizsample0001s', parameterName: 'ibizsample0001' },
{ pathName: 'sf5editview', parameterName: 'sf5editview' },
],
requireAuth: true,
},
component: () => import('@pages/sample/ibizsample0001-sf5-edit-view/ibizsample0001-sf5-edit-view.vue'),
},
{
path: '/ibizsample0001s/:ibizsample0001?/sf5editview/:sf5editview?',
meta: {
......@@ -1629,6 +1688,20 @@ const router = new Router({
},
component: () => import('@pages/sample/ibizsample0001-sf5-edit-view/ibizsample0001-sf5-edit-view.vue'),
},
{
path: '/ibizsample0002s/:ibizsample0002?/ibizsample0001s/:ibizsample0001?/sf4editview/:sf4editview?',
meta: {
caption: 'entities.ibizsample0001.views.sf4editview.caption',
info:'',
parameters: [
{ pathName: 'ibizsample0002s', parameterName: 'ibizsample0002' },
{ pathName: 'ibizsample0001s', parameterName: 'ibizsample0001' },
{ pathName: 'sf4editview', parameterName: 'sf4editview' },
],
requireAuth: true,
},
component: () => import('@pages/sample/ibizsample0001-sf4-edit-view/ibizsample0001-sf4-edit-view.vue'),
},
{
path: '/ibizsample0001s/:ibizsample0001?/sf4editview/:sf4editview?',
meta: {
......@@ -2136,6 +2209,20 @@ const router = new Router({
},
component: () => import('@pages/sample/ibizorder-sedit-view/ibizorder-sedit-view.vue'),
},
{
path: '/ibizsample0002s/:ibizsample0002?/ibizsample0001s/:ibizsample0001?/sf2editview/:sf2editview?',
meta: {
caption: 'entities.ibizsample0001.views.sf2editview.caption',
info:'',
parameters: [
{ pathName: 'ibizsample0002s', parameterName: 'ibizsample0002' },
{ pathName: 'ibizsample0001s', parameterName: 'ibizsample0001' },
{ pathName: 'sf2editview', parameterName: 'sf2editview' },
],
requireAuth: true,
},
component: () => import('@pages/sample/ibizsample0001-sf2-edit-view/ibizsample0001-sf2-edit-view.vue'),
},
{
path: '/ibizsample0001s/:ibizsample0001?/sf2editview/:sf2editview?',
meta: {
......
......@@ -48,6 +48,11 @@ export default class IBIZSample0001ServiceBase extends EntityService {
* @memberof IBIZSample0001ServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.ibizsample0002 && context.ibizsample0001){
let res:any = Http.getInstance().post(`/ibizsample0002s/${context.ibizsample0002}/ibizsample0001s/${context.ibizsample0001}/select`,data,isloading);
return res;
}
let res:any = Http.getInstance().post(`/ibizsample0001s/${context.ibizsample0001}/select`,data,isloading);
return res;
......@@ -63,6 +68,20 @@ export default class IBIZSample0001ServiceBase extends EntityService {
* @memberof IBIZSample0001ServiceBase
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.ibizsample0002 && true){
let masterData:any = {};
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
}
if(data.srffrontuf){
delete data.srffrontuf;
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/ibizsample0002s/${context.ibizsample0002}/ibizsample0001s`,data,isloading);
return res;
}
let masterData:any = {};
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
......@@ -87,6 +106,13 @@ export default class IBIZSample0001ServiceBase extends EntityService {
* @memberof IBIZSample0001ServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.ibizsample0002 && context.ibizsample0001){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/ibizsample0002s/${context.ibizsample0002}/ibizsample0001s/${context.ibizsample0001}`,data,isloading);
return res;
}
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/ibizsample0001s/${context.ibizsample0001}`,data,isloading);
......@@ -104,6 +130,10 @@ export default class IBIZSample0001ServiceBase extends EntityService {
* @memberof IBIZSample0001ServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.ibizsample0002 && context.ibizsample0001){
let res:any = Http.getInstance().delete(`/ibizsample0002s/${context.ibizsample0002}/ibizsample0001s/${context.ibizsample0001}`,isloading);
return res;
}
let res:any = Http.getInstance().delete(`/ibizsample0001s/${context.ibizsample0001}`,isloading);
return res;
}
......@@ -118,6 +148,11 @@ export default class IBIZSample0001ServiceBase extends EntityService {
* @memberof IBIZSample0001ServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.ibizsample0002 && context.ibizsample0001){
let res:any = await Http.getInstance().get(`/ibizsample0002s/${context.ibizsample0002}/ibizsample0001s/${context.ibizsample0001}`,isloading);
return res;
}
let res:any = await Http.getInstance().get(`/ibizsample0001s/${context.ibizsample0001}`,isloading);
return res;
......@@ -133,6 +168,12 @@ export default class IBIZSample0001ServiceBase extends EntityService {
* @memberof IBIZSample0001ServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.ibizsample0002 && true){
let res:any = await Http.getInstance().get(`/ibizsample0002s/${context.ibizsample0002}/ibizsample0001s/getdraft`,isloading);
res.data.ibizsample0001 = data.ibizsample0001;
return res;
}
let res:any = await Http.getInstance().get(`/ibizsample0001s/getdraft`,isloading);
res.data.ibizsample0001 = data.ibizsample0001;
......@@ -149,6 +190,13 @@ export default class IBIZSample0001ServiceBase extends EntityService {
* @memberof IBIZSample0001ServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.ibizsample0002 && context.ibizsample0001){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/ibizsample0002s/${context.ibizsample0002}/ibizsample0001s/${context.ibizsample0001}/checkkey`,data,isloading);
return res;
}
let res:any = Http.getInstance().post(`/ibizsample0001s/${context.ibizsample0001}/checkkey`,data,isloading);
return res;
}
......@@ -163,6 +211,13 @@ export default class IBIZSample0001ServiceBase extends EntityService {
* @memberof IBIZSample0001ServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.ibizsample0002 && context.ibizsample0001){
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/ibizsample0002s/${context.ibizsample0002}/ibizsample0001s/${context.ibizsample0001}/save`,data,isloading);
return res;
}
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/ibizsample0001s/${context.ibizsample0001}/save`,data,isloading);
......@@ -180,6 +235,11 @@ export default class IBIZSample0001ServiceBase extends EntityService {
* @memberof IBIZSample0001ServiceBase
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.ibizsample0002 && true){
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/ibizsample0002s/${context.ibizsample0002}/ibizsample0001s/fetchdefault`,tempData,isloading);
return res;
}
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/ibizsample0001s/fetchdefault`,tempData,isloading);
return res;
......
......@@ -73,6 +73,7 @@ export default class IBIZSample0002ServiceBase extends EntityService {
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/ibizsample0002s`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_ibizsample0001s',JSON.stringify(res.data.ibizsample0001s?res.data.ibizsample0001s:[]));
return res;
}
......
......@@ -277,6 +277,21 @@ public class IBIZSample0001 extends EntityMP implements Serializable {
@JSONField(name = "field2")
@JsonProperty("field2")
private BigDecimal field2;
/**
* 首页图表数据源标识
*/
@TableField(value = "ibizsample0002id")
@JSONField(name = "ibizsample0002id")
@JsonProperty("ibizsample0002id")
private String ibizsample0002id;
/**
*
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.core.sample.domain.IBIZSample0002 sample0002Sample00011N;
......@@ -526,6 +541,14 @@ public class IBIZSample0001 extends EntityMP implements Serializable {
this.modify("field2",field2);
}
/**
* 设置 [首页图表数据源标识]
*/
public void setIbizsample0002id(String ibizsample0002id){
this.ibizsample0002id = ibizsample0002id ;
this.modify("ibizsample0002id",ibizsample0002id);
}
/**
* 复制当前对象数据到目标对象(粘贴重置)
......
......@@ -48,6 +48,13 @@ public class IBIZSample0001SearchContext extends QueryWrapperContext<IBIZSample0
this.getSearchCond().like("ibizsample0001name", n_ibizsample0001name_like);
}
}
private String n_ibizsample0002id_eq;//[首页图表数据源标识]
public void setN_ibizsample0002id_eq(String n_ibizsample0002id_eq) {
this.n_ibizsample0002id_eq = n_ibizsample0002id_eq;
if(!ObjectUtils.isEmpty(this.n_ibizsample0002id_eq)){
this.getSearchCond().eq("ibizsample0002id", n_ibizsample0002id_eq);
}
}
/**
* 启用快速搜索
......
......@@ -62,4 +62,6 @@ public interface IBIZSample0001Mapper extends BaseMapper<IBIZSample0001>{
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<IBIZSample0001> selectByIbizsample0002id(@Param("ibizsample0002id") Serializable ibizsample0002id) ;
}
......@@ -37,6 +37,8 @@ public interface IIBIZSample0001Service extends IService<IBIZSample0001>{
boolean save(IBIZSample0001 et) ;
void saveBatch(List<IBIZSample0001> list) ;
Page<IBIZSample0001> searchDefault(IBIZSample0001SearchContext context) ;
List<IBIZSample0001> selectByIbizsample0002id(String ibizsample0002id);
void removeByIbizsample0002id(String ibizsample0002id);
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
......
......@@ -48,6 +48,9 @@ import org.springframework.util.StringUtils;
@Service("IBIZSample0001ServiceImpl")
public class IBIZSample0001ServiceImpl extends ServiceImpl<IBIZSample0001Mapper, IBIZSample0001> implements IIBIZSample0001Service {
@Autowired
@Lazy
protected cn.ibizlab.core.sample.service.IIBIZSample0002Service ibizsample0002Service;
protected int batchSize = 500;
......@@ -148,6 +151,15 @@ public class IBIZSample0001ServiceImpl extends ServiceImpl<IBIZSample0001Mapper,
}
@Override
public List<IBIZSample0001> selectByIbizsample0002id(String ibizsample0002id) {
return baseMapper.selectByIbizsample0002id(ibizsample0002id);
}
@Override
public void removeByIbizsample0002id(String ibizsample0002id) {
this.remove(new QueryWrapper<IBIZSample0001>().eq("ibizsample0002id",ibizsample0002id));
}
/**
* 查询集合 DEFAULT
......
......@@ -48,6 +48,9 @@ import org.springframework.util.StringUtils;
@Service("IBIZSample0002ServiceImpl")
public class IBIZSample0002ServiceImpl extends ServiceImpl<IBIZSample0002Mapper, IBIZSample0002> implements IIBIZSample0002Service {
@Autowired
@Lazy
protected cn.ibizlab.core.sample.service.IIBIZSample0001Service ibizsample0001Service;
protected int batchSize = 500;
......
......@@ -383,6 +383,8 @@
</column>
<column name="FIELD2" remarks="" type="DECIMAL(38,2)">
</column>
<column name="IBIZSAMPLE0002ID" remarks="" type="VARCHAR(100)">
</column>
</createTable>
</changeSet>
......@@ -1055,13 +1057,16 @@
<!--输出实体[IBIZQJ]外键关系 -->
<!--输出实体[IBIZSAMPLE]外键关系 -->
<!--输出实体[IBIZSAMPLE0001]外键关系 -->
<changeSet author="a_LAB01_df847bdfd" id="fk-ibizsample0001-43-38">
<addForeignKeyConstraint baseColumnNames="IBIZSAMPLE0002ID" baseTableName="T_IBIZSAMPLE0001" constraintName="DER1N_IBIZSAMPLE0001_IBIZSAMPL" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="IBIZSAMPLE0002ID" referencedTableName="T_IBIZSAMPLE0002" validate="true"/>
</changeSet>
<!--输出实体[IBIZSAMPLE0002]外键关系 -->
<!--输出实体[IBIZSAMPLE0003]外键关系 -->
<!--输出实体[IBIZSAMPLE0004]外键关系 -->
<!--输出实体[IBIZSAMPLE0005]外键关系 -->
<!--输出实体[IBIZSAMPLE0006]外键关系 -->
<!--输出实体[IBIZSAMPLE0007]外键关系 -->
<changeSet author="a_LAB01_df847bdfd" id="fk-ibizsample0007-4-38">
<changeSet author="a_LAB01_df847bdfd" id="fk-ibizsample0007-4-39">
<addForeignKeyConstraint baseColumnNames="IBIZSAMPLE0006ID" baseTableName="T_IBIZSAMPLE0007" constraintName="DER1N_IBIZSAMPLE0007_IBIZSAMPL" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="IBIZSAMPLE0006ID" referencedTableName="T_IBIZSAMPLE0006" validate="true"/>
</changeSet>
<!--输出实体[IBIZSAMPLE0008]外键关系 -->
......@@ -1077,7 +1082,7 @@
<!--输出实体[IBIZSAMPLE0018]外键关系 -->
<!--输出实体[IBIZSAMPLE0019]外键关系 -->
<!--输出实体[IBIZSAMPLE0020]外键关系 -->
<changeSet author="a_LAB01_df847bdfd" id="fk-ibizsample0020-4-39">
<changeSet author="a_LAB01_df847bdfd" id="fk-ibizsample0020-4-40">
<addForeignKeyConstraint baseColumnNames="IBIZSAMPLE0019ID" baseTableName="T_IBIZSAMPLE0020" constraintName="DER1N_IBIZSAMPLE0020_IBIZSAMPL" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="IBIZSAMPLE0019ID" referencedTableName="T_IBIZSAMPLE0019" validate="true"/>
</changeSet>
<!--输出实体[IBIZSOFTWARESUIT]外键关系 -->
......
......@@ -23,10 +23,20 @@
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="IBIZSample0001ResultMap" type="cn.ibizlab.core.sample.domain.IBIZSample0001" autoMapping="true">
<id property="ibizsample0001id" column="ibizsample0001id" /><!--主键字段映射-->
<result property="ibizsample0002id" column="ibizsample0002id" />
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="sample0002Sample00011N" javaType="cn.ibizlab.core.sample.domain.IBIZSample0002" column="ibizsample0002id" select="cn.ibizlab.core.sample.mapper.IBIZSample0002Mapper.selectById" fetchType="lazy"></association>
</resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_IBIZSAMPLE0001_IBIZSAMPLE0002_IBIZSAMPLE0002ID] -->
<select id="selectByIbizsample0002id" resultMap="IBIZSample0001ResultMap">
select t1.* from (
<include refid="Default" />
) t1
where ibizsample0002id=#{ibizsample0002id}
</select>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.core.sample.filter.IBIZSample0001SearchContext" resultMap="IBIZSample0001ResultMap">
......@@ -49,7 +59,7 @@
</sql>
<!--数据查询[Default]-->
<sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`FIELD`, t1.`FIELD01`, t1.`FIELD02`, t1.`FIELD05`, t1.`FIELD06`, t1.`FIELD07`, t1.`FIELD08`, t1.`FIELD09`, t1.`FIELD10`, t1.`FIELD11`, t1.`FIELD12`, t1.`FIELD13`, t1.`FIELD14`, t1.`FIELD15`, t1.`FIELD16`, t1.`FIELD17`, t1.`FIELD18`, t1.`FIELD19`, t1.`FIELD2`, t1.`FIELD20`, t1.`FIELD21`, t1.`FIELD22`, t1.`FIELD24`, t1.`FIELD27`, t1.`IBIZSAMPLE0001ID`, t1.`IBIZSAMPLE0001NAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_IBIZSAMPLE0001` t1
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`FIELD`, t1.`FIELD01`, t1.`FIELD02`, t1.`FIELD05`, t1.`FIELD06`, t1.`FIELD07`, t1.`FIELD08`, t1.`FIELD09`, t1.`FIELD10`, t1.`FIELD11`, t1.`FIELD12`, t1.`FIELD13`, t1.`FIELD14`, t1.`FIELD15`, t1.`FIELD16`, t1.`FIELD17`, t1.`FIELD18`, t1.`FIELD19`, t1.`FIELD2`, t1.`FIELD20`, t1.`FIELD21`, t1.`FIELD22`, t1.`FIELD24`, t1.`FIELD27`, t1.`IBIZSAMPLE0001ID`, t1.`IBIZSAMPLE0001NAME`, t1.`IBIZSAMPLE0002ID`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_IBIZSAMPLE0001` t1
]]>
</sql>
<!--数据查询[Default]-->
......
......@@ -2801,11 +2801,35 @@
"key_field":0,
"show_order":1000,
"major_field":0
},
{
"fieldname":"IBIZSAMPLE0002ID" ,
"codename":"IBIZSample0002Id",
"field_logic_name":"首页图表数据源标识",
"entity_name":"IBIZSample0001",
"ref_de":"IBIZSAMPLE0002",
"ref_field_name":"IBIZSAMPLE0002ID",
"relation_name":"DER1N_IBIZSAMPLE0001_IBIZSAMPLE0002_IBIZSAMPLE0002ID",
"relation_codename":"SAMPLE0002_SAMPLE0001_1_N",
"field_type":"PICKUP",
"nullable":1,
"physical_field":1,
"data_type":"VARCHAR",
"data_length":100,
"key_field":0,
"show_order":1000,
"major_field":0
}
],
"subEntitys":[
],
"parentEntitys":[
{"name":"DER1N_IBIZSAMPLE0001_IBIZSAMPLE0002_IBIZSAMPLE0002ID",
"relation_type":"DER1N",
"code_name":"SAMPLE0002_SAMPLE0001_1_N",
"entity_name":"IBIZSAMPLE0001",
"ref_entity_name":"IBIZSAMPLE0002"
}
]
}
,
......@@ -2936,6 +2960,12 @@
}
],
"subEntitys":[
{"name":"DER1N_IBIZSAMPLE0001_IBIZSAMPLE0002_IBIZSAMPLE0002ID",
"relation_type":"DER1N",
"code_name":"SAMPLE0002_SAMPLE0001_1_N",
"entity_name":"IBIZSAMPLE0001",
"ref_entity_name":"IBIZSAMPLE0002"
}
],
"parentEntitys":[
]
......
......@@ -306,6 +306,15 @@ public class IBIZSample0001DTO extends DTOBase implements Serializable {
@JsonProperty("field2")
private BigDecimal field2;
/**
* 属性 [IBIZSAMPLE0002ID]
*
*/
@JSONField(name = "ibizsample0002id")
@JsonProperty("ibizsample0002id")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String ibizsample0002id;
/**
* 设置 [FIELD01]
......@@ -523,6 +532,14 @@ public class IBIZSample0001DTO extends DTOBase implements Serializable {
this.modify("field2",field2);
}
/**
* 设置 [IBIZSAMPLE0002ID]
*/
public void setIbizsample0002id(String ibizsample0002id){
this.ibizsample0002id = ibizsample0002id ;
this.modify("ibizsample0002id",ibizsample0002id);
}
}
......
......@@ -159,5 +159,135 @@ public class IBIZSample0001Resource {
}
@PreAuthorize("hasPermission(this.ibizsample0001Mapping.toDomain(#ibizsample0001dto),'DemoSys-IBIZSample0001-Create')")
@ApiOperation(value = "根据示例实体02建立示例实体01", tags = {"示例实体01" }, notes = "根据示例实体02建立示例实体01")
@RequestMapping(method = RequestMethod.POST, value = "/ibizsample0002s/{ibizsample0002_id}/ibizsample0001s")
public ResponseEntity<IBIZSample0001DTO> createByIBIZSample0002(@PathVariable("ibizsample0002_id") String ibizsample0002_id, @RequestBody IBIZSample0001DTO ibizsample0001dto) {
IBIZSample0001 domain = ibizsample0001Mapping.toDomain(ibizsample0001dto);
domain.setIbizsample0002id(ibizsample0002_id);
ibizsample0001Service.create(domain);
IBIZSample0001DTO dto = ibizsample0001Mapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.ibizsample0001Mapping.toDomain(#ibizsample0001dtos),'DemoSys-IBIZSample0001-Create')")
@ApiOperation(value = "根据示例实体02批量建立示例实体01", tags = {"示例实体01" }, notes = "根据示例实体02批量建立示例实体01")
@RequestMapping(method = RequestMethod.POST, value = "/ibizsample0002s/{ibizsample0002_id}/ibizsample0001s/batch")
public ResponseEntity<Boolean> createBatchByIBIZSample0002(@PathVariable("ibizsample0002_id") String ibizsample0002_id, @RequestBody List<IBIZSample0001DTO> ibizsample0001dtos) {
List<IBIZSample0001> domainlist=ibizsample0001Mapping.toDomain(ibizsample0001dtos);
for(IBIZSample0001 domain:domainlist){
domain.setIbizsample0002id(ibizsample0002_id);
}
ibizsample0001Service.createBatch(domainlist);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@VersionCheck(entity = "ibizsample0001" , versionfield = "updatedate")
@PreAuthorize("hasPermission(this.ibizsample0001Service.get(#ibizsample0001_id),'DemoSys-IBIZSample0001-Update')")
@ApiOperation(value = "根据示例实体02更新示例实体01", tags = {"示例实体01" }, notes = "根据示例实体02更新示例实体01")
@RequestMapping(method = RequestMethod.PUT, value = "/ibizsample0002s/{ibizsample0002_id}/ibizsample0001s/{ibizsample0001_id}")
public ResponseEntity<IBIZSample0001DTO> updateByIBIZSample0002(@PathVariable("ibizsample0002_id") String ibizsample0002_id, @PathVariable("ibizsample0001_id") String ibizsample0001_id, @RequestBody IBIZSample0001DTO ibizsample0001dto) {
IBIZSample0001 domain = ibizsample0001Mapping.toDomain(ibizsample0001dto);
domain.setIbizsample0002id(ibizsample0002_id);
domain.setIbizsample0001id(ibizsample0001_id);
ibizsample0001Service.update(domain);
IBIZSample0001DTO dto = ibizsample0001Mapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.ibizsample0001Service.getIbizsample0001ByEntities(this.ibizsample0001Mapping.toDomain(#ibizsample0001dtos)),'DemoSys-IBIZSample0001-Update')")
@ApiOperation(value = "根据示例实体02批量更新示例实体01", tags = {"示例实体01" }, notes = "根据示例实体02批量更新示例实体01")
@RequestMapping(method = RequestMethod.PUT, value = "/ibizsample0002s/{ibizsample0002_id}/ibizsample0001s/batch")
public ResponseEntity<Boolean> updateBatchByIBIZSample0002(@PathVariable("ibizsample0002_id") String ibizsample0002_id, @RequestBody List<IBIZSample0001DTO> ibizsample0001dtos) {
List<IBIZSample0001> domainlist=ibizsample0001Mapping.toDomain(ibizsample0001dtos);
for(IBIZSample0001 domain:domainlist){
domain.setIbizsample0002id(ibizsample0002_id);
}
ibizsample0001Service.updateBatch(domainlist);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasPermission(this.ibizsample0001Service.get(#ibizsample0001_id),'DemoSys-IBIZSample0001-Remove')")
@ApiOperation(value = "根据示例实体02删除示例实体01", tags = {"示例实体01" }, notes = "根据示例实体02删除示例实体01")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibizsample0002s/{ibizsample0002_id}/ibizsample0001s/{ibizsample0001_id}")
public ResponseEntity<Boolean> removeByIBIZSample0002(@PathVariable("ibizsample0002_id") String ibizsample0002_id, @PathVariable("ibizsample0001_id") String ibizsample0001_id) {
return ResponseEntity.status(HttpStatus.OK).body(ibizsample0001Service.remove(ibizsample0001_id));
}
@PreAuthorize("hasPermission(this.ibizsample0001Service.getIbizsample0001ByIds(#ids),'DemoSys-IBIZSample0001-Remove')")
@ApiOperation(value = "根据示例实体02批量删除示例实体01", tags = {"示例实体01" }, notes = "根据示例实体02批量删除示例实体01")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibizsample0002s/{ibizsample0002_id}/ibizsample0001s/batch")
public ResponseEntity<Boolean> removeBatchByIBIZSample0002(@RequestBody List<String> ids) {
ibizsample0001Service.removeBatch(ids);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PostAuthorize("hasPermission(this.ibizsample0001Mapping.toDomain(returnObject.body),'DemoSys-IBIZSample0001-Get')")
@ApiOperation(value = "根据示例实体02获取示例实体01", tags = {"示例实体01" }, notes = "根据示例实体02获取示例实体01")
@RequestMapping(method = RequestMethod.GET, value = "/ibizsample0002s/{ibizsample0002_id}/ibizsample0001s/{ibizsample0001_id}")
public ResponseEntity<IBIZSample0001DTO> getByIBIZSample0002(@PathVariable("ibizsample0002_id") String ibizsample0002_id, @PathVariable("ibizsample0001_id") String ibizsample0001_id) {
IBIZSample0001 domain = ibizsample0001Service.get(ibizsample0001_id);
IBIZSample0001DTO dto = ibizsample0001Mapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "根据示例实体02获取示例实体01草稿", tags = {"示例实体01" }, notes = "根据示例实体02获取示例实体01草稿")
@RequestMapping(method = RequestMethod.GET, value = "/ibizsample0002s/{ibizsample0002_id}/ibizsample0001s/getdraft")
public ResponseEntity<IBIZSample0001DTO> getDraftByIBIZSample0002(@PathVariable("ibizsample0002_id") String ibizsample0002_id) {
IBIZSample0001 domain = new IBIZSample0001();
domain.setIbizsample0002id(ibizsample0002_id);
return ResponseEntity.status(HttpStatus.OK).body(ibizsample0001Mapping.toDto(ibizsample0001Service.getDraft(domain)));
}
@ApiOperation(value = "根据示例实体02检查示例实体01", tags = {"示例实体01" }, notes = "根据示例实体02检查示例实体01")
@RequestMapping(method = RequestMethod.POST, value = "/ibizsample0002s/{ibizsample0002_id}/ibizsample0001s/checkkey")
public ResponseEntity<Boolean> checkKeyByIBIZSample0002(@PathVariable("ibizsample0002_id") String ibizsample0002_id, @RequestBody IBIZSample0001DTO ibizsample0001dto) {
return ResponseEntity.status(HttpStatus.OK).body(ibizsample0001Service.checkKey(ibizsample0001Mapping.toDomain(ibizsample0001dto)));
}
@PreAuthorize("hasPermission(this.ibizsample0001Mapping.toDomain(#ibizsample0001dto),'DemoSys-IBIZSample0001-Save')")
@ApiOperation(value = "根据示例实体02保存示例实体01", tags = {"示例实体01" }, notes = "根据示例实体02保存示例实体01")
@RequestMapping(method = RequestMethod.POST, value = "/ibizsample0002s/{ibizsample0002_id}/ibizsample0001s/save")
public ResponseEntity<Boolean> saveByIBIZSample0002(@PathVariable("ibizsample0002_id") String ibizsample0002_id, @RequestBody IBIZSample0001DTO ibizsample0001dto) {
IBIZSample0001 domain = ibizsample0001Mapping.toDomain(ibizsample0001dto);
domain.setIbizsample0002id(ibizsample0002_id);
return ResponseEntity.status(HttpStatus.OK).body(ibizsample0001Service.save(domain));
}
@PreAuthorize("hasPermission(this.ibizsample0001Mapping.toDomain(#ibizsample0001dtos),'DemoSys-IBIZSample0001-Save')")
@ApiOperation(value = "根据示例实体02批量保存示例实体01", tags = {"示例实体01" }, notes = "根据示例实体02批量保存示例实体01")
@RequestMapping(method = RequestMethod.POST, value = "/ibizsample0002s/{ibizsample0002_id}/ibizsample0001s/savebatch")
public ResponseEntity<Boolean> saveBatchByIBIZSample0002(@PathVariable("ibizsample0002_id") String ibizsample0002_id, @RequestBody List<IBIZSample0001DTO> ibizsample0001dtos) {
List<IBIZSample0001> domainlist=ibizsample0001Mapping.toDomain(ibizsample0001dtos);
for(IBIZSample0001 domain:domainlist){
domain.setIbizsample0002id(ibizsample0002_id);
}
ibizsample0001Service.saveBatch(domainlist);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZSample0001-searchDefault-all') and hasPermission(#context,'DemoSys-IBIZSample0001-Get')")
@ApiOperation(value = "根据示例实体02获取DEFAULT", tags = {"示例实体01" } ,notes = "根据示例实体02获取DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/ibizsample0002s/{ibizsample0002_id}/ibizsample0001s/fetchdefault")
public ResponseEntity<List<IBIZSample0001DTO>> fetchIBIZSample0001DefaultByIBIZSample0002(@PathVariable("ibizsample0002_id") String ibizsample0002_id,IBIZSample0001SearchContext context) {
context.setN_ibizsample0002id_eq(ibizsample0002_id);
Page<IBIZSample0001> domains = ibizsample0001Service.searchDefault(context) ;
List<IBIZSample0001DTO> list = ibizsample0001Mapping.toDto(domains.getContent());
return ResponseEntity.status(HttpStatus.CREATED)
.header("x-page", String.valueOf(context.getPageable().getPageNumber()))
.header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
.header("x-total", String.valueOf(domains.getTotalElements()))
.body(list);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZSample0001-searchDefault-all') and hasPermission(#context,'DemoSys-IBIZSample0001-Get')")
@ApiOperation(value = "根据示例实体02查询DEFAULT", tags = {"示例实体01" } ,notes = "根据示例实体02查询DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/ibizsample0002s/{ibizsample0002_id}/ibizsample0001s/searchdefault")
public ResponseEntity<Page<IBIZSample0001DTO>> searchIBIZSample0001DefaultByIBIZSample0002(@PathVariable("ibizsample0002_id") String ibizsample0002_id, @RequestBody IBIZSample0001SearchContext context) {
context.setN_ibizsample0002id_eq(ibizsample0002_id);
Page<IBIZSample0001> domains = ibizsample0001Service.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.CREATED)
.body(new PageImpl(ibizsample0001Mapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册