<?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.ruoyi.study.mapper.TStoryMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="BaseResultMap" type="com.ruoyi.study.domain.TStory">
|
<id column="id" property="id" />
|
<result column="name" property="name" />
|
<result column="english" property="english" />
|
<result column="type" property="type" />
|
<result column="state" property="state" />
|
<result column="img" property="img" />
|
<result column="right" property="right" />
|
<result column="error" property="error" />
|
</resultMap>
|
|
<!-- 通用查询结果列 -->
|
<sql id="Base_Column_List">
|
id, name, english, type, state, img, right, error
|
</sql>
|
<select id="listAll" resultType="com.ruoyi.study.vo.SubjectVO">
|
select *
|
from t_story
|
where 1=1 and `state`!=3
|
<if test="req.name != null and req.name != ''">
|
and `name` like concat('%',#{req.name},'%')
|
</if>
|
<if test="req.english != null and req.english != ''">
|
and english like concat('%',#{req.english},'%')
|
</if>
|
<if test="req.state != null">
|
and `state` = #{req.state}
|
</if>
|
<if test="req.type != null and req.type != ''">
|
and `type` like concat('%',#{req.type},'%')
|
</if>
|
<if test="null != req.ids and req.ids.size()>0" >
|
and firstCategory in
|
<foreach collection="req.ids" close=")" open="(" item="item" separator=",">
|
#{item}
|
</foreach>
|
</if>
|
and disabled=0
|
order by createTime desc
|
</select>
|
|
</mapper>
|