'门店增加经纬度'

dev-discount
199901012 4 years ago
parent 5a3bea30dc
commit 4edcdf484c
  1. 4
      hai-bweb/src/main/java/com/bweb/controller/HighMerchantStoreController.java
  2. 12
      hai-service/src/main/java/com/hai/dao/HighMerchantStoreMapper.java
  3. 28
      hai-service/src/main/java/com/hai/dao/HighMerchantStoreSqlProvider.java
  4. 34
      hai-service/src/main/java/com/hai/entity/HighMerchantStore.java
  5. 140
      hai-service/src/main/java/com/hai/entity/HighMerchantStoreExample.java

@ -68,13 +68,13 @@ public class HighMerchantStoreController {
|| StringUtils.isNotBlank(highMerchantStore.getStoreName())
|| StringUtils.isNotBlank(highMerchantStore.getTelephone())
|| StringUtils.isNotBlank(highMerchantStore.getAddress())
|| StringUtils.isNotBlank(highMerchantStore.getLatitude())
|| StringUtils.isNotBlank(highMerchantStore.getLongitude())
) {
log.error("HighMerchantStoreController -> editMerchantStore() error!","参数错误");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
// id为空 就是增加门店,需要校验账号是否填写
if (highMerchantStore.getId() == null) {
if (StringUtils.isBlank(highMerchantStore.getSecUser().getPassword()) || StringUtils.isBlank(highMerchantStore.getSecUser().getTelephone())) {

@ -43,6 +43,7 @@ public interface HighMerchantStoreMapper extends HighMerchantStoreMapperExt {
"store_key, store_name, ",
"store_desc, telephone, ",
"address, `status`, ",
"longitude, latitude, ",
"operator_id, operator_name, ",
"update_time, create_time, ",
"ext_1, ext_2, ext_3)",
@ -50,6 +51,7 @@ public interface HighMerchantStoreMapper extends HighMerchantStoreMapperExt {
"#{storeKey,jdbcType=VARCHAR}, #{storeName,jdbcType=VARCHAR}, ",
"#{storeDesc,jdbcType=VARCHAR}, #{telephone,jdbcType=VARCHAR}, ",
"#{address,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ",
"#{longitude,jdbcType=VARCHAR}, #{latitude,jdbcType=VARCHAR}, ",
"#{operatorId,jdbcType=BIGINT}, #{operatorName,jdbcType=VARCHAR}, ",
"#{updateTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
@ -72,6 +74,8 @@ public interface HighMerchantStoreMapper extends HighMerchantStoreMapperExt {
@Result(column="telephone", property="telephone", jdbcType=JdbcType.VARCHAR),
@Result(column="address", property="address", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="longitude", property="longitude", jdbcType=JdbcType.VARCHAR),
@Result(column="latitude", property="latitude", jdbcType=JdbcType.VARCHAR),
@Result(column="operator_id", property="operatorId", jdbcType=JdbcType.BIGINT),
@Result(column="operator_name", property="operatorName", jdbcType=JdbcType.VARCHAR),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@ -85,8 +89,8 @@ public interface HighMerchantStoreMapper extends HighMerchantStoreMapperExt {
@Select({
"select",
"id, company_id, merchant_id, store_key, store_name, store_desc, telephone, address, ",
"`status`, operator_id, operator_name, update_time, create_time, ext_1, ext_2, ",
"ext_3",
"`status`, longitude, latitude, operator_id, operator_name, update_time, create_time, ",
"ext_1, ext_2, ext_3",
"from high_merchant_store",
"where id = #{id,jdbcType=BIGINT}"
})
@ -100,6 +104,8 @@ public interface HighMerchantStoreMapper extends HighMerchantStoreMapperExt {
@Result(column="telephone", property="telephone", jdbcType=JdbcType.VARCHAR),
@Result(column="address", property="address", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="longitude", property="longitude", jdbcType=JdbcType.VARCHAR),
@Result(column="latitude", property="latitude", jdbcType=JdbcType.VARCHAR),
@Result(column="operator_id", property="operatorId", jdbcType=JdbcType.BIGINT),
@Result(column="operator_name", property="operatorName", jdbcType=JdbcType.VARCHAR),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@ -129,6 +135,8 @@ public interface HighMerchantStoreMapper extends HighMerchantStoreMapperExt {
"telephone = #{telephone,jdbcType=VARCHAR},",
"address = #{address,jdbcType=VARCHAR},",
"`status` = #{status,jdbcType=INTEGER},",
"longitude = #{longitude,jdbcType=VARCHAR},",
"latitude = #{latitude,jdbcType=VARCHAR},",
"operator_id = #{operatorId,jdbcType=BIGINT},",
"operator_name = #{operatorName,jdbcType=VARCHAR},",
"update_time = #{updateTime,jdbcType=TIMESTAMP},",

@ -60,6 +60,14 @@ public class HighMerchantStoreSqlProvider {
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}");
}
if (record.getLongitude() != null) {
sql.VALUES("longitude", "#{longitude,jdbcType=VARCHAR}");
}
if (record.getLatitude() != null) {
sql.VALUES("latitude", "#{latitude,jdbcType=VARCHAR}");
}
if (record.getOperatorId() != null) {
sql.VALUES("operator_id", "#{operatorId,jdbcType=BIGINT}");
}
@ -106,6 +114,8 @@ public class HighMerchantStoreSqlProvider {
sql.SELECT("telephone");
sql.SELECT("address");
sql.SELECT("`status`");
sql.SELECT("longitude");
sql.SELECT("latitude");
sql.SELECT("operator_id");
sql.SELECT("operator_name");
sql.SELECT("update_time");
@ -166,6 +176,14 @@ public class HighMerchantStoreSqlProvider {
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
}
if (record.getLongitude() != null) {
sql.SET("longitude = #{record.longitude,jdbcType=VARCHAR}");
}
if (record.getLatitude() != null) {
sql.SET("latitude = #{record.latitude,jdbcType=VARCHAR}");
}
if (record.getOperatorId() != null) {
sql.SET("operator_id = #{record.operatorId,jdbcType=BIGINT}");
}
@ -211,6 +229,8 @@ public class HighMerchantStoreSqlProvider {
sql.SET("telephone = #{record.telephone,jdbcType=VARCHAR}");
sql.SET("address = #{record.address,jdbcType=VARCHAR}");
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
sql.SET("longitude = #{record.longitude,jdbcType=VARCHAR}");
sql.SET("latitude = #{record.latitude,jdbcType=VARCHAR}");
sql.SET("operator_id = #{record.operatorId,jdbcType=BIGINT}");
sql.SET("operator_name = #{record.operatorName,jdbcType=VARCHAR}");
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
@ -260,6 +280,14 @@ public class HighMerchantStoreSqlProvider {
sql.SET("`status` = #{status,jdbcType=INTEGER}");
}
if (record.getLongitude() != null) {
sql.SET("longitude = #{longitude,jdbcType=VARCHAR}");
}
if (record.getLatitude() != null) {
sql.SET("latitude = #{latitude,jdbcType=VARCHAR}");
}
if (record.getOperatorId() != null) {
sql.SET("operator_id = #{operatorId,jdbcType=BIGINT}");
}

@ -51,7 +51,7 @@ public class HighMerchantStore extends HighMerchantStoreModel implements Seriali
private String telephone;
/**
* 商户地址
* 门店地址
*/
private String address;
@ -60,6 +60,16 @@ public class HighMerchantStore extends HighMerchantStoreModel implements Seriali
*/
private Integer status;
/**
* 门店地址经度
*/
private String longitude;
/**
* 门店地址纬度
*/
private String latitude;
/**
* 操作人id
*/
@ -160,6 +170,22 @@ public class HighMerchantStore extends HighMerchantStoreModel implements Seriali
this.status = status;
}
public String getLongitude() {
return longitude;
}
public void setLongitude(String longitude) {
this.longitude = longitude;
}
public String getLatitude() {
return latitude;
}
public void setLatitude(String latitude) {
this.latitude = latitude;
}
public Long getOperatorId() {
return operatorId;
}
@ -237,6 +263,8 @@ public class HighMerchantStore extends HighMerchantStoreModel implements Seriali
&& (this.getTelephone() == null ? other.getTelephone() == null : this.getTelephone().equals(other.getTelephone()))
&& (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getLongitude() == null ? other.getLongitude() == null : this.getLongitude().equals(other.getLongitude()))
&& (this.getLatitude() == null ? other.getLatitude() == null : this.getLatitude().equals(other.getLatitude()))
&& (this.getOperatorId() == null ? other.getOperatorId() == null : this.getOperatorId().equals(other.getOperatorId()))
&& (this.getOperatorName() == null ? other.getOperatorName() == null : this.getOperatorName().equals(other.getOperatorName()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
@ -259,6 +287,8 @@ public class HighMerchantStore extends HighMerchantStoreModel implements Seriali
result = prime * result + ((getTelephone() == null) ? 0 : getTelephone().hashCode());
result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getLongitude() == null) ? 0 : getLongitude().hashCode());
result = prime * result + ((getLatitude() == null) ? 0 : getLatitude().hashCode());
result = prime * result + ((getOperatorId() == null) ? 0 : getOperatorId().hashCode());
result = prime * result + ((getOperatorName() == null) ? 0 : getOperatorName().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
@ -284,6 +314,8 @@ public class HighMerchantStore extends HighMerchantStoreModel implements Seriali
sb.append(", telephone=").append(telephone);
sb.append(", address=").append(address);
sb.append(", status=").append(status);
sb.append(", longitude=").append(longitude);
sb.append(", latitude=").append(latitude);
sb.append(", operatorId=").append(operatorId);
sb.append(", operatorName=").append(operatorName);
sb.append(", updateTime=").append(updateTime);

@ -715,6 +715,146 @@ public class HighMerchantStoreExample {
return (Criteria) this;
}
public Criteria andLongitudeIsNull() {
addCriterion("longitude is null");
return (Criteria) this;
}
public Criteria andLongitudeIsNotNull() {
addCriterion("longitude is not null");
return (Criteria) this;
}
public Criteria andLongitudeEqualTo(String value) {
addCriterion("longitude =", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeNotEqualTo(String value) {
addCriterion("longitude <>", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeGreaterThan(String value) {
addCriterion("longitude >", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeGreaterThanOrEqualTo(String value) {
addCriterion("longitude >=", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeLessThan(String value) {
addCriterion("longitude <", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeLessThanOrEqualTo(String value) {
addCriterion("longitude <=", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeLike(String value) {
addCriterion("longitude like", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeNotLike(String value) {
addCriterion("longitude not like", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeIn(List<String> values) {
addCriterion("longitude in", values, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeNotIn(List<String> values) {
addCriterion("longitude not in", values, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeBetween(String value1, String value2) {
addCriterion("longitude between", value1, value2, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeNotBetween(String value1, String value2) {
addCriterion("longitude not between", value1, value2, "longitude");
return (Criteria) this;
}
public Criteria andLatitudeIsNull() {
addCriterion("latitude is null");
return (Criteria) this;
}
public Criteria andLatitudeIsNotNull() {
addCriterion("latitude is not null");
return (Criteria) this;
}
public Criteria andLatitudeEqualTo(String value) {
addCriterion("latitude =", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeNotEqualTo(String value) {
addCriterion("latitude <>", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeGreaterThan(String value) {
addCriterion("latitude >", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeGreaterThanOrEqualTo(String value) {
addCriterion("latitude >=", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeLessThan(String value) {
addCriterion("latitude <", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeLessThanOrEqualTo(String value) {
addCriterion("latitude <=", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeLike(String value) {
addCriterion("latitude like", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeNotLike(String value) {
addCriterion("latitude not like", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeIn(List<String> values) {
addCriterion("latitude in", values, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeNotIn(List<String> values) {
addCriterion("latitude not in", values, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeBetween(String value1, String value2) {
addCriterion("latitude between", value1, value2, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeNotBetween(String value1, String value2) {
addCriterion("latitude not between", value1, value2, "latitude");
return (Criteria) this;
}
public Criteria andOperatorIdIsNull() {
addCriterion("operator_id is null");
return (Criteria) this;

Loading…
Cancel
Save