9 changed files with 164 additions and 41 deletions
-
24modules/cqc-service/src/main/java/com/thing/cqc/cqcCarbonReport/controller/CqcCarbonReportController.java
-
22modules/cqc-service/src/main/java/com/thing/cqc/cqcCarbonReport/dto/CqcCarbonReportDTO.java
-
12modules/cqc-service/src/main/java/com/thing/cqc/cqcCarbonReport/entity/CqcCarbonReportEntity.java
-
2modules/cqc-service/src/main/java/com/thing/cqc/cqcCarbonReport/service/CqcCarbonReportService.java
-
76modules/cqc-service/src/main/java/com/thing/cqc/cqcCarbonReport/service/impl/CqcCarbonReportServiceImpl.java
-
6modules/cqc-service/src/main/java/com/thing/cqc/rpcService/JsonCryptoUtils.java
-
7modules/cqc-service/src/main/java/com/thing/cqc/rpcService/service/CqcRpcService.java
-
23modules/cqc-service/src/main/java/com/thing/cqc/rpcService/service/impl/CqcRpcServiceImpl.java
-
33modules/thing/src/main/java/com/thing/sys/biz/utils/HttpClientUtil.java
@ -1,19 +1,32 @@ |
|||||
package com.thing.cqc.rpcService.service.impl; |
package com.thing.cqc.rpcService.service.impl; |
||||
|
|
||||
|
import com.thing.cqc.rpcService.JsonCryptoUtils; |
||||
import com.thing.cqc.rpcService.service.CqcRpcService; |
import com.thing.cqc.rpcService.service.CqcRpcService; |
||||
import com.thing.sys.biz.utils.HttpClientUtil; |
import com.thing.sys.biz.utils.HttpClientUtil; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
public class CqcRpcServiceImpl implements CqcRpcService { |
|
||||
|
|
||||
|
import java.util.HashMap; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
@Service |
||||
|
public class CqcRpcServiceImpl implements CqcRpcService { |
||||
|
|
||||
|
private static final String url = "http://114.249.188.139:8099/"; |
||||
|
|
||||
|
private static final String uploadDataFix = "api/uploadData"; |
||||
|
|
||||
|
private static final String token = "6276a411ba4fec238500f8123f89192"; |
||||
|
|
||||
@Override |
@Override |
||||
public String doUploadData() { |
|
||||
|
public String doUploadData(String param) throws Exception { |
||||
//数据加密 |
//数据加密 |
||||
|
|
||||
return null; |
|
||||
|
String encryptParam = JsonCryptoUtils.encryptJson(param,JsonCryptoUtils.SECRETKEY); |
||||
|
Map<String,String> paramMap = new HashMap<>(); |
||||
|
paramMap.put("token",token); |
||||
|
paramMap.put("content",encryptParam); |
||||
|
String postUrl = url+uploadDataFix; |
||||
|
String httpResultStr = HttpClientUtil.post(postUrl,paramMap); |
||||
|
//返回结果解析 |
||||
|
return httpResultStr; |
||||
} |
} |
||||
} |
} |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue