瀏覽代碼

修改bug

liu 2 年之前
父節點
當前提交
3b567fa5b9
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      mhotel/src/com/happy/dao/impl/HotelCouponImplDao.java

+ 2 - 2
mhotel/src/com/happy/dao/impl/HotelCouponImplDao.java

@@ -216,7 +216,7 @@ public class HotelCouponImplDao implements HotelCouponDao {
                 "\thc.effective_start_date AS  effectiveStartDate,(SELECT COUNT( hcs.complaint_id ) AS totalCount FROM `hotel_coupon_status` hcs WHERE hcs.complaint_id = hc.id ) AS totalCount, hc.limit_number as limitNumber,hc.remainder_number as remainderNumber, \n" +
                 "\thc.effective_end_date AS effectiveEndDate \n" +
                 "FROM\n" +
-                "\t`hotel_coupon` hc     where hc.effective_start_date < :dateTime and hc.effective_end_date> :dateTime and hc.`status` = 1  ORDER BY hc.effective_start_date DESC limit :start,:rows";
+                "\t`hotel_coupon` hc     where hc.grant_start_date < :dateTime and hc.grant_end_date> :dateTime and hc.`status` = 1  ORDER BY hc.effective_start_date DESC limit :start,:rows";
 
         MapSqlParameterSource sps = new MapSqlParameterSource();
         sps.addValue("dateTime", dateTime);
@@ -237,7 +237,7 @@ public class HotelCouponImplDao implements HotelCouponDao {
         String sql="SELECT\n" +
                 "\t count(1)\n" +
                 "FROM\n" +
-                "\t`hotel_coupon` hc where hc.effective_start_date<:date and hc.effective_end_date>:date and hc.`status` = 1 ";
+                "\t`hotel_coupon` hc where hc.grant_start_date<:date and hc.grant_end_date>:date and hc.`status` = 1 ";
         MapSqlParameterSource sps = new MapSqlParameterSource();
         sps.addValue("date", date);
         return namedParameterJdbcTemplate.queryForInt(sql, sps);