|
|
@@ -690,15 +690,18 @@ public class Order extends Controller {
|
|
|
//状态
|
|
|
if (whereObject.containsKey("status") && !"".equals(whereObject.getString("status"))) {
|
|
|
JSONArray jsonArray =whereObject.getJSONArray("status");
|
|
|
- StringBuffer str=new StringBuffer("(");
|
|
|
- for(Object o :jsonArray){
|
|
|
- str.append("'"+(String)o+"',");
|
|
|
+ if(!jsonArray.isEmpty()){
|
|
|
+ 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.status in"+result);
|
|
|
+ where.append(")");
|
|
|
}
|
|
|
- String result = str.substring(0, str.length() - 1);
|
|
|
- result=result+")";
|
|
|
- where.append(" and(");
|
|
|
- where.append("t1.status in"+result);
|
|
|
- where.append(")");
|
|
|
+
|
|
|
}
|
|
|
if (whereObject.containsKey("type") && !"".equals(whereObject.getString("type"))) {
|
|
|
where.append(" and(");
|