如题,一个报表中涉及到多个人员查看,但是A账号只允许看到A的数据,B账号只允许看到B的数据。
如何能实现?
$fine_username
权限细粒度控制-https://help.fanruan.com/finereport/doc-view-861.html
查询条件可以写 where 人员名称 = '${fine_username}'
select * from 表名称
where 1=1
and myuser='${fine_username}'
类似这样
SELECT * FROM TABLE WHERE 1=1 ${SWITCH(fine_username,"A账号"," AND A账号的权限","B账号"," AND B账号的权限","C账号"," AND C账号的权限")}