|
@@ -8,6 +8,7 @@ import com.fdkankan.fusion.mapper.ICaseImgMapper;
|
|
|
import com.fdkankan.fusion.request.CaseImgParam;
|
|
|
import com.fdkankan.fusion.service.ICaseImgService;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.util.List;
|
|
@@ -30,6 +31,14 @@ public class CaseImgServiceImpl extends ServiceImpl<ICaseImgMapper, CaseImg> imp
|
|
|
}
|
|
|
LambdaQueryWrapper<CaseImg> wrapper = new LambdaQueryWrapper<>();
|
|
|
wrapper.eq(CaseImg::getCaseId,param.getCaseId());
|
|
|
+ if(param.getStatus() != null){
|
|
|
+ wrapper.eq(CaseImg::getStatus,param.getStatus());
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotBlank(param.getOrderBy()) && param.getOrderBy().contains("sort")){
|
|
|
+ wrapper.apply(" order by " + param.getOrderBy());
|
|
|
+ }else {
|
|
|
+ wrapper.orderByDesc(CaseImg::getId);
|
|
|
+ }
|
|
|
return this.list(wrapper);
|
|
|
}
|
|
|
}
|