Esempio n. 1
0
 public DirectPrice getPriceByDirectAndProduct(Direct direct, Product product) {
   String sqlString =
       "SELECT * from biz_product_direct_price where direct_id = "
           + direct.getId()
           + " and product_id="
           + product.getId();
   // System.err.println(sqlString);
   List<DirectPrice> list = directPriceDao.findBySql(sqlString, DirectPrice.class);
   if (list != null && list.size() > 0) {
     return list.get(0);
   }
   return null;
 }
Esempio n. 2
0
 public DirectPrice getPriceById(Long id) {
   return directPriceDao.findOne(id);
 }
Esempio n. 3
0
 @Transactional(readOnly = false)
 public void deletePrice(DirectPrice price) {
   directPriceDao.delete(price);
 }