|
|
@@ -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 {
|