高德
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2023/6/21 15:01
|
||||
* @Version 1.0
|
||||
*/
|
||||
public interface GaoDeService {
|
||||
|
||||
/**
|
||||
* 根据经纬度生成图片
|
||||
* @param latitudeLongitude
|
||||
* @return
|
||||
*/
|
||||
String getGaoDePicture(String latitudeLongitude);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.service.GaoDeService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2023/6/21 15:04
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class GaoDeServiceImpl implements GaoDeService {
|
||||
|
||||
@Resource
|
||||
RestTemplate restTemplate;
|
||||
@Override
|
||||
public String getGaoDePicture(String latitudeLongitude) {
|
||||
String url = "https://restapi.amap.com/v3/staticmap?location=120.21201,30.2084&zoom=10&size=750*300&markers=mid,,A:116.481485,39.990464&key=fb6332444cab4eba54655571dfc68f5b&markersStyle=-1";
|
||||
ResponseEntity<String> forEntity = restTemplate.getForEntity(url, String.class);
|
||||
String body = forEntity.getBody();
|
||||
log.info("--------------{}", JSONObject.toJSON(body));
|
||||
return body;
|
||||
}
|
||||
}
|
||||
@@ -29,6 +29,7 @@ import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.sql.Array;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -57,6 +58,8 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
EnterpriseUserService enterpriseUserService;
|
||||
@Resource
|
||||
AliyunService aliyunService;
|
||||
@Resource
|
||||
HyPartnerBaseInfoDAO hyPartnerBaseInfoDAO;
|
||||
|
||||
@Override
|
||||
public StageCountVO selectStagePendingCount(String userId) {
|
||||
@@ -141,6 +144,7 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
//过滤出已结束的线索 这块线索需要重新生成新的线索
|
||||
List<HyPartnerLineInfoDO> closeLineList = partnerLineInfoList.stream().filter(x -> x.getCloseTime() != null).collect(Collectors.toList());
|
||||
List<Long> closeLineIdList = closeLineList.stream().map(HyPartnerLineInfoDO::getId).collect(Collectors.toList());
|
||||
|
||||
//已结束的线索 需要重新生成一条新的线索
|
||||
List<HyPartnerLineInfoDO> list = new ArrayList<>();
|
||||
closeLineList.stream().forEach(x->{
|
||||
@@ -153,6 +157,14 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
list.add(hyPartnerLineInfoDO);
|
||||
});
|
||||
hyPartnerLineInfoDAO.batchInsert(list);
|
||||
List<HyPartnerBaseInfoDO> hyPartnerBaseInfoDOS = new ArrayList<>();
|
||||
list.forEach(x->{
|
||||
HyPartnerBaseInfoDO newHyPartnerBaseInfoDO = new HyPartnerBaseInfoDO();
|
||||
newHyPartnerBaseInfoDO.setPartnerId(x.getPartnerId());
|
||||
newHyPartnerBaseInfoDO.setPartnerLineId(x.getId());
|
||||
hyPartnerBaseInfoDOS.add(newHyPartnerBaseInfoDO);
|
||||
});
|
||||
hyPartnerBaseInfoDAO.batchInsert(hyPartnerBaseInfoDOS);
|
||||
//将老的线索置为删除状态
|
||||
hyPartnerLineInfoDAO.batchDeleted(closeLineIdList);
|
||||
//没有结束的线索直接分配招商经理
|
||||
@@ -160,7 +172,7 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
List<Long> otherLineIdList = otherLineList.stream().map(HyPartnerLineInfoDO::getId).collect(Collectors.toList());
|
||||
hyPartnerLineInfoDAO.updateInvestmentManager(userId, otherLineIdList);
|
||||
|
||||
return null;
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user