test

test

 1     @Test
 2     public void writeJsonFile () {
 3         Long shopId = 11L;
 4         Map<String, String> params = new HashMap<String, String>();
 5         params.put("shopId", shopId + "");
 6         List<WifiShopConfig> wifiShopConfigs = wifiShopConfigDao.getWifiShopConfigList(params);
 7         
 8         String fileName = wifiShopConfigs.get(0).getWifiShop().getWifiShopId() + ".json";
 9         File file = new File("c:/temp", fileName);
10         JsonUtil.writeObject2JsonFile(file, wifiShopConfigs);
11         
12         File file2 = new File("c:/temp", fileName);
13         FTPUtil.ftpUpload(file2);
14         
15         System.out.println("上传成功!");
16     }

 

posted @ 2015-04-16 17:32  warmker  阅读(124)  评论(0编辑  收藏  举报