胡锐 2 years ago
commit b5bcaabcc3
  1. 20
      cweb/src/main/java/com/cweb/controller/CommonController.java
  2. 4
      service/src/main/java/com/hfkj/dao/BsStoreMapperExt.java
  3. 24
      service/src/main/java/com/hfkj/model/OpenStoreModel.java

@ -8,6 +8,7 @@ import com.hfkj.channel.saas.utils.SaasCommon;
import com.hfkj.common.exception.ErrorCode;
import com.hfkj.common.exception.ErrorHelp;
import com.hfkj.common.exception.SysCode;
import com.hfkj.common.utils.CoordCommonUtil;
import com.hfkj.common.utils.ResponseMsgUtil;
import com.hfkj.entity.BsCompany;
import com.hfkj.entity.SecRegion;
@ -279,24 +280,7 @@ public class CommonController {
) {
try {
List<OpenStoreModel> list = storeService.getStoreList(name , childId);
for (OpenStoreModel storeModel : list ) {
Map<String , Object> map = new HashMap<>();
String regEx = "[\n`~!@#$%^&*()+=|{}':;',\\[\\].<>/?~!@#¥%……&*()——+|{}【】‘;:”“’。, ·、?]";
map.put("address" , storeModel.getBlisRegAddress().replaceAll(regEx,""));
map.put("location" , "showLocation");
JSONObject object = commonService.getMapDetail(map);
if (object.getInteger("status") == 0) {
JSONObject jsonObject = object.getJSONObject("result").getJSONObject("location");
storeModel.setLatitude(jsonObject.getString("lat"));
storeModel.setLongitude(jsonObject.getString("lng"));
}
}
return ResponseMsgUtil.success(list);
return ResponseMsgUtil.success(storeService.getStoreList(name , childId));
} catch (Exception e) {
log.error(e.getMessage(), e);

@ -27,7 +27,9 @@ public interface BsStoreMapperExt {
@Select(" <script>" +
" select" +
" blis_reg_address as blisRegAddress ," +
" address," +
" longitude," +
" latitude," +
" door_head_img as doorHeadImg, " +
" bs.name as storeName , " +
" parent_id as parentId , " +

@ -1,5 +1,7 @@
package com.hfkj.model;
import ch.qos.logback.core.db.dialect.DBUtil;
import javax.xml.crypto.Data;
/**
@ -9,7 +11,7 @@ import javax.xml.crypto.Data;
public class OpenStoreModel {
// 门店地址
private String blisRegAddress;
private String address;
// 门头照
private String doorHeadImg;
@ -42,6 +44,16 @@ public class OpenStoreModel {
// 创建时间
private Data storeCreateTime;
private Double distance;
public Double getDistance() {
return distance;
}
public void setDistance(Double distance) {
this.distance = distance;
}
public String getLatitude() {
return latitude;
}
@ -59,15 +71,15 @@ public class OpenStoreModel {
}
public String getBlisRegAddress() {
return blisRegAddress;
public String getAddress() {
return address;
}
public void setBlisRegAddress(String blisRegAddress) {
this.blisRegAddress = blisRegAddress;
public void setAddress(String address) {
this.address = address;
}
public String getDoorHeadImg() {
return doorHeadImg;
}

Loading…
Cancel
Save