正在做一个在线信用充值申请。 我想从数据库中获取凭证的类别,类型和面额。 我需要帮助查询我插入creatquery()和setparameter()方法。 这是我的代码片段获取优惠券。通过多个参数查询
public String getVoucherPinByCategoryTypeDeno(String category, String type, double denomination) {
return (String) sessionFactory.getCurrentSession().createQuery("from voucher v where v.category = :category and v.voucherType = :type and v.denomination = :denomination").setparameter().uniqueResult();
}
我猜券不是一个字符串 – nachokk
@AlmoullimDev。 PHP的?这是java xD – nachokk
@nachokk哦!!,那么我一定会失去我的想法'抱歉':L –