From 1b8ed7f033b54d460beab30f442c59d1abd1841c Mon Sep 17 00:00:00 2001 From: liuchengqian Date: Wed, 1 Mar 2023 17:52:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ontroller.java => GaoDeApiController.java} | 4 +- .../java/com/xkrs/dao/GlobalSettingDao.java | 11 ---- .../model/entity/GlobalSettingEntity.java | 57 ------------------- .../com/xkrs/model/entity/LandEntity.java | 7 +-- 4 files changed, 4 insertions(+), 75 deletions(-) rename src/main/java/com/xkrs/controller/{GaodeApiController.java => GaoDeApiController.java} (98%) delete mode 100644 src/main/java/com/xkrs/dao/GlobalSettingDao.java delete mode 100644 src/main/java/com/xkrs/model/entity/GlobalSettingEntity.java diff --git a/src/main/java/com/xkrs/controller/GaodeApiController.java b/src/main/java/com/xkrs/controller/GaoDeApiController.java similarity index 98% rename from src/main/java/com/xkrs/controller/GaodeApiController.java rename to src/main/java/com/xkrs/controller/GaoDeApiController.java index bc24e95..59e1305 100644 --- a/src/main/java/com/xkrs/controller/GaodeApiController.java +++ b/src/main/java/com/xkrs/controller/GaoDeApiController.java @@ -26,8 +26,8 @@ import static com.xkrs.utils.HttpClientUtils.sendHttpsGet; */ @RestController @RequestMapping(value = "/gaode") -public class GaodeApiController { - private static final Logger log = LoggerFactory.getLogger(GaodeApiController.class); +public class GaoDeApiController { + private static final Logger log = LoggerFactory.getLogger(GaoDeApiController.class); Locale locale = LocaleContextHolder.getLocale(); @RequestMapping(value = "/weather", method = RequestMethod.GET) diff --git a/src/main/java/com/xkrs/dao/GlobalSettingDao.java b/src/main/java/com/xkrs/dao/GlobalSettingDao.java deleted file mode 100644 index 5a71162..0000000 --- a/src/main/java/com/xkrs/dao/GlobalSettingDao.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.xkrs.dao; - -import com.xkrs.model.entity.GlobalSettingEntity; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; -import org.springframework.stereotype.Component; - -@Component -public interface GlobalSettingDao extends JpaRepository, JpaSpecificationExecutor { - -} diff --git a/src/main/java/com/xkrs/model/entity/GlobalSettingEntity.java b/src/main/java/com/xkrs/model/entity/GlobalSettingEntity.java deleted file mode 100644 index 2e25f27..0000000 --- a/src/main/java/com/xkrs/model/entity/GlobalSettingEntity.java +++ /dev/null @@ -1,57 +0,0 @@ -package com.xkrs.model.entity; - -import javax.persistence.*; -import java.io.Serializable; - -/** - * 全局配置表 - */ -@Entity -@Table(name = "global_setting") -public class GlobalSettingEntity implements Serializable { - - /** - * 主键id - */ - @Id - @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "global_setting_seq_gen") - @SequenceGenerator(name = "global_setting_seq_gen", sequenceName = "global_setting_id_seq", allocationSize = 1) - private Long id; - - /** - * 全局配置项的键 - */ - private String key; - - /** - * 全局配置项的值 - */ - private Long value; - - public GlobalSettingEntity() { - } - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getKey() { - return key; - } - - public void setKey(String key) { - this.key = key; - } - - public Long getValue() { - return value; - } - - public void setValue(Long value) { - this.value = value; - } -} diff --git a/src/main/java/com/xkrs/model/entity/LandEntity.java b/src/main/java/com/xkrs/model/entity/LandEntity.java index 3ca5d5b..5a5c613 100644 --- a/src/main/java/com/xkrs/model/entity/LandEntity.java +++ b/src/main/java/com/xkrs/model/entity/LandEntity.java @@ -13,7 +13,7 @@ public class LandEntity { */ @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "city_seq_gen") - @SequenceGenerator(name = "city_seq_gen", sequenceName = "city_id_seq",allocationSize = 1) + @SequenceGenerator(name = "city_seq_gen", sequenceName = "city_id_seq", allocationSize = 1) private Integer id; /** @@ -48,9 +48,6 @@ public class LandEntity { @Override public String toString() { - return "LandEntity{" + - "id=" + id + - ", landName='" + landName + '\'' + - '}'; + return "LandEntity{" + "id=" + id + ", landName='" + landName + '\'' + '}'; } }