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

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

上级 e817b39f
......@@ -316,7 +316,7 @@ mock.onGet(new RegExp(/^\/ibizuniproducts\/fetchdefault(\?[\w-./?%&=,]*)*$/)).re
});
// FetchIndexDER
mock.onGet(new RegExp(/^\/ibizuniproducts\/fetchindexder$/)).reply((config: any) => {
mock.onGet(new RegExp(/^\/ibizuniproducts\/fetchdefault$/)).reply((config: any) => {
console.groupCollapsed("实体:ibizuniproduct 方法: FetchIndexDER");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
......@@ -331,7 +331,7 @@ mock.onGet(new RegExp(/^\/ibizuniproducts\/fetchindexder$/)).reply((config: any)
});
// FetchIndexDER
mock.onGet(new RegExp(/^\/ibizuniproducts\/fetchindexder(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
mock.onGet(new RegExp(/^\/ibizuniproducts\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:ibizuniproduct 方法: FetchIndexDER");
console.table({url:config.url, method: config.method, data:config.data});
if(config.url.includes('page')){
......
......@@ -209,9 +209,16 @@ export default class IBIZUNIProductServiceBase extends EntityService {
* @memberof IBIZUNIProductServiceBase
*/
public async FetchIndexDER(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/ibizuniproducts/fetchindexder`,tempData,isloading);
return res;
let codelistModel:any = {tag:'UNIPRODUCTTYPE',codelistType:'STATIC'};
let res:any = await this.getCodeList(codelistModel.tag,codelistModel.codelistType,context,data);
if(res && res.length > 0){
res.forEach((ele:any) => {
// 仿真返回数据集
ele.ibizuniproductid = ele.value;
ele.ibizuniproductname = ele.text
});
}
return {status:200,data:res};
}
/**
......
......@@ -158,28 +158,6 @@ public class IBIZUNIProductResource {
.body(new PageImpl(ibizuniproductMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZUNIProduct-searchIndexDER-all') and hasPermission(#context,'DemoSys-IBIZUNIProduct-Get')")
@ApiOperation(value = "获取IndexDER", tags = {"统一产品(索引主实体)" } ,notes = "获取IndexDER")
@RequestMapping(method= RequestMethod.GET , value="/ibizuniproducts/fetchindexder")
public ResponseEntity<List<IBIZUNIProductDTO>> fetchIndexDER(IBIZUNIProductSearchContext context) {
Page<IBIZUNIProduct> domains = ibizuniproductService.searchIndexDER(context) ;
List<IBIZUNIProductDTO> list = ibizuniproductMapping.toDto(domains.getContent());
return ResponseEntity.status(HttpStatus.OK)
.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-IBIZUNIProduct-searchIndexDER-all') and hasPermission(#context,'DemoSys-IBIZUNIProduct-Get')")
@ApiOperation(value = "查询IndexDER", tags = {"统一产品(索引主实体)" } ,notes = "查询IndexDER")
@RequestMapping(method= RequestMethod.POST , value="/ibizuniproducts/searchindexder")
public ResponseEntity<Page<IBIZUNIProductDTO>> searchIndexDER(@RequestBody IBIZUNIProductSearchContext context) {
Page<IBIZUNIProduct> domains = ibizuniproductService.searchIndexDER(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(ibizuniproductMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册