1234567891011121314151617181920212223242526272829303132 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
- <mapper namespace="cn.cslg.pas.mapper.ReportTemplateMapper">
- <select id="getPageList" parameterType="cn.cslg.pas.common.model.vo.TemplateConditionVO" resultType="cn.cslg.pas.domain.ReportTemplate">
- select t.id, t.name, t.permissions, t.project_id, t.status, t.docpath as path, t.remark, t.create_by, t.create_time,
- u.name as create_name, tc.name as project_name
- from os_template t
- left join os_distribution u on t.create_by = u.id
- left join os_thematic tc on t.project_id = tc.id
- <where>
- (t.permissions = 2 and t.status = 1) or
- <trim prefix="(" prefixOverrides="and" suffix=")">
- <if test="params.name != null and params.name != '' ">
- and t.name like concat('%', #{params.name}, '%')
- </if>
- <if test="params.createBy != null and params.createBy != '' ">
- and u.name like concat('%', #{params.createBy}, '%')
- </if>
- <if test="params.projectId != null and params.projectId != '' ">
- and t.project_id = #{params.projectId}
- </if>
- <if test="params.permissions != null and params.permissions != '' ">
- and t.permissions = #{params.permissions}
- </if>
- <if test="params.projectName != null and params.projectName != ''">
- and tc.name like concat('%', #{params.projectName}, '%')
- </if>
- and t.status = 1
- </trim>
- </where>
- </select>
- </mapper>
|