|
@@ -9,6 +9,7 @@ import com.platform.entity.TmTaskLog;
|
|
import com.platform.service.custom.*;
|
|
import com.platform.service.custom.*;
|
|
import com.platform.service.impl.BrandServiceImpl;
|
|
import com.platform.service.impl.BrandServiceImpl;
|
|
import com.platform.service.impl.OrderServiceImpl;
|
|
import com.platform.service.impl.OrderServiceImpl;
|
|
|
|
+import com.platform.utils.HttpClientUtil;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -323,9 +324,9 @@ public class SceneStatisticTask {
|
|
//从商圈API获取店铺下面所有商品的数量
|
|
//从商圈API获取店铺下面所有商品的数量
|
|
String shopApiUrl = openApiUrl + "4dage/shop/getGoodsNum?sceneNum=" + brandEntity.getSceneNum();
|
|
String shopApiUrl = openApiUrl + "4dage/shop/getGoodsNum?sceneNum=" + brandEntity.getSceneNum();
|
|
|
|
|
|
- ResponseEntity<String> resultString = restTemplate.getForEntity(shopApiUrl,String.class);
|
|
|
|
- log.info("商圈api返回详情:{}", resultString.getBody());
|
|
|
|
- JSONObject resObj = JSON.parseObject(resultString.getBody(), JSONObject.class);
|
|
|
|
|
|
+ String resultString = HttpClientUtil.doGet(shopApiUrl);
|
|
|
|
+ log.info("商圈api返回详情:{}", JSON.toJSONString(resultString));
|
|
|
|
+ JSONObject resObj = JSON.parseObject(resultString, JSONObject.class);
|
|
if (null != resObj) {
|
|
if (null != resObj) {
|
|
int code = resObj.getInteger("code");
|
|
int code = resObj.getInteger("code");
|
|
if (code == 0) {
|
|
if (code == 0) {
|