|
|
@@ -13,8 +13,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<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"/>
|
|
|
@@ -55,6 +53,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="courseName" column="course_name"/>
|
|
|
</resultMap>
|
|
|
|
|
|
+ <resultMap type="com.zhongzheng.modules.course.vo.CourseConfigurationVo" id="CourseResultConfiguration">
|
|
|
+ <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="status" column="status"/>
|
|
|
+ <result property="teacherIds" column="teacher_ids"/>
|
|
|
+ <result property="courseName" column="course_name"/>
|
|
|
+ <result property="useStatus" column="useStatus"/>
|
|
|
+ <association property="activityConfigurationVo" javaType="com.zhongzheng.modules.activity.vo.ActivityConfigurationVo" >
|
|
|
+ <result property="id" column="sid"/>
|
|
|
+ <result property="activityName" column="sactivity_name"/>
|
|
|
+ <result property="activityType" column="sactivity_type"/>
|
|
|
+ <result property="description" column="sdescription"/>
|
|
|
+ <result property="startTime" column="sstart_time"/>
|
|
|
+ <result property="endTime" column="send_time"/>
|
|
|
+ <result property="price" column="sprice"/>
|
|
|
+ <result property="quantity" column="squantity"/>
|
|
|
+ <result property="liveContent" column="slive_content"/>
|
|
|
+ <result property="liveAdress" column="slive_adress"/>
|
|
|
+ <result property="createTime" column="screate_time"/>
|
|
|
+ <result property="updateTime" column="supdate_time"/>
|
|
|
+ <result property="status" column="sstatus"/>
|
|
|
+ <result property="couponEnd" column="scoupon_end"/>
|
|
|
+ </association>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
<select id="selectConfiguraList" parameterType="com.zhongzheng.modules.activity.bo.ActivityConfigurationQueryBo" resultMap="ActivityConfigurationResultVO">
|
|
|
SELECT
|
|
|
c.*,
|
|
|
@@ -108,6 +137,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
and c.status != 0
|
|
|
</otherwise>
|
|
|
</choose>
|
|
|
+ order by c.update_time desc
|
|
|
</select>
|
|
|
|
|
|
<select id="selectConfigures" parameterType="java.lang.Long" resultMap="ActivityConfigurationResultVO">
|
|
|
@@ -121,4 +151,69 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
WHERE 1=1
|
|
|
and c.id = #{id,jdbcType=INTEGER}
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="selectConfiguraIssueList" parameterType="com.zhongzheng.modules.activity.bo.ActivityConfigurationQueryBo" resultMap="CourseResultConfiguration">
|
|
|
+ SELECT
|
|
|
+ s.*,
|
|
|
+ c.id as sid,
|
|
|
+ c.activity_name as sactivity_name,
|
|
|
+ c.activity_type as sactivity_type,
|
|
|
+ c.description as sdescription,
|
|
|
+ c.start_time as sstart_time,
|
|
|
+ c.end_time as send_time,
|
|
|
+ c.price as sprice,
|
|
|
+ c.quantity as squantity,
|
|
|
+ c.live_content as slive_content,
|
|
|
+ c.live_adress as slive_adress,
|
|
|
+ c.create_time as screate_time,
|
|
|
+ c.update_time as supdate_time,
|
|
|
+ c.status as sstatus,
|
|
|
+ c.coupon_end as scoupon_end,
|
|
|
+ <if test="userId != null and userId != ''" >
|
|
|
+ ( CASE WHEN ( SELECT COUNT( user_id ) FROM activity_configuration_use WHERE 1 = 1 AND user_id = #{userId} ) = 1 THEN 'yes' ELSE 'no' END ) AS useStatus
|
|
|
+ </if>
|
|
|
+ FROM
|
|
|
+ activity_configuration c
|
|
|
+ LEFT JOIN activity_configuration_course f ON c.id = f.configuration_id
|
|
|
+ LEFT JOIN course s ON f.course_id = s.course_id
|
|
|
+ WHERE 1=1
|
|
|
+ and c.status = 3
|
|
|
+ <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="typeIds != null">
|
|
|
+ and c.activity_type in
|
|
|
+ <foreach collection="typeIds" open="(" separator="," close=")" item="TypeId">
|
|
|
+ #{TypeId}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="description != null" >
|
|
|
+ and c.description = #{description,jdbcType=VARCHAR}
|
|
|
+ </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="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>
|
|
|
+ <if test="startTime != null and startTime != ''">
|
|
|
+ AND #{startTime} BETWEEN c.start_time AND c.end_time
|
|
|
+ </if>
|
|
|
+ order by c.update_time desc
|
|
|
+ </select>
|
|
|
</mapper>
|