sql查询数组越界问题。

代码:

if(type==1){
            String sql1 = "SELECT sum(c.couponfee/100) as'已省' FROM couponpublish c,couponpool e WHERE c.pubid=e.pubid AND e.status = 4 ";    
            List<Map> s = super.findListbySqlReturnMap(sql1);
            if(!s.isEmpty()){
                for(int i=0;i<s.size();i++){
                    list.add(s.get(i));
                }
            }
          int q = s.size();
          String sql ="SELECT e.content,e.logo FROM hh_coupon_equivalent e  WHERE  e.min<'"+s.get(q).get("sum(c.couponfee/100)")+"' AND e.max>'"+s.get(q).get("sum(c.couponfee/100)")+"'";
          List<Map> l = super.findListbySqlReturnMap(sql);
            if(!l.isEmpty()){
                for(int i=0;i<l.size();i++){
                    list.add(l.get(i));
                }
            }

先通过sql1查到sum(c.couponfee/100),放到s里,然后作为sql的查询条件查询e.min<'"+s.get(q).get("sum(c.couponfee/100)")报java.lang.IndexOutOfBoundsException: Index: 1, Size: 1数组越界吧。。应该怎么写呀

查看回复