|
@@ -1,13 +1,11 @@
|
|
|
package restcontroller.common.adspace;
|
|
|
|
|
|
+import beans.user.User;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import common.Controller;
|
|
|
import common.YosException;
|
|
|
import common.annotation.API;
|
|
|
-import common.data.Row;
|
|
|
-import common.data.Rows;
|
|
|
-import common.data.RowsMap;
|
|
|
-import common.data.SQLFactory;
|
|
|
+import common.data.*;
|
|
|
import common.parameter.parameter;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
@@ -29,15 +27,12 @@ public class adspace extends Controller {
|
|
|
adspaceSQL.addParameter("systemclient", systemclient);
|
|
|
Rows adspacerows = dbConnect.runSqlQuery(adspaceSQL.getSQL());
|
|
|
|
|
|
- ArrayList<String> systemappidlist;
|
|
|
- if (parameter.userauth_systemappids.containsKey(userid)) {
|
|
|
- systemappidlist = parameter.userauth_systemappids.get(userid).toArrayList("systemappid");
|
|
|
- } else {
|
|
|
- systemappidlist = new ArrayList<>();
|
|
|
- }
|
|
|
+ QuerySQL querySQL = SQLFactory.createQuerySQL(this, "sys_roleappoptionauth", "systemappid");
|
|
|
+ querySQL.setWhere("roleid", User.getUserRoleIDs(this, userid));
|
|
|
+
|
|
|
SQLFactory adSQl = new SQLFactory(this, "广告明细查询");
|
|
|
adSQl.addParameter("siteid", siteid);
|
|
|
- adSQl.addParameter_in("systemappid", systemappidlist);
|
|
|
+ adSQl.addParameter_in("systemappid", querySQL.query().toArrayList("systemappid", true));
|
|
|
adSQl.addParameter_in("sys_adspaceid", adspacerows.toArrayList("sys_adspaceid"));
|
|
|
RowsMap admap = dbConnect.runSqlQuery(adSQl.getSQL()).toRowsMap("sys_adspaceid");
|
|
|
for (Row adspacerow : adspacerows) {
|