Esempio n. 1
0
 /*
  * (non-Javadoc)
  *
  * @see
  * com.legendshop.business.service.BrandService#save(com.legendshop.model
  * .entity.Brand)
  */
 @Override
 public Long save(Brand brand) {
   if (!AppUtils.isBlank(brand.getBrandId())) {
     update(brand);
     return brand.getBrandId();
   }
   return (Long) brandDao.save(brand);
 }
Esempio n. 2
0
  @Override
  public List<Item> getUsableBrand(Long nsortId, String userName) {
    List<Item> list = new ArrayList<Item>();
    try {
      list = brandDao.getUsableBrand(nsortId, userName);
    } catch (Exception e) {
      e.printStackTrace();
    }

    return list;
  }
Esempio n. 3
0
 /*
  * (non-Javadoc)
  *
  * @see com.legendshop.business.service.BrandService#delete(java.lang.Long)
  */
 @Override
 @CacheEvict(value = "Brand", key = "#id")
 public void delete(Long id) {
   brandDao.exeByHQL("delete from NsortBrand where id.brandId = ?", id);
   brandDao.deleteBrandById(id);
 }
Esempio n. 4
0
 /*
  * (non-Javadoc)
  *
  * @see com.legendshop.business.service.BrandService#load(java.lang.Long)
  */
 @Override
 public Brand getBrand(Long id) {
   return brandDao.get(Brand.class, id);
 }
Esempio n. 5
0
 /*
  * (non-Javadoc)
  *
  * @see com.legendshop.business.service.BrandService#list(java.lang.String)
  */
 @Override
 public List<Brand> getBrand(String userName) {
   return brandDao.findByHQL("from Brand where userName = ?", new Object[] {userName});
 }
Esempio n. 6
0
 @Override
 public boolean hasChildProduct(String userName, Long brandId) {
   return brandDao.hasChildProduct(userName, brandId);
 }
Esempio n. 7
0
 @Override
 public List<Brand> loadBrandByName(Long subNsortId, String shopName, String brandName) {
   return brandDao.loadBrandByName(subNsortId, shopName, brandName);
 }
Esempio n. 8
0
 @Override
 public List<Item> getUsedBrand(Long nsortId, String userName) {
   return brandDao.getUsedBrand(nsortId, userName);
 }
Esempio n. 9
0
 @Override
 public String saveBrandItem(String idJson, String nameJson, Long nsortId, String userName) {
   List<String> idList = JSONUtil.getArray(idJson, String.class);
   return brandDao.saveBrandItem(idList, nsortId, userName);
 }
Esempio n. 10
0
 @Override
 public List<Item> getUsableBrandByName(Long nsortId, String userName, String brandName) {
   return brandDao.getUsableBrandByName(nsortId, userName, brandName);
 }
Esempio n. 11
0
  @Override
  public String saveBrandItem(List<String> idList, Long nsortId, String userName) {

    return brandDao.saveBrandItem(idList, nsortId, userName);
  }
Esempio n. 12
0
 /*
  * (non-Javadoc)
  *
  * @see
  * com.legendshop.business.service.BrandService#getDataByCriteriaQuery(com
  * .legendshop.core.dao.support.CriteriaQuery)
  */
 @Override
 public PageSupport getDataByCriteriaQuery(CriteriaQuery cq) {
   return brandDao.find(cq);
 }
Esempio n. 13
0
 @Override
 public List<Brand> loadBrandBySubSortId(Long subNsortId, String userName) {
   return brandDao.loadBrandBySubSortId(subNsortId, userName);
 }
Esempio n. 14
0
 @Override
 public List<KeyValueEntity> loadBrandEntityBySubSortId(Long subNsortId, String userName) {
   return convertToEntity(brandDao.loadBrandBySubSortId(subNsortId, userName));
 }
Esempio n. 15
0
 /*
  * (non-Javadoc)
  *
  * @see
  * com.legendshop.business.service.BrandService#update(com.legendshop.model
  * .entity.Brand)
  */
 @Override
 @CacheEvict(value = "Brand", key = "#brand.brandId")
 public void update(Brand brand) {
   brandDao.updateBrand(brand);
 }