Selaa lähdekoodia

订单列表查询可通过状态多选查询

hu 10 kuukautta sitten
vanhempi
commit
1848c86c5b
1 muutettua tiedostoa jossa 7 lisäystä ja 7 poistoa
  1. 7 7
      src/custom/restcontroller/webmanage/sale/order/Order.java

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

@@ -689,12 +689,7 @@ public class Order extends Controller {
             }
             //状态
             if (whereObject.containsKey("status") && !"".equals(whereObject.getString("status"))) {
-                where.append(" and(");
-                where.append("t1.status ='").append(whereObject.getString("status")).append("' ");
-                where.append(")");
-            }
-            if (whereObject.containsKey("type") && !"".equals(whereObject.getString("type"))) {
-                JSONArray jsonArray =whereObject.getJSONArray("type");
+                JSONArray jsonArray =whereObject.getJSONArray("status");
                 StringBuffer str=new StringBuffer("(");
                 for(Object o :jsonArray){
                     str.append("'"+(String)o+"',");
@@ -702,7 +697,12 @@ public class Order extends Controller {
                 String result = str.substring(0, str.length() - 1);
                 result=result+")";
                 where.append(" and(");
-                where.append("t1.type in" +result);
+                where.append("t1.status in"+result);
+                where.append(")");
+            }
+            if (whereObject.containsKey("type") && !"".equals(whereObject.getString("type"))) {
+                where.append(" and(");
+                where.append("t1.type ='").append(whereObject.getString("type")).append("' ");
                 where.append(")");
             }
             if (whereObject.containsKey("notclose") && !"".equals(whereObject.getString("notclose"))) {