|
@@ -411,6 +411,8 @@ public class FodderServiceImpl extends IBaseServiceImpl<FodderEntity, Long> impl
|
|
|
builder.append(" and type='").append(type).append("'");
|
|
|
if (dirId != null && dirId > 1){
|
|
|
builder.append(" and parent_id=").append(dirId);
|
|
|
+ } else {
|
|
|
+ builder.append(" and parent_id=1");
|
|
|
}
|
|
|
|
|
|
if (StrUtil.isNotBlank(searchKey)){
|
|
@@ -432,6 +434,8 @@ public class FodderServiceImpl extends IBaseServiceImpl<FodderEntity, Long> impl
|
|
|
// dirId为空或者为1 :根目录
|
|
|
if (dirId != null && dirId > 1){
|
|
|
builder.append(" and a.dir_id=").append(dirId);
|
|
|
+ } else {
|
|
|
+ builder.append(" and (a.dir_id is null or a.dir_id=1)");
|
|
|
}
|
|
|
|
|
|
if (StrUtil.isNotBlank(searchKey)){
|