Procházet zdrojové kódy

管理端商户选择新增排除过滤

沈静伟 před 4 roky
rodič
revize
a545d0235e

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

@@ -43,6 +43,15 @@ public class tagents extends Controller {
                 where.append("or t2.fphonenumber like'%").append(whereObject.getString("condition")).append("%' ");
                 where.append(")");
             }
+            if (whereObject.containsKey("notin") && !"".equals(whereObject.getString("notin"))) {
+                JSONObject notinObject = whereObject.getJSONObject("notin");
+                String tablename = notinObject.getString("tablename");
+                if (tablename.equalsIgnoreCase("tactivity_agentmsg")) {
+                    long tactivityid = notinObject.getLong("tactivityid");
+                    where.append(" and not exists( select * from tactivity_agentmsg where siteid='" + siteid + "' " +
+                            "and tactivityid='" + tactivityid + "' and tagentsid=t1.tagentsid ) ");
+                }
+            }
         }
         SQLFactory singleagentSql = new SQLFactory(this, "¸öÈËÉÌ»§Áбí²éѯ", pageSize, pageNumber, "t1.tagentsid");
         singleagentSql.addParameter("siteid", siteid);