From f66794f3d8b25f18daad31e081d8e7c2cb7f4c04 Mon Sep 17 00:00:00 2001 From: wu Date: Mon, 4 Nov 2024 17:25:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BA=BF=E8=B7=AF=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E5=85=B7=E4=BD=93=E4=BF=A1=E6=81=AF=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?,=E6=B2=A1=E6=9C=89=E5=BD=93=E5=89=8D=E6=9C=88=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=97=B6=E4=BD=BF=E7=94=A8=E6=9C=80=E6=96=B0=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=9A=84=E6=89=80=E5=9C=A8=E6=9C=88=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ykMap/service/impl/LineServiceImpl.java | 25 +++++++++---------- src/main/resources/application-prod.yml | 8 +++++- .../resources/com/ykMap/mapper/LineMapper.xml | 22 +++++++--------- 3 files changed, 28 insertions(+), 27 deletions(-) diff --git a/src/main/java/com/ykMap/service/impl/LineServiceImpl.java b/src/main/java/com/ykMap/service/impl/LineServiceImpl.java index 655149c..9d64cfb 100644 --- a/src/main/java/com/ykMap/service/impl/LineServiceImpl.java +++ b/src/main/java/com/ykMap/service/impl/LineServiceImpl.java @@ -1,7 +1,6 @@ package com.ykMap.service.impl; import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.collection.CollectionUtil; import com.ykMap.entity.response.EquipResponse; import com.ykMap.entity.response.GetCarIdInfoResponse; import com.ykMap.entity.response.ItemsResponse; @@ -70,17 +69,17 @@ public class LineServiceImpl implements LineService { @Override public List lineTemplate(String area) { List list; - LocalDate now = LocalDate.now(); - if (now.getDayOfMonth() < 26) { - LocalDate a1 = now.minusMonths(2).withDayOfMonth(26); - LocalDate a2 = now.minusMonths(1).withDayOfMonth(25); - list = lineMapper.lineTemplate(area, a1, a2); - } else { - LocalDate a1 = now.minusMonths(1).withDayOfMonth(26); - LocalDate a2 = now.withDayOfMonth(25); - list = lineMapper.lineTemplate(area, a1, a2); - } - if (CollectionUtil.isEmpty(list)) { +// LocalDate now = LocalDate.now(); +// if (now.getDayOfMonth() < 26) { +// LocalDate a1 = now.minusMonths(2).withDayOfMonth(26); +// LocalDate a2 = now.minusMonths(1).withDayOfMonth(25); +// list = lineMapper.lineTemplate(area, a1, a2); +// } else { +// LocalDate a1 = now.minusMonths(1).withDayOfMonth(26); +// LocalDate a2 = now.withDayOfMonth(25); +// list = lineMapper.lineTemplate(area, a1, a2); +// } +// if (CollectionUtil.isEmpty(list)) { // 查询数据库最新时间 LocalDateTime dataTime = lineMapper.findLineTemplateTime(); if (dataTime == null) { @@ -91,7 +90,7 @@ public class LineServiceImpl implements LineService { // 获取数据库最新时间月份的最后一天 LocalDate lastDayOfMonth = dataTime.with(TemporalAdjusters.lastDayOfMonth()).toLocalDate(); list = lineMapper.lineTemplate(area, firstDayOfMonth, lastDayOfMonth); - } +// } return list; } diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml index 4996af6..8d16124 100644 --- a/src/main/resources/application-prod.yml +++ b/src/main/resources/application-prod.yml @@ -61,4 +61,10 @@ spring: merge-sql: true wall: config: - multi-statement-allow: true \ No newline at end of file + multi-statement-allow: true + +# 日志配置 +logging: + level: + com.ykMap: error + org.springframework: error \ No newline at end of file diff --git a/src/main/resources/com/ykMap/mapper/LineMapper.xml b/src/main/resources/com/ykMap/mapper/LineMapper.xml index d165a84..e0354fa 100644 --- a/src/main/resources/com/ykMap/mapper/LineMapper.xml +++ b/src/main/resources/com/ykMap/mapper/LineMapper.xml @@ -36,20 +36,16 @@ and is_delete =0 and state = '正常'