Browse Source

feat(commoncount):计数器增加对uu互联数据接口的特殊处理

wangyc 7 years ago
parent
commit
b8d0050fbc

+ 3 - 1
src/main/java/com/uas/platform/b2c/prod/product/common/CommonTask.java

@@ -38,7 +38,9 @@ public class CommonTask {
                 try {
                     String responseText = HttpUtil.sendGetRequest(commonCount.getSql(), null).getResponseText();
                     if (!StringUtils.isEmpty(responseText)) {
-                        if (responseText.contains("{")) {
+                        if (commonCount.getSql().contains("113.105.74.140:8092")) {
+                            commonCount.setCount(JSON.parseObject(responseText).getDouble("totalCount"));
+                        } else if (responseText.contains("{")) {
                             commonCount.setCount(JSON.parseObject(responseText).getDouble("count"));
                         } else {
                             commonCount.setCount(Double.parseDouble(responseText));