|
|
@ -1505,7 +1505,7 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<JSONObject> getLatestNotice(int clientId) {
|
|
|
|
public List<JSONObject> getLatestNotice(JSONObject device, int clientId) {
|
|
|
|
JSONObject clientConfig = clientConfigService.find(clientId);
|
|
|
|
JSONObject clientConfig = clientConfigService.find(clientId);
|
|
|
|
JSONObject notice = new JSONObject();
|
|
|
|
JSONObject notice = new JSONObject();
|
|
|
|
JSONObject latestNotice = noticeManage.getLatestWindowNotice(clientId);
|
|
|
|
JSONObject latestNotice = noticeManage.getLatestWindowNotice(clientId);
|
|
|
@ -1595,7 +1595,8 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
act.put("data", latestAct);
|
|
|
|
act.put("data", latestAct);
|
|
|
|
act.put("type", "popup");
|
|
|
|
act.put("type", "popup");
|
|
|
|
if (StringUtils.equalsIgnoreCase("跨境商城", latestAct.getString("act_name"))) {
|
|
|
|
if (StringUtils.equalsIgnoreCase("跨境商城", latestAct.getString("act_name"))) {
|
|
|
|
if (!clientConfig.getBooleanValue("geek_shop_status")) {
|
|
|
|
if (clientConfig !=null && !clientConfig.getBooleanValue("geek_shop_status")
|
|
|
|
|
|
|
|
&& geekShowActVersion(device.getString("version"))) {
|
|
|
|
result.add(act);
|
|
|
|
result.add(act);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}else {
|
|
|
|
}else {
|
|
|
@ -1764,9 +1765,18 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
List<JSONObject> newActs = new ArrayList<>();
|
|
|
|
List<JSONObject> newActs = new ArrayList<>();
|
|
|
|
for (JSONObject act : JSON.parseArray(acts.toJSONString(), JSONObject.class)) {
|
|
|
|
for (JSONObject act : JSON.parseArray(acts.toJSONString(), JSONObject.class)) {
|
|
|
|
if (act.getString("page_desc") != null && !act.getString("page_desc").equals("0")) {
|
|
|
|
if (act.getString("page_desc") != null && !act.getString("page_desc").equals("0")) {
|
|
|
|
|
|
|
|
JSONObject reference = act.getJSONObject("reference");
|
|
|
|
|
|
|
|
String geekUrl = "https://opt.royalpay.com.au/geekforbest/v1/operation/purpose_apply/index?source=app";
|
|
|
|
|
|
|
|
if (reference != null && StringUtils.isNotBlank(reference.getString("url"))
|
|
|
|
|
|
|
|
&& StringUtils.equalsIgnoreCase(geekUrl, reference.getString("url"))) {
|
|
|
|
|
|
|
|
if (geekShowActVersion(device.getString("version"))) {
|
|
|
|
|
|
|
|
newActs.add(act);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}else {
|
|
|
|
newActs.add(act);
|
|
|
|
newActs.add(act);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
res.put("data", newActs);
|
|
|
|
res.put("data", newActs);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 手续费返还活动
|
|
|
|
// 手续费返还活动
|
|
|
@ -3053,4 +3063,17 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
res.put("channels", channels);
|
|
|
|
res.put("channels", channels);
|
|
|
|
return res;
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private boolean geekShowActVersion(String version) {
|
|
|
|
|
|
|
|
boolean result = false;
|
|
|
|
|
|
|
|
String geekShowVersion = "2.10.11";
|
|
|
|
|
|
|
|
String[] nowAppVersion = version.split("\\.");
|
|
|
|
|
|
|
|
String[] geekVersion = geekShowVersion.split("\\.");
|
|
|
|
|
|
|
|
for (int i = 0; i < geekVersion.length; i++) {
|
|
|
|
|
|
|
|
if (Integer.parseInt(nowAppVersion[i]) >= Integer.parseInt(geekVersion[i])) {
|
|
|
|
|
|
|
|
result = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|