|
|
@@ -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);
|