|
|
@@ -79,12 +79,12 @@ public class ReadBookPlanServicesImpl implements ReadBookPlanServicesInterface{
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public Mono<ReadBookGetOneMaterialRes> readBookGetOneMaterial(String code) {
|
|
|
+ public Mono<ReadBookGetOneMaterialRes> readBookGetOneMaterial(String code,Integer type) {
|
|
|
return template.selectOne(Query.query(Criteria.where("code").is(code)), PlanNewCommon.class)
|
|
|
.switchIfEmpty(Mono.error(new BaseException("计划code异")))
|
|
|
.onErrorResume(throwable -> Mono.error(new BaseException("计划code异"))).flatMap(f -> {
|
|
|
Mono<ReadBookGetOneMaterialRes> readBookGetOneMaterialResMono = template
|
|
|
- .select(Query.query(Criteria.where("type").is(15)
|
|
|
+ .select(Query.query(Criteria.where("type").is(type)
|
|
|
.and("deleted_at").isNull()
|
|
|
.and("group_type_id").is(f.groupId())), Material.class)
|
|
|
.onErrorResume(throwable -> Mono.error(new BaseException("获取分享文案异常Err"+throwable.getMessage())))
|