| 123456789101112131415161718192021222324252627282930313233343536 |
- <?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="com.fdkankan.jp.xspace.mapper.ISceneXspaceMapper">
- <select id="pageXspace" resultType="com.fdkankan.jp.xspace.vo.XspaceVO" parameterType="com.fdkankan.jp.xspace.dto.XspacePageDTO">
- SELECT sx.id, p.`title`,sx.`num`,sx.`serial`,u2.`nick_name` as creator ,sx.`create_time`,sx.`update_time`,sx.`status`
- FROM t_scene_xspace sx
- LEFT JOIN t_scene_plus p ON sx.`num` = p.`num`
- LEFT JOIN t_user u ON sx.`user_id` = u.`id`
- left join t_user u2 on sx.creator = u2.id
- WHERE sx.`rec_status` = 'A'
- <if test="param.userId != null">
- AND sx.`user_id` = #{param.userId}
- </if>
- <if test="param.companyId != null">
- AND u.`company_id` = #{param.companyId}
- </if>
- <if test="param.title != null and param.title != ''">
- AND p.`title` LIKE concat('%', #{param.title}, '%')
- </if>
- <if test="param.creator != null and param.creator != ''">
- AND u2.`nick_name` LIKE concat('%', #{param.creator}, '%')
- </if>
- <if test="param.timeStart != null">
- AND sx.`create_time` >= #{param.timeStart}
- </if>
- <if test="param.timeEnd != null">
- AND sx.`create_time` <![CDATA[ <= ]]> #{param.timeEnd}
- </if>
- <if test="param.status != null">
- AND sx.`status` = #{param.status}
- </if>
- order by sx.id desc
- </select>
- </mapper>
|