提交查询门店和积分返利

yy_dev
袁野 2 years ago
parent e8b240e318
commit 5749d10f8b
  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.ErrorCode;
import com.hfkj.common.exception.ErrorHelp; import com.hfkj.common.exception.ErrorHelp;
import com.hfkj.common.exception.SysCode; import com.hfkj.common.exception.SysCode;
import com.hfkj.common.utils.CoordCommonUtil;
import com.hfkj.common.utils.ResponseMsgUtil; import com.hfkj.common.utils.ResponseMsgUtil;
import com.hfkj.entity.BsCompany; import com.hfkj.entity.BsCompany;
import com.hfkj.entity.SecRegion; import com.hfkj.entity.SecRegion;
@ -279,24 +280,7 @@ public class CommonController {
) { ) {
try { try {
List<OpenStoreModel> list = storeService.getStoreList(name , childId); return ResponseMsgUtil.success(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);
} catch (Exception e) { } catch (Exception e) {
log.error(e.getMessage(), e); log.error(e.getMessage(), e);

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

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

Loading…
Cancel
Save