Metrics
0
Watch 2.9K Star 6.1K Fork 3K

ThinkGem / JeeSite 4.xJavaAGPL-3.0

数据权限的多数据源问题

Open
丁军杰  Created at

该问题是怎么引起的?

业务表和系统表分为两个数据源,在对数据权限进行控制时,导致需要对系统表进行查询的数据源没切换过去,请问这个怎么解决

重现步骤

报错信息

Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'kuaidian-tv-cms-data.js_sys_user_data_scope' doesn't exist

The error may exist in com/jeesite/modules/program/dao/ProgramDao.java (best guess)

The error may involve com.jeesite.modules.program.dao.ProgramDao.findList-Inline

The error occurred while setting parameters

Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'kuaidian-tv-cms-data.js_sys_user_data_scope' doesn't exist

; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'kuaidian-tv-cms-data.js_sys_user_data_scope' doesn't exist] with root cause

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'kuaidian-tv-cms-data.js_sys_user_data_scope' doesn't exist

total 1 participants

Comments (1)

丁军杰 2019-09-09 11:31
public void addDataScopeFilter(Program program){
	program.getSqlMap().getDataScope().addFilter("dsf", "Company",
			"a.company_code", DataScope.CTRL_PERMI_HAVE);
}

Sign in and comment

Assignee
Labels
Not set
Project
Milestone
Branch
Scheduled start
Not set
Scheduled end
Not set
Top level
Priority

Help Search