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 # 命名策略