大家好,又见面了,我是你们的朋友全栈君。
CallbackEntity callbackEntity = new CallbackEntity();
callbackEntity.setUserId(infos.get(3)); //用户id
callbackEntity.setOrderId(infos.get(0)); //订单id
callbackEntity.setChannel(infos.get(4));//渠道
callbackEntity.setType(infos.get(1)); //类型
callbackEntity.setSubType(infos.get(2)); //子类型
callbackEntity.setStrategyId(dec.getStrategyId()); // 决策流id
callbackEntity.setStrategyVersion(dec.getStrategyVersion());//决策流版本
callbackEntity.setStrategyName(dec.getStrategyName()); //决策流名字
callbackEntity.setAdditions(dec.getParams()); //附加信息
callbackEntity.setCode(Integer.parseInt(dec.getResultCode())); //code=0,为拒绝;code=1,为通过 -1为异常
Map<String, Object> ben2Map =
JSON.parseObject(JSON.toJSONString(callbackEntity, SerializerFeature.WriteNullStringAsEmpty, SerializerFeature.WriteNullNumberAsZero, SerializerFeature.WriteMapNullValue), Map.class);
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/145704.html原文链接:https://javaforall.net