From 0cbf9ce5c32240e96cd50d81541d469bc4e2862f Mon Sep 17 00:00:00 2001 From: liuchengqian Date: Tue, 28 Feb 2023 08:59:02 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E5=86=99=E7=94=A8=E6=88=B7=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E7=81=AB=E7=82=B9=E6=95=B0=E6=8D=AE=E7=9A=84=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=20=E5=BE=85=E5=AE=9A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/DispatchFirePointServiceImpl.java | 10 ++++++++-- .../java/com/xkrs/straw/utils/VipTimeRangeUtils.java | 12 ++++++++---- src/main/resources/application.properties | 2 +- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/xkrs/straw/service/impl/DispatchFirePointServiceImpl.java b/src/main/java/com/xkrs/straw/service/impl/DispatchFirePointServiceImpl.java index 8ba7556..c16eeaf 100644 --- a/src/main/java/com/xkrs/straw/service/impl/DispatchFirePointServiceImpl.java +++ b/src/main/java/com/xkrs/straw/service/impl/DispatchFirePointServiceImpl.java @@ -6,11 +6,13 @@ import com.xkrs.straw.dao.FirePointOrdinaryDao; import com.xkrs.straw.dao.FirePointPreciseDao; import com.xkrs.straw.dao.SysUserDao; import com.xkrs.straw.helper.GeoCodeHelper; +import com.xkrs.straw.model.bean.FirePointQueryResultBean; import com.xkrs.straw.model.entity.FirePointChannelConfigEntity; import com.xkrs.straw.model.entity.FirePointOrdinaryEntity; import com.xkrs.straw.model.entity.FirePointPreciseEntity; import com.xkrs.straw.model.entity.SysUserEntity; import com.xkrs.straw.model.qo.AllFirePointQo; +import com.xkrs.straw.model.vo.AllFirePointVo; import com.xkrs.straw.service.DispatchFirePointService; import com.xkrs.straw.utils.DispatchFirePointUtils; import com.xkrs.straw.utils.FirePointQueryManager; @@ -55,7 +57,11 @@ public class DispatchFirePointServiceImpl implements DispatchFirePointService { public String debug() { Optional sysUser = sysUserDao.findById(1120L); - firePointQueryManager.queryFirePointBelongToUser(sysUser.get(), null, null, null, null); + FirePointQueryResultBean firePointQueryResultBean = firePointQueryManager.queryFirePointBelongToUser(sysUser.get(), null, null, null, null); + boolean success = firePointQueryResultBean.isSuccess(); + String errorMessage = firePointQueryResultBean.getErrorMessage(); + List list = firePointQueryResultBean.getList(); + return outputEncapsulationObject(PromptMessageEnum.SUCCESS, list, locale); // FirePointChannelConfigBean firePointChannelConfigBean = new FirePointChannelConfigBean(); // firePointChannelConfigBean.setChannelName(FirePointChannelConfigBean.Ordinary); @@ -81,7 +87,7 @@ public class DispatchFirePointServiceImpl implements DispatchFirePointService { // FirePointChannelConfigEntity firePointChannelConfigEntity = new FirePointChannelConfigEntity(); // firePointChannelConfigEntity.setJsonContent(serialize); // channelConfigDao.save(firePointChannelConfigEntity); - return "null"; +// return "null"; } /** diff --git a/src/main/java/com/xkrs/straw/utils/VipTimeRangeUtils.java b/src/main/java/com/xkrs/straw/utils/VipTimeRangeUtils.java index d40d523..7474e91 100644 --- a/src/main/java/com/xkrs/straw/utils/VipTimeRangeUtils.java +++ b/src/main/java/com/xkrs/straw/utils/VipTimeRangeUtils.java @@ -186,11 +186,15 @@ public class VipTimeRangeUtils { } public static void main(String[] args) { - VipTimeRangeBean.VipTimeRangeItemBean vipTimeRangeItemBean = new VipTimeRangeBean.VipTimeRangeItemBean(); - vipTimeRangeItemBean.setStartTime("2022-06-27 11:15:00"); - vipTimeRangeItemBean.setEndTime("2022-07-07 18:20:00"); + VipTimeRangeBean.VipTimeRangeItemBean vipTimeRangeItemBean1 = new VipTimeRangeBean.VipTimeRangeItemBean(); + vipTimeRangeItemBean1.setStartTime("2022-06-27 11:15:00"); + vipTimeRangeItemBean1.setEndTime("2022-07-07 18:20:00"); + VipTimeRangeBean.VipTimeRangeItemBean vipTimeRangeItemBean2 = new VipTimeRangeBean.VipTimeRangeItemBean(); + vipTimeRangeItemBean2.setStartTime("2022-07-09 18:20:00"); + vipTimeRangeItemBean2.setEndTime("2022-07-20 18:20:00"); List list = new ArrayList<>(); - list.add(vipTimeRangeItemBean); + list.add(vipTimeRangeItemBean1); + list.add(vipTimeRangeItemBean2); VipTimeRangeBean vipTimeRangeBean = new VipTimeRangeBean(); vipTimeRangeBean.setList(list); String serialize = JsonUtils.serialize(vipTimeRangeBean); diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index bd9c2ff..58006b1 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -23,7 +23,7 @@ spring.datasource.hikari.validation-timeout = 3000 ## Spring Data JPA 配置 spring.jpa.database = POSTGRESQL spring.jpa.database-platform = org.hibernate.dialect.PostgreSQLDialect -spring.jpa.show-sql = false +spring.jpa.show-sql = true # 指定 ddl mode (none, validate, create, create-drop, update) spring.jpa.hibernate.ddl-auto = update # 命名策略