Merge branch 'master_区块链天擎修复' into uat_code
This commit is contained in:
@ -0,0 +1,28 @@
|
|||||||
|
package com.chinaunicom.mall.ebtp.extend.crypconfigure.entity;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
|
import com.chinaunicom.mall.ebtp.common.uniBss.entity.UniBss;
|
||||||
|
import com.chinaunicom.mall.ebtp.common.uniBss.entity.UniBssAttached;
|
||||||
|
import com.chinaunicom.mall.ebtp.common.uniBss.entity.UniBssBody;
|
||||||
|
import com.chinaunicom.mall.ebtp.common.uniBss.entity.UniBssHead;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实体类 CrypConfigure-区块链参数配置表
|
||||||
|
*
|
||||||
|
* @author yss
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class CrypUniBss {
|
||||||
|
@JSONField(name = "UNI_BSS_ATTACHED")
|
||||||
|
private UniBssAttached uniBssAttached;
|
||||||
|
@JSONField(name = "UNI_BSS_BODY")
|
||||||
|
private Map<String, Object> uniBssBodyMap;
|
||||||
|
@JSONField(name = "UNI_BSS_HEAD")
|
||||||
|
private UniBssHead uniBssHead;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -28,6 +28,7 @@ import com.chinaunicom.mall.ebtp.extend.crypconfigure.dao.CrypConfigureMapper;
|
|||||||
import com.chinaunicom.mall.ebtp.extend.crypconfigure.entity.CiticUniBss;
|
import com.chinaunicom.mall.ebtp.extend.crypconfigure.entity.CiticUniBss;
|
||||||
import com.chinaunicom.mall.ebtp.extend.crypconfigure.entity.CrypBean;
|
import com.chinaunicom.mall.ebtp.extend.crypconfigure.entity.CrypBean;
|
||||||
import com.chinaunicom.mall.ebtp.extend.crypconfigure.entity.CrypConfigure;
|
import com.chinaunicom.mall.ebtp.extend.crypconfigure.entity.CrypConfigure;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.crypconfigure.entity.CrypUniBss;
|
||||||
import com.chinaunicom.mall.ebtp.extend.crypconfigure.service.ICrypConfigureService;
|
import com.chinaunicom.mall.ebtp.extend.crypconfigure.service.ICrypConfigureService;
|
||||||
import com.chinaunicom.mall.ebtp.extend.crypconfigure.util.SslUtil;
|
import com.chinaunicom.mall.ebtp.extend.crypconfigure.util.SslUtil;
|
||||||
import com.chinaunicom.mall.ebtp.extend.uniBss.UniBssUtil;
|
import com.chinaunicom.mall.ebtp.extend.uniBss.UniBssUtil;
|
||||||
@ -36,6 +37,7 @@ import org.apache.commons.io.IOUtils;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.scheduling.annotation.Async;
|
import org.springframework.scheduling.annotation.Async;
|
||||||
|
import org.springframework.scheduling.annotation.EnableAsync;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
@ -50,6 +52,7 @@ import java.util.*;
|
|||||||
* @author yss
|
* @author yss
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
@EnableAsync
|
||||||
@Service
|
@Service
|
||||||
public class CrypConfigureServiceImpl extends BaseServiceImpl<CrypConfigureMapper, CrypConfigure> implements ICrypConfigureService {
|
public class CrypConfigureServiceImpl extends BaseServiceImpl<CrypConfigureMapper, CrypConfigure> implements ICrypConfigureService {
|
||||||
|
|
||||||
@ -122,7 +125,7 @@ public class CrypConfigureServiceImpl extends BaseServiceImpl<CrypConfigureMappe
|
|||||||
log.info("------请求天擎接口---json参数:---"+json);
|
log.info("------请求天擎接口---json参数:---"+json);
|
||||||
str = UniBssServiceImpl.uniBssHttpPost(bean.getUrl(), json);
|
str = UniBssServiceImpl.uniBssHttpPost(bean.getUrl(), json);
|
||||||
blockChainLog.setResult(str);//返回参数
|
blockChainLog.setResult(str);//返回参数
|
||||||
UniBss uniBssRsp = JSONArray.parseObject(str, UniBss.class);
|
CrypUniBss uniBssRsp = JSONArray.parseObject(str, CrypUniBss.class);
|
||||||
if (uniBssRsp != null && UniBssConstant.RESP_CODE_00000.equals(uniBssRsp.getUniBssHead().getRespCode())) {
|
if (uniBssRsp != null && UniBssConstant.RESP_CODE_00000.equals(uniBssRsp.getUniBssHead().getRespCode())) {
|
||||||
System.out.println("返回接口:" + uniBssRsp);
|
System.out.println("返回接口:" + uniBssRsp);
|
||||||
|
|
||||||
@ -349,7 +352,7 @@ public class CrypConfigureServiceImpl extends BaseServiceImpl<CrypConfigureMappe
|
|||||||
*/
|
*/
|
||||||
private String getUniBss(String reqName, Map<String, Object> map) {
|
private String getUniBss(String reqName, Map<String, Object> map) {
|
||||||
|
|
||||||
UniBss uniBss = new UniBss();
|
CrypUniBss uniBss = new CrypUniBss();
|
||||||
uniBss.setUniBssAttached(new UniBssAttached().setMediaInf(""));
|
uniBss.setUniBssAttached(new UniBssAttached().setMediaInf(""));
|
||||||
//天擎部分head
|
//天擎部分head
|
||||||
UniBssUtil util = new UniBssUtil(app_id, app_secret);
|
UniBssUtil util = new UniBssUtil(app_id, app_secret);
|
||||||
|
Reference in New Issue
Block a user