区块链调试
This commit is contained in:
@ -16,6 +16,7 @@ import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
|
||||
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class, DruidDataSourceAutoConfigure.class})
|
||||
@EnableFeignClients
|
||||
@ -23,6 +24,7 @@ import org.springframework.context.annotation.ComponentScan;
|
||||
@MapperScan({"com.chinaunicom.mall.ebtp.extend.**.dao"})
|
||||
@ComponentScan("com.chinaunicom.mall.ebtp.*")
|
||||
@EnableApolloConfig
|
||||
@EnableAsync
|
||||
public class BizServiceEbtpExtendApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
@ -28,6 +28,7 @@ import org.apache.commons.io.IOUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.InputStream;
|
||||
@ -70,6 +71,7 @@ public class CrypConfigureServiceImpl extends BaseServiceImpl<CrypConfigureMappe
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@Async
|
||||
public Boolean callUniInterface(CrypBean bean){
|
||||
log.info("区块链------callUniInterface:---入参-----"+JSON.toJSONString(bean));
|
||||
BlockChainLog blockChainLog = new BlockChainLog();
|
||||
@ -78,13 +80,13 @@ public class CrypConfigureServiceImpl extends BaseServiceImpl<CrypConfigureMappe
|
||||
blockChainLog.setInterfaceUrl(bean.getUrl());
|
||||
|
||||
try {
|
||||
LinkedHashMap<String, Object> map = JSONArray.parseObject(JSONArray.toJSONString(bean.getObject(),SerializerFeature.WriteMapNullValue), LinkedHashMap.class);
|
||||
Map<String, Object> map = JSONArray.parseObject(JSONArray.toJSONString(bean.getObject(),SerializerFeature.WriteMapNullValue), Map.class);
|
||||
Object signObject = new Object();
|
||||
|
||||
if(map.get("BODY_LIST")!=null){
|
||||
signObject = map.get("BODY_LIST");
|
||||
}else{
|
||||
signObject =map;
|
||||
signObject = map;
|
||||
}
|
||||
//传入数据解密
|
||||
String sign = getSignValue(signObject);
|
||||
@ -169,7 +171,7 @@ public class CrypConfigureServiceImpl extends BaseServiceImpl<CrypConfigureMappe
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
private String getUniBss(String reqName, LinkedHashMap<String,Object> map){
|
||||
private String getUniBss(String reqName, Map<String,Object> map){
|
||||
//获取token
|
||||
Date date = new Date();
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss SSS");
|
||||
|
Reference in New Issue
Block a user