yujian
2019-06-12 c007868c62c7da5c9ce1bf0e77d9e5f8619826e4
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/HelpController.java
@@ -71,19 +71,44 @@
   @RequestMapping(value = "updateApp")
   public void updateApp(AcceptData acceptData, PrintWriter out) {
      Map<String, String> params = new HashMap<>();
      params.put("method", "update");
      params.put("Platform", "Android");
      params.put("Version", acceptData.getVersion());
      params.put("device  ", acceptData.getDevice());
      params.put("time", System.currentTimeMillis() + "");
      params.put("Package", acceptData.getPackages());
      params.put("device", acceptData.getDevice());
      params.put("platform", "Android");
      params.put("key", "a3f390d88e4c41f2747bfa2f1b5f87db");
      params.put("versionCode", acceptData.getVersion() + "");
      if ("android".equalsIgnoreCase(acceptData.getPlatform())) {// android更新
         acceptData.setVersion("10");
         params.put("method", "update");
         params.put("Platform", "Android");
         params.put("Version", acceptData.getVersion());
         params.put("device  ", acceptData.getDevice());
         params.put("time", System.currentTimeMillis() + "");
         params.put("Package", acceptData.getPackages());
         params.put("device", acceptData.getDevice());
         params.put("platform", "Android");
         params.put("key", "a3f390d88e4c41f2747bfa2f1b5f87db");
         params.put("versionCode", acceptData.getVersion() + "");
         String url = "http://update.yeshitv.com:8090/update/update";
         String result = HttpUtil.post(url, params, null);
         try {
            out.print(new String(result.getBytes("ISO-8859-1"), "UTF-8"));
         } catch (UnsupportedEncodingException e) {
            out.print(result);
         }
      } else {// IOS更新
         params.put("method", "update");
         params.put("Platform", "IOS");
         params.put("Version", acceptData.getVersion());
         params.put("device  ", acceptData.getDevice());
         params.put("time", System.currentTimeMillis() + "");
         params.put("Package", acceptData.getPackages());
         params.put("device", acceptData.getDevice());
         params.put("platform", "IOS");
         params.put("key", "32bb90e8976aab5298d5da10fe66f21d");
         params.put("versionCode", acceptData.getVersion() + "");
      }
      String url = "http://update.yeshitv.com:8090/update/update";
      String result = HttpUtil.post(url, params, null);
      out.print(result);
      try {
         out.print(new String(result.getBytes("ISO-8859-1"), "UTF-8"));
      } catch (UnsupportedEncodingException e) {
         out.print(result);
      }
   }
}