Пример #1
0
 @Override
 public void saveOrUpdate(ArticalTag bean) {
   if (bean.getTagId() != null) {
     tagDao.update(bean);
   } else {
     tagDao.save(bean);
   }
 }
Пример #2
0
 @Override
 public PageDTO<List<ArticalTagDTO>> getListByPage(PageDTO<ArticalTag> page) {
   List<ArticalTagDTO> data = tagDao.getListByPage(page);
   PageDTO<List<ArticalTagDTO>> result = new PageDTO<List<ArticalTagDTO>>();
   result.setParam(data);
   result.setPageIndex(page.getPageIndex());
   result.setPageSize(page.getPageSize());
   int count = tagDao.getCountByParam(page.getParam());
   count =
       count % result.getPageSize() == 0
           ? count / result.getPageSize()
           : count / result.getPageSize() + 1;
   result.setTotalPage(count);
   return result;
 }
Пример #3
0
 @Override
 public ArticalTagDTO getById(Integer id) {
   if (id == null) {
     return null;
   }
   ArticalTag articalTag = new ArticalTag();
   articalTag.setTagId(id);
   return tagDao.getTagByParam(articalTag);
 }
Пример #4
0
 @Override
 public List<String> getBrandCharArr() {
   return tagDao.getBrandCharArr();
 }
Пример #5
0
 @Override
 public ArticalTagDTO getArticalParam(ArticalTag tag) {
   return tagDao.getTagByParam(tag);
 }
Пример #6
0
 @Override
 public List<ArticalTagDTO> getListByParam(ArticalTag tag) {
   return tagDao.getListByParam(tag);
 }
Пример #7
0
 @Override
 public List<ArticalTagDTO> getAllTag() {
   return tagDao.getAllTag();
 }