Forráskód Böngészése

订单列表查询可通过订单类型多选查询

hu 4 hónapja
szülő
commit
a0d9d90254

+ 8 - 1
src/custom/restcontroller/webmanage/sale/order/Order.java

@@ -694,8 +694,15 @@ public class Order extends Controller {
                 where.append(")");
             }
             if (whereObject.containsKey("type") && !"".equals(whereObject.getString("type"))) {
+                JSONArray jsonArray =whereObject.getJSONArray("type");
+                StringBuffer str=new StringBuffer("(");
+                for(Object o :jsonArray){
+                    str.append("'"+(String)o+"',");
+                }
+                String result = str.substring(0, str.length() - 1);
+                result=result+")";
                 where.append(" and(");
-                where.append("t1.type ='%").append(whereObject.getString("type")).append("%' ");
+                where.append("t1.type in" +result);
                 where.append(")");
             }
             if (whereObject.containsKey("notclose") && !"".equals(whereObject.getString("notclose"))) {