Explorar o código

查询授权品牌逻辑调整

wu hai 5 meses
pai
achega
c7e9b8aac2
Modificáronse 1 ficheiros con 13 adicións e 13 borrados
  1. 13 13
      src/custom/beans/enterprise/Enterprise.java

+ 13 - 13
src/custom/beans/enterprise/Enterprise.java

@@ -36,20 +36,20 @@ public class Enterprise extends BaseClass {
     }
 
     public static Rows getBrands2(Controller controller, long sys_enterpriseid) throws YosException {
-        if (sys_enterpriseid == 0 && controller.userInfo.isSaler()) {
-            return controller.dbConnect.runSqlQuery("select * from sa_brand where siteid='" + controller.siteid + "'"
-                    + " and sa_brandid in (" + StringUtils.join(get_sa_brandid(controller), ",") + ")");
-        }
-        if (controller.dbConnect.runSqlQuery("select *from sys_enterprise where siteid='" + controller.siteid + "' and sys_enterpriseid=" + sys_enterpriseid + " and saleclassauth=0").isNotEmpty()) {
-            return controller.dbConnect.runSqlQuery("select * from sa_brand where siteid='" + controller.siteid + "'");
-        }
-        if (sys_enterpriseid == 0) {
+//        if (sys_enterpriseid == 0 && controller.userInfo.isSaler()) {
+//            return controller.dbConnect.runSqlQuery("select * from sa_brand where siteid='" + controller.siteid + "'"
+//                    + " and sa_brandid in (" + StringUtils.join(get_sa_brandid(controller), ",") + ")");
+//        }
+//        if (controller.dbConnect.runSqlQuery("select *from sys_enterprise where siteid='" + controller.siteid + "' and sys_enterpriseid=" + sys_enterpriseid + " and saleclassauth=0").isNotEmpty()) {
+//            return controller.dbConnect.runSqlQuery("select * from sa_brand where siteid='" + controller.siteid + "'");
+//        }
+//        if (sys_enterpriseid == 0) {
             return controller.dbConnect.runSqlQuery("select * from sa_brand where siteid='" + controller.siteid + "'");
-        }
-        SQLFactory sqlFactory = new SQLFactory(new Enterprise(), "企业品牌授权查询");
-        sqlFactory.addParameter("siteid", controller.siteid);
-        sqlFactory.addParameter("sys_enterpriseid", sys_enterpriseid);
-        return sqlFactory.runSqlQuery(controller.dbConnect);
+//        }
+//        SQLFactory sqlFactory = new SQLFactory(new Enterprise(), "企业品牌授权查询");
+//        sqlFactory.addParameter("siteid", controller.siteid);
+//        sqlFactory.addParameter("sys_enterpriseid", sys_enterpriseid);
+//        return sqlFactory.runSqlQuery(controller.dbConnect);
     }
 
     public static ArrayList<Long> get_sa_brandid(Controller controller) throws YosException {