From 25d8594a2b050e8d857c3237e1099b157c1004c8 Mon Sep 17 00:00:00 2001 From: yang <1175@qq.com> Date: Wed, 9 Oct 2024 18:52:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A1=88=E4=BE=8B=EF=BC=8Cbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../boecase/service/impl/CasesServiceImpl.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/servers/boe-server-all/src/main/java/com/xboe/module/boecase/service/impl/CasesServiceImpl.java b/servers/boe-server-all/src/main/java/com/xboe/module/boecase/service/impl/CasesServiceImpl.java index 56a53aab..d7bff60a 100644 --- a/servers/boe-server-all/src/main/java/com/xboe/module/boecase/service/impl/CasesServiceImpl.java +++ b/servers/boe-server-all/src/main/java/com/xboe/module/boecase/service/impl/CasesServiceImpl.java @@ -44,6 +44,7 @@ import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import java.lang.reflect.Array; import java.time.LocalDateTime; +import java.time.YearMonth; import java.time.format.DateTimeFormatter; import java.time.temporal.TemporalAdjusters; import java.util.*; @@ -1203,15 +1204,15 @@ public class CasesServiceImpl implements ICasesService { } //获取案例当月排名 -// String sql = -// "SELECT bc.id,bcmt.major_id,bc.views - COALESCE(bc.last_month_views, 0) AS increment\n" + -// "FROM boe_cases bc\n" + -// "JOIN boe_cases_major_type bcmt ON bcmt.case_id = bc.id and bc.deleted=0 and file_path is not null and file_path!='' and bc.views - COALESCE(bc.last_month_views, 0)!=0"; - String sql = - "SELECT bc.id,bcmt.major_id,bc.views AS increment\n" + - "FROM boe_cases bc\n" + - "JOIN boe_cases_major_type bcmt ON bcmt.case_id = bc.id and bc.deleted=0 and file_path is not null and file_path!='' and bc.views !=0 and bc.views is not null"; + "SELECT bc.id,bcmt.major_id,bc.views - COALESCE(bc.last_month_views, 0) AS increment\n" + + "FROM boe_cases bc\n" + + "JOIN boe_cases_major_type bcmt ON bcmt.case_id = bc.id and bc.deleted=0 and file_path is not null and file_path!='' and bc.views - COALESCE(bc.last_month_views, 0)!=0"; + +// String sql = +// "SELECT bc.id,bcmt.major_id,bc.views AS increment\n" + +// "FROM boe_cases bc\n" + +// "JOIN boe_cases_major_type bcmt ON bcmt.case_id = bc.id and bc.deleted=0 and file_path is not null and file_path!='' and bc.views !=0 and bc.views is not null"; List caseListOfObject = casesDao.sqlFindList(sql);