中信支付使用的 天擎公共接口
This commit is contained in:
@ -152,15 +152,15 @@ public class CrypConfigureServiceImpl extends BaseServiceImpl<CrypConfigureMappe
|
||||
}
|
||||
|
||||
/**
|
||||
* 区块链调用天擎接口
|
||||
*
|
||||
* 调用天擎接口
|
||||
* 使用对象:中信支付、
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@Async
|
||||
public String callUniInterfaceJson(CrypBean bean) {
|
||||
log.info("区块链------callUniInterface:---入参-----" + JSON.toJSONString(bean));
|
||||
log.info("天擎接口------callUniInterface:---入参-----" + JSON.toJSONString(bean));
|
||||
BlockChainLog blockChainLog = new BlockChainLog();
|
||||
blockChainLog.setId(PropertyUtils.getSnowflakeId());
|
||||
//天擎地址
|
||||
@ -189,10 +189,9 @@ public class CrypConfigureServiceImpl extends BaseServiceImpl<CrypConfigureMappe
|
||||
|
||||
map.put("SIGN", sign);
|
||||
|
||||
json = getUniBss(bean.getReqName(), map);
|
||||
json = getCiticUniBss(bean.getReqName(), map);
|
||||
|
||||
str = UniBssServiceImpl.uniBssHttpPost(bean.getUrl(), json);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("区块链调用失败!~-----------------",e);
|
||||
}
|
||||
@ -335,7 +334,10 @@ public class CrypConfigureServiceImpl extends BaseServiceImpl<CrypConfigureMappe
|
||||
|
||||
/**
|
||||
* 获取加密签名
|
||||
*
|
||||
* 使用对象:区块链
|
||||
* REQ:{
|
||||
* body:{}
|
||||
* }
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@ -383,6 +385,33 @@ public class CrypConfigureServiceImpl extends BaseServiceImpl<CrypConfigureMappe
|
||||
return JSON.toJSONString(uniBss);
|
||||
}
|
||||
|
||||
/**
|
||||
* 中信天擎接口 数据格式 获取加密签名
|
||||
* REQ:{
|
||||
* header:{}
|
||||
* body:{}
|
||||
* }
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
private String getCiticUniBss(String reqName, Map<String, Object> map) {
|
||||
|
||||
UniBss uniBss = new UniBss();
|
||||
uniBss.setUniBssAttached(new UniBssAttached().setMediaInf(""));
|
||||
//天擎部分head
|
||||
UniBssUtil util = new UniBssUtil(app_id, app_secret);
|
||||
uniBss.setUniBssHead(util.getUniBssHead());
|
||||
|
||||
log.info("业务参数封装前:" + map);
|
||||
Map reqMap = new HashMap();
|
||||
reqMap.put(reqName, map);
|
||||
uniBss.setUniBssBodyMap(reqMap);
|
||||
log.info("业务参数封装后:" + JSON.toJSONString(reqMap));
|
||||
log.info("业务参数封装后uniBss:" + JSON.toJSONString(uniBss));
|
||||
|
||||
return JSON.toJSONString(uniBss);
|
||||
}
|
||||
|
||||
/**
|
||||
* 解密
|
||||
*
|
||||
|
Reference in New Issue
Block a user