| | |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.dsh.course.entity.TCourse"> |
| | | <id column="id" property="id" /> |
| | | <result column="name" property="name" /> |
| | | <result column="type" property="type" /> |
| | | <result column="introduce" property="introduce" /> |
| | | <result column="coverDrawing" property="coverDrawing" /> |
| | | <result column="introductionDrawing" property="introductionDrawing" /> |
| | | <result column="courseVideo" property="courseVideo" /> |
| | | <result column="state" property="state" /> |
| | | <result column="insertTime" property="insertTime" /> |
| | | <id column="id" property="id"/> |
| | | <result column="name" property="name"/> |
| | | <result column="type" property="type"/> |
| | | <result column="introduce" property="introduce"/> |
| | | <result column="coverDrawing" property="coverDrawing"/> |
| | | <result column="introductionDrawing" property="introductionDrawing"/> |
| | | <result column="courseVideo" property="courseVideo"/> |
| | | <result column="state" property="state"/> |
| | | <result column="insertTime" property="insertTime"/> |
| | | </resultMap> |
| | | <update id="changeState"> |
| | | update t_course set |
| | | state = #{state} |
| | | <where> |
| | | <if test="ids != null and ids.size()>0"> |
| | | AND t_course.id IN |
| | | <foreach collection="ids" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | update t_course set |
| | | state = #{state} |
| | | <where> |
| | | <if test="ids != null and ids.size()>0"> |
| | | AND t_course.id IN |
| | | <foreach collection="ids" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </update> |
| | | |
| | | <select id="queryCourseList" resultType="map"> |
| | |
| | | </select> |
| | | |
| | | <select id="getCourseByCourseIds" resultType="com.dsh.course.model.vo.TQueryBenefitsVideosVO"> |
| | | select * from t_course |
| | | <where> |
| | | <if test="query.name != null and query.name != ''"> |
| | | AND t_course.name LIKE concat('%',#{query.name},'%') |
| | | </if> |
| | | <if test="query.type != null and query.type != '' "> |
| | | AND t_course.type = #{query.type} |
| | | </if> |
| | | <if test="query.state != null and query.state != '' "> |
| | | AND t_course.state = #{query.state} |
| | | </if> |
| | | <if test="query.coursIds != null and query.coursIds.size()>0"> |
| | | AND t_course.id IN |
| | | <foreach collection="query.coursIds" separator="," item="coursId" open="(" close=")"> |
| | | #{coursId} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | select * from t_course |
| | | <where> |
| | | <if test="query.name != null and query.name != ''"> |
| | | AND t_course.name LIKE concat('%',#{query.name},'%') |
| | | </if> |
| | | <if test="query.type != null and query.type != '' "> |
| | | AND t_course.type = #{query.type} |
| | | </if> |
| | | <if test="query.state != null and query.state != '' "> |
| | | AND t_course.state = #{query.state} |
| | | </if> |
| | | <if test="query.coursIds != null and query.coursIds.size()>0"> |
| | | AND t_course.id IN |
| | | <foreach collection="query.coursIds" separator="," item="coursId" open="(" close=")"> |
| | | #{coursId} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |