Przeglądaj źródła

列表搜索排除方式参数格式调整

沈静伟 4 lat temu
rodzic
commit
c88c813457

+ 3 - 3
src/dsb/com/cnd3b/restcontroller/enterprise/products/products.java

@@ -61,9 +61,9 @@ public class products extends Controller {
             }
             }
             if (whereObject.containsKey("notin") && !"".equals(whereObject.getString("notin"))) {
             if (whereObject.containsKey("notin") && !"".equals(whereObject.getString("notin"))) {
                 JSONObject notinObject = whereObject.getJSONObject("notin");
                 JSONObject notinObject = whereObject.getJSONObject("notin");
-                String tablename = notinObject.getString("tablename");
-                if (tablename.equalsIgnoreCase("tactivity_agentproducts")) {
-                    long tactivityid = notinObject.getLong("tactivityid");
+                if (notinObject.containsKey("tactivity_agentproducts")) {
+                    JSONObject tactivity_agentmsgObject = notinObject.getJSONObject("tactivity_agentmsg");
+                    long tactivityid = tactivity_agentmsgObject.getLong("tactivityid");
                     where.append(" and not exists( select * from tactivity_agentproducts where siteid='" + siteid + "' " +
                     where.append(" and not exists( select * from tactivity_agentproducts where siteid='" + siteid + "' " +
                             "and tactivityid='" + tactivityid + "' and tagentsid='" + tagentsid + "' and tagents_productid=t1.tagents_productid) ");
                             "and tactivityid='" + tactivityid + "' and tagentsid='" + tagentsid + "' and tagents_productid=t1.tagents_productid) ");
                 }
                 }

+ 3 - 3
src/dsb/com/cnd3b/restcontroller/enterprise/tagents/tagents.java

@@ -79,9 +79,9 @@ public class tagents extends Controller {
             }
             }
             if (whereObject.containsKey("notin") && !"".equals(whereObject.getString("notin"))) {
             if (whereObject.containsKey("notin") && !"".equals(whereObject.getString("notin"))) {
                 JSONObject notinObject = whereObject.getJSONObject("notin");
                 JSONObject notinObject = whereObject.getJSONObject("notin");
-                String tablename = notinObject.getString("tablename");
-                if (tablename.equalsIgnoreCase("tactivity_agentmsg")) {
-                    long tactivityid = notinObject.getLong("tactivityid");
+                if (notinObject.containsKey("tactivity_agentmsg")) {
+                    JSONObject tactivity_agentmsgObject = notinObject.getJSONObject("tactivity_agentmsg");
+                    long tactivityid = tactivity_agentmsgObject.getLong("tactivityid");
                     where.append(" and not exists( select * from tactivity_agentmsg where siteid='" + siteid + "' " +
                     where.append(" and not exists( select * from tactivity_agentmsg where siteid='" + siteid + "' " +
                             "and tactivityid='" + tactivityid + "' and tagentsid=t1.tagentsid ) ");
                             "and tactivityid='" + tactivityid + "' and tagentsid=t1.tagentsid ) ");
                 }
                 }