|
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.mapper.Wrapper;
|
|
import com.iotechn.unimall.app.api.advertisement.AdvertisementService;
|
|
import com.iotechn.unimall.app.api.advertisement.AdvertisementService;
|
|
import com.iotechn.unimall.biz.service.sale.SaleBizService;
|
|
import com.iotechn.unimall.biz.service.sale.SaleBizService;
|
|
import com.iotechn.unimall.core.exception.ServiceException;
|
|
import com.iotechn.unimall.core.exception.ServiceException;
|
|
|
|
+import com.iotechn.unimall.core.util.HttpUtils;
|
|
import com.iotechn.unimall.data.domain.*;
|
|
import com.iotechn.unimall.data.domain.*;
|
|
import com.iotechn.unimall.data.dto.*;
|
|
import com.iotechn.unimall.data.dto.*;
|
|
import com.iotechn.unimall.data.enums.AdvertisementType;
|
|
import com.iotechn.unimall.data.enums.AdvertisementType;
|
|
@@ -12,6 +13,8 @@ import com.iotechn.unimall.data.enums.RecommendType;
|
|
import com.iotechn.unimall.data.enums.TaskStatusType;
|
|
import com.iotechn.unimall.data.enums.TaskStatusType;
|
|
import com.iotechn.unimall.data.mapper.*;
|
|
import com.iotechn.unimall.data.mapper.*;
|
|
import com.iotechn.unimall.data.model.Page;
|
|
import com.iotechn.unimall.data.model.Page;
|
|
|
|
+import org.apache.http.HttpResponse;
|
|
|
|
+import org.apache.http.util.EntityUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
@@ -80,6 +83,24 @@ public class IntegralServiceImpl implements IntegralService {
|
|
portPriceDTOS.add(portPriceDTO);
|
|
portPriceDTOS.add(portPriceDTO);
|
|
}
|
|
}
|
|
integralIndexDataDTO.setPortInfo(portPriceDTOS);
|
|
integralIndexDataDTO.setPortInfo(portPriceDTOS);
|
|
|
|
+ /**
|
|
|
|
+ * 期货价格
|
|
|
|
+ */
|
|
|
|
+ List<InfoDTO> infoDTOS = new ArrayList<>();
|
|
|
|
+ String host = "https://hq.sinajs.cn/list=C0,C2109,C2111,C2201,C2203,C2205,C2207";
|
|
|
|
+ String path = "";
|
|
|
|
+ String method = "GET";
|
|
|
|
+ Map<String, String> headers = new HashMap<String, String>();
|
|
|
|
+ Map<String, String> querys = new HashMap<String, String>();
|
|
|
|
+ try {
|
|
|
|
+ HttpResponse response = HttpUtils.doGet(host, path, method, headers, querys);
|
|
|
|
+ System.out.println("期货价格");
|
|
|
|
+// System.out.println(response.toString());
|
|
|
|
+ //获取response的body
|
|
|
|
+ System.out.println(EntityUtils.toString(response.getEntity()));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
|
|
// List<AdvertisementDO> activeAd1 = advertisementService.getActiveAd(0);
|
|
// List<AdvertisementDO> activeAd1 = advertisementService.getActiveAd(0);
|
|
// if(activeAd1.size() > 0){
|
|
// if(activeAd1.size() > 0){
|