提交 9c2d710a authored 作者: 任建彩's avatar 任建彩

feat:系列

1.resource
上级 0e9c75eb
......@@ -267,14 +267,11 @@ public class RecommendResourceServiceImpl extends ServiceImpl<RecommendResourceM
//查询专题推荐位绑定数量
int bindCount = this.countProjectByRecommendCode(code);
if (bindCount <= num) {
num = bindCount;
/*if (bindCount > 2) {
if (bindCount > 2) {
num = bindCount - bindCount %2;
} else {
num = 2;
}*/
}else{
num = 2;
}
}
}
......@@ -410,7 +407,6 @@ public class RecommendResourceServiceImpl extends ServiceImpl<RecommendResourceM
sql.append("SELECT id FROM ")
.append(tableInfo.getTableName())
.append(" WHERE status = {0} ");
if (ids.size() >0) {
sql.append(" AND id NOT IN {1} ");
}
......
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;
......@@ -210,7 +211,10 @@ public class ResourceLibraryServiceImpl implements ResourceLibraryService {
resultMap.put("author", audioBookAuthorService.queryAudioBookAuthorList((String) resultMap.get("id")));
break;
case PROJECT:
ProjectLibrary projectLibrary = projectLibraryMapper.selectById(id);
//ProjectLibrary projectLibrary = projectLibraryMapper.selectById(id);
LambdaQueryWrapper<ProjectLibrary> projectLibrary = new LambdaQueryWrapper<>();
projectLibrary.eq(ProjectLibrary::getId,id);
projectLibrary.eq(ProjectLibrary::getType,1);
if (projectLibrary == null) break;
resultMap = mapper.convertValue(projectLibrary, new TypeReference<Map<String, Object>>() {});
break;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论