pg@p>
<@p p=" and ((user_id IN(%s)" f="?">user_id@p>
<@p p=" and %s)">state@p>
<@p p=" or %s)">providerid@p>
<@p p="and (title like ?">key@p>
<@p p="or category like ?">key@p>
<@p p="or providerdepartname like ?)">key@p>
group by file.id
]]>
state@p>
<@p p="and %s">pg@p>
<@p p="and (title like ?">key@p>
<@p p="or category like ?)">key@p>
]]>
id@p>
)
]]>
id@p>
)
]]>
id@p>
)
]]>
limitation_id@p> as limitation_id,<@p p=" ? ">file_id@p> as file_id,coursename,courseid,username,usercode
from v_class_user
where <@p>courseid@p>
]]>
limitation_id@p> as limitation_id,<@p p=" ? ">file_id@p> as file_id,classname,classid,username,usercode
from (SELECT
`et_train_pd_cc`.`id` AS `classid`,
`et_train_pd_cc`.`bjmc` AS `classname`,
`et_train_pd_cc`.`kcmcid` AS `courseid`,
`et_train_pd_cc`.`kcmc` AS `coursename`,
`et_train_pd_cc_user`.`usercode` AS `usercode`,
`et_train_pd_cc_user`.`username` AS `username`,
`et_train_pd_cc_user`.`groupid` AS `userdeptid`,
`et_train_pd_cc_user`.`groupname` AS `userdeptname`
FROM
( `et_train_pd_cc` LEFT JOIN `et_train_pd_cc_user` ON ( ( `et_train_pd_cc`.`id` = `et_train_pd_cc_user`.`ccid` ) ) )
where 1=1
<@p p="AND `et_train_pd_cc`.`id` = ?">classid@p>
)a
]]>
pg@p>
<@p p=" and %s ">providerid@p>
or id in
(select a.file_id from et_resource_limitation a left join et_resource_limitation_class b on a.id = b.limitation_id where 1=1 <@p p="AND b.class_person_id = ?">class_person_id@p>)
or id in
(select a.file_id from et_resource_limitation a left join et_resource_limitation_course b on a.id = b.limitation_id where 1=1 <@p p="AND b.course_person_id = ?">course_person_id@p>)
<@p p="and (title like ?">key@p>
<@p p="or category like ?">key@p>
<@p p="or providerdepartname like ?)">key@p>
]]>
pg@p>
<@p p=" and (%s">class_person_id@p>
<@p p=" or %s">course_person_id@p>
<@p p=" or %s)">providerid@p>
<@p p="and (title like ?">key@p>
<@p p="or category like ?">key@p>
<@p p="or providerdepartname like ?)">key@p>
group by file.id
]]>
state@p>
<@p p=" and %s ">pg@p>
<@p p=" and %s ">providerdepartid@p>
<@p p="and providerdepartid in(%s)" f="?">groupidarray@p>
<@p p="and (title like ?">key@p>
<@p p="or category like ?">key@p>
<@p p="or providerdepartname like ?)">key@p>
]]>
file_id@p>
]]>
id@p>
]]>
pg@p>
<@p p="and (title like ?">key@p>
<@p p="or category like ?">key@p>
<@p p="or providerdepartname like ?)">key@p>
]]>
id@p>
]]>
user_id@p>
]]>
ccid@p>
]]>