提交 38f28185 authored 作者: 任建彩's avatar 任建彩

feat:系列

1.resource
上级 9c2d710a
......@@ -299,7 +299,7 @@ public class RecommendResourceServiceImpl extends ServiceImpl<RecommendResourceM
switch (code) {
case GlobalConstant.SYZT:
//填充数据且补全推荐位数量
result = this.queryRecommendResourceList(ids, num, ProjectLibrary.class, AllResourceTypeEnum.PROJECT,null);
result = this.queryRecommendResourceList(ids, num, ProjectLibrary.class, AllResourceTypeEnum.PROJECT,"1");
break;
case GlobalConstant.TJTSZY:
//填充数据且补全推荐位数量
......@@ -410,7 +410,9 @@ public class RecommendResourceServiceImpl extends ServiceImpl<RecommendResourceM
if (ids.size() >0) {
sql.append(" AND id NOT IN {1} ");
}
if(StringUtils.isNotBlank(bookid) && bookid=="1"){
sql.append(" type = 1 ");
}
sql.append(" ORDER BY createdTime DESC LIMIT 0, {2};");
List<Object> fillIds = SqlRunner.db().selectObjs(sql.toString(), StatusEnum.ENABLE.getCode(), ids, diff);
......
package com.zrqx.resource.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.TableInfo;
import com.baomidou.mybatisplus.core.metadata.TableInfoHelper;
import com.baomidou.mybatisplus.extension.toolkit.SqlRunner;
......@@ -211,10 +210,7 @@ public class ResourceLibraryServiceImpl implements ResourceLibraryService {
resultMap.put("author", audioBookAuthorService.queryAudioBookAuthorList((String) resultMap.get("id")));
break;
case PROJECT:
//ProjectLibrary projectLibrary = projectLibraryMapper.selectById(id);
LambdaQueryWrapper<ProjectLibrary> projectLibrary = new LambdaQueryWrapper<>();
projectLibrary.eq(ProjectLibrary::getId,id);
projectLibrary.eq(ProjectLibrary::getType,1);
ProjectLibrary projectLibrary = projectLibraryMapper.selectById(id);
if (projectLibrary == null) break;
resultMap = mapper.convertValue(projectLibrary, new TypeReference<Map<String, Object>>() {});
break;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论