Compare commits

..

No commits in common. '2480acf16991651281767e5dd280559eca9f2706' and 'e387ff7d93973a15c0999977dfd76c694079ec7b' have entirely different histories.

@ -68,25 +68,20 @@ public class CaseCategoryServiceImpl extends BaseServiceImpl<CaseCategoryMapper,
*/ */
@Override @Override
public JSONObject getCaseCategoryByParentId(Long parentId,Integer pageNum,Integer pageSize) { public JSONObject getCaseCategoryByParentId(Long parentId,Integer pageNum,Integer pageSize) {
// CaseCategory findCaseCategory = new CaseCategory(); CaseCategory findCaseCategory = new CaseCategory();
Example example = new Example(CaseCategory.class);
example.setOrderByClause("update_date_time DESC");
Example.Criteria criteria = example.createCriteria();
criteria.andEqualTo("state",Constants.STATE_VALID);
if (null == parentId){ if (null == parentId){
CaseCategory findCaseCategory2 = new CaseCategory(); CaseCategory findCaseCategory2 = new CaseCategory();
findCaseCategory2.setLevel(2); findCaseCategory2.setLevel(2);
findCaseCategory2.setState(Constants.STATE_VALID); findCaseCategory2.setState(Constants.STATE_VALID);
List<CaseCategory> caseCategoryList2 = caseCategoryMapper.select(findCaseCategory2); List<CaseCategory> caseCategoryList2 = caseCategoryMapper.select(findCaseCategory2);
// findCaseCategory.setState(Constants.STATE_VALID); findCaseCategory.setState(Constants.STATE_VALID);
parentId = caseCategoryList2.get(0).getId(); parentId = caseCategoryList2.get(0).getId();
// findCaseCategory.setParentId(parentId); findCaseCategory.setParentId(parentId);
criteria.andEqualTo("parentId",parentId);
}else { }else {
// findCaseCategory.setState(Constants.STATE_VALID); findCaseCategory.setState(Constants.STATE_VALID);
criteria.andEqualTo("parentId",parentId); findCaseCategory.setParentId(parentId);
} }
List<CaseCategory> caseCategoryList = caseCategoryMapper.selectByExample(example); List<CaseCategory> caseCategoryList = caseCategoryMapper.select(findCaseCategory);
JSONObject pageJson = PageUtils.page(caseCategoryList,pageNum,pageSize); JSONObject pageJson = PageUtils.page(caseCategoryList,pageNum,pageSize);
JSONArray jsonArray = pageJson.getJSONArray("list"); JSONArray jsonArray = pageJson.getJSONArray("list");
caseCategoryList = JSONObject.parseArray(JSONObject.toJSONString(jsonArray), CaseCategory.class); caseCategoryList = JSONObject.parseArray(JSONObject.toJSONString(jsonArray), CaseCategory.class);

@ -52,7 +52,8 @@ public class CaseContentServiceImpl extends BaseServiceImpl<CaseContentMapper, C
private CaseContentScoreMapper caseContentScoreMapper; private CaseContentScoreMapper caseContentScoreMapper;
@Resource @Resource
private CaseContentForwardMapper caseContentForwardMapper; private CaseContentForwardMapper caseContentForwardMapper;
private Logger logger = LogUtils.getPlatformLogger();
private Logger logger = LogUtils.getBussinessLogger();
/** /**
* *
@ -194,7 +195,8 @@ public class CaseContentServiceImpl extends BaseServiceImpl<CaseContentMapper, C
JSONArray contentAttachmentJson = jsonObject.getJSONArray("contentAttachmentJson"); JSONArray contentAttachmentJson = jsonObject.getJSONArray("contentAttachmentJson");
JSONArray contentMaterialJson = jsonObject.getJSONArray("contentMaterialJson"); JSONArray contentMaterialJson = jsonObject.getJSONArray("contentMaterialJson");
System.out.println("CKTEST"+jsonObject.toJSONString()); System.out.println("CKTEST"+jsonObject.toJSONString());
logger.info("CKTEST"+jsonObject.toJSONString());if (null == contentId) { logger.info("CKTEST"+jsonObject.toJSONString());
if (null == contentId) {
//新增 //新增
if (StringUtils.isBlank(contentTitle)) { if (StringUtils.isBlank(contentTitle)) {
ajaxResult.setRetcode(AjaxResult.FAILED); ajaxResult.setRetcode(AjaxResult.FAILED);
@ -415,4 +417,12 @@ public class CaseContentServiceImpl extends BaseServiceImpl<CaseContentMapper, C
} }
return ajaxResult; return ajaxResult;
} }
@Override
public AjaxResult getAllContentList() {
AjaxResult ajaxResult = new AjaxResult();
List<CaseContent> caseContentList = caseContentMapper.getAllContentList();
ajaxResult.setData(caseContentList);
return ajaxResult;
}
} }

Loading…
Cancel
Save