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 }
戒骄!戒躁!戒惰!