diff --git a/src/main/java/com/bsd/cases/service/impl/CaseCategoryServiceImpl.java b/src/main/java/com/bsd/cases/service/impl/CaseCategoryServiceImpl.java index b70a2ea..0332d36 100644 --- a/src/main/java/com/bsd/cases/service/impl/CaseCategoryServiceImpl.java +++ b/src/main/java/com/bsd/cases/service/impl/CaseCategoryServiceImpl.java @@ -68,20 +68,25 @@ public class CaseCategoryServiceImpl extends BaseServiceImpl caseCategoryList2 = caseCategoryMapper.select(findCaseCategory2); - findCaseCategory.setState(Constants.STATE_VALID); +// findCaseCategory.setState(Constants.STATE_VALID); parentId = caseCategoryList2.get(0).getId(); - findCaseCategory.setParentId(parentId); +// findCaseCategory.setParentId(parentId); + criteria.andEqualTo("parentId",parentId); }else { - findCaseCategory.setState(Constants.STATE_VALID); - findCaseCategory.setParentId(parentId); +// findCaseCategory.setState(Constants.STATE_VALID); + criteria.andEqualTo("parentId",parentId); } - List caseCategoryList = caseCategoryMapper.select(findCaseCategory); + List caseCategoryList = caseCategoryMapper.selectByExample(example); JSONObject pageJson = PageUtils.page(caseCategoryList,pageNum,pageSize); JSONArray jsonArray = pageJson.getJSONArray("list"); caseCategoryList = JSONObject.parseArray(JSONObject.toJSONString(jsonArray), CaseCategory.class); diff --git a/src/main/java/com/bsd/cases/service/impl/CaseContentServiceImpl.java b/src/main/java/com/bsd/cases/service/impl/CaseContentServiceImpl.java index 69f5f0f..7c0b882 100644 --- a/src/main/java/com/bsd/cases/service/impl/CaseContentServiceImpl.java +++ b/src/main/java/com/bsd/cases/service/impl/CaseContentServiceImpl.java @@ -8,6 +8,7 @@ import com.bsd.cases.model.*; import com.bsd.cases.service.CaseContentService; import com.bsd.cases.service.CaseUsersService; import com.bsd.cases.util.AjaxResult; +import com.bsd.cases.util.LogUtils; import com.bsd.cases.util.PageAjax; import com.bsd.cases.util.PageUtils; import com.bsd.cases.vo.CaseContentBakVo; @@ -16,6 +17,7 @@ import com.bsd.cases.vo.CaseContentDetailVo; import com.bsd.cases.vo.CaseContentVo; import com.github.pagehelper.PageHelper; import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -50,7 +52,7 @@ public class CaseContentServiceImpl extends BaseServiceImpl