| | |
| | | left join sys_user t2 on t1.user_id = t2.user_id |
| | | left join t_template t3 on t1.template_id = t3.id |
| | | where 1=1 |
| | | and t1.`disabled` = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | and t1.`disabled` = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} and t3.id is not null |
| | | <if test="query.templateIds != null and query.templateIds.size()>0"> |
| | | AND t1.template_id IN |
| | | <foreach collection="query.templateIds" separator="," item="id" open="(" close=")"> |
| | |
| | | <foreach collection="query.patrolInspectorIds" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="query.templateName != null and query.templateName != ''"> |
| | | AND t3.template_name like concat('%',#{query.templateName},'%') |
| | | </if> |
| | | <if test="query.nickName != null and query.nickName != ''"> |
| | | AND t2.nick_name like concat('%',#{query.nickName},'%') |
| | | </if> |
| | | |
| | | group by t1.user_id,t1.template_id |
| | |
| | | left join sys_user t2 on t1.user_id = t2.user_id |
| | | left join t_template t3 on t1.template_id = t3.id |
| | | where 1=1 |
| | | and t1.`disabled` = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | and t1.`disabled` = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} and t3.id is not null |
| | | <if test="query.templateIds != null and query.templateIds.size()>0"> |
| | | AND t1.template_id IN |
| | | <foreach collection="query.templateIds" separator="," item="id" open="(" close=")"> |
| | |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="query.templateName != null and query.templateName != ''"> |
| | | AND t3.template_name like concat('%',#{query.templateName},'%') |
| | | </if> |
| | | <if test="query.nickName != null and query.nickName != ''"> |
| | | AND t2.nick_name like concat('%',#{query.nickName},'%') |
| | | </if> |
| | | |
| | | group by t1.user_id,t1.template_id |
| | | </select> |