| | |
| | | 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; |
| | |
| | | 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 { |
| | |
| | | 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()); |
| | | } |