我要把这句话写入iBatis,domain和xml文件要怎么写。我现在是要给系统添加一个报表统计的功能,user_region是需要前台提交的数据。其中sql语句中涉及的四张表都有独立的domain对象在其他的包下面,有大神能帮我解决一下吗
select t.user_region,t.ENTERPRISE_NAME, count(t.user_phone),count(s.phone_number) from (
select distinct b.user_region,a.ENTERPRISE_NAME, d.user_phone
from t_rc_enterprise_info a,t_rc_sys_user b,t_rc_meeting_info c,t_rc_meeting_user d
where a.ENTERPRISE_ACCOUNT= b.user_id and b.user_id= c.user_id and c.meeting_id= d.meeting_id and b.user_region='温州') t left join
(select distinct phone_number from rc_statistics_db.t_rc_client_login) s on t.user_phone = s.phone_number
group by t.user_region,t.ENTERPRISE_NAME