|
@@ -26,26 +26,26 @@ public class FusionGuideServiceImpl extends ServiceImpl<IFusionGuideMapper, Fusi
|
|
|
@Override
|
|
|
public List<FusionGuide> getAllList(Integer fusionId) {
|
|
|
LambdaQueryWrapper<FusionGuide> wrapper = new LambdaQueryWrapper<>();
|
|
|
- wrapper.eq(FusionGuide::getFusionId,fusionId);
|
|
|
+ wrapper.eq(FusionGuide::getCaseId,fusionId);
|
|
|
wrapper.orderByAsc(FusionGuide::getSort);
|
|
|
wrapper.orderByAsc(FusionGuide::getCreateTime);
|
|
|
return this.list(wrapper);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public Long getCountByFusionId(Integer fusionId) {
|
|
|
+ public Long getCountByCaseId(Integer caseId) {
|
|
|
LambdaQueryWrapper<FusionGuide> wrapper = new LambdaQueryWrapper<>();
|
|
|
- wrapper.eq(FusionGuide::getFusionId,fusionId);
|
|
|
+ wrapper.eq(FusionGuide::getCaseId,caseId);
|
|
|
return this.count(wrapper);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public FusionGuide add(FusionGuide fusionGuide) {
|
|
|
- if(fusionGuide.getFusionId() == null || StringUtils.isEmpty(fusionGuide.getTitle())
|
|
|
+ if(fusionGuide.getCaseId() == null || StringUtils.isEmpty(fusionGuide.getTitle())
|
|
|
|| StringUtils.isEmpty(fusionGuide.getCover())){
|
|
|
throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
|
|
|
}
|
|
|
- Long count = this.getCountByFusionId(fusionGuide.getFusionId());
|
|
|
+ Long count = this.getCountByCaseId(fusionGuide.getCaseId());
|
|
|
fusionGuide.setSort(count + 1);
|
|
|
this.save(fusionGuide);
|
|
|
return fusionGuide;
|