栏目子节点bug修复
This commit is contained in:
parent
d635498372
commit
5694c5d702
|
@ -288,8 +288,8 @@ public class CategoryAction extends BaseAction {
|
|||
}
|
||||
//判断是否选择子级为所属栏目
|
||||
CategoryEntity _category = new CategoryEntity();
|
||||
_category.setCategoryParentIds(category.getId());
|
||||
List<CategoryEntity> categoryList = categoryBiz.queryChilds(_category);
|
||||
_category.setId(category.getId());
|
||||
List<CategoryEntity> categoryList = categoryBiz.queryChildren(_category);
|
||||
if(categoryList.size()>0) {
|
||||
for(CategoryEntity item:categoryList){
|
||||
if(item.getId().equals(category.getCategoryId())){
|
||||
|
@ -330,7 +330,7 @@ public class CategoryAction extends BaseAction {
|
|||
}
|
||||
category = categoryBiz.getById(category.getId());
|
||||
category.setCategoryParentIds(null);
|
||||
List<CategoryEntity> childs = categoryBiz.queryChilds(category);
|
||||
List<CategoryEntity> childs = categoryBiz.queryChildren(category);
|
||||
//更新与父节点相同类型的子栏目的模板内容
|
||||
for (int i =0; i < childs.size(); i++) {
|
||||
if (childs.get(i).getCategoryType().equals(category.getCategoryType())) {
|
||||
|
|
|
@ -165,7 +165,7 @@ public class GeneraterAction extends BaseAction {
|
|||
} else { //选择栏目更新
|
||||
CategoryEntity categoryEntity = new CategoryEntity();
|
||||
categoryEntity.setId(categoryId);
|
||||
columns = categoryBiz.queryChilds(categoryEntity);
|
||||
columns = categoryBiz.queryChildren(categoryEntity);
|
||||
}
|
||||
|
||||
//文章列表
|
||||
|
@ -241,7 +241,7 @@ public class GeneraterAction extends BaseAction {
|
|||
} else { //选择栏目更新
|
||||
CategoryEntity categoryEntity = new CategoryEntity();
|
||||
categoryEntity.setId(columnId);
|
||||
categoryList = categoryBiz.queryChilds(categoryEntity);
|
||||
categoryList = categoryBiz.queryChildren(categoryEntity);
|
||||
}
|
||||
|
||||
for (CategoryEntity category : categoryList) {
|
||||
|
|
|
@ -36,10 +36,10 @@ public interface ICategoryBiz extends IBaseBiz<CategoryEntity> {
|
|||
|
||||
/**
|
||||
* 查询当前分类下的所有子分类,包含自身
|
||||
* @param category
|
||||
* @param category 通过setId指定栏目id
|
||||
* @return
|
||||
*/
|
||||
List<CategoryEntity> queryChilds(CategoryEntity category);
|
||||
List<CategoryEntity> queryChildren(CategoryEntity category);
|
||||
|
||||
void saveEntity(CategoryEntity entity);
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ public class CategoryBizImpl extends BaseBizImpl<ICategoryDao, CategoryEntity> i
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<CategoryEntity> queryChilds(CategoryEntity category) {
|
||||
public List<CategoryEntity> queryChildren(CategoryEntity category) {
|
||||
// TODO Auto-generated method stub
|
||||
return categoryDao.queryChildren(category);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue