| | |
| | | @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 out
|
| | | */
|
| | | @RequestMapping(value = "getLogoutProtocol")
|
| | | public void getLogoutProtocol(String callback, AcceptData acceptData,PrintWriter out) {
|
| | | 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));
|