public Criteria or() { Criteria criteria = createCriteriaInternal(); oredCriteria.add(criteria); return criteria; }
@Override public List<PmsProductCategory> getList(Long parentId, Integer pageSize, Integer pageNum) { PageHelper.startPage(pageNum, pageSize); PmsProductCategoryExample example = new PmsProductCategoryExample(); example.setOrderByClause("sort desc"); example.createCriteria().andParentIdEqualTo(parentId); return productCategoryMapper.selectByExample(example); }
@Override public int updateNavStatus(List<Long> ids, Integer navStatus) { PmsProductCategory productCategory = new PmsProductCategory(); productCategory.setNavStatus(navStatus); PmsProductCategoryExample example = new PmsProductCategoryExample(); example.createCriteria().andIdIn(ids); return productCategoryMapper.updateByExampleSelective(productCategory, example); }
@Override public List<PmsProductCategory> getProductCateList(Long parentId) { PmsProductCategoryExample example = new PmsProductCategoryExample(); example.createCriteria() .andShowStatusEqualTo(1) .andParentIdEqualTo(parentId); example.setOrderByClause("sort desc"); return productCategoryMapper.selectByExample(example); }
@Override public int updateShowStatus(List<Long> ids, Integer showStatus) { PmsProductCategory productCategory = new PmsProductCategory(); productCategory.setShowStatus(showStatus); PmsProductCategoryExample example = new PmsProductCategoryExample(); example.createCriteria().andIdIn(ids); return productCategoryMapper.updateByExampleSelective(productCategory, example); }
public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); if (oredCriteria.size() == 0) { oredCriteria.add(criteria); } return criteria; }