コード例 #1
0
 public Boolean deleteByUniqueIndexsystemNameelementName(String systemName, String elementName) {
   HtmlElementConfig htmlElementConfig = new HtmlElementConfig();
   htmlElementConfig.setSystemName(systemName);
   htmlElementConfig.setElementName(elementName);
   int result =
       htmlElementConfigMapper.deleteByUniqueIndexsystemNameelementName(htmlElementConfig);
   return result == 0 ? false : true;
 }
コード例 #2
0
 @Override
 public Boolean batchDeleteAndSave(List<HtmlElementConfig> htmlElementConfigList) {
   // 事务控制
   TransactionStatus status = null;
   try {
     // 开始事务
     status =
         this.initTansactionStatus(transactionManager, TransactionDefinition.PROPAGATION_REQUIRED);
     for (HtmlElementConfig htmlElementConfig : htmlElementConfigList) {
       htmlElementConfigMapper.deleteByUniqueIndexsystemNameelementName(htmlElementConfig);
       htmlElementConfigMapper.save(htmlElementConfig);
     }
     transactionManager.commit(status);
     return true;
   } catch (Exception e) {
     transactionManager.rollback(status);
     logger.error("批量删除又保存失败", e);
     return false;
   }
 }
コード例 #3
0
 public Boolean save(HtmlElementConfig htmlElementConfig) throws Exception {
   try {
     Long id = htmlElementConfigMapper.save(htmlElementConfig);
     return id == 0 ? false : true;
   } catch (Exception e) {
     if (e instanceof DuplicateKeyException) {
       ErpException erpException = new ErpException("", "请检查是否唯一");
       e = erpException;
     }
     throw e;
   }
 }
コード例 #4
0
 public Long queryCountBySelectiveForPagination(Query<HtmlElementConfig> htmlElementConfig) {
   Long count = htmlElementConfigMapper.queryCountBySelective(htmlElementConfig);
   return count;
 }
コード例 #5
0
 public List<HtmlElementConfig> queryBySelectiveForPagination(
     PageQuery<HtmlElementConfig> htmlElementConfig) {
   List<HtmlElementConfig> htmlElementConfigList =
       htmlElementConfigMapper.queryBySelective(htmlElementConfig);
   return htmlElementConfigList;
 }
コード例 #6
0
 public Boolean updateByPrimaryKeySelective(HtmlElementConfig htmlElementConfig) {
   int result = htmlElementConfigMapper.updateByPrimaryKeySelective(htmlElementConfig);
   return result == 0 ? false : true;
 }
コード例 #7
0
 public Boolean deleteByPrimaryKey(Long id) {
   int result = htmlElementConfigMapper.deleteByPrimaryKey(id);
   return result == 0 ? false : true;
 }
コード例 #8
0
 public HtmlElementConfig queryByPrimaryKey(Long id) {
   HtmlElementConfig htmlElementConfig = htmlElementConfigMapper.queryByPrimaryKey(id);
   return htmlElementConfig;
 }
コード例 #9
0
 public List<HtmlElementConfig> queryBySelective(Query<HtmlElementConfig> htmlElementConfig) {
   List<HtmlElementConfig> htmlElementConfigList =
       htmlElementConfigMapper.queryBySelective(htmlElementConfig);
   return htmlElementConfigList;
 }
コード例 #10
0
 public Long findCount() {
   Long count = htmlElementConfigMapper.findCount();
   return count;
 }
コード例 #11
0
 public List<HtmlElementConfig> findAll() {
   List<HtmlElementConfig> htmlElementConfigList = htmlElementConfigMapper.findAll();
   return htmlElementConfigList;
 }