| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181 |
- <?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.zhongzheng.modules.activity.mapper.ActivityConfigurationMapper">
- <resultMap type="com.zhongzheng.modules.activity.domain.ActivityConfiguration" id="ActivityConfigurationResult">
- <result property="id" column="id"/>
- <result property="activityName" column="activity_name"/>
- <result property="activityType" column="activity_type"/>
- <result property="description" column="description"/>
- <result property="startTime" column="start_time"/>
- <result property="endTime" column="end_time"/>
- <result property="price" column="price"/>
- <result property="quantity" column="quantity"/>
- <result property="validityTime" column="validity_time"/>
- <result property="discount" column="discount"/>
- <result property="liveContent" column="live_content"/>
- <result property="liveAdress" column="live_adress"/>
- <result property="createTime" column="create_time"/>
- <result property="updateTime" column="update_time"/>
- <result property="status" column="status"/>
- </resultMap>
- <resultMap type="com.zhongzheng.modules.activity.vo.ActivityConfigurationVo" id="ActivityConfigurationResultVO">
- <result property="id" column="id"/>
- <result property="activityName" column="activity_name"/>
- <result property="activityType" column="activity_type"/>
- <result property="description" column="description"/>
- <result property="startTime" column="start_time"/>
- <result property="endTime" column="end_time"/>
- <result property="price" column="price"/>
- <result property="quantity" column="quantity"/>
- <result property="validityTime" column="validity_time"/>
- <result property="discount" column="discount"/>
- <result property="liveContent" column="live_content"/>
- <result property="liveAdress" column="live_adress"/>
- <result property="createTime" column="create_time"/>
- <result property="updateTime" column="update_time"/>
- <result property="status" column="status"/>
- <collection property="courses" javaType="java.util.List" resultMap="CourseResult"/>
- </resultMap>
- <resultMap type="com.zhongzheng.modules.course.domain.Course" id="CourseResult">
- <result property="courseId" column="course_id"/>
- <result property="categoryId" column="category_id"/>
- <result property="price" column="price"/>
- <result property="duration" column="duration"/>
- <result property="startTime" column="start_time"/>
- <result property="endTime" column="end_time"/>
- <result property="coverUrl" column="cover_url"/>
- <result property="introduction" column="introduction"/>
- <result property="createTime" column="create_time"/>
- <result property="updateTime" column="update_time"/>
- <result property="status" column="status"/>
- <result property="teacherIds" column="teacher_ids"/>
- <result property="courseName" column="course_name"/>
- </resultMap>
- <select id="selectConfiguraList" parameterType="com.zhongzheng.modules.activity.bo.ActivityConfigurationQueryBo" resultMap="ActivityConfigurationResultVO">
- SELECT
- c.*,
- s.*
- FROM
- activity_configuration c
- LEFT JOIN activity_configuration_course f ON c.id = f.configuration_id
- LEFT JOIN course s ON f.configuration_id = s.course_id
- WHERE 1=1
- <if test="id != null" >
- and c.id = #{id,jdbcType=INTEGER}
- </if>
- <if test="activityName != null" >
- and c.activity_name = #{activityName,jdbcType=VARCHAR}
- </if>
- <if test="activityType != null" >
- and c.activity_type = #{activityType,jdbcType=VARCHAR}
- </if>
- <if test="description != null" >
- and c.description = #{description,jdbcType=VARCHAR}
- </if>
- <if test="startTime != null" >
- and c.start_time = #{startTime,jdbcType=INTEGER}
- </if>
- <if test="endTime != null" >
- and c.end_time = #{endTime,jdbcType=INTEGER}
- </if>
- <if test="price != null" >
- and c.price = #{price,jdbcType=DECIMAL}
- </if>
- <if test="quantity != null" >
- and c.quantity = #{quantity,jdbcType=INTEGER}
- </if>
- <if test="validityTime != null" >
- and c.validity_time = #{validityTime,jdbcType=INTEGER}
- </if>
- <if test="discount != null" >
- and c.discount = #{discount,jdbcType=VARCHAR}
- </if>
- <if test="liveContent != null" >
- and c.live_content = #{liveContent,jdbcType=VARCHAR}
- </if>
- <if test="liveAdress != null" >
- and c.live_adress = #{liveAdress,jdbcType=VARCHAR}
- </if>
- <if test="createTime != null" >
- and c.create_time = #{createTime,jdbcType=INTEGER}
- </if>
- <if test="updateTime != null" >
- and c.update_time = #{updateTime,jdbcType=INTEGER}
- </if>
- <choose>
- <when test="status !=null and status != ''">
- and c.status = #{status,jdbcType=TINYINT}
- </when>
- <otherwise>
- and c.status != 0
- </otherwise>
- </choose>
- </select>
- <select id="selectConfigures" parameterType="java.lang.Long" resultMap="ActivityConfigurationResultVO">
- SELECT
- c.*,
- s.*
- FROM
- activity_configuration c
- LEFT JOIN activity_configuration_course f ON c.id = f.configuration_id
- LEFT JOIN course s ON f.configuration_id = s.course_id
- WHERE 1=1
- <if test="id != null" >
- and c.id = #{id,jdbcType=INTEGER}
- </if>
- <if test="activityName != null" >
- and c.activity_name = #{activityName,jdbcType=VARCHAR}
- </if>
- <if test="activityType != null" >
- and c.activity_type = #{activityType,jdbcType=VARCHAR}
- </if>
- <if test="description != null" >
- and c.description = #{description,jdbcType=VARCHAR}
- </if>
- <if test="startTime != null" >
- and c.start_time = #{startTime,jdbcType=INTEGER}
- </if>
- <if test="endTime != null" >
- and c.end_time = #{endTime,jdbcType=INTEGER}
- </if>
- <if test="price != null" >
- and c.price = #{price,jdbcType=DECIMAL}
- </if>
- <if test="quantity != null" >
- and c.quantity = #{quantity,jdbcType=INTEGER}
- </if>
- <if test="validityTime != null" >
- and c.validity_time = #{validityTime,jdbcType=INTEGER}
- </if>
- <if test="discount != null" >
- and c.discount = #{discount,jdbcType=VARCHAR}
- </if>
- <if test="liveContent != null" >
- and c.live_content = #{liveContent,jdbcType=VARCHAR}
- </if>
- <if test="liveAdress != null" >
- and c.live_adress = #{liveAdress,jdbcType=VARCHAR}
- </if>
- <if test="createTime != null" >
- and c.create_time = #{createTime,jdbcType=INTEGER}
- </if>
- <if test="updateTime != null" >
- and c.update_time = #{updateTime,jdbcType=INTEGER}
- </if>
- <choose>
- <when test="status !=null and status != ''">
- and c.status = #{status,jdbcType=TINYINT}
- </when>
- <otherwise>
- and c.status != 0
- </otherwise>
- </choose>
- </select>
- </mapper>
|