admin
2020-07-02 a62d474f024332dde7616054c549b7794f120151
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ConfigControllerV2.java
@@ -687,13 +687,39 @@
   @RequestMapping(value = "getShowAd")
   public void showAd(AcceptData acceptData, Long uid, PrintWriter out) {
      String value = configService.get(ConfigKeyEnum.showSplashAd.getKey());
      boolean huaweiShowAd = true;
      if ("huawei".equalsIgnoreCase(acceptData.getChannel())) {
         String version = configService.get(ConfigKeyEnum.huaweiOnLineVersionCode.getKey());
         if (!StringUtil.isNullOrEmpty(version)) {
            if (Integer.parseInt(version) == Integer.parseInt(acceptData.getVersion())) {
               huaweiShowAd = false;
            }
         }
      }
      JSONObject data = new JSONObject();
      if ("0".equalsIgnoreCase(value.trim())) {
         data.put("show", false);
      } else {
         data.put("show", true);
         if (huaweiShowAd)
            data.put("show", true);
         else
            data.put("show", false);
      }
      out.print(JsonUtil.loadTrueResult(data));
   }
   /**
    * 获取注销协议
    * @param acceptData
    * @param uid
    * @param type
    * @param out
    */
   @RequestMapping(value = "getLogoutProtocol")
   public void getLogoutProtocol(String callback, AcceptData acceptData, PrintWriter out) {
      JSONObject data = new JSONObject();
      data.put("link", configService.get(ConfigKeyEnum.accountLogoutProtocolLink.getKey()));
      JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
   }
}