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; }
public DirectPrice getPriceById(Long id) { return directPriceDao.findOne(id); }
@Transactional(readOnly = false) public void deletePrice(DirectPrice price) { directPriceDao.delete(price); }