diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/crypconfigure/controller/CrypConfigureController.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/crypconfigure/controller/CrypConfigureController.java index 2c3fd84..ab9ac23 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/crypconfigure/controller/CrypConfigureController.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/crypconfigure/controller/CrypConfigureController.java @@ -120,6 +120,18 @@ public class CrypConfigureController{ return BaseResponse.success(this.iCrypConfigureService.callUniInterface(bean)); } + /** + * 调用天擎接口 + * + * @param bean + * @return + */ + @ApiOperation("调用天擎接口") + @PostMapping("/callUniInterfaceJson") + public BaseResponse callUniInterfaceJson(@RequestBody CrypBean bean) { + + return BaseResponse.success(this.iCrypConfigureService.callUniInterfaceJson(bean)); + } /** * 加载失败日志再发送 diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/crypconfigure/service/ICrypConfigureService.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/crypconfigure/service/ICrypConfigureService.java index 2ee9e7c..eca938c 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/crypconfigure/service/ICrypConfigureService.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/crypconfigure/service/ICrypConfigureService.java @@ -5,6 +5,7 @@ import com.chinaunicom.mall.ebtp.common.base.service.IBaseService; import com.chinaunicom.mall.ebtp.extend.blockchain.entity.BlockChainLogVo; import com.chinaunicom.mall.ebtp.extend.crypconfigure.entity.CrypBean; import com.chinaunicom.mall.ebtp.extend.crypconfigure.entity.CrypConfigure; +import org.springframework.scheduling.annotation.Async; /** * 对数据表 biz_bid_cryp_configure 操作的 service @@ -12,12 +13,20 @@ import com.chinaunicom.mall.ebtp.extend.crypconfigure.entity.CrypConfigure; * */ public interface ICrypConfigureService extends IBaseService { + /** * 调用天擎接口 * @param bean - * @return + * @return true/false */ Boolean callUniInterface(CrypBean bean); + + /** + * json + * @param bean + * @return + */ + String callUniInterfaceJson(CrypBean bean); /** * 加载失败日志再发送 * @param diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/crypconfigure/service/impl/CrypConfigureServiceImpl.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/crypconfigure/service/impl/CrypConfigureServiceImpl.java index ede74a3..423407a 100644 --- a/src/main/java/com/chinaunicom/mall/ebtp/extend/crypconfigure/service/impl/CrypConfigureServiceImpl.java +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/crypconfigure/service/impl/CrypConfigureServiceImpl.java @@ -76,7 +76,7 @@ public class CrypConfigureServiceImpl extends BaseServiceImpl map = JSONArray.parseObject(JSONArray.toJSONString(bean.getObject()), Map.class); + + //传入数据解密 + String sign = getSignValue(map); + + map.put("SIGN", sign); + + json = getUniBss(bean.getReqName(), map); + + str = UniBssServiceImpl.uniBssHttpPost(bean.getUrl(), json); + + } catch (Exception e) { + log.error("区块链调用失败!~-----------------",e); + } + return str; + } + /** * 加载失败日志再发送 *