Commit ac53fbc6 by chongli

分享中的券不再显示在app中

parent 15560a43
......@@ -172,6 +172,7 @@ public class VoucherDao extends GenericHibernateDao<Voucher, Integer> {
StringBuilder sb = new StringBuilder(
"select count(*) as count from bsc_voucher v where 1=1 ");
sb.append(" and v.uid='").append(uid).append("'");
sb.append(" and v.isShare=0");
sb.append(" and v.Used=").append(VourcherUsedEnum.UNUSED.getKey().intValue());
sb.append(" and DATE_FORMAT(EndUseDate, '%Y-%m-%d') >= DATE_FORMAT(now(), '%Y-%m-%d') ");
if (!isNew) {
......@@ -516,6 +517,7 @@ public class VoucherDao extends GenericHibernateDao<Voucher, Integer> {
criteria.add(Restrictions.eq("used", queryBean.getUsed()));
}
criteria.add(Restrictions.eq("uid", queryBean.getUid()));
criteria.add(Restrictions.eq("isShare", 0));
if (queryBean.getType() != null && queryBean.getType() != 0) {
criteria.add(Restrictions.eq("type", queryBean.getType()));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment