Browse Source

bug修复

wu 1 week ago
parent
commit
03ac1c79b0
1 changed files with 4 additions and 2 deletions
  1. 4 2
      src/custom/restcontroller/webmanage/sale/salearea/Agents.java

+ 4 - 2
src/custom/restcontroller/webmanage/sale/salearea/Agents.java

@@ -17,8 +17,10 @@ public class Agents {
 
 
     public static ArrayList<Long> getRepeatAgents(Controller controller, Long sa_agentsid) throws YosException {
     public static ArrayList<Long> getRepeatAgents(Controller controller, Long sa_agentsid) throws YosException {
 
 
-        JSONObject ruleObj = controller.dbConnect.runSqlQuery("select agentcheckrule from sys_site_parameter WHERE siteid='" + controller.siteid + "'").get(0).getJSONObject("agentcheckrule");
-        if (ruleObj == null) {
+        Rows rulerows = controller.dbConnect.runSqlQuery("select agentcheckrule from sys_site_parameter WHERE siteid='" + controller.siteid + "'");
+
+        JSONObject ruleObj = rulerows.get(0).getJSONObject("agentcheckrule");
+        if (ruleObj == null || ruleObj.size() == 0) {
             return new ArrayList<>();
             return new ArrayList<>();
         }
         }
         Row agentRow = new Row();
         Row agentRow = new Row();