区块链调试

This commit is contained in:
zhangqinbin
2021-09-06 14:57:07 +08:00
parent b5b7c44c0e
commit 21568b7a4e
2 changed files with 7 additions and 3 deletions

View File

@ -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) {

View File

@ -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,7 +80,7 @@ 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){
@ -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");