|
@@ -29,8 +29,8 @@ public class CaseViewServiceImpl extends ServiceImpl<ICaseViewMapper, CaseView>
|
|
private String small;
|
|
private String small;
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public List<CaseView> allList(Integer caseId, String num,String smallImgH, String smallImgW){
|
|
|
|
- if(caseId == null && StringUtils.isEmpty(num)){
|
|
|
|
|
|
+ public List<CaseView> allList(Integer caseId,Integer fusionId, String num,String smallImgH, String smallImgW){
|
|
|
|
+ if(caseId == null && StringUtils.isEmpty(num) && fusionId == null){
|
|
throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
|
|
throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
|
|
}
|
|
}
|
|
LambdaQueryWrapper<CaseView> wrapper = new LambdaQueryWrapper<>();
|
|
LambdaQueryWrapper<CaseView> wrapper = new LambdaQueryWrapper<>();
|
|
@@ -40,6 +40,9 @@ public class CaseViewServiceImpl extends ServiceImpl<ICaseViewMapper, CaseView>
|
|
if(StringUtils.isNotBlank(num)){
|
|
if(StringUtils.isNotBlank(num)){
|
|
wrapper.eq(CaseView::getNum,num);
|
|
wrapper.eq(CaseView::getNum,num);
|
|
}
|
|
}
|
|
|
|
+ if(fusionId!=null){
|
|
|
|
+ wrapper.eq(CaseView::getFusionId,fusionId);
|
|
|
|
+ }
|
|
wrapper.orderByAsc(CaseView::getSort);
|
|
wrapper.orderByAsc(CaseView::getSort);
|
|
wrapper.orderByDesc(CaseView::getCreateTime);
|
|
wrapper.orderByDesc(CaseView::getCreateTime);
|
|
List<CaseView> list = list(wrapper);
|
|
List<CaseView> list = list(wrapper);
|
|
@@ -49,8 +52,8 @@ public class CaseViewServiceImpl extends ServiceImpl<ICaseViewMapper, CaseView>
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public CaseView add(CaseView caseView) {
|
|
public CaseView add(CaseView caseView) {
|
|
- if(caseView.getCaseId() == null || StringUtils.isEmpty(caseView.getNum()) || StringUtils.isEmpty(caseView.getNumThumb())
|
|
|
|
- || caseView.getNumType() == null || StringUtils.isEmpty(caseView.getViewImg()) || StringUtils.isEmpty(caseView.getViewTitle())
|
|
|
|
|
|
+ if(caseView.getCaseId() == null || ((StringUtils.isEmpty(caseView.getNum()) || caseView.getNumType() == null) && caseView.getFusionId() == null)
|
|
|
|
+ || StringUtils.isEmpty(caseView.getViewImg()) || StringUtils.isEmpty(caseView.getViewTitle())
|
|
|| StringUtils.isEmpty(caseView.getViewPoint())) {
|
|
|| StringUtils.isEmpty(caseView.getViewPoint())) {
|
|
throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
|
|
throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
|
|
}
|
|
}
|