接口返回json串
来源:互联网 发布:java读取xml配置文件 编辑:程序博客网 时间:2024/05/18 22:43
public String getSweepInfo(){String cropsProductionId = "";String productId = "";try {cropsProductionId = paymentService.findProductIdByTraceCode(traceCode);} catch (Exception e) {e.printStackTrace();}List<AttachReference> list= new ArrayList<AttachReference>();if(StringUtils.isNotBlank(cropsProductionId)){cropsProduction = cropsProductionService.get(cropsProductionId);productId = cropsProduction.getProductId();if(StringUtils.isNotBlank(productId)){basicProduct = basicProductService.get(productId);list = attachReferenceService.referenceAttachment(productId, "basicProduct.img");}}String [] infoarrays = new String [3];infoarrays[0] = list.get(0).getAttachment().getPath();infoarrays[1] = cropsProduction.getName();infoarrays[2] = basicProduct.getGoodsDemo();String [] otherMessage = new String [4];otherMessage[0] = cropsProduction.getId();otherMessage[1] = cropsProduction.getBatchNo();otherMessage[2]= traceCode;otherMessage[3] = isSign;Map<String, Object[]> map = new LinkedHashMap();map.put("info", infoarrays);map.put("otherMessage", otherMessage);try { this.response.setContentType("application/json"); this.response.setCharacterEncoding("utf-8"); this.response.getWriter().print(new Gson().toJson(map)); } catch (IOException e) { e.printStackTrace(); }return null;}
0 0
- 接口返回json串
- 接口返回json串乱码问题
- 接口返回json
- django json 接口获取返回
- Android 接口返回Json解析
- 接口测试返回值验证方式---返回值为json长串
- 百度淘宝搜索引擎,提示接口,返回json
- 常用的返回JSON的接口
- java 调用webservice 接口 解析返回json
- php编写接口返回json格式结果
- 接口返回值 Json格式数据
- Struts2写接口返回json数据
- 返回map形式json数据格式接口
- SpringMVC提供接口返回json数据
- 编写接口返回JSON类型数据
- python 解接口返回的json字符串
- ajax调用返回php接口返回json数据
- struts2返回json串
- JavaScript实战中会用到的算法
- NoSuchBeanDefinitionException: No qualifying bean of type 错误误区
- U-Boot2010.06移植(2440)-----移植NorFlash驱动
- php的mysql学习(一)
- krpano 全景图在微信里面被屏蔽的解决办法
- 接口返回json串
- Cannot load libphp5.so into server: undefined symbol: __dn_expand
- 构建灵活的 UI -Activity 运行时为 Activity 添加片段
- Spring Boot 性能优化
- 关系型数据库和关系型数据库管理系统
- php视频格式转换---------ffmpeg-php扩展与ffmpeg.exe安装与使用
- 练习
- axis1.4 设立请求超时时间——call.setTimeout();
- 基础最短路四 POJ3268