|
|
@@ -1,5 +1,6 @@
|
|
|
package com.uas.platform.b2c.prod.product.common;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
import com.uas.platform.b2c.prod.product.common.dao.CommonCountDao;
|
|
|
import com.uas.platform.b2c.prod.product.common.model.CommonCount;
|
|
|
import com.uas.platform.core.util.HttpUtil;
|
|
|
@@ -36,7 +37,11 @@ public class CommonTask {
|
|
|
try {
|
|
|
String responseText = HttpUtil.sendGetRequest(commonCount.getSql(), null).getResponseText();
|
|
|
if (!StringUtils.isEmpty(responseText)) {
|
|
|
- commonCount.setCount(Double.parseDouble(responseText));
|
|
|
+ if (responseText.contains("{")) {
|
|
|
+ commonCount.setCount(JSON.parseObject(responseText).getDouble("count"));
|
|
|
+ } else {
|
|
|
+ commonCount.setCount(Double.parseDouble(responseText));
|
|
|
+ }
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
}
|