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

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

上级 68f50012
...@@ -87,44 +87,6 @@ mock.onDelete(new RegExp(/^\/bladevisuals\/batch$/)).reply((config: any) => { ...@@ -87,44 +87,6 @@ mock.onDelete(new RegExp(/^\/bladevisuals\/batch$/)).reply((config: any) => {
}); });
// Save2
mock.onPost(new RegExp(/^\/bladevisuals\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:bladevisual 方法: Save2");
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(/^\/bladevisuals\/([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];
});
// Select // Select
mock.onGet(new RegExp(/^\/bladevisuals\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => { mock.onGet(new RegExp(/^\/bladevisuals\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:bladevisual 方法: Select"); console.groupCollapsed("实体:bladevisual 方法: Select");
......
...@@ -38,20 +38,6 @@ export default class BladeVisualServiceBase extends EntityService { ...@@ -38,20 +38,6 @@ export default class BladeVisualServiceBase extends EntityService {
// 实体接口 // 实体接口
/**
* Save2接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof BladeVisualServiceBase
*/
public async Save2(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/bladevisuals/${context.bladevisual}`,data,isloading);
return res;
}
/** /**
* Select接口方法 * Select接口方法
* *
......
...@@ -36,7 +36,6 @@ public interface IBladeVisualService extends IService<BladeVisual> { ...@@ -36,7 +36,6 @@ public interface IBladeVisualService extends IService<BladeVisual> {
boolean checkKey(BladeVisual et); boolean checkKey(BladeVisual et);
boolean save(BladeVisual et); boolean save(BladeVisual et);
void saveBatch(List<BladeVisual> list); void saveBatch(List<BladeVisual> list);
BladeVisual save2(BladeVisual et);
Page<BladeVisual> searchDefault(BladeVisualSearchContext context); Page<BladeVisual> searchDefault(BladeVisualSearchContext context);
/** /**
*自定义查询SQL *自定义查询SQL
......
...@@ -150,13 +150,6 @@ public class BladeVisualServiceImpl extends ServiceImpl<BladeVisualMapper, Blade ...@@ -150,13 +150,6 @@ public class BladeVisualServiceImpl extends ServiceImpl<BladeVisualMapper, Blade
saveOrUpdateBatch(list,batchSize); saveOrUpdateBatch(list,batchSize);
} }
@Override
@Transactional
public BladeVisual save2(BladeVisual et) {
//自定义代码
return et;
}
/** /**
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<!--输出实体[BLADE_VISUAL]数据结构 --> <!--输出实体[BLADE_VISUAL]数据结构 -->
<changeSet author="root" id="tab-blade_visual-54-1"> <changeSet author="root" id="tab-blade_visual-55-1">
<createTable tableName="blade_visual"> <createTable tableName="blade_visual">
<column name="ID" remarks="" type="BIGINT"> <column name="ID" remarks="" type="BIGINT">
<constraints primaryKey="true" primaryKeyName="PK_BLADE_VISUAL_ID"/> <constraints primaryKey="true" primaryKeyName="PK_BLADE_VISUAL_ID"/>
......
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
"delogicname":"可视化表", "delogicname":"可视化表",
"sysmoudle":{"id":"AVUEDATA","name":"大屏展示"}, "sysmoudle":{"id":"AVUEDATA","name":"大屏展示"},
"dedataset":[{"id":"Default" , "name":"数据集"}], "dedataset":[{"id":"Default" , "name":"数据集"}],
"deaction":[{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"Save2" , "name":"Save2" , "type":"USERCUSTOM" }], "deaction":[{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}] "datascope":[{"id":"all","name":"全部数据"}]
} }
, { , {
......
...@@ -47,17 +47,6 @@ public class BladeVisualResource { ...@@ -47,17 +47,6 @@ public class BladeVisualResource {
@Lazy @Lazy
public BladeVisualMapping bladevisualMapping; public BladeVisualMapping bladevisualMapping;
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-BladeVisual-Save2-all')")
@ApiOperation(value = "Save2", tags = {"可视化表" }, notes = "Save2")
@RequestMapping(method = RequestMethod.POST, value = "/bladevisuals/{bladevisual_id}/save2")
public ResponseEntity<BladeVisualDTO> save2(@PathVariable("bladevisual_id") Long bladevisual_id, @RequestBody BladeVisualDTO bladevisualdto) {
BladeVisual domain = bladevisualMapping.toDomain(bladevisualdto);
domain.setId(bladevisual_id);
domain = bladevisualService.save2(domain);
bladevisualdto = bladevisualMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(bladevisualdto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-BladeVisual-Create-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-BladeVisual-Create-all')")
@ApiOperation(value = "新建可视化表", tags = {"可视化表" }, notes = "新建可视化表") @ApiOperation(value = "新建可视化表", tags = {"可视化表" }, notes = "新建可视化表")
@RequestMapping(method = RequestMethod.POST, value = "/bladevisuals") @RequestMapping(method = RequestMethod.POST, value = "/bladevisuals")
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册