Browse Source

修改删除订单,该顶单下的评论缺少入住时间问题,查看个人优惠券问题

liu 2 years ago
parent
commit
6ffbe3e089

+ 6 - 4
mhotel/src/com/happy/action/AppHotelCouponAction.java

@@ -15,7 +15,6 @@ import net.sf.json.JSONObject;
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.lang.StringUtils;
 import org.apache.struts2.ServletActionContext;
 import org.apache.struts2.ServletActionContext;
 import org.apache.struts2.interceptor.ServletRequestAware;
 import org.apache.struts2.interceptor.ServletRequestAware;
-import org.springframework.util.ObjectUtils;
 
 
 import javax.annotation.Resource;
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletRequest;
@@ -190,9 +189,12 @@ public class AppHotelCouponAction extends ActionSupport implements ServletReques
         IPage<CardCouponPageVo> iPage = hotelCoupomService.cardCouponPage(types, userId, page, rows);
         IPage<CardCouponPageVo> iPage = hotelCoupomService.cardCouponPage(types, userId, page, rows);
 
 
         List<String> strs = new ArrayList<>();
         List<String> strs = new ArrayList<>();
-        for (CardCouponPageVo data:iPage.getPageList()) {
-            if(!data.getHotelIds().contains(",") || data.getHotelIds().contains("-1")){
-                strs.add(data.getHotelIds());
+        List<CardCouponPageVo> pageList = iPage.getPageList();
+        if (pageList!=null&&pageList.size()>0) {
+            for (CardCouponPageVo data : iPage.getPageList()) {
+                if (!data.getHotelIds().contains(",") || data.getHotelIds().contains("-1")) {
+                    strs.add(data.getHotelIds());
+                }
             }
             }
         }
         }
         if(strs.size() > 0){
         if(strs.size() > 0){

File diff suppressed because it is too large
+ 3 - 6
mhotel/src/com/happy/dao/impl/BookingCommentImplDao.java


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

@@ -332,8 +332,8 @@ public class HotelCouponImplDao implements HotelCouponDao {
                 "FROM\n" +
                 "FROM\n" +
                 "\thotel_coupon_status hcs\n" +
                 "\thotel_coupon_status hcs\n" +
                 "\tLEFT JOIN hotel_coupon hc ON hc.id = hcs.complaint_id  " +
                 "\tLEFT JOIN hotel_coupon hc ON hc.id = hcs.complaint_id  " +
-                "\t  where FIND_IN_SET(hc.type,:status) and hcs.user_id=:userId and hcs.status=1  \n" +
-                "\tORDER BY hc.effective_start_date DESC limit :start,:rows";
+                "\t  where FIND_IN_SET(hc.type, :status ) and hcs.user_id= :userId and hcs.status=1  \n" +
+                "\tORDER BY hc.effective_start_date DESC limit :start , :rows";
 
 
         MapSqlParameterSource sps = new MapSqlParameterSource();
         MapSqlParameterSource sps = new MapSqlParameterSource();
         sps.addValue("status", types);
         sps.addValue("status", types);