From 2cba9e02f3f77e22b0dd5022f2c1d319657cb734 Mon Sep 17 00:00:00 2001 From: yuanye <418471657@qq.com> Date: Mon, 4 Jul 2022 11:31:46 +0800 Subject: [PATCH] 1 --- .../java/com/hai/dao/ApiKfcStoresMapper.java | 25 ++++--- .../com/hai/dao/ApiKfcStoresSqlProvider.java | 14 ++++ .../java/com/hai/entity/ApiKfcStores.java | 13 ++++ .../com/hai/entity/ApiKfcStoresExample.java | 70 +++++++++++++++++++ 4 files changed, 112 insertions(+), 10 deletions(-) diff --git a/hai-service/src/main/java/com/hai/dao/ApiKfcStoresMapper.java b/hai-service/src/main/java/com/hai/dao/ApiKfcStoresMapper.java index 4e958107..37ce6358 100644 --- a/hai-service/src/main/java/com/hai/dao/ApiKfcStoresMapper.java +++ b/hai-service/src/main/java/com/hai/dao/ApiKfcStoresMapper.java @@ -46,10 +46,11 @@ public interface ApiKfcStoresMapper extends ApiKfcStoresMapperExt { "store_code, lon, ", "lat, address, start_time, ", "end_time, store_status, ", - "shelf_status, operator_id, ", - "operator_name, create_time, ", - "update_time, `status`, ", - "ext_1, ext_2, ext_3)", + "shelf_status, distance, ", + "operator_id, operator_name, ", + "create_time, update_time, ", + "`status`, ext_1, ext_2, ", + "ext_3)", "values (#{cityNameFirstLetter,jdbcType=VARCHAR}, #{cityCode,jdbcType=VARCHAR}, ", "#{cityName,jdbcType=VARCHAR}, #{provinceName,jdbcType=VARCHAR}, ", "#{provinceCode,jdbcType=VARCHAR}, #{kfcCityId,jdbcType=INTEGER}, ", @@ -57,10 +58,11 @@ public interface ApiKfcStoresMapper extends ApiKfcStoresMapperExt { "#{storeCode,jdbcType=VARCHAR}, #{lon,jdbcType=VARCHAR}, ", "#{lat,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{startTime,jdbcType=VARCHAR}, ", "#{endTime,jdbcType=VARCHAR}, #{storeStatus,jdbcType=INTEGER}, ", - "#{shelfStatus,jdbcType=INTEGER}, #{operatorId,jdbcType=BIGINT}, ", - "#{operatorName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ", - "#{updateTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, ", - "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + "#{shelfStatus,jdbcType=INTEGER}, #{distance,jdbcType=VARCHAR}, ", + "#{operatorId,jdbcType=BIGINT}, #{operatorName,jdbcType=VARCHAR}, ", + "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", + "#{status,jdbcType=INTEGER}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ", + "#{ext3,jdbcType=VARCHAR})" }) @Options(useGeneratedKeys=true,keyProperty="id") int insert(ApiKfcStores record); @@ -88,6 +90,7 @@ public interface ApiKfcStoresMapper extends ApiKfcStoresMapperExt { @Result(column="end_time", property="endTime", jdbcType=JdbcType.VARCHAR), @Result(column="store_status", property="storeStatus", jdbcType=JdbcType.INTEGER), @Result(column="shelf_status", property="shelfStatus", jdbcType=JdbcType.INTEGER), + @Result(column="distance", property="distance", jdbcType=JdbcType.VARCHAR), @Result(column="operator_id", property="operatorId", jdbcType=JdbcType.BIGINT), @Result(column="operator_name", property="operatorName", jdbcType=JdbcType.VARCHAR), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @@ -103,8 +106,8 @@ public interface ApiKfcStoresMapper extends ApiKfcStoresMapperExt { "select", "id, city_name_first_letter, city_code, city_name, province_name, province_code, ", "kfc_city_id, kfc_city_code, store_name, store_code, lon, lat, address, start_time, ", - "end_time, store_status, shelf_status, operator_id, operator_name, create_time, ", - "update_time, `status`, ext_1, ext_2, ext_3", + "end_time, store_status, shelf_status, distance, operator_id, operator_name, ", + "create_time, update_time, `status`, ext_1, ext_2, ext_3", "from api_kfc_stores", "where id = #{id,jdbcType=BIGINT}" }) @@ -126,6 +129,7 @@ public interface ApiKfcStoresMapper extends ApiKfcStoresMapperExt { @Result(column="end_time", property="endTime", jdbcType=JdbcType.VARCHAR), @Result(column="store_status", property="storeStatus", jdbcType=JdbcType.INTEGER), @Result(column="shelf_status", property="shelfStatus", jdbcType=JdbcType.INTEGER), + @Result(column="distance", property="distance", jdbcType=JdbcType.VARCHAR), @Result(column="operator_id", property="operatorId", jdbcType=JdbcType.BIGINT), @Result(column="operator_name", property="operatorName", jdbcType=JdbcType.VARCHAR), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @@ -164,6 +168,7 @@ public interface ApiKfcStoresMapper extends ApiKfcStoresMapperExt { "end_time = #{endTime,jdbcType=VARCHAR},", "store_status = #{storeStatus,jdbcType=INTEGER},", "shelf_status = #{shelfStatus,jdbcType=INTEGER},", + "distance = #{distance,jdbcType=VARCHAR},", "operator_id = #{operatorId,jdbcType=BIGINT},", "operator_name = #{operatorName,jdbcType=VARCHAR},", "create_time = #{createTime,jdbcType=TIMESTAMP},", diff --git a/hai-service/src/main/java/com/hai/dao/ApiKfcStoresSqlProvider.java b/hai-service/src/main/java/com/hai/dao/ApiKfcStoresSqlProvider.java index bdaf6d24..6290ec02 100644 --- a/hai-service/src/main/java/com/hai/dao/ApiKfcStoresSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/ApiKfcStoresSqlProvider.java @@ -92,6 +92,10 @@ public class ApiKfcStoresSqlProvider { sql.VALUES("shelf_status", "#{shelfStatus,jdbcType=INTEGER}"); } + if (record.getDistance() != null) { + sql.VALUES("distance", "#{distance,jdbcType=VARCHAR}"); + } + if (record.getOperatorId() != null) { sql.VALUES("operator_id", "#{operatorId,jdbcType=BIGINT}"); } @@ -150,6 +154,7 @@ public class ApiKfcStoresSqlProvider { sql.SELECT("end_time"); sql.SELECT("store_status"); sql.SELECT("shelf_status"); + sql.SELECT("distance"); sql.SELECT("operator_id"); sql.SELECT("operator_name"); sql.SELECT("create_time"); @@ -243,6 +248,10 @@ public class ApiKfcStoresSqlProvider { sql.SET("shelf_status = #{record.shelfStatus,jdbcType=INTEGER}"); } + if (record.getDistance() != null) { + sql.SET("distance = #{record.distance,jdbcType=VARCHAR}"); + } + if (record.getOperatorId() != null) { sql.SET("operator_id = #{record.operatorId,jdbcType=BIGINT}"); } @@ -300,6 +309,7 @@ public class ApiKfcStoresSqlProvider { sql.SET("end_time = #{record.endTime,jdbcType=VARCHAR}"); sql.SET("store_status = #{record.storeStatus,jdbcType=INTEGER}"); sql.SET("shelf_status = #{record.shelfStatus,jdbcType=INTEGER}"); + sql.SET("distance = #{record.distance,jdbcType=VARCHAR}"); sql.SET("operator_id = #{record.operatorId,jdbcType=BIGINT}"); sql.SET("operator_name = #{record.operatorName,jdbcType=VARCHAR}"); sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); @@ -382,6 +392,10 @@ public class ApiKfcStoresSqlProvider { sql.SET("shelf_status = #{shelfStatus,jdbcType=INTEGER}"); } + if (record.getDistance() != null) { + sql.SET("distance = #{distance,jdbcType=VARCHAR}"); + } + if (record.getOperatorId() != null) { sql.SET("operator_id = #{operatorId,jdbcType=BIGINT}"); } diff --git a/hai-service/src/main/java/com/hai/entity/ApiKfcStores.java b/hai-service/src/main/java/com/hai/entity/ApiKfcStores.java index f8770ae2..0a4e96ef 100644 --- a/hai-service/src/main/java/com/hai/entity/ApiKfcStores.java +++ b/hai-service/src/main/java/com/hai/entity/ApiKfcStores.java @@ -98,6 +98,8 @@ public class ApiKfcStores implements Serializable { */ private Integer shelfStatus; + private String distance; + /** * 操作人员id */ @@ -276,6 +278,14 @@ public class ApiKfcStores implements Serializable { this.shelfStatus = shelfStatus; } + public String getDistance() { + return distance; + } + + public void setDistance(String distance) { + this.distance = distance; + } + public Long getOperatorId() { return operatorId; } @@ -369,6 +379,7 @@ public class ApiKfcStores implements Serializable { && (this.getEndTime() == null ? other.getEndTime() == null : this.getEndTime().equals(other.getEndTime())) && (this.getStoreStatus() == null ? other.getStoreStatus() == null : this.getStoreStatus().equals(other.getStoreStatus())) && (this.getShelfStatus() == null ? other.getShelfStatus() == null : this.getShelfStatus().equals(other.getShelfStatus())) + && (this.getDistance() == null ? other.getDistance() == null : this.getDistance().equals(other.getDistance())) && (this.getOperatorId() == null ? other.getOperatorId() == null : this.getOperatorId().equals(other.getOperatorId())) && (this.getOperatorName() == null ? other.getOperatorName() == null : this.getOperatorName().equals(other.getOperatorName())) && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) @@ -400,6 +411,7 @@ public class ApiKfcStores implements Serializable { result = prime * result + ((getEndTime() == null) ? 0 : getEndTime().hashCode()); result = prime * result + ((getStoreStatus() == null) ? 0 : getStoreStatus().hashCode()); result = prime * result + ((getShelfStatus() == null) ? 0 : getShelfStatus().hashCode()); + result = prime * result + ((getDistance() == null) ? 0 : getDistance().hashCode()); result = prime * result + ((getOperatorId() == null) ? 0 : getOperatorId().hashCode()); result = prime * result + ((getOperatorName() == null) ? 0 : getOperatorName().hashCode()); result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); @@ -434,6 +446,7 @@ public class ApiKfcStores implements Serializable { sb.append(", endTime=").append(endTime); sb.append(", storeStatus=").append(storeStatus); sb.append(", shelfStatus=").append(shelfStatus); + sb.append(", distance=").append(distance); sb.append(", operatorId=").append(operatorId); sb.append(", operatorName=").append(operatorName); sb.append(", createTime=").append(createTime); diff --git a/hai-service/src/main/java/com/hai/entity/ApiKfcStoresExample.java b/hai-service/src/main/java/com/hai/entity/ApiKfcStoresExample.java index bf4211d6..b22a6851 100644 --- a/hai-service/src/main/java/com/hai/entity/ApiKfcStoresExample.java +++ b/hai-service/src/main/java/com/hai/entity/ApiKfcStoresExample.java @@ -1275,6 +1275,76 @@ public class ApiKfcStoresExample { return (Criteria) this; } + public Criteria andDistanceIsNull() { + addCriterion("distance is null"); + return (Criteria) this; + } + + public Criteria andDistanceIsNotNull() { + addCriterion("distance is not null"); + return (Criteria) this; + } + + public Criteria andDistanceEqualTo(String value) { + addCriterion("distance =", value, "distance"); + return (Criteria) this; + } + + public Criteria andDistanceNotEqualTo(String value) { + addCriterion("distance <>", value, "distance"); + return (Criteria) this; + } + + public Criteria andDistanceGreaterThan(String value) { + addCriterion("distance >", value, "distance"); + return (Criteria) this; + } + + public Criteria andDistanceGreaterThanOrEqualTo(String value) { + addCriterion("distance >=", value, "distance"); + return (Criteria) this; + } + + public Criteria andDistanceLessThan(String value) { + addCriterion("distance <", value, "distance"); + return (Criteria) this; + } + + public Criteria andDistanceLessThanOrEqualTo(String value) { + addCriterion("distance <=", value, "distance"); + return (Criteria) this; + } + + public Criteria andDistanceLike(String value) { + addCriterion("distance like", value, "distance"); + return (Criteria) this; + } + + public Criteria andDistanceNotLike(String value) { + addCriterion("distance not like", value, "distance"); + return (Criteria) this; + } + + public Criteria andDistanceIn(List values) { + addCriterion("distance in", values, "distance"); + return (Criteria) this; + } + + public Criteria andDistanceNotIn(List values) { + addCriterion("distance not in", values, "distance"); + return (Criteria) this; + } + + public Criteria andDistanceBetween(String value1, String value2) { + addCriterion("distance between", value1, value2, "distance"); + return (Criteria) this; + } + + public Criteria andDistanceNotBetween(String value1, String value2) { + addCriterion("distance not between", value1, value2, "distance"); + return (Criteria) this; + } + public Criteria andOperatorIdIsNull() { addCriterion("operator_id is null"); return (Criteria) this;