select * from db_platform_report.ads_kfc_service_dim_kfc_bsc_dp_user_day where 1=1 ${if(orgLevel='BGM', "", if(orgLevel='RVP', "and rvp_dept_id='"+deptId+"'", if(orgLevel='MM', "and mm_dept_id='"+deptId+"'", if(orgLevel='OM', "and om_dept_id='"+deptId+"'", if(orgLevel='DM', "and dm_dept_id='"+deptId+"'", if(orgLevel='AM', "and am_dept_id='"+deptId+"'", if(orgLevel='RGM', "and rgm_dept_id ='"+deptId+"'","" )))))))} |