From 3721eea476d9dad0a5838b3aa89a30a8b4640f7d Mon Sep 17 00:00:00 2001
From: xusd <hugeinfo123>
Date: Mon, 14 Oct 2024 17:40:33 +0800
Subject: [PATCH] 网格登录对接
---
dyh-service/dyh-sys/src/main/java/cn/huge/module/grid/service/GridCompanyService.java | 20 +++++++++++++-------
1 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/dyh-service/dyh-sys/src/main/java/cn/huge/module/grid/service/GridCompanyService.java b/dyh-service/dyh-sys/src/main/java/cn/huge/module/grid/service/GridCompanyService.java
index 9a6a478..0588ac2 100644
--- a/dyh-service/dyh-sys/src/main/java/cn/huge/module/grid/service/GridCompanyService.java
+++ b/dyh-service/dyh-sys/src/main/java/cn/huge/module/grid/service/GridCompanyService.java
@@ -4,6 +4,7 @@
import cn.huge.base.common.utils.AesUtils;
import cn.huge.base.common.utils.HttpClientUtils;
import cn.huge.base.common.utils.ObjectUtils;
+import cn.huge.base.common.utils.SpringContextUtil;
import cn.huge.module.grid.domain.dto.GridCompanyDTO;
import cn.huge.module.grid.domain.vo.*;
import com.alibaba.fastjson.JSON;
@@ -55,7 +56,7 @@
List<GridCompanyDTO.UnitDTO> records = data.getRecords();
for(GridCompanyDTO.UnitDTO item :records){
item.setLegalRepresent(AesUtils.decrypt(item.getLegalRepresent(),"eb4KhdJRyDwS4ndTBc2NTDNaSEP6KbwQ"));
-
+ item.setLegalPersonTelephone(AesUtils.decrypt(item.getLegalPersonTelephone(),"eb4KhdJRyDwS4ndTBc2NTDNaSEP6KbwQ"));
}
return R.ok(data);
} else {
@@ -75,12 +76,17 @@
public Page pageQuery(GridCompanyVo gridCompanyVo) throws Exception {
Sort sort = Sort.by(Sort.Direction.DESC, "create_time");
PageRequest pageRequest = PageRequest.of(gridCompanyVo.getPage()-1, gridCompanyVo.getPageSize(), sort);
-// R<GridCompanyDTO> companyList = getCompanyList(gridCompanyVo);
- String url = "http://183.2.142.21:9007/api/thrid/grid/company/get-company-list";
- Map<String, String> headers = new HashMap<>();
- headers.put("Content-Type", "application/json");
- String s = HttpClientUtils.httpPostRaw(url, JSON.toJSONString(gridCompanyVo), headers, "utf-8");
- R companyList = JSON.parseObject(s, R.class);
+ R<GridCompanyDTO> companyList = null;
+ // 开发环境
+ if (SpringContextUtil.checkDev()) {
+ String url = "http://183.2.142.46:9007/api/thrid/grid/company/get-company-list";
+ Map<String, String> headers = new HashMap<>();
+ headers.put("Content-Type", "application/json");
+ String s = HttpClientUtils.httpPostRaw(url, JSON.toJSONString(gridCompanyVo), headers, "utf-8");
+ companyList = JSON.parseObject(s, R.class);
+ }else {
+ companyList = getCompanyList(gridCompanyVo);
+ }
if(companyList.getCode() != 0){
throw new Exception(companyList.getMsg());
}
--
Gitblit v1.8.0