update
This commit is contained in:
@ -24,8 +24,8 @@ server:
|
||||
|
||||
# 框架配置
|
||||
spring:
|
||||
profiles:
|
||||
active: dev
|
||||
# profiles:
|
||||
# active: dev
|
||||
mvc:
|
||||
static-path-pattern: /api/static/**
|
||||
throw-exception-if-no-handler-found: true
|
||||
|
@ -240,22 +240,23 @@ public class PcServiceImpI implements IPcService {
|
||||
.eq("id", article.getCid())
|
||||
.eq("is_delete", 0));
|
||||
|
||||
// TODO: 传入参数判断上下一条记录是否与当前同一分类
|
||||
// 上一条记录
|
||||
Article prev = articleMapper.selectOne(new QueryWrapper<Article>()
|
||||
.select("id,title")
|
||||
.eq(article.getCid() != null, "cid", article.getCid())
|
||||
.lt("id", id)
|
||||
.eq("is_delete", 0)
|
||||
.eq(article.getCid() != null, "cid", article.getCid())
|
||||
.orderByDesc(Arrays.asList("sort", "id"))
|
||||
.last("limit 1"));
|
||||
|
||||
// 下一条记录
|
||||
Article next = articleMapper.selectOne(new QueryWrapper<Article>()
|
||||
.select("id,title")
|
||||
.eq(article.getCid() != null, "cid", article.getCid())
|
||||
.gt("id", id)
|
||||
.eq("is_delete", 0)
|
||||
.eq(article.getCid() != null, "cid", article.getCid())
|
||||
.orderByDesc(Arrays.asList("sort", "id"))
|
||||
.orderByAsc(Arrays.asList("sort", "id"))
|
||||
.last("limit 1"));
|
||||
|
||||
// 是否收藏
|
||||
|
@ -17,8 +17,8 @@ server:
|
||||
|
||||
# 框架配置
|
||||
spring:
|
||||
profiles:
|
||||
active: dev
|
||||
# profiles:
|
||||
# active: dev
|
||||
mvc:
|
||||
static-path-pattern: /api/static/**
|
||||
throw-exception-if-no-handler-found: true
|
||||
|
Reference in New Issue
Block a user