把数组放到List集合里然后一个一个取出数组中的值来

    public static void batchSaveOrUpdatePic(List list) {
        String[] sql = new String[list.size()];
        for (int i = 0; i < sql.length; i++) {
            String[] tmp = (String[]) list.get(i);
            sql[i] = "update mk_catalog c set c.pic  = '" + tmp[2] + "' where c.supplier_goods_code= '" + tmp[0]
                    + "' and c.agreement_code='" + tmp[1] + "'  and c.flag='0'";
            System.out.println(sql[i]);
        }
    }

猜你喜欢

转载自fengzhaoyang.iteye.com/blog/2261315