Commit d4a4d9d3 authored by liuChang's avatar liuChang

区域企业

parent dc83791b
...@@ -25,16 +25,12 @@ public class RegionalEnterprisesController { ...@@ -25,16 +25,12 @@ public class RegionalEnterprisesController {
@Autowired @Autowired
private RegionalEnterprisesService regionalEnterprisesService; private RegionalEnterprisesService regionalEnterprisesService;
@PostMapping("regional/page") @PostMapping("/regional/page")
public AjaxResult page(@RequestBody JSONObject object) throws Exception{ public AjaxResult page(@RequestBody JSONObject object) throws Exception{
ComposeQueryDto compose = JSONObject.parseObject(object.toJSONString(), ComposeQueryDto.class); ComposeQueryDto compose = JSONObject.parseObject(object.toJSONString(), ComposeQueryDto.class);
compose.getPage().setPage(compose.getPageNum());
compose.getPage().setLimit(compose.getPageSize());
compose.getPage().setField(compose.getField());
compose.getPage().setOrder(compose.getOrder());
if (PageQueryLimit.pageLimit(compose.getPage())){ if (PageQueryLimit.pageLimit(compose.getPage())){
return AjaxResult.error("翻页已达到上限"); return AjaxResult.error("翻页已达到上限");
} }
return regionalEnterprisesService.enterprisePage(compose); return regionalEnterprisesService.enterprisePage(object);
} }
} }
package com.dsk.jsk.service.service; package com.dsk.jsk.service.service;
import com.alibaba.fastjson2.JSONObject;
import com.dsk.common.core.domain.AjaxResult; import com.dsk.common.core.domain.AjaxResult;
import com.dsk.jsk.domain.bo.ComposeQueryDto;
/** /**
* @ClassName EconomicService * @ClassName EconomicService
...@@ -19,5 +19,5 @@ public interface RegionalEnterprisesService { ...@@ -19,5 +19,5 @@ public interface RegionalEnterprisesService {
*@Author: Dgm *@Author: Dgm
*@date: 2023/5/18 10:25 *@date: 2023/5/18 10:25
*/ */
AjaxResult enterprisePage(ComposeQueryDto compose) throws Exception; AjaxResult enterprisePage(JSONObject object) throws Exception;
} }
...@@ -2,6 +2,7 @@ package com.dsk.jsk.service.service.impl; ...@@ -2,6 +2,7 @@ package com.dsk.jsk.service.service.impl;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson2.JSONObject;
import com.dsk.acc.openapi.client.util.CommonUtils; import com.dsk.acc.openapi.client.util.CommonUtils;
import com.dsk.common.core.domain.AjaxResult; import com.dsk.common.core.domain.AjaxResult;
import com.dsk.common.utils.DskOpenApiUtil; import com.dsk.common.utils.DskOpenApiUtil;
...@@ -29,8 +30,8 @@ public class RegionalEnterprisesServiceImpl implements RegionalEnterprisesServic ...@@ -29,8 +30,8 @@ public class RegionalEnterprisesServiceImpl implements RegionalEnterprisesServic
private DskOpenApiUtil dskOpenApiUtil; private DskOpenApiUtil dskOpenApiUtil;
@Override @Override
public AjaxResult enterprisePage(ComposeQueryDto pageDto) { public AjaxResult enterprisePage(JSONObject object) {
Map<String, Object> map = dskOpenApiUtil.requestBody("/nationzj/enterprice/page",BeanUtil.beanToMap(pageDto, false, false)); Map<String, Object> map = dskOpenApiUtil.requestBody("/nationzj/enterprice/page",BeanUtil.beanToMap(object, false, false));
Integer code = MapUtils.getInteger(map, "code", 300); Integer code = MapUtils.getInteger(map, "code", 300);
if (code.equals(HttpStatus.OK.value())) { if (code.equals(HttpStatus.OK.value())) {
Map data = MapUtils.getMap(map, "data", null); Map data = MapUtils.getMap(map, "data", null);
......
...@@ -162,7 +162,7 @@ public class BusinessOpportunityRadarService { ...@@ -162,7 +162,7 @@ public class BusinessOpportunityRadarService {
} }
public AjaxResult bxproPage(JSONObject object) { public AjaxResult bxproPage(JSONObject object) {
Map<String, Object> map = dskOpenApiUtil.requestBody("/nationzj/subscription/bxproPage", object); Map<String, Object> map = dskOpenApiUtil.requestBody("/nationzj/subscription/yqBxproPage", object);
return BeanUtil.toBean(map, AjaxResult.class); return BeanUtil.toBean(map, AjaxResult.class);
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment