|
@@ -261,7 +261,7 @@ public class HotelCouponImplDao implements HotelCouponDao {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public QuotaVo quota(String complaintId) {
|
|
|
|
|
|
|
+ public QuotaVo quota(String complaintId,String userId) {
|
|
|
String sql="SELECT\n" +
|
|
String sql="SELECT\n" +
|
|
|
"\tCOUNT( hcs.complaint_id ) AS totalCount,\n" +
|
|
"\tCOUNT( hcs.complaint_id ) AS totalCount,\n" +
|
|
|
"\t( SELECT hc.limit_number FROM hotel_coupon hc WHERE hc.id = :complaintId and hc.`status`=1 ) AS limitNumber, \n" +
|
|
"\t( SELECT hc.limit_number FROM hotel_coupon hc WHERE hc.id = :complaintId and hc.`status`=1 ) AS limitNumber, \n" +
|
|
@@ -269,10 +269,11 @@ public class HotelCouponImplDao implements HotelCouponDao {
|
|
|
"FROM\n" +
|
|
"FROM\n" +
|
|
|
"\t`hotel_coupon_status` hcs \n" +
|
|
"\t`hotel_coupon_status` hcs \n" +
|
|
|
"WHERE\n" +
|
|
"WHERE\n" +
|
|
|
- "\thcs.complaint_id = :complaintId ";
|
|
|
|
|
|
|
+ "\thcs.complaint_id = :complaintId and hcs.user_id= :userId ";
|
|
|
|
|
|
|
|
MapSqlParameterSource sps = new MapSqlParameterSource();
|
|
MapSqlParameterSource sps = new MapSqlParameterSource();
|
|
|
sps.addValue("complaintId", complaintId);
|
|
sps.addValue("complaintId", complaintId);
|
|
|
|
|
+ sps.addValue("userId", userId);
|
|
|
List<QuotaVo> list = null;
|
|
List<QuotaVo> list = null;
|
|
|
try{
|
|
try{
|
|
|
list = namedParameterJdbcTemplate.query(sql, sps,new BeanPropertyRowMapper<>(QuotaVo.class));
|
|
list = namedParameterJdbcTemplate.query(sql, sps,new BeanPropertyRowMapper<>(QuotaVo.class));
|