select * from A where 1=1
${if(1 != 1,"",
" and t.CUSTOMER_NAME in (
select Decode(Dpa.CUSTOMER_NAME,'ALL' ,t.CUSTOMER_NAME,Dpa.CUSTOMER_NAME) from DWS_FL_C_CUSTOMER_AUTH Dpa
where dpa.User_Code = '"+ fine_username +"') "
)}
说明:fine_username BI用户账号;A 需要继续数据权限过滤的目标表;
DWS_FL_C_CUSTOMER_AUTH 用户权限表