From d6bd18820318c70e22049d9b0f6996d89c7a15a3 Mon Sep 17 00:00:00 2001 From: TinyAnts Date: Mon, 9 Jan 2023 16:00:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86PC=E7=AB=AF=E7=9A=84=E8=A3=85?= =?UTF-8?q?=E4=BF=AE=E6=95=B0=E6=8D=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/mdd/front/service/IPcService.java | 15 ++++++--------- .../com/mdd/front/service/impl/PcServiceImpI.java | 9 +++++---- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/server/like-front/src/main/java/com/mdd/front/service/IPcService.java b/server/like-front/src/main/java/com/mdd/front/service/IPcService.java index dbaa5371..ad3b3a9e 100644 --- a/server/like-front/src/main/java/com/mdd/front/service/IPcService.java +++ b/server/like-front/src/main/java/com/mdd/front/service/IPcService.java @@ -1,19 +1,16 @@ package com.mdd.front.service; -import com.mdd.common.mapper.DecoratePageMapper; -import com.mdd.common.mapper.DecorateTabbarMapper; -import com.mdd.common.mapper.article.ArticleMapper; -import com.mdd.common.mapper.setting.HotSearchMapper; - -import javax.annotation.Resource; import java.util.Map; public interface IPcService { + /** + * 配置 + * @author cjh + * @return Map + */ + Map index(); - - - Map index(); /** * 配置 * @author cjh diff --git a/server/like-front/src/main/java/com/mdd/front/service/impl/PcServiceImpI.java b/server/like-front/src/main/java/com/mdd/front/service/impl/PcServiceImpI.java index 3d7d457b..ab19705c 100644 --- a/server/like-front/src/main/java/com/mdd/front/service/impl/PcServiceImpI.java +++ b/server/like-front/src/main/java/com/mdd/front/service/impl/PcServiceImpI.java @@ -33,7 +33,7 @@ public class PcServiceImpI implements IPcService { Map indexData = new LinkedHashMap<>(); DecoratePage decoratePage = decoratePageMapper.selectOne( new QueryWrapper() - .eq("id", 1) + .eq("id", 4) .last("limit 1")); //全部资讯 List
articlesAll = articleMapper.selectList(new QueryWrapper
() @@ -50,8 +50,8 @@ public class PcServiceImpI implements IPcService { map.put("intro", article.getIntro()); map.put("summary", article.getSummary()); map.put("image", UrlUtils.toAbsoluteUrl(article.getImage())); - map.put("author", article.getAuthor()); map.put("visit", article.getVisit()); + map.put("author", article.getAuthor()); map.put("sort", article.getSort()); map.put("createTime", TimeUtils.timestampToDate(article.getCreateTime())); articlesAllList.add(map); @@ -71,12 +71,13 @@ public class PcServiceImpI implements IPcService { map.put("intro", article.getIntro()); map.put("summary", article.getSummary()); map.put("image", UrlUtils.toAbsoluteUrl(article.getImage())); - map.put("author", article.getAuthor()); map.put("visit", article.getVisit()); map.put("sort", article.getSort()); + map.put("author", article.getAuthor()); map.put("createTime", TimeUtils.timestampToDate(article.getCreateTime())); articlesNewList.add(map); } + //热门资讯 List
articlesHot = articleMapper.selectList(new QueryWrapper
() .eq("is_show", 1) @@ -113,8 +114,8 @@ public class PcServiceImpI implements IPcService { Map loginConfig = ConfigUtils.get("login"); loginMap.put("loginWay", ArrayUtils.stringToListAsInt(loginConfig.getOrDefault("loginWay", ""), ",")); loginMap.put("forceBindMobile", Integer.parseInt(loginConfig.getOrDefault("forceBindMobile", "0"))); - loginMap.put("openAgreement", Integer.parseInt(loginConfig.getOrDefault("openAgreement", "0"))); loginMap.put("openOtherAuth", Integer.parseInt(loginConfig.getOrDefault("openOtherAuth", "0"))); + loginMap.put("openAgreement", Integer.parseInt(loginConfig.getOrDefault("openAgreement", "0"))); loginMap.put("autoLoginAuth", ArrayUtils.stringToListAsInt(loginConfig.getOrDefault("autoLoginAuth", ""), ",")); // 网址信息