Exemplo n.º 1
0
 @Override
 @Transactional
 public void updateStatus(Long objectId, int status) {
   ProductCategory category = new ProductCategory();
   category.setObjectId(objectId);
   category.setStatus(status);
   productCategoryDao.updateStatus(category);
 }
Exemplo n.º 2
0
 @Override
 @Transactional
 public void updateSortNoByObjectId(String objectIds, String sortNos) {
   String[] ids = objectIds.split(",");
   String[] nos = sortNos.split(",");
   for (int i = 0; i < ids.length; i++) {
     try {
       Long objectId = Long.parseLong(ids[i]);
       Double sortNo = Double.parseDouble(nos[i]);
       ProductCategory category = new ProductCategory();
       category.setSortNo(sortNo);
       category.setObjectId(objectId);
       productCategoryDao.updateSortNo(category);
     } catch (Exception e) {
       LOGGER.error("updateSortNoByObjectId", e);
     }
   }
 }